| OLD | NEW |
| 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 Loading... |
| 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() { | 130 void OrientationSensor::OnSensorReadingChanged(double timestamp) { |
| 131 reading_dirty_ = true; | 131 reading_dirty_ = true; |
| 132 Sensor::OnSensorReadingChanged(timestamp); |
| 132 } | 133 } |
| 133 | 134 |
| 134 DEFINE_TRACE(OrientationSensor) { | 135 DEFINE_TRACE(OrientationSensor) { |
| 135 Sensor::Trace(visitor); | 136 Sensor::Trace(visitor); |
| 136 } | 137 } |
| 137 | 138 |
| 138 } // namespace blink | 139 } // namespace blink |
| OLD | NEW |