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

Side by Side Diff: android_webview/native/aw_contents_background_thread_client.cc

Issue 2295693004: Pass JavaRef to Java methods in android_webview. (Closed)
Patch Set: Created 4 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 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 #include "android_webview/native/aw_contents_background_thread_client.h" 5 #include "android_webview/native/aw_contents_background_thread_client.h"
6 6
7 #include "jni/AwContentsBackgroundThreadClient_jni.h" 7 #include "jni/AwContentsBackgroundThreadClient_jni.h"
8 8
9 using base::android::JavaRef;
10
9 namespace android_webview { 11 namespace android_webview {
10 12
11 // static 13 // static
12 base::android::ScopedJavaLocalRef<jobject> 14 base::android::ScopedJavaLocalRef<jobject>
13 AwContentsBackgroundThreadClient::shouldInterceptRequest( 15 AwContentsBackgroundThreadClient::shouldInterceptRequest(
14 JNIEnv* env, 16 JNIEnv* env,
15 jobject obj, 17 const JavaRef<jobject>& obj,
16 jstring url, 18 const JavaRef<jstring>& url,
17 jboolean isMainFrame, 19 jboolean isMainFrame,
18 jboolean hasUserGesture, 20 jboolean hasUserGesture,
19 jstring method, 21 const JavaRef<jstring>& method,
20 jobjectArray requestHeaderNames, 22 const JavaRef<jobjectArray>& requestHeaderNames,
21 jobjectArray requestHeaderValues) { 23 const JavaRef<jobjectArray>& requestHeaderValues) {
22 return Java_AwContentsBackgroundThreadClient_shouldInterceptRequestFromNative( 24 return Java_AwContentsBackgroundThreadClient_shouldInterceptRequestFromNative(
23 env, obj, url, isMainFrame, hasUserGesture, method, requestHeaderNames, 25 env, obj, url, isMainFrame, hasUserGesture, method, requestHeaderNames,
24 requestHeaderValues); 26 requestHeaderValues);
25 } 27 }
26 28
27 } // namespace android_webview 29 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents_background_thread_client.h ('k') | android_webview/native/aw_contents_client_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698