Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2424)

Unified Diff: android_webview/native/aw_contents_io_thread_client_impl.cc

Issue 11090003: [Android] Upstream WebView.allow{Content|File}Access implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Workaround to remove dependency on https://codereview.chromium.org/11030051 Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_contents_io_thread_client_impl.cc
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc
index efcf7d9a6488191d3e78e26b1c8b5cc7077cb19a..e79836456facd1ccd853077d8094f7eb786e6538 100644
--- a/android_webview/native/aw_contents_io_thread_client_impl.cc
+++ b/android_webview/native/aw_contents_io_thread_client_impl.cc
@@ -194,6 +194,26 @@ AwContentsIoThreadClientImpl::ShouldInterceptRequest(
new InterceptedRequestData(ret));
}
+bool AwContentsIoThreadClientImpl::ShouldBlockContentUrls() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ if (java_object_.is_null())
+ return false;
+
+ JNIEnv* env = AttachCurrentThread();
+ return Java_AwContentsIoThreadClient_shouldBlockContentUrls(
+ env, java_object_.obj());
+}
+
+bool AwContentsIoThreadClientImpl::ShouldBlockFileUrls() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ if (java_object_.is_null())
+ return false;
+
+ JNIEnv* env = AttachCurrentThread();
+ return Java_AwContentsIoThreadClient_shouldBlockFileUrls(
+ env, java_object_.obj());
+}
+
bool AwContentsIoThreadClientImpl::ShouldBlockNetworkLoads() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (java_object_.is_null())
« no previous file with comments | « android_webview/native/aw_contents_io_thread_client_impl.h ('k') | content/browser/android/content_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698