public class XWalkResourceClient
extends XWalkResourceClientInternal
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR_AUTHENTICATION
User authentication failed on server
|
static int |
ERROR_BAD_URL
Malformed URL
|
static int |
ERROR_CONNECT
Failed to connect to the server
|
static int |
ERROR_FAILED_SSL_HANDSHAKE
Failed to perform SSL handshake
|
static int |
ERROR_FILE
Generic file error
|
static int |
ERROR_FILE_NOT_FOUND
File not found
|
static int |
ERROR_HOST_LOOKUP
Server or proxy hostname lookup failed
|
static int |
ERROR_IO
Failed to read or write to the server
|
static int |
ERROR_OK
Success
|
static int |
ERROR_PROXY_AUTHENTICATION
User authentication failed on proxy
|
static int |
ERROR_REDIRECT_LOOP
Too many redirects
|
static int |
ERROR_TIMEOUT
Connection timed out
|
static int |
ERROR_TOO_MANY_REQUESTS
Too many requests during this load
|
static int |
ERROR_UNKNOWN
Generic error
|
static int |
ERROR_UNSUPPORTED_AUTH_SCHEME
Unsupported authentication scheme (not basic or digest)
|
static int |
ERROR_UNSUPPORTED_SCHEME
Unsupported URI scheme
|
| Constructor and Description |
|---|
XWalkResourceClient(XWalkView view)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onLoadFinished(XWalkViewInternal view,
java.lang.String url) |
void |
onLoadFinished(XWalkView view,
java.lang.String url)
Notify the client that the XWalkView completes to load the resource
specified by the given url.
|
void |
onLoadStarted(XWalkViewInternal view,
java.lang.String url) |
void |
onLoadStarted(XWalkView view,
java.lang.String url)
Notify the client that the XWalkView will load the resource specified
by the given url.
|
void |
onProgressChanged(XWalkView view,
int progressInPercent)
Notify the client the progress info of loading a specific url.
|
void |
onProgressChanged(XWalkViewInternal view,
int progressInPercent) |
void |
onReceivedLoadError(XWalkViewInternal view,
int errorCode,
java.lang.String description,
java.lang.String failingUrl) |
void |
onReceivedLoadError(XWalkView view,
int errorCode,
java.lang.String description,
java.lang.String failingUrl)
Report an error to the client.
|
WebResourceResponse |
shouldInterceptLoadRequest(XWalkViewInternal view,
java.lang.String url) |
WebResourceResponse |
shouldInterceptLoadRequest(XWalkView view,
java.lang.String url)
Notify the client of a resource request and allow the client to return
the data.
|
boolean |
shouldOverrideUrlLoading(XWalkViewInternal view,
java.lang.String url) |
boolean |
shouldOverrideUrlLoading(XWalkView view,
java.lang.String url)
Give the host application a chance to take over the control when a new
url is about to be loaded in the current XWalkView.
|
public static final int ERROR_OK
public static final int ERROR_UNKNOWN
public static final int ERROR_HOST_LOOKUP
public static final int ERROR_UNSUPPORTED_AUTH_SCHEME
public static final int ERROR_AUTHENTICATION
public static final int ERROR_PROXY_AUTHENTICATION
public static final int ERROR_CONNECT
public static final int ERROR_IO
public static final int ERROR_TIMEOUT
public static final int ERROR_REDIRECT_LOOP
public static final int ERROR_UNSUPPORTED_SCHEME
public static final int ERROR_FAILED_SSL_HANDSHAKE
public static final int ERROR_BAD_URL
public static final int ERROR_FILE
public static final int ERROR_FILE_NOT_FOUND
public static final int ERROR_TOO_MANY_REQUESTS
public XWalkResourceClient(XWalkView view)
view - the owner XWalkView instance.public void onLoadStarted(XWalkView view, java.lang.String url)
view - the owner XWalkView instance.url - the url for the resource to be loaded.public void onLoadStarted(XWalkViewInternal view,
java.lang.String url)
public void onLoadFinished(XWalkView view, java.lang.String url)
view - the owner XWalkView instance.url - the url for the resource done for loading.public void onLoadFinished(XWalkViewInternal view,
java.lang.String url)
public void onProgressChanged(XWalkView view, int progressInPercent)
view - the owner XWalkView instance.progressInPercent - the loading process in percent.public void onProgressChanged(XWalkViewInternal view,
int progressInPercent)
public WebResourceResponse shouldInterceptLoadRequest(XWalkView view, java.lang.String url)
view - The XWalkView that is requesting the
resource.url - The raw url of the resource.android.webkit.WebResourceResponse containing the
response information or null if the XWalkView should load the
resource itself.public WebResourceResponse shouldInterceptLoadRequest(XWalkViewInternal view,
java.lang.String url)
public void onReceivedLoadError(XWalkView view, int errorCode, java.lang.String description, java.lang.String failingUrl)
view - the owner XWalkView instance.errorCode - the error id.description - A String describing the error.failingUrl - The url that failed to load.public void onReceivedLoadError(XWalkViewInternal view,
int errorCode,
java.lang.String description,
java.lang.String failingUrl)
public boolean shouldOverrideUrlLoading(XWalkView view, java.lang.String url)
view - The XWalkView that is initiating the callback.url - The url to be loaded.public boolean shouldOverrideUrlLoading(XWalkViewInternal view,
java.lang.String url)