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

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

Issue 10825240: Refactor ShellWindow to separate platform-specific code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 4 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
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 fe265587ee8c9cceafbeef1ab90330e5314af283..22f0db9ac4429a2040acd801dd7253a8cc7abbc9 100644
--- a/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc
@@ -13,11 +13,9 @@
#include "ui/base/x/active_window_watcher_x.h"
#include "ui/gfx/rect.h"
-ShellWindowGtk::ShellWindowGtk(Profile* profile,
- const extensions::Extension* extension,
- const GURL& url,
+ShellWindowGtk::ShellWindowGtk(ShellWindow* shell_window,
const ShellWindow::CreateParams& params)
- : ShellWindow(profile, extension, url),
+ : shell_window_(shell_window),
state_(GDK_WINDOW_STATE_WITHDRAWN),
is_active_(!ui::ActiveWindowWatcherX::WMSupportsActivation()),
content_thinks_its_fullscreen_(false) {
@@ -59,7 +57,7 @@ ShellWindowGtk::ShellWindowGtk(Profile* profile,
}
// TODO(mihaip): Mirror contents of <title> tag in window title
- gtk_window_set_title(window_, extension->name().c_str());
+ gtk_window_set_title(window_, extension()->name().c_str());
g_signal_connect(window_, "delete-event",
G_CALLBACK(OnMainWindowDeleteEventThunk), this);
@@ -121,7 +119,7 @@ void ShellWindowGtk::Close() {
// OnNativeClose does a delete this so no other members should
// be accessed after. gtk_widget_destroy is safe (and must
// be last).
- OnNativeClose();
+ shell_window_->OnNativeClose();
gtk_widget_destroy(window);
}
@@ -220,10 +218,12 @@ bool ShellWindowGtk::IsFullscreenOrPending() const {
return content_thinks_its_fullscreen_;
}
+void ShellWindowGtk::UpdateWindowTitle() {
+ // TODO(jeremya): implement.
+}
+
// static
-ShellWindow* ShellWindow::CreateImpl(Profile* profile,
- const extensions::Extension* extension,
- const GURL& url,
- const ShellWindow::CreateParams& params) {
- return new ShellWindowGtk(profile, extension, url, params);
+NativeShellWindow* NativeShellWindow::Create(
+ ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
+ return new ShellWindowGtk(shell_window, params);
}
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.h ('k') | chrome/browser/ui/views/extensions/shell_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698