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

Unified Diff: chrome/renderer/render_view.cc

Issue 63145: Copy text selection from renderer to browser every time it changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 13391)
+++ chrome/renderer/render_view.cc (working copy)
@@ -440,7 +440,6 @@
IPC_MESSAGE_HANDLER(ViewMsg_NotifyAudioStreamVolume, OnAudioStreamVolume)
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
IPC_MESSAGE_HANDLER(ViewMsg_ExtensionResponse, OnExtensionResponse)
- IPC_MESSAGE_HANDLER(ViewMsg_RequestSelectionText, OnRequestSelectionText)
IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode)
// Have the super handle all other messages.
@@ -471,10 +470,6 @@
Send(new ViewHostMsg_Thumbnail(routing_id_, url, score, thumbnail));
}
-void RenderView::OnRequestSelectionText() {
- Send(new ViewHostMsg_SetSelectionText(routing_id_, selection_text_));
-}
-
void RenderView::PrintPage(const ViewMsg_PrintPage_Params& params,
const gfx::Size& canvas_size,
WebFrame* frame) {
@@ -2477,9 +2472,8 @@
void RenderView::DidChangeSelection(bool is_empty_selection) {
#if defined(OS_LINUX)
if (!is_empty_selection) {
- // TODO(estade): find a way to incrementally update the selection text.
- selection_text_ = webview()->GetMainFrame()->GetSelection(false);
- Send(new ViewHostMsg_SelectionChanged(routing_id_));
+ Send(new ViewHostMsg_SelectionChanged(routing_id_,
+ webview()->GetMainFrame()->GetSelection(false)));
}
#endif
}
« chrome/browser/renderer_host/render_widget_host_view.h ('K') | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698