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

Unified Diff: chrome/browser/ui/views/frame/browser_view.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 | « chrome/browser/ui/views/frame/browser_view.h ('k') | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_view.cc (revision 255719)
+++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
@@ -100,8 +100,8 @@
#include "content/public/browser/download_manager.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -1419,19 +1419,19 @@
// won't do anything. We'll need something like an overall clipboard command
// manager to do that.
void BrowserView::Cut() {
- // If a WebContent is focused, call RenderWidgetHost::Cut. Otherwise, e.g. if
+ // If a WebContent is focused, call RenderFrameHost::Cut. Otherwise, e.g. if
// Omnibox is focused, send a Ctrl+x key event to Chrome. Using RWH interface
// rather than the fake key event for a WebContent is important since the fake
// event might be consumed by the web content (crbug.com/137908).
- DoCutCopyPaste(&content::RenderWidgetHost::Cut, IDS_APP_CUT);
+ DoCutCopyPaste(&content::RenderFrameHost::Cut, IDS_APP_CUT);
}
void BrowserView::Copy() {
- DoCutCopyPaste(&content::RenderWidgetHost::Copy, IDS_APP_COPY);
+ DoCutCopyPaste(&content::RenderFrameHost::Copy, IDS_APP_COPY);
}
void BrowserView::Paste() {
- DoCutCopyPaste(&content::RenderWidgetHost::Paste, IDS_APP_PASTE);
+ DoCutCopyPaste(&content::RenderFrameHost::Paste, IDS_APP_PASTE);
}
WindowOpenDisposition BrowserView::GetDispositionForPopupBounds(
@@ -2508,7 +2508,7 @@
toolbar_->ShowBrowserActionPopup(extension);
}
-void BrowserView::DoCutCopyPaste(void (content::RenderWidgetHost::*method)(),
+void BrowserView::DoCutCopyPaste(void (content::RenderFrameHost::*method)(),
int command_id) {
WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents();
if (!contents)
@@ -2535,7 +2535,7 @@
bool BrowserView::DoCutCopyPasteForWebContents(
WebContents* contents,
- void (content::RenderWidgetHost::*method)()) {
+ void (content::RenderFrameHost::*method)()) {
gfx::NativeView native_view = contents->GetView()->GetContentNativeView();
if (!native_view)
return false;
@@ -2544,7 +2544,9 @@
#elif defined(OS_WIN)
if (native_view == ::GetFocus()) {
#endif
- (contents->GetRenderViewHost()->*method)();
+ content::RenderFrameHost* frame = contents->GetFocusedFrame();
+ if (frame)
+ (frame->*method)();
return true;
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698