public class SystemWebViewClient
extends android.webkit.WebViewClient
Modifier and Type | Field and Description |
---|---|
protected SystemWebViewEngine |
parentEngine |
ERROR_AUTHENTICATION, ERROR_BAD_URL, ERROR_CONNECT, ERROR_FAILED_SSL_HANDSHAKE, ERROR_FILE, ERROR_FILE_NOT_FOUND, ERROR_HOST_LOOKUP, ERROR_IO, ERROR_PROXY_AUTHENTICATION, ERROR_REDIRECT_LOOP, ERROR_TIMEOUT, ERROR_TOO_MANY_REQUESTS, ERROR_UNKNOWN, ERROR_UNSUPPORTED_AUTH_SCHEME, ERROR_UNSUPPORTED_SCHEME
Constructor and Description |
---|
SystemWebViewClient(SystemWebViewEngine parentEngine) |
Modifier and Type | Method and Description |
---|---|
void |
clearAuthenticationTokens()
Clear all authentication tokens.
|
AuthenticationToken |
getAuthenticationToken(java.lang.String host,
java.lang.String realm)
Gets the authentication token.
|
void |
onPageFinished(android.webkit.WebView view,
java.lang.String url)
Notify the host application that a page has finished loading.
|
void |
onPageStarted(android.webkit.WebView view,
java.lang.String url,
android.graphics.Bitmap favicon)
Notify the host application that a page has started loading.
|
void |
onReceivedClientCertRequest(android.webkit.WebView view,
android.webkit.ClientCertRequest request)
On received client cert request.
|
void |
onReceivedError(android.webkit.WebView view,
int errorCode,
java.lang.String description,
java.lang.String failingUrl)
Report an error to the host application.
|
void |
onReceivedHttpAuthRequest(android.webkit.WebView view,
android.webkit.HttpAuthHandler handler,
java.lang.String host,
java.lang.String realm)
On received http auth request.
|
void |
onReceivedSslError(android.webkit.WebView view,
android.webkit.SslErrorHandler handler,
android.net.http.SslError error)
Notify the host application that an SSL error occurred while loading a resource.
|
AuthenticationToken |
removeAuthenticationToken(java.lang.String host,
java.lang.String realm)
Removes the authentication token.
|
void |
setAuthenticationToken(AuthenticationToken authenticationToken,
java.lang.String host,
java.lang.String realm)
Sets the authentication token.
|
android.webkit.WebResourceResponse |
shouldInterceptRequest(android.webkit.WebView view,
java.lang.String url) |
boolean |
shouldOverrideUrlLoading(android.webkit.WebView 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 WebView.
|
doUpdateVisitedHistory, onFormResubmission, onLoadResource, onPageCommitVisible, onReceivedError, onReceivedHttpError, onReceivedLoginRequest, onScaleChanged, onTooManyRedirects, onUnhandledKeyEvent, shouldInterceptRequest, shouldOverrideKeyEvent, shouldOverrideUrlLoading
protected final SystemWebViewEngine parentEngine
public SystemWebViewClient(SystemWebViewEngine parentEngine)
public boolean shouldOverrideUrlLoading(android.webkit.WebView view, java.lang.String url)
shouldOverrideUrlLoading
in class android.webkit.WebViewClient
view
- The WebView that is initiating the callback.url
- The url to be loaded.public void onReceivedHttpAuthRequest(android.webkit.WebView view, android.webkit.HttpAuthHandler handler, java.lang.String host, java.lang.String realm)
onReceivedHttpAuthRequest
in class android.webkit.WebViewClient
public void onReceivedClientCertRequest(android.webkit.WebView view, android.webkit.ClientCertRequest request)
onReceivedClientCertRequest
in class android.webkit.WebViewClient
view
- request
- public void onPageStarted(android.webkit.WebView view, java.lang.String url, android.graphics.Bitmap favicon)
onPageStarted
in class android.webkit.WebViewClient
view
- The webview initiating the callback.url
- The url of the page.public void onPageFinished(android.webkit.WebView view, java.lang.String url)
onPageFinished
in class android.webkit.WebViewClient
view
- The webview initiating the callback.url
- The url of the page.public void onReceivedError(android.webkit.WebView view, int errorCode, java.lang.String description, java.lang.String failingUrl)
onReceivedError
in class android.webkit.WebViewClient
view
- The WebView that is initiating the callback.errorCode
- The error code corresponding to an ERROR_* value.description
- A String describing the error.failingUrl
- The url that failed to load.public void onReceivedSslError(android.webkit.WebView view, android.webkit.SslErrorHandler handler, android.net.http.SslError error)
onReceivedSslError
in class android.webkit.WebViewClient
view
- The WebView that is initiating the callback.handler
- An SslErrorHandler object that will handle the user's response.error
- The SSL error object.public void setAuthenticationToken(AuthenticationToken authenticationToken, java.lang.String host, java.lang.String realm)
authenticationToken
- host
- realm
- public AuthenticationToken removeAuthenticationToken(java.lang.String host, java.lang.String realm)
host
- realm
- public AuthenticationToken getAuthenticationToken(java.lang.String host, java.lang.String realm)
host
- realm
- public void clearAuthenticationTokens()
public android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebView view, java.lang.String url)
shouldInterceptRequest
in class android.webkit.WebViewClient