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