Index: chrome/browser/renderer_host/render_widget_host_view_gtk.cc |
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc |
index f883b3f37e574a77372a05b648412967c047af63..68e8c52ebc43bd4f6ab6677b264832290c7b5cea 100644 |
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc |
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc |
@@ -34,7 +34,8 @@ using WebKit::WebInputEventFactory; |
class RenderWidgetHostViewGtkWidget { |
public: |
static GtkWidget* CreateNewWidget(RenderWidgetHostViewGtk* host_view) { |
- GtkWidget* widget = gtk_drawing_area_new(); |
+ GtkWidget* widget = gtk_fixed_new(); |
+ gtk_fixed_set_has_window(GTK_FIXED(widget), true); |
gtk_widget_set_double_buffered(widget, FALSE); |
#if defined(NDEBUG) |
gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &gfx::kGdkWhite); |
@@ -375,6 +376,7 @@ RenderWidgetHostViewGtk::~RenderWidgetHostViewGtk() { |
void RenderWidgetHostViewGtk::InitAsChild() { |
view_.Own(RenderWidgetHostViewGtkWidget::CreateNewWidget(this)); |
+ plugin_container_host_.set_host_widget(view_.get()); |
gtk_widget_show(view_.get()); |
} |
@@ -384,6 +386,7 @@ void RenderWidgetHostViewGtk::InitAsPopup( |
parent_ = parent_host_view->GetNativeView(); |
GtkWidget* popup = gtk_window_new(GTK_WINDOW_POPUP); |
view_.Own(RenderWidgetHostViewGtkWidget::CreateNewWidget(this)); |
+ plugin_container_host_.set_host_widget(view_.get()); |
gtk_container_add(GTK_CONTAINER(popup), view_.get()); |
// If we are not activatable, we don't want to grab keyboard input, |
@@ -473,8 +476,9 @@ void RenderWidgetHostViewGtk::MovePluginWindows( |
const std::vector<WebPluginGeometry>& plugin_window_moves) { |
if (plugin_window_moves.empty()) |
return; |
- |
- NOTIMPLEMENTED(); |
+ for (unsigned int i = 0; i < plugin_window_moves.size(); ++i) { |
+ plugin_container_host_.MovePluginContainer(plugin_window_moves[i]); |
+ } |
} |
void RenderWidgetHostViewGtk::Focus() { |
@@ -573,6 +577,7 @@ void RenderWidgetHostViewGtk::DidScrollRect(const gfx::Rect& rect, int dx, |
void RenderWidgetHostViewGtk::RenderViewGone() { |
Destroy(); |
+ plugin_container_host_.set_host_widget(NULL); |
} |
void RenderWidgetHostViewGtk::Destroy() { |
@@ -707,3 +712,12 @@ void RenderWidgetHostViewGtk::ReceivedSelectionText(GtkClipboard* clipboard, |
host_view->host_->Send(new ViewMsg_InsertText(host_view->host_->routing_id(), |
UTF8ToUTF16(text))); |
} |
+ |
+gfx::PluginWindowHandle RenderWidgetHostViewGtk::CreatePluginContainer() { |
+ return plugin_container_host_.CreatePluginContainer(); |
+} |
+ |
+void RenderWidgetHostViewGtk::DestroyPluginContainer( |
+ gfx::PluginWindowHandle container) { |
+ plugin_container_host_.DestroyPluginContainer(container); |
+} |