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

Side by Side Diff: third_party/WebKit/Source/modules/sensor/MagnetometerReading.cpp

Issue 2534703002: [Sensors] Layouts test to check frequency hint (Closed)
Patch Set: Comments from Reilly Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/sensor/MagnetometerReading.h" 5 #include "modules/sensor/MagnetometerReading.h"
6 6
7 #include "modules/sensor/MagnetometerReadingInit.h" 7 #include "modules/sensor/MagnetometerReadingInit.h"
8 #include "wtf/CurrentTime.h" 8 #include "wtf/CurrentTime.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 30 matching lines...) Expand all
41 double MagnetometerReading::y() const { 41 double MagnetometerReading::y() const {
42 return data().values[1]; 42 return data().values[1];
43 } 43 }
44 44
45 double MagnetometerReading::z() const { 45 double MagnetometerReading::z() const {
46 return data().values[2]; 46 return data().values[2];
47 } 47 }
48 48
49 bool MagnetometerReading::isReadingUpdated( 49 bool MagnetometerReading::isReadingUpdated(
50 const device::SensorReading& previous) const { 50 const device::SensorReading& previous) const {
51 return previous.values[0] != x() && previous.values[1] != y() && 51 return previous.values[0] != x() || previous.values[1] != y() ||
52 previous.values[2] != z(); 52 previous.values[2] != z();
53 } 53 }
54 54
55 DEFINE_TRACE(MagnetometerReading) { 55 DEFINE_TRACE(MagnetometerReading) {
56 SensorReading::trace(visitor); 56 SensorReading::trace(visitor);
57 } 57 }
58 58
59 } // namespace blink 59 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698