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

Unified Diff: android_webview/native/aw_contents_background_thread_client.cc

Issue 1350553005: [Android WebView] Call shouldInterceptRequest on a background thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Get rid of has_been_killed Created 5 years, 3 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_background_thread_client.cc
diff --git a/android_webview/native/aw_locale_manager_impl.cc b/android_webview/native/aw_contents_background_thread_client.cc
similarity index 24%
copy from android_webview/native/aw_locale_manager_impl.cc
copy to android_webview/native/aw_contents_background_thread_client.cc
index b6230fd8bdb5210b5dbea4ddc1b87cf9bb473eeb..3993b6f2803cd210ad118bd9f5c9bf6692c613c3 100644
--- a/android_webview/native/aw_locale_manager_impl.cc
+++ b/android_webview/native/aw_contents_background_thread_client.cc
@@ -2,20 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "android_webview/native/aw_locale_manager_impl.h"
+#include "android_webview/native/aw_contents_background_thread_client.h"
-#include "android_webview/native/aw_contents.h"
+#include "jni/AwContentsBackgroundThreadClient_jni.h"
namespace android_webview {
-AwLocaleManagerImpl::AwLocaleManagerImpl() {
+// static
+base::android::ScopedJavaLocalRef<jobject>
+AwContentsBackgroundThreadClient::shouldInterceptRequest(
+ JNIEnv* env,
+ jobject obj,
+ jstring url,
+ jboolean isMainFrame,
+ jboolean hasUserGesture,
+ jstring method,
+ jobjectArray requestHeaderNames,
+ jobjectArray requestHeaderValues) {
+ return Java_AwContentsBackgroundThreadClient_shouldInterceptRequestFromNative(
+ env, obj, url, isMainFrame, hasUserGesture, method, requestHeaderNames,
+ requestHeaderValues);
}
-AwLocaleManagerImpl::~AwLocaleManagerImpl() {
-}
-
-std::string AwLocaleManagerImpl::GetLocale() {
- return AwContents::GetLocale();
+bool RegisterAwContentsBackgroundThreadClient(JNIEnv* env) {
+ return RegisterNativesImpl(env);
}
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698