Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / android / find_in_page / find_in_page_bridge.h
blobd822a3a2627e76d39bb6fc60ff13a1c894288fc2
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_
8 #include <jni.h>
10 #include "base/android/jni_weak_ref.h"
11 #include "content/public/browser/web_contents.h"
13 class FindInPageBridge {
14 public:
15 FindInPageBridge(JNIEnv* env, jobject obj, jobject j_web_contents);
16 void Destroy(JNIEnv*, jobject);
18 void StartFinding(JNIEnv* env,
19 jobject obj,
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,
27 jobject obj);
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);
37 private:
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_