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

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

Issue 247363005: Fullscreen/immersive mode is allowed in touch view mode, the shelf gets hidden and an edge swipe br… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
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 23 matching lines...) Expand all
34 // WindowState::State overrides: 34 // WindowState::State overrides:
35 virtual void OnWMEvent(wm::WindowState* window_state, 35 virtual void OnWMEvent(wm::WindowState* window_state,
36 const wm::WMEvent* event) OVERRIDE; 36 const wm::WMEvent* event) OVERRIDE;
37 37
38 virtual wm::WindowStateType GetType() const OVERRIDE; 38 virtual wm::WindowStateType GetType() const OVERRIDE;
39 virtual void AttachState(wm::WindowState* window_state, 39 virtual void AttachState(wm::WindowState* window_state,
40 wm::WindowState::State* previous_state) OVERRIDE; 40 wm::WindowState::State* previous_state) OVERRIDE;
41 virtual void DetachState(wm::WindowState* window_state) OVERRIDE; 41 virtual void DetachState(wm::WindowState* window_state) OVERRIDE;
42 42
43 private: 43 private:
44 // Centers the window on top of the workspace or maximizes it. If |animate| is 44 // Updates the window to |new_state_type| and resulting bounds:
45 // set to true, a bounds change will be animated - otherwise immediate. 45 // Either full screen, maximized centered or minimized. If the state does not
46 void MaximizeOrCenterWindow(wm::WindowState* window_state, bool animate); 46 // change, only the bounds will be changed. If |animate| is set, the bound
47 // change get animated.
48 void UpdateWindow(wm::WindowState* window_state,
49 wm::WindowStateType new_state_type,
50 bool animate);
47 51
48 // Minimize the window. 52 // Depending on the capabilities of the window we either return
49 void Minimize(wm::WindowState* window_state); 53 // |WINDOW_STATE_TYPE_MAXIMIZED| or |WINDOW_STATE_TYPE_NORMAL|.
54 wm::WindowStateType GetMaximizedOrCenteredWindowType(
55 wm::WindowState* window_state);
56
57 // Updates the bounds to the maximum possible bounds according to the current
58 // window state. If |animated| is set we animate the change.
59 void UpdateBounds(wm::WindowState* window_state, bool animated);
50 60
51 // The original state object of the window. 61 // The original state object of the window.
52 scoped_ptr<wm::WindowState::State> old_state_; 62 scoped_ptr<wm::WindowState::State> old_state_;
53 63
54 // The state object for this object which owns this instance. 64 // The state object for this object which owns this instance.
55 aura::Window* window_; 65 aura::Window* window_;
56 66
57 // The creator which needs to be informed when this state goes away. 67 // The creator which needs to be informed when this state goes away.
58 MaximizeModeWindowManager* creator_; 68 MaximizeModeWindowManager* creator_;
59 69
60 // The current state type. Due to the nature of this state, this can only be 70 // The current state type. Due to the nature of this state, this can only be
61 // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}. 71 // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}.
62 wm::WindowStateType current_state_type_; 72 wm::WindowStateType current_state_type_;
63 73
64 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState); 74 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState);
65 }; 75 };
66 76
67 } // namespace ash 77 } // namespace ash
68 78
69 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_ 79 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698