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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef BASE_ANDROID_JAVA_RUNTIME_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_BACKGROUND_THREAD_CLIENT_H_
6 #define BASE_ANDROID_JAVA_RUNTIME_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_BACKGROUND_THREAD_CLIENT_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/base_export.h"
10 9
11 namespace base { 10 namespace android_webview {
12 namespace android {
13 11
14 // Wrapper class for using the java.lang.Runtime object from jni. 12 class AwContentsBackgroundThreadClient {
15 class BASE_EXPORT JavaRuntime {
16 public: 13 public:
17 // Registers the jni class (once per process). 14 static base::android::ScopedJavaLocalRef<jobject> shouldInterceptRequest(
18 static bool Register(JNIEnv* env); 15 JNIEnv* env,
19 16 jobject obj,
20 // Fills the total memory used and memory allocated for objects by the java 17 jstring url,
21 // heap in the current process. Returns true on success. 18 jboolean isMainFrame,
22 static void GetMemoryUsage(long* total_memory, long* free_memory); 19 jboolean hasUserGesture,
20 jstring method,
21 jobjectArray requestHeaderNames,
22 jobjectArray requestHeaderValues);
23 }; 23 };
24 24
25 } // namespace android 25 // JNI registration method.
26 } // namespace base 26 bool RegisterAwContentsBackgroundThreadClient(JNIEnv* env);
27 27
28 #endif // BASE_ANDROID_JAVA_RUNTIME_H_ 28 }
29
30 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_BACKGROUND_THREAD_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698