summaryrefslogtreecommitdiffstats
path: root/android_webview/native/aw_contents_io_thread_client_impl.h
diff options
context:
space:
mode:
authorMikhail Naganov <mnaganov@chromium.org>2015-10-01 14:38:27 -0700
committerMikhail Naganov <mnaganov@chromium.org>2015-10-01 21:40:41 +0000
commit0f79c573df3eeebd91bb056686bbade31a6aa5fd (patch)
tree499648b397036ae3d2195d4c8028da50b736732c /android_webview/native/aw_contents_io_thread_client_impl.h
parent342e9a9e890a316cee81da8017bf22b1dca4ea74 (diff)
downloadchromium_src-0f79c573df3eeebd91bb056686bbade31a6aa5fd.zip
chromium_src-0f79c573df3eeebd91bb056686bbade31a6aa5fd.tar.gz
chromium_src-0f79c573df3eeebd91bb056686bbade31a6aa5fd.tar.bz2
[Android WebView] Call shouldInterceptRequest on a background thread
Move the call to WebViewClient.shouldInterceptRequest from IO thread to a background thread. This is in order to avoid situations when embedder's code blocks inside shouldInterceptRequest callback, and this effectively shuts down IPC messages processing. BUG=533082 R=boliu@chromium.org, mmenke@chromium.org Review URL: https://codereview.chromium.org/1350553005 . Cr-Commit-Position: refs/heads/master@{#351894}
Diffstat (limited to 'android_webview/native/aw_contents_io_thread_client_impl.h')
-rw-r--r--android_webview/native/aw_contents_io_thread_client_impl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.h b/android_webview/native/aw_contents_io_thread_client_impl.h
index 97ba314..01d8747b 100644
--- a/android_webview/native/aw_contents_io_thread_client_impl.h
+++ b/android_webview/native/aw_contents_io_thread_client_impl.h
@@ -47,8 +47,9 @@ class AwContentsIoThreadClientImpl : public AwContentsIoThreadClient {
// Implementation of AwContentsIoThreadClient.
bool PendingAssociation() const override;
CacheMode GetCacheMode() const override;
- scoped_ptr<AwWebResourceResponse> ShouldInterceptRequest(
- const net::URLRequest* request) override;
+ void ShouldInterceptRequestAsync(
+ const net::URLRequest* request,
+ const ShouldInterceptRequestResultCallback callback) override;
bool ShouldBlockContentUrls() const override;
bool ShouldBlockFileUrls() const override;
bool ShouldAcceptThirdPartyCookies() const override;
@@ -69,6 +70,7 @@ class AwContentsIoThreadClientImpl : public AwContentsIoThreadClient {
private:
bool pending_association_;
base::android::ScopedJavaGlobalRef<jobject> java_object_;
+ base::android::ScopedJavaGlobalRef<jobject> bg_thread_client_object_;
DISALLOW_COPY_AND_ASSIGN(AwContentsIoThreadClientImpl);
};