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

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 322203002: Add an interface to gather text surrounding the selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@surroundings-patch-5
Patch Set: Moved the callback to RenderWidgetHostViewAndroid. Created 6 years, 6 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
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/android/jni_weak_ref.h" 11 #include "base/android/jni_weak_ref.h"
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
14 #include "base/i18n/rtl.h" 13 #include "base/i18n/rtl.h"
15 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
16 #include "base/process/process.h" 15 #include "base/process/process.h"
17 #include "content/browser/renderer_host/render_widget_host_view_android.h" 16 #include "content/browser/renderer_host/render_widget_host_view_android.h"
18 #include "content/browser/web_contents/web_contents_impl.h" 17 #include "content/browser/web_contents/web_contents_impl.h"
19 #include "content/public/browser/android/content_view_core.h" 18 #include "content/public/browser/android/content_view_core.h"
20 #include "content/public/browser/web_contents_observer.h" 19 #include "content/public/browser/web_contents_observer.h"
21 #include "third_party/WebKit/public/web/WebInputEvent.h" 20 #include "third_party/WebKit/public/web/WebInputEvent.h"
22 #include "ui/gfx/rect.h" 21 #include "ui/gfx/rect.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual void ShowPastePopup(int x, int y) OVERRIDE; 54 virtual void ShowPastePopup(int x, int y) OVERRIDE;
56 virtual void GetScaledContentBitmap( 55 virtual void GetScaledContentBitmap(
57 float scale, 56 float scale,
58 jobject bitmap_config, 57 jobject bitmap_config,
59 gfx::Rect src_subrect, 58 gfx::Rect src_subrect,
60 const base::Callback<void(bool, const SkBitmap&)>& result_callback) 59 const base::Callback<void(bool, const SkBitmap&)>& result_callback)
61 OVERRIDE; 60 OVERRIDE;
62 virtual float GetDpiScale() const OVERRIDE; 61 virtual float GetDpiScale() const OVERRIDE;
63 virtual void PauseVideo() OVERRIDE; 62 virtual void PauseVideo() OVERRIDE;
64 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE; 63 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE;
64 virtual void RequestTextSurroundingSelection(
65 int max_length,
66 const base::Callback<void(const base::string16& content,
67 int start_offset,
68 int end_offset)>& callback) OVERRIDE;
65 69
66 // -------------------------------------------------------------------------- 70 // --------------------------------------------------------------------------
67 // Methods called from Java via JNI 71 // Methods called from Java via JNI
68 // -------------------------------------------------------------------------- 72 // --------------------------------------------------------------------------
69 73
70 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, 74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env,
71 jobject obj); 75 jobject obj);
72 76
73 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); 77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj);
74 78
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 java_bridge_dispatcher_host_manager_; 383 java_bridge_dispatcher_host_manager_;
380 384
381 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 385 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
382 }; 386 };
383 387
384 bool RegisterContentViewCore(JNIEnv* env); 388 bool RegisterContentViewCore(JNIEnv* env);
385 389
386 } // namespace content 390 } // namespace content
387 391
388 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 392 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698