Index: ash/wm/window_state.h |
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h |
index 4ed2fe6b699b7f7e3a2d647586a76d62610f4bd8..1023cdd8cb86f47c7c95d6e0ba4cc59611ae29ce 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; |
@@ -271,6 +274,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 +288,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 +334,9 @@ 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 in |
+ // UpdateWindowShowType() |
+ bool ignore_property_change_; |
WindowShowType window_show_type_; |