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

Unified Diff: ash/content/display/screen_orientation_controller_chromeos.cc

Issue 822503003: Change AccelerometerReader to a Singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update new dependency Created 5 years, 11 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 | « no previous file | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/content/display/screen_orientation_controller_chromeos.cc
diff --git a/ash/content/display/screen_orientation_controller_chromeos.cc b/ash/content/display/screen_orientation_controller_chromeos.cc
index f36f1931b9c0e3c37fbe85a2a24f58b1b13ec7e9..297455d5fd51085e274ef83e4df013d75bbbc181 100644
--- a/ash/content/display/screen_orientation_controller_chromeos.cc
+++ b/ash/content/display/screen_orientation_controller_chromeos.cc
@@ -74,7 +74,7 @@ ScreenOrientationController::ScreenOrientationController()
ScreenOrientationController::~ScreenOrientationController() {
content::ScreenOrientationProvider::SetDelegate(NULL);
Shell::GetInstance()->RemoveShellObserver(this);
- Shell::GetInstance()->accelerometer_reader()->RemoveObserver(this);
+ chromeos::AccelerometerReader::GetInstance()->RemoveObserver(this);
Shell::GetInstance()->display_controller()->RemoveObserver(this);
}
@@ -220,14 +220,14 @@ void ScreenOrientationController::OnMaximizeModeStarted() {
display_manager->GetDisplayInfo(gfx::Display::InternalDisplayId())
.rotation();
LoadDisplayRotationProperties();
- Shell::GetInstance()->accelerometer_reader()->AddObserver(this);
+ chromeos::AccelerometerReader::GetInstance()->AddObserver(this);
Shell::GetInstance()->display_controller()->AddObserver(this);
}
void ScreenOrientationController::OnMaximizeModeEnded() {
if (!Shell::GetInstance()->display_manager()->HasInternalDisplay())
return;
- Shell::GetInstance()->accelerometer_reader()->RemoveObserver(this);
+ chromeos::AccelerometerReader::GetInstance()->RemoveObserver(this);
Shell::GetInstance()->display_controller()->RemoveObserver(this);
if (current_rotation_ != user_rotation_)
SetDisplayRotation(user_rotation_);
« no previous file with comments | « no previous file | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698