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

Unified Diff: ash/wm/window_state_observer.h

Issue 149303003: [Refactor] Move the logic to update bounds for show type from WorkspaceLayoutManager to DefaultState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: ash/wm/window_state_observer.h
diff --git a/ash/wm/window_state_observer.h b/ash/wm/window_state_observer.h
index f177d5fbeba817fdc69f8d2b0e5c411680a6c029..d76b902f72f7a9e594609a0348e42bf479c6472f 100644
--- a/ash/wm/window_state_observer.h
+++ b/ash/wm/window_state_observer.h
@@ -14,12 +14,23 @@ class WindowState;
class ASH_EXPORT WindowStateObserver {
public:
- // Called when the window's show type has changed. This is different from
- // kWindowShowStatekey property change as this will be invoked when the window
+ // Following observer methods are different from kWindowShowStatekey
+ // property change as this will be invoked when the window
// gets left/right maximized, and auto positioned. |old_type| is the value
// before the change.
- virtual void OnWindowShowTypeChanged(WindowState* window_state,
- WindowShowType old_type) {}
+
+ // Called after the window's show type is set to new type, but before
+ // the window's bounds has been updated for the new type.
+ // This is used to update the shell state such as work area so
+ // that the window can use the correct environment to update its bounds.
+ virtual void OnPreWindowShowTypeChange(WindowState* window_state,
+ WindowShowType old_type) {}
pkotwicz 2014/02/12 05:10:00 I wonder whether it is possible to call OnPreWindo
oshima 2014/02/12 14:08:33 I thought about it, but I figured that's requires
+
+ // Called after the window's state has been changed for the new show type.
+ // This is used to update the shell state that depends on the update
+ // window bounds, such as shelf visibility.
+ virtual void OnPostWindowShowTypeChange(WindowState* window_state,
+ WindowShowType old_type) {}
};
} // namespace wm

Powered by Google App Engine
This is Rietveld 408576698