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

Unified Diff: ash/wm/window_state.h

Issue 2889413002: chromeos: nukes window_state_aura (Closed)
Patch Set: merge, remove include from windows and shuffle functions for declaration Created 3 years, 7 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
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.h
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h
index 9438cd7b21a18e661579d88d844fbcbb3d9c734d..25f52bd126e28e99626d2049c9bf47a043eb6756 100644
--- a/ash/wm/window_state.h
+++ b/ash/wm/window_state.h
@@ -33,10 +33,20 @@ enum class WindowPinType;
}
namespace wm {
+class WindowState;
class WindowStateDelegate;
class WindowStateObserver;
class WMEvent;
+// Returns the WindowState for the active window, null if there is no active
+// window.
+ASH_EXPORT WindowState* GetActiveWindowState();
+
+// Returns the WindowState for |window|. Creates WindowState if it doesn't
+// exist. The returned value is owned by |window| (you should not delete it).
+ASH_EXPORT WindowState* GetWindowState(aura::Window* window);
+ASH_EXPORT const WindowState* GetWindowState(const aura::Window* window);
+
// WindowState manages and defines ash specific window state and
// behavior. Ash specific per-window state (such as ones that controls
// window manager behavior) and ash specific window behavior (such as
@@ -323,17 +333,17 @@ class ASH_EXPORT WindowState {
// Called from the associated WmWindow once the window pin type changes.
void OnWindowPinTypeChanged();
- protected:
- explicit WindowState(WmWindow* window);
-
private:
friend class DefaultState;
friend class ash::LockWindowState;
friend class ash::MaximizeModeWindowState;
+ friend WindowState* GetWindowState(aura::Window*);
FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest, CrossFadeToBounds);
FRIEND_TEST_ALL_PREFIXES(WindowAnimationsTest,
CrossFadeToBoundsFromTransform);
+ explicit WindowState(WmWindow* window);
+
WindowStateDelegate* delegate() { return delegate_.get(); }
// Returns the window's current always_on_top state.
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698