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

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

Issue 1043543002: Fixed MaximizeModeWindowState::UpdateWindowPosition(...) to not animate incorrectly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
9 9
10 namespace ash { 10 namespace ash {
11 class MaximizeModeWindowManager; 11 class MaximizeModeWindowManager;
12 12
13 // The MaximizeModeWindowState implementation which reduces all possible window 13 // The MaximizeModeWindowState implementation which reduces all possible window
14 // states to minimized and maximized. If a window cannot be maximized it will be 14 // states to minimized and maximized. If a window cannot be maximized it will be
15 // set to normal. If a window cannot fill the entire workspace it will be 15 // set to normal. If a window cannot fill the entire workspace it will be
16 // centered within the workspace. 16 // centered within the workspace.
17 class MaximizeModeWindowState : public wm::WindowState::State { 17 class MaximizeModeWindowState : public wm::WindowState::State {
18 public: 18 public:
19 // Called when the window position might need to be updated. 19 // Called when the window position might need to be updated.
20 static void UpdateWindowPosition(wm::WindowState* window_state, 20 static void UpdateWindowPosition(wm::WindowState* window_state);
21 bool animated);
22 21
23 // The |window|'s state object will be modified to use this new window mode 22 // The |window|'s state object will be modified to use this new window mode
24 // state handler. Upon destruction it will restore the previous state handler 23 // state handler. Upon destruction it will restore the previous state handler
25 // and call |creator::WindowStateDestroyed()| to inform that the window mode 24 // and call |creator::WindowStateDestroyed()| to inform that the window mode
26 // was reverted to the old window manager. 25 // was reverted to the old window manager.
27 MaximizeModeWindowState(aura::Window* window, 26 MaximizeModeWindowState(aura::Window* window,
28 MaximizeModeWindowManager* creator); 27 MaximizeModeWindowManager* creator);
29 ~MaximizeModeWindowState() override; 28 ~MaximizeModeWindowState() override;
30 29
31 // Leaves the maximize mode by reverting to previous state object. 30 // Leaves the maximize mode by reverting to previous state object.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 76
78 // If true, do not update bounds. 77 // If true, do not update bounds.
79 bool defer_bounds_updates_; 78 bool defer_bounds_updates_;
80 79
81 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState); 80 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState);
82 }; 81 };
83 82
84 } // namespace ash 83 } // namespace ash
85 84
86 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ 85 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.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