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

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

Issue 261163004: Lock Rotation when screen is manually rotated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CONTROLLER_H_ 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
7 7
8 #include "ash/accelerometer/accelerometer_observer.h" 8 #include "ash/accelerometer/accelerometer_observer.h"
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 private: 41 private:
42 // Detect hinge rotation from |base| and |lid| accelerometers and 42 // Detect hinge rotation from |base| and |lid| accelerometers and
43 // automatically start / stop maximize mode. 43 // automatically start / stop maximize mode.
44 void HandleHingeRotation(const gfx::Vector3dF& base, 44 void HandleHingeRotation(const gfx::Vector3dF& base,
45 const gfx::Vector3dF& lid); 45 const gfx::Vector3dF& lid);
46 46
47 // Detect screen rotation from |lid| accelerometer and automatically rotate 47 // Detect screen rotation from |lid| accelerometer and automatically rotate
48 // screen. 48 // screen.
49 void HandleScreenRotation(const gfx::Vector3dF& lid); 49 void HandleScreenRotation(const gfx::Vector3dF& lid);
50 50
51 // Enables MaximizeModeWindowManager, and determines the current state of
52 // rotation lock.
53 void EnterMaximizeMode();
54
55 // Removes MaximizeModeWindowManager and resets the display rotation if there
56 // is no rotation lock.
57 void LeaveMaximizeMode();
58
51 // An event handler which traps mouse and keyboard events while maximize 59 // An event handler which traps mouse and keyboard events while maximize
52 // mode is engaged. 60 // mode is engaged.
53 scoped_ptr<MaximizeModeEventBlocker> event_blocker_; 61 scoped_ptr<MaximizeModeEventBlocker> event_blocker_;
54 62
55 // When true calls to OnAccelerometerUpdated will not rotate the display. 63 // When true calls to OnAccelerometerUpdated will not rotate the display.
56 bool rotation_locked_; 64 bool rotation_locked_;
57 65
58 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController); 66 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
59 }; 67 };
60 68
61 } // namespace ash 69 } // namespace ash
62 70
63 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ 71 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698