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 |