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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 55052: Copy selection to x clipboard. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/browser/renderer_host/render_view_host.cc
===================================================================
--- chrome/browser/renderer_host/render_view_host.cc (revision 13031)
+++ chrome/browser/renderer_host/render_view_host.cc (working copy)
@@ -772,8 +772,10 @@
OnRemoveAutofillEntry)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFeedList, OnMsgUpdateFeedList)
IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRequest, OnExtensionRequest)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectionText, OnMsgSetSelectionText)
IPC_MESSAGE_HANDLER(ViewHostMsg_PasteFromSelectionClipboard,
- OnPasteFromSelectionClipboard)
+ OnMsgPasteFromSelectionClipboard)
// Have the super handle all other messages.
IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg))
IPC_END_MESSAGE_MAP_EX()
@@ -1094,6 +1096,21 @@
view()->SetTooltipText(tooltip_text);
}
+void RenderViewHost::OnMsgSelectionChanged() {
+ if (view())
+ view()->SelectionChanged();
+}
+
+void RenderViewHost::OnMsgSetSelectionText(const std::string& text) {
+ if (view())
+ view()->SetSelectionText(text);
+}
+
+void RenderViewHost::OnMsgPasteFromSelectionClipboard() {
+ if (view())
+ view()->PasteFromSelectionClipboard();
+}
+
void RenderViewHost::OnMsgRunFileChooser(bool multiple_files,
const std::wstring& title,
const std::wstring& default_file,
@@ -1366,8 +1383,3 @@
const std::string& response) {
Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response));
}
-
-void RenderViewHost::OnPasteFromSelectionClipboard() {
- if (view())
- view()->PasteFromSelectionClipboard();
-}
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_widget_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698