Index: athena/system/orientation_controller.cc |
diff --git a/athena/system/orientation_controller.cc b/athena/system/orientation_controller.cc |
index 93d0bf10023ec850f1f47670847efee5e4a0c184..6b294af25e7f5e4d087d2df9f84e82c7f5dff305 100644 |
--- a/athena/system/orientation_controller.cc |
+++ b/athena/system/orientation_controller.cc |
@@ -24,18 +24,20 @@ OrientationController::OrientationController() { |
void OrientationController::InitWith( |
scoped_refptr<base::TaskRunner> blocking_task_runner) { |
- accelerometer_reader_.reset( |
- new chromeos::AccelerometerReader(blocking_task_runner, this)); |
+ accelerometer_reader_.reset(new chromeos::AccelerometerReader()); |
+ accelerometer_reader_->Initialize(blocking_task_runner); |
+ accelerometer_reader_->AddObserver(this); |
} |
OrientationController::~OrientationController() { |
} |
void OrientationController::Shutdown() { |
+ accelerometer_reader_->RemoveObserver(this); |
accelerometer_reader_.reset(); |
} |
-void OrientationController::HandleAccelerometerUpdate( |
+void OrientationController::OnAccelerometerUpdated( |
const ui::AccelerometerUpdate& update) { |
if (!update.has(ui::ACCELEROMETER_SOURCE_SCREEN)) |
return; |