| OLD | NEW |
| 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 #ifndef Accelerometer_h | 5 #ifndef Accelerometer_h |
| 6 #define Accelerometer_h | 6 #define Accelerometer_h |
| 7 | 7 |
| 8 #include "modules/sensor/AccelerometerOptions.h" | |
| 9 #include "modules/sensor/Sensor.h" | 8 #include "modules/sensor/Sensor.h" |
| 10 | 9 |
| 11 namespace blink { | 10 namespace blink { |
| 12 | 11 |
| 13 class Accelerometer final : public Sensor { | 12 class Accelerometer final : public Sensor { |
| 14 DEFINE_WRAPPERTYPEINFO(); | 13 DEFINE_WRAPPERTYPEINFO(); |
| 15 | 14 |
| 16 public: | 15 public: |
| 17 static Accelerometer* create(ExecutionContext*, | 16 static Accelerometer* create(ExecutionContext*, |
| 18 const AccelerometerOptions&, | 17 const SensorOptions&, |
| 19 ExceptionState&); | 18 ExceptionState&); |
| 20 static Accelerometer* create(ExecutionContext*, ExceptionState&); | 19 static Accelerometer* create(ExecutionContext*, ExceptionState&); |
| 21 | 20 |
| 22 double x(bool& isNull) const; | 21 double x(bool& isNull) const; |
| 23 double y(bool& isNull) const; | 22 double y(bool& isNull) const; |
| 24 double z(bool& isNull) const; | 23 double z(bool& isNull) const; |
| 25 bool includesGravity() const; | |
| 26 | 24 |
| 27 DECLARE_VIRTUAL_TRACE(); | 25 DECLARE_VIRTUAL_TRACE(); |
| 28 | 26 |
| 29 private: | 27 private: |
| 30 Accelerometer(ExecutionContext*, | 28 Accelerometer(ExecutionContext*, const SensorOptions&, ExceptionState&); |
| 31 const AccelerometerOptions&, | |
| 32 ExceptionState&); | |
| 33 // Sensor overrides. | |
| 34 AccelerometerOptions m_accelerometerOptions; | |
| 35 }; | 29 }; |
| 36 | 30 |
| 37 } // namespace blink | 31 } // namespace blink |
| 38 | 32 |
| 39 #endif // Accelerometer_h | 33 #endif // Accelerometer_h |
| OLD | NEW |