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

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

Issue 934843002: Implement DeviceMotionEvent API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missed test Created 5 years, 9 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: 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 ea473e0a9fab5ed9f78ee792401a6fc27428ecb8..696112b5d1c583c9d5a5c55271cf1945e9b5acdf 100644
--- a/ash/content/display/screen_orientation_controller_chromeos.cc
+++ b/ash/content/display/screen_orientation_controller_chromeos.cc
@@ -147,16 +147,16 @@ void ScreenOrientationController::OnWindowDestroying(aura::Window* window) {
}
void ScreenOrientationController::OnAccelerometerUpdated(
- const chromeos::AccelerometerUpdate& update) {
+ scoped_refptr<const chromeos::AccelerometerUpdate> update) {
if (rotation_locked_ && !CanRotateInLockedState())
return;
- if (!update.has(chromeos::ACCELEROMETER_SOURCE_SCREEN))
+ if (!update->has(chromeos::ACCELEROMETER_SOURCE_SCREEN))
return;
// Ignore the reading if it appears unstable. The reading is considered
// unstable if it deviates too much from gravity
- if (ui::IsAccelerometerReadingStable(update,
+ if (ui::IsAccelerometerReadingStable(*update,
chromeos::ACCELEROMETER_SOURCE_SCREEN)) {
- HandleScreenRotation(update.get(chromeos::ACCELEROMETER_SOURCE_SCREEN));
+ HandleScreenRotation(update->get(chromeos::ACCELEROMETER_SOURCE_SCREEN));
}
}

Powered by Google App Engine
This is Rietveld 408576698