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

Unified Diff: content/common/frame_messages.h

Issue 292113008: Plumbing for browser process to access text surrounding selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@adb_install_humans
Patch Set: 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 2fd20c73e8fe3aa5399080592840662843f2d24d..6db0b9d60e8f2a394fb3a15a47d08dbf70b4ee02 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -358,6 +358,11 @@ IPC_MESSAGE_ROUTED1(FrameMsg_DidEndColorChooser, unsigned)
// RenderFrame object it is associated with.
IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy)
+// Request the text surrounding the selection with a |max_length|. The response
+// will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
+IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest,
+ size_t /* max_length */)
+
// -----------------------------------------------------------------------------
// Messages sent from the renderer to the browser.
@@ -607,3 +612,10 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_MediaPlayingNotification,
IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification,
int64 /* player_cookie, distinguishes instances */)
+
+// Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
+// |endOffset| are the offsets of the selection in the returned |content|.
+IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse,
+ base::string16, /* content */
+ size_t, /* startOffset */
+ size_t /* endOffset */)
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698