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

Unified Diff: chrome/browser/ui/gtk/gtk_window_util.cc

Issue 10871087: GTK implementation of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change the polling loop and its comment a bit 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/gtk_window_util.cc
diff --git a/chrome/browser/ui/gtk/gtk_window_util.cc b/chrome/browser/ui/gtk/gtk_window_util.cc
index 569bc1da12b741479ffac79fb559ffc0bd114907..60eae4c35d4699cafbf14bd45fe3f3e68bc8d422 100644
--- a/chrome/browser/ui/gtk/gtk_window_util.cc
+++ b/chrome/browser/ui/gtk/gtk_window_util.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/gtk/gtk_window_util.h"
#include <dlfcn.h>
+#include "chrome/browser/ui/base_window.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
@@ -183,4 +184,13 @@ void SetWindowCustomClass(GtkWindow* window, const std::string& wmclass) {
gtk_window_set_role(window, wmclass.c_str());
}
+void UpdateWindowPosition(BaseWindow* window, gfx::Rect* bounds,
Evan Stade 2012/08/30 23:55:38 one param per line
+ gfx::Rect* restored_bounds) {
+ gint x, y;
+ gtk_window_get_position(window->GetNativeWindow(), &x, &y);
+ (*bounds).set_origin(gfx::Point(x, y));
+ if (!window->IsFullscreen() && !window->IsMaximized())
+ (*restored_bounds) = *bounds;
Evan Stade 2012/08/30 23:55:38 no parens
+}
+
} // namespace gtk_window_util

Powered by Google App Engine
This is Rietveld 408576698