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

Unified Diff: chrome/browser/ui/gtk/extensions/shell_window_gtk.cc

Issue 10119003: Pull shell window stuff out of ExtensionHost and put in ShellWindow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 8 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
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698