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

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

Issue 9969087: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring back 512x384 default bounds. 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
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 4fb7e61c7fec3f4dc3e0bc6faead532d13050218..e82b53f2ab72fbf10764661aed2fe2774ad93072 100644
--- a/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/shell_window_gtk.cc
@@ -19,35 +19,9 @@ ShellWindowGtk::ShellWindowGtk(ExtensionHost* host)
gtk_container_add(GTK_CONTAINER(window_), host_->view()->native_view());
- const Extension* extension = host_->extension();
+ gtk_window_set_default_size(window_, 512, 384);
miket_OOO 2012/04/06 18:05:01 If these values are temporary, fine. But since I s
Mihai Parparita -not on Chrome 2012/04/06 22:02:59 Moved to shared constants (defined in shell_window
- // TOOD(mihaip): restore prior window dimensions and positions on relaunch.
- gtk_window_set_default_size(
- window_, extension->launch_width(), extension->launch_height());
-
- int min_width = extension->launch_min_width();
- int min_height = extension->launch_min_height();
- int max_width = extension->launch_max_width();
- int max_height = extension->launch_max_height();
- GdkGeometry hints;
- int hints_mask = 0;
- if (min_width || min_height) {
- hints.min_height = min_height;
- hints.min_width = min_width;
- hints_mask |= GDK_HINT_MIN_SIZE;
- }
- if (max_width || max_height) {
- hints.max_height = max_height ? max_height : G_MAXINT;
- hints.max_width = max_width ? max_width : G_MAXINT;
- hints_mask |= GDK_HINT_MAX_SIZE;
- }
- if (hints_mask) {
- gtk_window_set_geometry_hints(
- window_,
- GTK_WIDGET(window_),
- &hints,
- static_cast<GdkWindowHints>(hints_mask));
- }
+ const Extension* extension = host_->extension();
// TODO(mihaip): Mirror contents of <title> tag in window title
gtk_window_set_title(window_, extension->name().c_str());

Powered by Google App Engine
This is Rietveld 408576698