| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.android_webview; | 5 package org.chromium.android_webview; |
| 6 | 6 |
| 7 import android.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
| 8 import android.net.http.SslCertificate; | 8 import android.net.http.SslCertificate; |
| 9 import android.os.AsyncTask; | 9 import android.os.AsyncTask; |
| 10 import android.os.Handler; | 10 import android.os.Handler; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 private class IoThreadClientHandler extends Handler { | 74 private class IoThreadClientHandler extends Handler { |
| 75 public static final int MSG_SHOULD_INTERCEPT_REQUEST = 1; | 75 public static final int MSG_SHOULD_INTERCEPT_REQUEST = 1; |
| 76 | 76 |
| 77 @Override | 77 @Override |
| 78 public void handleMessage(Message msg) { | 78 public void handleMessage(Message msg) { |
| 79 switch(msg.what) { | 79 switch(msg.what) { |
| 80 case MSG_SHOULD_INTERCEPT_REQUEST: | 80 case MSG_SHOULD_INTERCEPT_REQUEST: |
| 81 final String url = (String)msg.obj; | 81 final String url = (String)msg.obj; |
| 82 AwContents.this.mContentsClient.onLoadResource(url); | 82 AwContents.this.mContentsClient.onLoadResource(url); |
| 83 break; | 83 break; |
| 84 default: |
| 85 throw new IllegalStateException( |
| 86 "IoThreadClientHandler: unhandled message " + msg.wh
at); |
| 84 } | 87 } |
| 85 } | 88 } |
| 86 } | 89 } |
| 87 | 90 |
| 88 private class IoThreadClientImpl implements AwContentsIoThreadClient { | 91 private class IoThreadClientImpl implements AwContentsIoThreadClient { |
| 89 // Called on the IO thread. | 92 // Called on the IO thread. |
| 90 @Override | 93 @Override |
| 91 public InterceptedRequestData shouldInterceptRequest(final String url) { | 94 public InterceptedRequestData shouldInterceptRequest(final String url) { |
| 92 InterceptedRequestData interceptedRequestData = | 95 InterceptedRequestData interceptedRequestData = |
| 93 AwContents.this.mContentsClient.shouldInterceptRequest(url); | 96 AwContents.this.mContentsClient.shouldInterceptRequest(url); |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent
s, | 462 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent
s, |
| 460 InterceptNavigationDelegate navigationInterceptionDelegate); | 463 InterceptNavigationDelegate navigationInterceptionDelegate); |
| 461 | 464 |
| 462 private native int nativeFindAllSync(int nativeAwContents, String searchStri
ng); | 465 private native int nativeFindAllSync(int nativeAwContents, String searchStri
ng); |
| 463 private native void nativeFindAllAsync(int nativeAwContents, String searchSt
ring); | 466 private native void nativeFindAllAsync(int nativeAwContents, String searchSt
ring); |
| 464 private native void nativeFindNext(int nativeAwContents, boolean forward); | 467 private native void nativeFindNext(int nativeAwContents, boolean forward); |
| 465 private native void nativeClearMatches(int nativeAwContents); | 468 private native void nativeClearMatches(int nativeAwContents); |
| 466 private native void nativeClearCache(int nativeAwContents, boolean includeDi
skFiles); | 469 private native void nativeClearCache(int nativeAwContents, boolean includeDi
skFiles); |
| 467 private native byte[] nativeGetCertificate(int nativeAwContents); | 470 private native byte[] nativeGetCertificate(int nativeAwContents); |
| 468 } | 471 } |
| OLD | NEW |