Chromium Code Reviews| Index: ash/wm/window_state.h |
| diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h |
| index 4ed2fe6b699b7f7e3a2d647586a76d62610f4bd8..e0e8f361a2f88a42788809bcf4431df1426e8d77 100644 |
| --- a/ash/wm/window_state.h |
| +++ b/ash/wm/window_state.h |
| @@ -23,6 +23,9 @@ class Rect; |
| } |
| namespace ash { |
| +namespace internal { |
| +class WorkspaceLayoutManager; |
| +} |
| namespace wm { |
| class WindowStateDelegate; |
| @@ -94,6 +97,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { |
| bool IsActive() const; |
| bool IsDocked() const; |
| bool IsSnapped() const; |
| + bool IsPanel() const; |
| // Checks if the window can change its state accordingly. |
| bool CanMaximize() const; |
| @@ -271,6 +275,10 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { |
| // Sets the currently stored restore bounds and clears the restore bounds. |
| void SetAndClearRestoreBounds(); |
| + // Adjusts the |bounds| so that they are flush with the edge of the |
| + // workspace if the window represented by |window_state| is side snapped. |
| + void AdjustSnappedBounds(gfx::Rect* bounds); |
| + |
| // Returns a pointer to DragDetails during drag operations. |
| const DragDetails* drag_details() const { return drag_details_.get(); } |
| DragDetails* drag_details() { return drag_details_.get(); } |
| @@ -281,12 +289,26 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { |
| intptr_t old) OVERRIDE; |
| private: |
| + friend class DefaultState; |
| + // TODO(oshima): Move more logic from WLM to this class and remove |
| + // this friend. |
| + friend class internal::WorkspaceLayoutManager; |
| + |
| + WindowStateDelegate* delegate() { return delegate_.get(); } |
| + |
| // Snaps the window to left or right of the desktop with given bounds. |
| void SnapWindow(WindowShowType left_or_right, |
| const gfx::Rect& bounds); |
| // Sets the window show type and updates the show state if necessary. |
| - void SetWindowShowType(WindowShowType new_window_show_type); |
| + // Note that this does not update the window bounds. |
| + void UpdateWindowShowType(WindowShowType new_window_show_type); |
| + |
| + void NotifyPreShowTypeChange(WindowShowType old_window_show_type); |
| + void NotifyPostShowTypeChange(WindowShowType old_window_show_type); |
| + |
| + void SetBoundsDirect(const gfx::Rect& bounds); |
| + void SetBoundsDirectAnimated(const gfx::Rect& bounds); |
| // The owner of this window settings. |
| aura::Window* window_; |
| @@ -313,8 +335,8 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { |
| ObserverList<WindowStateObserver> observer_list_; |
| - // True when in SetWindowShowType(). This is used to avoid reentrance. |
| - bool in_set_window_show_type_; |
| + // True to ignore a property change event to avoid reentrance. |
|
pkotwicz
2014/02/12 22:27:27
How about: "True to ignore a property change event
oshima
2014/02/13 14:52:34
Done.
|
| + bool ignore_property_change_; |
| WindowShowType window_show_type_; |