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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

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: update to use websurroundingtext 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/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f883a45098cb08d4634e0c40f904f8aa70943d1e..9bbf125c4fc55d93607c3ce614075920ff693f03 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -321,6 +321,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
OnShowDesktopNotification)
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
OnCancelDesktopNotification)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse,
+ OnTextSurroundingSelectionResponse)
IPC_END_MESSAGE_MAP()
return handled;
@@ -698,6 +700,14 @@ void RenderFrameHostImpl::OnCancelDesktopNotification(int notification_id) {
cancel_notification_callbacks_.erase(notification_id);
}
+void RenderFrameHostImpl::OnTextSurroundingSelectionResponse(
+ const base::string16& content,
+ unsigned int start_offset,
+ unsigned int end_offset) {
+ render_view_host_->OnTextSurroundingSelectionResponse(
+ content, start_offset, end_offset);
+}
+
void RenderFrameHostImpl::OnDidAccessInitialDocument() {
delegate_->DidAccessInitialDocument();
}

Powered by Google App Engine
This is Rietveld 408576698