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

Unified Diff: trunk/src/ash/wm/maximize_mode/maximize_mode_controller.cc

Issue 290563003: Revert 270746 "Suppressed screen rotation notifications triggere..." (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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/ash/wm/maximize_mode/maximize_mode_controller.cc
===================================================================
--- trunk/src/ash/wm/maximize_mode/maximize_mode_controller.cc (revision 270792)
+++ trunk/src/ash/wm/maximize_mode/maximize_mode_controller.cc (working copy)
@@ -11,7 +11,6 @@
#include "ash/display/display_manager.h"
#include "ash/shell.h"
#include "ash/wm/maximize_mode/maximize_mode_event_blocker.h"
-#include "base/auto_reset.h"
#include "base/command_line.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/events/event.h"
@@ -133,8 +132,7 @@
MaximizeModeController::MaximizeModeController()
: rotation_locked_(false),
- have_seen_accelerometer_data_(false),
- in_set_screen_rotation_(false) {
+ have_seen_accelerometer_data_(false) {
Shell::GetInstance()->accelerometer_controller()->AddObserver(this);
}
@@ -237,8 +235,8 @@
// Also, SetDisplayRotation will save the setting to the local store,
// this should be stored in a way that we can distinguish what the
// rotation was set by.
- SetDisplayRotation(display_manager,
- gfx::Display::ROTATE_0);
+ display_manager->SetDisplayRotation(gfx::Display::InternalDisplayId(),
+ gfx::Display::ROTATE_0);
}
rotation_locked_ = false;
return;
@@ -296,18 +294,9 @@
// match screen orientation.
if (new_rotation == gfx::Display::ROTATE_0 ||
maximize_mode_engaged) {
- SetDisplayRotation(display_manager,
- new_rotation);
+ display_manager->SetDisplayRotation(gfx::Display::InternalDisplayId(),
+ new_rotation);
}
}
-void MaximizeModeController::SetDisplayRotation(
- DisplayManager* display_manager,
- gfx::Display::Rotation rotation) {
- base::AutoReset<bool> auto_in_set_screen_rotation(
- &in_set_screen_rotation_, true);
- display_manager->SetDisplayRotation(gfx::Display::InternalDisplayId(),
- rotation);
-}
-
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698