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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_state.h

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698