OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_WINDOW_STATE_OBSERVER_H_ | 5 #ifndef ASH_WM_WINDOW_STATE_OBSERVER_H_ |
6 #define ASH_WM_WINDOW_STATE_OBSERVER_H_ | 6 #define ASH_WM_WINDOW_STATE_OBSERVER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/wm/wm_types.h" | 9 #include "ash/wm/wm_types.h" |
10 | 10 |
11 namespace ash { | 11 namespace ash { |
12 namespace wm { | 12 namespace wm { |
13 class WindowState; | 13 class WindowState; |
14 | 14 |
15 class ASH_EXPORT WindowStateObserver { | 15 class ASH_EXPORT WindowStateObserver { |
16 public: | 16 public: |
17 // Called when the window's show type has changed. This is different from | 17 // Following observer methods are different from kWindowShowStatekey |
18 // kWindowShowStatekey property change as this will be invoked when the window | 18 // property change as this will be invoked when the window |
pkotwicz
2014/02/12 22:27:27
this -> they
oshima
2014/02/13 14:52:34
Done.
| |
19 // gets left/right maximized, and auto positioned. |old_type| is the value | 19 // gets left/right maximized, and auto positioned. |old_type| is the value |
20 // before the change. | 20 // before the change. |
21 virtual void OnWindowShowTypeChanged(WindowState* window_state, | 21 |
22 WindowShowType old_type) {} | 22 // Called after the window's show type is set to new type, but before |
23 // the window's bounds has been updated for the new type. | |
24 // This is used to update the shell state such as work area so | |
25 // that the window can use the correct environment to update its bounds. | |
pkotwicz
2014/02/12 22:27:27
Can you please add a TODO to remove this method on
oshima
2014/02/13 14:52:34
Added TODO. It requires a couple of more refactori
| |
26 virtual void OnPreWindowShowTypeChange(WindowState* window_state, | |
27 WindowShowType old_type) {} | |
28 | |
29 // Called after the window's state has been changed for the new show type. | |
30 // This is used to update the shell state that depends on the update | |
31 // window bounds, such as shelf visibility. | |
32 virtual void OnPostWindowShowTypeChange(WindowState* window_state, | |
33 WindowShowType old_type) {} | |
23 }; | 34 }; |
24 | 35 |
25 } // namespace wm | 36 } // namespace wm |
26 } // namespace ash | 37 } // namespace ash |
27 | 38 |
28 #endif // ASH_WM_WINDOW_STATE_OBSERVER_H_ | 39 #endif // ASH_WM_WINDOW_STATE_OBSERVER_H_ |
OLD | NEW |