Chromium Code Reviews| 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 |