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

Unified Diff: chrome/browser/ui/cocoa/applescript/tab_applescript.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: chrome/browser/ui/cocoa/applescript/tab_applescript.mm
===================================================================
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm (revision 255719)
+++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm (working copy)
@@ -17,6 +17,7 @@
#include "chrome/common/url_constants.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/save_page_type.h"
#include "content/public/browser/web_contents.h"
@@ -26,6 +27,7 @@
using content::NavigationController;
using content::NavigationEntry;
using content::OpenURLParams;
+using content::RenderFrameHost;
using content::RenderViewHost;
using content::Referrer;
using content::WebContents;
@@ -184,33 +186,33 @@
}
- (void)handlesCutScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = webContents_->GetRenderViewHost();
- if (!view) {
+ RenderFrameHost* frame = webContents_->GetFocusedFrame();
+ if (!frame) {
NOTREACHED();
return;
}
- view->Cut();
+ frame->Cut();
}
- (void)handlesCopyScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = webContents_->GetRenderViewHost();
- if (!view) {
+ RenderFrameHost* frame = webContents_->GetFocusedFrame();
+ if (!frame) {
NOTREACHED();
return;
}
- view->Copy();
+ frame->Copy();
}
- (void)handlesPasteScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = webContents_->GetRenderViewHost();
- if (!view) {
+ RenderFrameHost* frame = webContents_->GetFocusedFrame();
+ if (!frame) {
NOTREACHED();
return;
}
- view->Paste();
+ frame->Paste();
}
- (void)handlesSelectAllScriptCommand:(NSScriptCommand*)command {
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu.cc ('k') | chrome/browser/ui/gtk/gtk_window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698