| Index: android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
|
| index 84ce826022c1571186752e474fcc3b68503adee5..8dbd5713ff455849fe039acaf25f384781623a24 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
|
| @@ -53,10 +53,23 @@ class AwContentsClientCallbackHelper {
|
| }
|
| }
|
|
|
| + private static class OnReceivedErrorInfo {
|
| + final int mErrorCode;
|
| + final String mDescription;
|
| + final String mFailingUrl;
|
| +
|
| + OnReceivedErrorInfo(int errorCode, String description, String failingUrl) {
|
| + mErrorCode = errorCode;
|
| + mDescription = description;
|
| + mFailingUrl = failingUrl;
|
| + }
|
| + }
|
| +
|
| private final static int MSG_ON_LOAD_RESOURCE = 1;
|
| private final static int MSG_ON_PAGE_STARTED = 2;
|
| private final static int MSG_ON_DOWNLOAD_START = 3;
|
| private final static int MSG_ON_RECEIVED_LOGIN_REQUEST = 4;
|
| + private final static int MSG_ON_RECEIVED_ERROR = 5;
|
|
|
| private final AwContentsClient mContentsClient;
|
|
|
| @@ -85,6 +98,12 @@ class AwContentsClientCallbackHelper {
|
| mContentsClient.onReceivedLoginRequest(info.mRealm, info.mAccount, info.mArgs);
|
| break;
|
| }
|
| + case MSG_ON_RECEIVED_ERROR: {
|
| + OnReceivedErrorInfo info = (OnReceivedErrorInfo) msg.obj;
|
| + mContentsClient.onReceivedError(info.mErrorCode, info.mDescription,
|
| + info.mFailingUrl);
|
| + break;
|
| + }
|
| default:
|
| throw new IllegalStateException(
|
| "AwContentsClientCallbackHelper: unhandled message " + msg.what);
|
| @@ -115,4 +134,9 @@ class AwContentsClientCallbackHelper {
|
| LoginRequestInfo info = new LoginRequestInfo(realm, account, args);
|
| mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RECEIVED_LOGIN_REQUEST, info));
|
| }
|
| +
|
| + public void postOnReceivedError(int errorCode, String description, String failingUrl) {
|
| + OnReceivedErrorInfo info = new OnReceivedErrorInfo(errorCode, description, failingUrl);
|
| + mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RECEIVED_ERROR, info));
|
| + }
|
| }
|
|
|