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

Unified Diff: ui/views/corewm/window_util.cc

Issue 11574041: Move WindowResizer to CoreWM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | « ui/views/corewm/window_util.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/window_util.cc
===================================================================
--- ui/views/corewm/window_util.cc (revision 173169)
+++ ui/views/corewm/window_util.cc (working copy)
@@ -5,6 +5,7 @@
#include "ui/views/corewm/window_util.h"
#include "ui/aura/client/activation_client.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
@@ -82,5 +83,21 @@
return old_layer;
}
+bool IsWindowNormal(const aura::Window* window) {
+ return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey));
+}
+
+bool IsWindowStateNormal(ui::WindowShowState state) {
+ return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT;
+}
+
+void SetRestoreBoundsInScreen(aura::Window* window, const gfx::Rect& bounds) {
+ window->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds));
+}
+
+const gfx::Rect* GetRestoreBoundsInScreen(aura::Window* window) {
+ return window->GetProperty(aura::client::kRestoreBoundsKey);
+}
+
} // namespace corewm
} // namespace views
« no previous file with comments | « ui/views/corewm/window_util.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698