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

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

Issue 588193003: Defer maximize mode bounds updates until after exiting overview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 {
(...skipping 13 matching lines...) Expand all
24 // state handler. Upon destruction it will restore the previous state handler 24 // state handler. Upon destruction it will restore the previous state handler
25 // and call |creator::WindowStateDestroyed()| to inform that the window mode 25 // and call |creator::WindowStateDestroyed()| to inform that the window mode
26 // was reverted to the old window manager. 26 // was reverted to the old window manager.
27 MaximizeModeWindowState(aura::Window* window, 27 MaximizeModeWindowState(aura::Window* window,
28 MaximizeModeWindowManager* creator); 28 MaximizeModeWindowManager* creator);
29 virtual ~MaximizeModeWindowState(); 29 virtual ~MaximizeModeWindowState();
30 30
31 // Leaves the maximize mode by reverting to previous state object. 31 // Leaves the maximize mode by reverting to previous state object.
32 void LeaveMaximizeMode(wm::WindowState* window_state); 32 void LeaveMaximizeMode(wm::WindowState* window_state);
33 33
34 // Sets whether to ignore bounds updates. If set to false, immediately does a
35 // bounds update as the current window bounds may no longer be correct.
36 void SetDeferBoundsUpdates(bool defer_bounds_updates);
37
34 // WindowState::State overrides: 38 // WindowState::State overrides:
35 virtual void OnWMEvent(wm::WindowState* window_state, 39 virtual void OnWMEvent(wm::WindowState* window_state,
36 const wm::WMEvent* event) OVERRIDE; 40 const wm::WMEvent* event) OVERRIDE;
37 41
38 virtual wm::WindowStateType GetType() const OVERRIDE; 42 virtual wm::WindowStateType GetType() const OVERRIDE;
39 virtual void AttachState(wm::WindowState* window_state, 43 virtual void AttachState(wm::WindowState* window_state,
40 wm::WindowState::State* previous_state) OVERRIDE; 44 wm::WindowState::State* previous_state) OVERRIDE;
41 virtual void DetachState(wm::WindowState* window_state) OVERRIDE; 45 virtual void DetachState(wm::WindowState* window_state) OVERRIDE;
42 46
43 private: 47 private:
(...skipping 20 matching lines...) Expand all
64 // The state object for this object which owns this instance. 68 // The state object for this object which owns this instance.
65 aura::Window* window_; 69 aura::Window* window_;
66 70
67 // 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.
68 MaximizeModeWindowManager* creator_; 72 MaximizeModeWindowManager* creator_;
69 73
70 // 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
71 // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}. 75 // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}.
72 wm::WindowStateType current_state_type_; 76 wm::WindowStateType current_state_type_;
73 77
78 // If true, do not update bounds.
79 bool defer_bounds_updates_;
80
74 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState); 81 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState);
75 }; 82 };
76 83
77 } // namespace ash 84 } // namespace ash
78 85
79 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ 86 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698