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

Unified Diff: android_webview/native/aw_contents_background_thread_client.h

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.h
diff --git a/base/android/java_runtime.h b/android_webview/native/aw_contents_background_thread_client.h
similarity index 25%
copy from base/android/java_runtime.h
copy to android_webview/native/aw_contents_background_thread_client.h
index 4ca889e05f1df28a59cbaaeadd2a5a039c9ba782..7efd20d52bf4541bd96648524a954b51d100fc7a 100644
--- a/base/android/java_runtime.h
+++ b/android_webview/native/aw_contents_background_thread_client.h
@@ -2,27 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_ANDROID_JAVA_RUNTIME_H_
-#define BASE_ANDROID_JAVA_RUNTIME_H_
+#ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_BACKGROUND_THREAD_CLIENT_H_
+#define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_BACKGROUND_THREAD_CLIENT_H_
#include "base/android/scoped_java_ref.h"
-#include "base/base_export.h"
-namespace base {
-namespace android {
+namespace android_webview {
-// Wrapper class for using the java.lang.Runtime object from jni.
-class BASE_EXPORT JavaRuntime {
+class AwContentsBackgroundThreadClient {
public:
- // Registers the jni class (once per process).
- static bool Register(JNIEnv* env);
-
- // Fills the total memory used and memory allocated for objects by the java
- // heap in the current process. Returns true on success.
- static void GetMemoryUsage(long* total_memory, long* free_memory);
+ static base::android::ScopedJavaLocalRef<jobject> shouldInterceptRequest(
+ JNIEnv* env,
+ jobject obj,
+ jstring url,
+ jboolean isMainFrame,
+ jboolean hasUserGesture,
+ jstring method,
+ jobjectArray requestHeaderNames,
+ jobjectArray requestHeaderValues);
};
-} // namespace android
-} // namespace base
+// JNI registration method.
+bool RegisterAwContentsBackgroundThreadClient(JNIEnv* env);
+
+}
-#endif // BASE_ANDROID_JAVA_RUNTIME_H_
+#endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_BACKGROUND_THREAD_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698