Index: ash/wm/window_state.h |
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h |
index 4ed2fe6b699b7f7e3a2d647586a76d62610f4bd8..9ab9ae335a4ddeaecc9a2a276705393450b370c6 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,25 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { |
intptr_t old) OVERRIDE; |
private: |
+ friend class DefaultState; |
+ // TODO(oshima): Remove more logic from WLM and this. |
pkotwicz
2014/02/12 05:10:00
Nit: Can you rephrase the TODO? I do not understan
oshima
2014/02/12 14:08:33
Done.
|
+ 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 +333,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. |
+ bool ignore_property_change_; |
WindowShowType window_show_type_; |