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

Unified Diff: content/shell/browser/shell_web_contents_view_delegate_win.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/shell/browser/shell_web_contents_view_delegate_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_web_contents_view_delegate_win.cc
===================================================================
--- content/shell/browser/shell_web_contents_view_delegate_win.cc (revision 255719)
+++ content/shell/browser/shell_web_contents_view_delegate_win.cc (working copy)
@@ -5,6 +5,7 @@
#include "content/shell/browser/shell_web_contents_view_delegate.h"
#include "base/command_line.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
@@ -190,15 +191,19 @@
}
void ShellWebContentsViewDelegate::MenuItemSelected(int selection) {
+ RenderFrameHost* frame = web_contents_->GetFocusedFrame();
switch (selection) {
case ShellContextMenuItemCutId:
- web_contents_->GetRenderViewHost()->Cut();
+ if (frame)
+ frame->Cut();
break;
case ShellContextMenuItemCopyId:
- web_contents_->GetRenderViewHost()->Copy();
+ if (frame)
+ frame->Copy();
break;
case ShellContextMenuItemPasteId:
- web_contents_->GetRenderViewHost()->Paste();
+ if (frame)
+ frame->Paste();
break;
case ShellContextMenuItemDeleteId:
web_contents_->GetRenderViewHost()->Delete();
« no previous file with comments | « content/shell/browser/shell_web_contents_view_delegate_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698