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

Side by Side Diff: chrome/browser/android/find_in_page/find_in_page_bridge.h

Issue 2315323002: Pass JavaRef to WebContents::FromJavaWebContents. (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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_ 6 #define CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 13
14 class FindInPageBridge { 14 class FindInPageBridge {
15 public: 15 public:
16 FindInPageBridge(JNIEnv* env, jobject obj, jobject j_web_contents); 16 FindInPageBridge(JNIEnv* env,
17 const base::android::JavaRef<jobject>& obj,
18 const base::android::JavaRef<jobject>& j_web_contents);
17 void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&); 19 void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&);
18 20
19 void StartFinding(JNIEnv* env, 21 void StartFinding(JNIEnv* env,
20 const base::android::JavaParamRef<jobject>& obj, 22 const base::android::JavaParamRef<jobject>& obj,
21 const base::android::JavaParamRef<jstring>& search_string, 23 const base::android::JavaParamRef<jstring>& search_string,
22 jboolean forward_direction, 24 jboolean forward_direction,
23 jboolean case_sensitive); 25 jboolean case_sensitive);
24 26
25 void StopFinding(JNIEnv* env, 27 void StopFinding(JNIEnv* env,
26 const base::android::JavaParamRef<jobject>& obj, 28 const base::android::JavaParamRef<jobject>& obj,
(...skipping 20 matching lines...) Expand all
47 static bool RegisterFindInPageBridge(JNIEnv* env); 49 static bool RegisterFindInPageBridge(JNIEnv* env);
48 50
49 private: 51 private:
50 content::WebContents* web_contents_; 52 content::WebContents* web_contents_;
51 JavaObjectWeakGlobalRef weak_java_ref_; 53 JavaObjectWeakGlobalRef weak_java_ref_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(FindInPageBridge); 55 DISALLOW_COPY_AND_ASSIGN(FindInPageBridge);
54 }; 56 };
55 57
56 #endif // CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_ 58 #endif // CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698