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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller.h

Issue 291233002: Re-landing "Suppressed screen rotation notifications triggeres by the accelerometer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ifdef'ed BlockRotationNotification test so it only runs on ChromeOS. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_controller.h
diff --git a/ash/wm/maximize_mode/maximize_mode_controller.h b/ash/wm/maximize_mode/maximize_mode_controller.h
index 9810d4d5bfc93019de796aec98baeb65790b1d66..6363211e343e2d43de4634dc258d515076e111d0 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -7,6 +7,7 @@
#include "ash/accelerometer/accelerometer_observer.h"
#include "ash/ash_export.h"
+#include "ash/display/display_manager.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -26,6 +27,10 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
MaximizeModeController();
virtual ~MaximizeModeController();
+ bool in_set_screen_rotation() const {
+ return in_set_screen_rotation_;
+ }
+
// True if |rotation_lock_| has been set, and OnAccelerometerUpdated will not
// change the display rotation.
bool rotation_locked() {
@@ -57,6 +62,10 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
// screen.
void HandleScreenRotation(const gfx::Vector3dF& lid);
+ // Sets the display rotation and suppresses display notifications.
+ void SetDisplayRotation(DisplayManager* display_manager,
+ gfx::Display::Rotation rotation);
+
// An event targeter controller which traps mouse and keyboard events while
// maximize mode is engaged.
scoped_ptr<MaximizeModeEventBlocker> event_blocker_;
@@ -70,6 +79,9 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
// Whether we have ever seen accelerometer data.
bool have_seen_accelerometer_data_;
+ // True when the screen's orientation is being changed.
+ bool in_set_screen_rotation_;
+
DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
};
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698