| OLD | NEW |
| 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 "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 12 | 13 |
| 13 class FindInPageBridge { | 14 class FindInPageBridge { |
| 14 public: | 15 public: |
| 15 FindInPageBridge(JNIEnv* env, jobject obj, jobject j_web_contents); | 16 FindInPageBridge(JNIEnv* env, jobject obj, jobject j_web_contents); |
| 16 void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&); | 17 void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&); |
| 17 | 18 |
| 18 void StartFinding(JNIEnv* env, | 19 void StartFinding(JNIEnv* env, |
| 19 const base::android::JavaParamRef<jobject>& obj, | 20 const base::android::JavaParamRef<jobject>& obj, |
| 20 const base::android::JavaParamRef<jstring>& search_string, | 21 const base::android::JavaParamRef<jstring>& search_string, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 46 static bool RegisterFindInPageBridge(JNIEnv* env); | 47 static bool RegisterFindInPageBridge(JNIEnv* env); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 content::WebContents* web_contents_; | 50 content::WebContents* web_contents_; |
| 50 JavaObjectWeakGlobalRef weak_java_ref_; | 51 JavaObjectWeakGlobalRef weak_java_ref_; |
| 51 | 52 |
| 52 DISALLOW_COPY_AND_ASSIGN(FindInPageBridge); | 53 DISALLOW_COPY_AND_ASSIGN(FindInPageBridge); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 #endif // CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_ | 56 #endif // CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_ |
| OLD | NEW |