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

Unified Diff: chrome/browser/ui/gtk/gtk_window_util.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 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/gtk/gtk_window_util.cc
===================================================================
--- chrome/browser/ui/gtk/gtk_window_util.cc (revision 255633)
+++ chrome/browser/ui/gtk/gtk_window_util.cc (working copy)
@@ -5,12 +5,13 @@
#include "chrome/browser/ui/gtk/gtk_window_util.h"
#include <dlfcn.h>
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "ui/base/base_window.h"
-using content::RenderWidgetHost;
+using content::RenderFrameHost;
using content::WebContents;
namespace gtk_window_util {
@@ -31,7 +32,7 @@
// TODO(suzhe): This approach does not work for plugins.
void DoCutCopyPaste(GtkWindow* window,
WebContents* web_contents,
- void (RenderWidgetHost::*method)(),
+ void (RenderFrameHost::*method)(),
const char* signal) {
GtkWidget* widget = gtk_window_get_focus(window);
if (widget == NULL)
@@ -39,7 +40,8 @@
if (web_contents &&
widget == web_contents->GetView()->GetContentNativeView()) {
- (web_contents->GetRenderViewHost()->*method)();
+ RenderFrameHost* frame = web_contents->GetFocusedFrame();
+ (frame->*method)();
} else {
guint id;
if ((id = g_signal_lookup(signal, G_OBJECT_TYPE(widget))) != 0)
@@ -49,17 +51,17 @@
void DoCut(GtkWindow* window, WebContents* web_contents) {
DoCutCopyPaste(window, web_contents,
- &RenderWidgetHost::Cut, "cut-clipboard");
+ &RenderFrameHost::Cut, "cut-clipboard");
}
void DoCopy(GtkWindow* window, WebContents* web_contents) {
DoCutCopyPaste(window, web_contents,
- &RenderWidgetHost::Copy, "copy-clipboard");
+ &RenderFrameHost::Copy, "copy-clipboard");
}
void DoPaste(GtkWindow* window, WebContents* web_contents) {
DoCutCopyPaste(window, web_contents,
- &RenderWidgetHost::Paste, "paste-clipboard");
+ &RenderFrameHost::Paste, "paste-clipboard");
}
// Ubuntu patches their version of GTK+ so that there is always a

Powered by Google App Engine
This is Rietveld 408576698