Chromium Code Reviews| 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_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ | 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ |
| 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ | 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ |
| 7 | 7 |
|
oshima
2016/04/08 07:09:42
include?
| |
| 8 #include "ash/wm/window_state.h" | 8 #include "ash/wm/window_state.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ash { |
| 12 class MaximizeModeWindowManager; | 12 class MaximizeModeWindowManager; |
| 13 | 13 |
| 14 // The MaximizeModeWindowState implementation which reduces all possible window | 14 // The MaximizeModeWindowState implementation which reduces all possible window |
| 15 // states to minimized and maximized. If a window cannot be maximized it will be | 15 // states to minimized and maximized. If a window cannot be maximized it will be |
| 16 // set to normal. If a window cannot fill the entire workspace it will be | 16 // set to normal. If a window cannot fill the entire workspace it will be |
| 17 // centered within the workspace. | 17 // centered within the workspace. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 // Depending on the capabilities of the window we either return | 56 // Depending on the capabilities of the window we either return |
| 57 // |WINDOW_STATE_TYPE_MAXIMIZED| or |WINDOW_STATE_TYPE_NORMAL|. | 57 // |WINDOW_STATE_TYPE_MAXIMIZED| or |WINDOW_STATE_TYPE_NORMAL|. |
| 58 wm::WindowStateType GetMaximizedOrCenteredWindowType( | 58 wm::WindowStateType GetMaximizedOrCenteredWindowType( |
| 59 wm::WindowState* window_state); | 59 wm::WindowState* window_state); |
| 60 | 60 |
| 61 // Updates the bounds to the maximum possible bounds according to the current | 61 // Updates the bounds to the maximum possible bounds according to the current |
| 62 // window state. If |animated| is set we animate the change. | 62 // window state. If |animated| is set we animate the change. |
| 63 void UpdateBounds(wm::WindowState* window_state, bool animated); | 63 void UpdateBounds(wm::WindowState* window_state, bool animated); |
| 64 | 64 |
| 65 // The original state object of the window. | 65 // The original state object of the window. |
| 66 scoped_ptr<wm::WindowState::State> old_state_; | 66 std::unique_ptr<wm::WindowState::State> old_state_; |
| 67 | 67 |
| 68 // The state object for this object which owns this instance. | 68 // The state object for this object which owns this instance. |
| 69 aura::Window* window_; | 69 aura::Window* window_; |
| 70 | 70 |
| 71 // The creator which needs to be informed when this state goes away. | 71 // The creator which needs to be informed when this state goes away. |
| 72 MaximizeModeWindowManager* creator_; | 72 MaximizeModeWindowManager* creator_; |
| 73 | 73 |
| 74 // The current state type. Due to the nature of this state, this can only be | 74 // The current state type. Due to the nature of this state, this can only be |
| 75 // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}. | 75 // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}. |
| 76 wm::WindowStateType current_state_type_; | 76 wm::WindowStateType current_state_type_; |
| 77 | 77 |
| 78 // If true, do not update bounds. | 78 // If true, do not update bounds. |
| 79 bool defer_bounds_updates_; | 79 bool defer_bounds_updates_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState); | 81 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace ash | 84 } // namespace ash |
| 85 | 85 |
| 86 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ | 86 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ |
| OLD | NEW |