Index: chrome/browser/ui/gtk/extensions/shell_window_gtk.cc |
diff --git a/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc b/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc |
index 2b298f776072c77802c4c0bc26b876b001c6ddbe..c48c1695be9a44d79a744444eabc9477de3cb6d0 100644 |
--- a/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc |
+++ b/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc |
@@ -4,22 +4,24 @@ |
#include "chrome/browser/ui/gtk/extensions/shell_window_gtk.h" |
-#include "chrome/browser/extensions/extension_host.h" |
+#include "chrome/browser/extensions/platform_app_host.h" |
#include "chrome/common/extensions/extension.h" |
#include "content/public/browser/render_widget_host_view.h" |
+#include "content/public/browser/web_contents.h" |
+#include "content/public/browser/web_contents_view.h" |
#include "ui/base/x/active_window_watcher_x.h" |
#include "ui/gfx/rect.h" |
-ShellWindowGtk::ShellWindowGtk(ExtensionHost* host) |
- : ShellWindow(host), |
+ShellWindowGtk::ShellWindowGtk(PlatformAppHost* host, |
+ const Extension* extension) |
+ : ShellWindow(host, extension), |
state_(GDK_WINDOW_STATE_WITHDRAWN), |
is_active_(!ui::ActiveWindowWatcherX::WMSupportsActivation()) { |
- host_->view()->SetContainer(this); |
window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); |
- gtk_container_add(GTK_CONTAINER(window_), host_->view()->native_view()); |
- |
- const Extension* extension = host_->extension(); |
+ gfx::NativeView native_view = |
+ host->host_contents()->GetView()->GetNativeView(); |
+ gtk_container_add(GTK_CONTAINER(window_), native_view); |
// TOOD(mihaip): restore prior window dimensions and positions on relaunch. |
gtk_window_set_default_size( |
@@ -190,6 +192,7 @@ gboolean ShellWindowGtk::OnWindowState(GtkWidget* sender, |
} |
// static |
-ShellWindow* ShellWindow::CreateShellWindow(ExtensionHost* host) { |
- return new ShellWindowGtk(host); |
+ShellWindow* ShellWindow::CreateShellWindow(PlatformAppHost* host, |
+ const Extension* extension) { |
+ return new ShellWindowGtk(host, extension); |
} |