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

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

Issue 2885373002: [Sensors] Simplify calculation of the reporting period (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/OrientationSensor.h" 5 #include "modules/sensor/OrientationSensor.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/geometry/DOMMatrix.h" 8 #include "core/geometry/DOMMatrix.h"
9 9
10 using device::mojom::blink::SensorType; 10 using device::mojom::blink::SensorType;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return reading_dirty_ || !CanReturnReadings(); 120 return reading_dirty_ || !CanReturnReadings();
121 } 121 }
122 122
123 OrientationSensor::OrientationSensor(ExecutionContext* execution_context, 123 OrientationSensor::OrientationSensor(ExecutionContext* execution_context,
124 const SensorOptions& options, 124 const SensorOptions& options,
125 ExceptionState& exception_state, 125 ExceptionState& exception_state,
126 device::mojom::blink::SensorType type) 126 device::mojom::blink::SensorType type)
127 : Sensor(execution_context, options, exception_state, type), 127 : Sensor(execution_context, options, exception_state, type),
128 reading_dirty_(true) {} 128 reading_dirty_(true) {}
129 129
130 void OrientationSensor::OnSensorReadingChanged(double timestamp) { 130 void OrientationSensor::OnSensorReadingChanged() {
131 reading_dirty_ = true; 131 reading_dirty_ = true;
132 Sensor::OnSensorReadingChanged(timestamp); 132 Sensor::OnSensorReadingChanged();
133 } 133 }
134 134
135 DEFINE_TRACE(OrientationSensor) { 135 DEFINE_TRACE(OrientationSensor) {
136 Sensor::Trace(visitor); 136 Sensor::Trace(visitor);
137 } 137 }
138 138
139 } // namespace blink 139 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/OrientationSensor.h ('k') | third_party/WebKit/Source/modules/sensor/Sensor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698