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

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, 7 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/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 2fd20c73e8fe3aa5399080592840662843f2d24d..c1d393e71b5837bbda7c7786ed940ad90a84879a 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,
+ unsigned /* max_length */)
nasko 2014/05/22 18:59:04 nit: unsigned what? It is best to be explicit abou
+
// -----------------------------------------------------------------------------
// 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 */
+ unsigned, /* startOffset */
+ unsigned /* endOffset */)

Powered by Google App Engine
This is Rietveld 408576698