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

Unified Diff: content/shell/browser/shell_web_contents_view_delegate_mac.mm

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
Index: content/shell/browser/shell_web_contents_view_delegate_mac.mm
===================================================================
--- content/shell/browser/shell_web_contents_view_delegate_mac.mm (revision 255719)
+++ content/shell/browser/shell_web_contents_view_delegate_mac.mm (working copy)
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.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"
@@ -222,15 +223,19 @@
}
void ShellWebContentsViewDelegate::ActionPerformed(int tag) {
+ RenderFrameHost* frame = web_contents_->GetFocusedFrame();
switch (tag) {
case ShellContextMenuItemCutTag:
- web_contents_->GetRenderViewHost()->Cut();
+ if (frame)
+ frame->Cut();
break;
case ShellContextMenuItemCopyTag:
- web_contents_->GetRenderViewHost()->Copy();
+ if (frame)
+ frame->Copy();
break;
case ShellContextMenuItemPasteTag:
- web_contents_->GetRenderViewHost()->Paste();
+ if (frame)
+ frame->Paste();
break;
case ShellContextMenuItemDeleteTag:
web_contents_->GetRenderViewHost()->Delete();

Powered by Google App Engine
This is Rietveld 408576698