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
3 // found in the LICENSE file.
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_
10 #include "base/android/jni_weak_ref.h"
11 #include "content/public/browser/web_contents.h"
13 class FindInPageBridge
{
15 FindInPageBridge(JNIEnv
* env
, jobject obj
, jobject j_web_contents
);
16 void Destroy(JNIEnv
*, jobject
);
18 void StartFinding(JNIEnv
* env
,
20 jstring search_string
,
21 jboolean forward_direction
,
22 jboolean case_sensitive
);
24 void StopFinding(JNIEnv
* env
, jobject obj
, jboolean clearSelection
);
26 base::android::ScopedJavaLocalRef
<jstring
> GetPreviousFindText(JNIEnv
* env
,
29 void RequestFindMatchRects(JNIEnv
* env
, jobject obj
, jint current_version
);
31 void ActivateNearestFindResult(JNIEnv
* env
, jobject obj
, jfloat x
, jfloat y
);
33 void ActivateFindInPageResultForAccessibility(JNIEnv
* env
, jobject obj
);
35 static bool RegisterFindInPageBridge(JNIEnv
* env
);
38 content::WebContents
* web_contents_
;
39 JavaObjectWeakGlobalRef weak_java_ref_
;
41 DISALLOW_COPY_AND_ASSIGN(FindInPageBridge
);
44 #endif // CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_