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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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/renderer_host/render_view_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_view_host_impl.cc (revision 247964)
+++ content/browser/renderer_host/render_view_host_impl.cc (working copy)
@@ -1238,7 +1238,6 @@
OnDocumentAvailableInMainFrame)
IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
OnDocumentOnLoadCompletedInMainFrame)
- IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnContextMenu)
IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnOpenURL)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
@@ -1609,22 +1608,6 @@
delegate_->DocumentOnLoadCompletedInMainFrame(this, page_id);
}
-void RenderViewHostImpl::OnContextMenu(const ContextMenuParams& params) {
- // Validate the URLs in |params|. If the renderer can't request the URLs
- // directly, don't show them in the context menu.
- ContextMenuParams validated_params(params);
- RenderProcessHost* process = GetProcess();
-
- // We don't validate |unfiltered_link_url| so that this field can be used
- // when users want to copy the original link URL.
- process->FilterURL(true, &validated_params.link_url);
- process->FilterURL(true, &validated_params.src_url);
- process->FilterURL(false, &validated_params.page_url);
- process->FilterURL(true, &validated_params.frame_url);
-
- delegate_->ShowContextMenu(validated_params);
-}
-
void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
delegate_->ToggleFullscreenMode(enter_fullscreen);
@@ -2062,16 +2045,6 @@
Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size));
}
-void RenderViewHostImpl::ExecuteCustomContextMenuCommand(
- int action, const CustomContextMenuContext& context) {
- Send(new ViewMsg_CustomContextMenuAction(GetRoutingID(), context, action));
-}
-
-void RenderViewHostImpl::NotifyContextMenuClosed(
- const CustomContextMenuContext& context) {
- Send(new ViewMsg_ContextMenuClosed(GetRoutingID(), context));
-}
-
void RenderViewHostImpl::CopyImageAt(int x, int y) {
Send(new ViewMsg_CopyImageAt(GetRoutingID(), x, y));
}

Powered by Google App Engine
This is Rietveld 408576698