OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DEFAULT_STATE_H_ | 5 #ifndef ASH_WM_DEFAULT_STATE_H_ |
6 #define ASH_WM_DEFAULT_STATE_H_ | 6 #define ASH_WM_DEFAULT_STATE_H_ |
7 | 7 |
8 #include "ash/wm/window_state.h" | 8 #include "ash/wm/window_state.h" |
9 | 9 |
10 namespace ash { | 10 namespace ash { |
11 namespace wm { | 11 namespace wm { |
12 | 12 |
13 // DefaultState implements Ash behavior without state machine. | 13 // DefaultState implements Ash behavior without state machine. |
14 class DefaultState : public WindowState::State { | 14 class DefaultState : public WindowState::State { |
15 public: | 15 public: |
16 DefaultState(); | 16 DefaultState(); |
17 virtual ~DefaultState(); | 17 virtual ~DefaultState(); |
18 | 18 |
19 // WindowState::State overrides: | 19 // WindowState::State overrides: |
20 virtual void OnWMEvent(WindowState* window_state, | 20 virtual void OnWMEvent(WindowState* window_state, WMEvent event) OVERRIDE; |
21 WMEvent event) OVERRIDE; | 21 |
22 private: | 22 private: |
| 23 // Process stete dependent events, such as TOGGLE_MAXIMIZED, |
| 24 // TOGGLE_FULLSCREEN. |
| 25 static bool ProcessCompoundEvents(WindowState* window_state, WMEvent event); |
| 26 |
| 27 // Animates to new window bounds based on the current and previous show type. |
| 28 static void UpdateBoundsFromShowType(wm::WindowState* window_state, |
| 29 wm::WindowShowType old_show_type); |
| 30 |
23 DISALLOW_COPY_AND_ASSIGN(DefaultState); | 31 DISALLOW_COPY_AND_ASSIGN(DefaultState); |
24 }; | 32 }; |
25 | 33 |
26 } // namespace wm | 34 } // namespace wm |
27 } // namespace ash | 35 } // namespace ash |
28 | 36 |
29 #endif // ASH_WM_DEFAULT_STATE_H_ | 37 #endif // ASH_WM_DEFAULT_STATE_H_ |
OLD | NEW |