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

Unified Diff: content/browser/frame_host/render_frame_host_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: sync to get android fix Created 6 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
===================================================================
--- content/browser/frame_host/render_frame_host_impl.cc (revision 255719)
+++ content/browser/frame_host/render_frame_host_impl.cc (working copy)
@@ -16,6 +16,7 @@
#include "content/browser/frame_host/render_frame_host_delegate.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/common/frame_messages.h"
+#include "content/common/input_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h"
@@ -131,6 +132,21 @@
Send(new FrameMsg_CustomContextMenuAction(routing_id_, context, action));
}
+void RenderFrameHostImpl::Cut() {
+ Send(new InputMsg_Cut(routing_id_));
+ RecordAction(base::UserMetricsAction("Cut"));
+}
+
+void RenderFrameHostImpl::Copy() {
+ Send(new InputMsg_Copy(routing_id_));
+ RecordAction(base::UserMetricsAction("Copy"));
+}
+
+void RenderFrameHostImpl::Paste() {
+ Send(new InputMsg_Paste(routing_id_));
+ RecordAction(base::UserMetricsAction("Paste"));
+}
+
void RenderFrameHostImpl::InsertCSS(const std::string& css) {
Send(new FrameMsg_CSSInsertRequest(routing_id_, css));
}
@@ -155,6 +171,7 @@
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameHostImpl, msg, msg_is_ok)
IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame,
OnDidStartProvisionalLoadForFrame)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError,
@@ -198,6 +215,10 @@
frame_tree_->RemoveFrame(frame_tree_node_);
}
+void RenderFrameHostImpl::OnFrameFocused() {
+ frame_tree_->SetFocusedFrame(frame_tree_node_);
+}
+
void RenderFrameHostImpl::OnOpenURL(
const FrameHostMsg_OpenURL_Params& params) {
GURL validated_url(params.url);
@@ -428,7 +449,7 @@
// completing a RVH swap or unload handler.
render_view_host_->SetState(RenderViewHostImpl::STATE_DEFAULT);
- Send(new FrameMsg_Navigate(GetRoutingID(), params));
+ Send(new FrameMsg_Navigate(routing_id_, params));
}
// Force the throbber to start. We do this because Blink's "started
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698