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

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

Issue 271133002: Revert 268794 "Lock Rotation when screen is manually rotated" (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/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
59 // An event handler which traps mouse and keyboard events while maximize 51 // An event handler which traps mouse and keyboard events while maximize
60 // mode is engaged. 52 // mode is engaged.
61 scoped_ptr<MaximizeModeEventBlocker> event_blocker_; 53 scoped_ptr<MaximizeModeEventBlocker> event_blocker_;
62 54
63 // When true calls to OnAccelerometerUpdated will not rotate the display. 55 // When true calls to OnAccelerometerUpdated will not rotate the display.
64 bool rotation_locked_; 56 bool rotation_locked_;
65 57
66 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController); 58 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
67 }; 59 };
68 60
69 } // namespace ash 61 } // namespace ash
70 62
71 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ 63 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | trunk/src/ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698