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

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

Issue 633743002: Add FindInPageBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ted's comments Created 6 years, 2 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
(Empty)
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.
4
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_
7
8 #include <jni.h>
9
10 #include "base/android/jni_weak_ref.h"
11 #include "content/public/browser/web_contents.h"
12
13 class FindInPageBridge {
14 public:
15 FindInPageBridge(JNIEnv* env, jobject obj, jobject j_web_contents);
16 void Destroy(JNIEnv*, jobject);
17
18 void StartFinding(JNIEnv* env,
19 jobject obj,
20 jstring search_string,
21 jboolean forward_direction,
22 jboolean case_sensitive);
23
24 void StopFinding(JNIEnv* env, jobject obj);
25
26 base::android::ScopedJavaLocalRef<jstring> GetPreviousFindText(JNIEnv* env,
27 jobject obj);
28
29 void RequestFindMatchRects(JNIEnv* env, jobject obj, jint current_version);
30
31 void ActivateNearestFindResult(JNIEnv* env, jobject obj, jfloat x, jfloat y);
32
33 static bool RegisterFindInPageBridge(JNIEnv* env);
34
35 private:
36 content::WebContents* web_contents_;
37 JavaObjectWeakGlobalRef weak_java_ref_;
38
39 DISALLOW_COPY_AND_ASSIGN(FindInPageBridge);
40 };
41
42 #endif // CHROME_BROWSER_ANDROID_FIND_IN_PAGE_FIND_IN_PAGE_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698