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 #include "chrome/browser/android/find_in_page/find_in_page_bridge.h" | 5 #include "chrome/browser/android/find_in_page/find_in_page_bridge.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 8 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "jni/FindInPageBridge_jni.h" | 10 #include "jni/FindInPageBridge_jni.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 ActivateNearestFindResult(x, y); | 63 ActivateNearestFindResult(x, y); |
64 } | 64 } |
65 | 65 |
66 void FindInPageBridge::ActivateFindInPageResultForAccessibility( | 66 void FindInPageBridge::ActivateFindInPageResultForAccessibility( |
67 JNIEnv* env, jobject obj) { | 67 JNIEnv* env, jobject obj) { |
68 FindTabHelper::FromWebContents(web_contents_)-> | 68 FindTabHelper::FromWebContents(web_contents_)-> |
69 ActivateFindInPageResultForAccessibility(); | 69 ActivateFindInPageResultForAccessibility(); |
70 } | 70 } |
71 | 71 |
72 // static | 72 // static |
73 static jlong Init(JNIEnv* env, jobject obj, jobject j_web_contents) { | 73 static jlong Init(JNIEnv* env, |
| 74 const JavaParamRef<jobject>& obj, |
| 75 const JavaParamRef<jobject>& j_web_contents) { |
74 FindInPageBridge* bridge = new FindInPageBridge(env, obj, j_web_contents); | 76 FindInPageBridge* bridge = new FindInPageBridge(env, obj, j_web_contents); |
75 return reinterpret_cast<intptr_t>(bridge); | 77 return reinterpret_cast<intptr_t>(bridge); |
76 } | 78 } |
77 | 79 |
78 bool FindInPageBridge::RegisterFindInPageBridge(JNIEnv* env) { | 80 bool FindInPageBridge::RegisterFindInPageBridge(JNIEnv* env) { |
79 return RegisterNativesImpl(env); | 81 return RegisterNativesImpl(env); |
80 } | 82 } |
OLD | NEW |