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

Unified Diff: content/renderer/render_view_impl.cc

Issue 183923030: Almost finish moving context_menu_node_ from RenderViewImpl to RenderFrameImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 10 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/renderer/render_view_impl.cc
===================================================================
--- content/renderer/render_view_impl.cc (revision 254898)
+++ content/renderer/render_view_impl.cc (working copy)
@@ -1084,12 +1084,9 @@
bool handled = true;
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderViewImpl, message, msg_is_ok)
- IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy)
- IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut)
IPC_MESSAGE_HANDLER(InputMsg_Delete, OnDelete)
IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
- IPC_MESSAGE_HANDLER(InputMsg_Paste, OnPaste)
IPC_MESSAGE_HANDLER(InputMsg_PasteAndMatchStyle, OnPasteAndMatchStyle)
IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo)
IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace)
@@ -1288,26 +1285,6 @@
target_url_status_ = TARGET_NONE;
}
-void RenderViewImpl::OnCopy() {
- if (!webview())
- return;
-
- base::AutoReset<bool> handling_select_range(&handling_select_range_, true);
- WebNode current_node = context_menu_node_.isNull() ?
- GetFocusedElement() : context_menu_node_;
- webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Copy"),
- current_node);
-}
-
-void RenderViewImpl::OnCut() {
- if (!webview())
- return;
-
- base::AutoReset<bool> handling_select_range(&handling_select_range_, true);
- webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Cut"),
- GetFocusedElement());
-}
-
void RenderViewImpl::OnDelete() {
if (!webview())
return;
@@ -1334,15 +1311,6 @@
webview()->focusedFrame()->moveCaretSelection(point);
}
-void RenderViewImpl::OnPaste() {
- if (!webview())
- return;
-
- base::AutoReset<bool> handling_select_range(&handling_select_range_, true);
- webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Paste"),
- GetFocusedElement());
-}
-
void RenderViewImpl::OnPasteAndMatchStyle() {
if (!webview())
return;
@@ -2232,6 +2200,11 @@
FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node));
}
+void RenderViewImpl::focusedFrameChanged(WebFrame* frame) {
+ int frame_routing_id = RenderFrameImpl::FromWebFrame(frame)->GetRoutingID();
+ Send(new ViewHostMsg_FocusedFrameChanged(routing_id_, frame_routing_id));
+}
+
void RenderViewImpl::numberOfWheelEventHandlersChanged(unsigned num_handlers) {
Send(new ViewHostMsg_DidChangeNumWheelEvents(routing_id_, num_handlers));
}
« content/renderer/render_frame_impl.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698