Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core / src / org / xwalk / core / XWalkContentsClientCallbackHelper.java
index bd2f44c..89b4ca4 100644 (file)
@@ -71,6 +71,7 @@ class XWalkContentsClientCallbackHelper {
     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 static int MSG_ON_RESOURCE_LOAD_STARTED = 6;
 
     private final XWalkContentsClient mContentsClient;
 
@@ -105,6 +106,11 @@ class XWalkContentsClientCallbackHelper {
                             info.mFailingUrl);
                     break;
                 }
+                case MSG_ON_RESOURCE_LOAD_STARTED: {
+                    final String url = (String) msg.obj;
+                    mContentsClient.onResourceLoadStarted(url);
+                    break;
+                }
                 default:
                     throw new IllegalStateException(
                             "XWalkContentsClientCallbackHelper: unhandled message " + msg.what);
@@ -140,4 +146,8 @@ class XWalkContentsClientCallbackHelper {
         OnReceivedErrorInfo info = new OnReceivedErrorInfo(errorCode, description, failingUrl);
         mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RECEIVED_ERROR, info));
     }
+
+    public void postOnResourceLoadStarted(String url) {
+        mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RESOURCE_LOAD_STARTED, url));
+    }
 }