| 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 0dce063f453ac7763615a160cca72818194bdc88..df1fe4bbc1a01a9f016849c3bcfc6c044f254a19 100644
|
| --- a/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc
|
| +++ b/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc
|
| @@ -4,20 +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());
|
| + gfx::NativeView native_view =
|
| + host->host_contents()->GetView()->GetNativeView();
|
| + gtk_container_add(GTK_CONTAINER(window_), native_view);
|
|
|
| gtk_window_set_default_size(window_, kDefaultWidth, kDefaultHeight);
|
|
|
| @@ -164,6 +168,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);
|
| }
|
|
|