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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_android.h
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 267b4107d372d7fa3bb133c5a80e4cd94c42a0cf..4707734a8e86ed7c0df2d752fdb85d864bf95e9f 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -224,6 +224,12 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
void SetOverlayVideoMode(bool enabled);
+ typedef base::Callback<
+ void(const base::string16& content, int start_offset, int end_offset)>
+ TextSurroundingSelectionCallback;
+ void SetTextSurroundingSelectionCallback(
+ const TextSurroundingSelectionCallback& callback);
+
private:
void RunAckCallbacks();
@@ -283,7 +289,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
void SetNeedsAnimate();
bool Animate(base::TimeTicks frame_time);
-
// The model object.
RenderWidgetHostImpl* host_;
@@ -353,6 +358,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
scoped_ptr<LastFrameInfo> last_frame_info_;
+ TextSurroundingSelectionCallback text_surrounding_selection_callback_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
};
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698