Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef Accelerometer_h | |
| 6 #define Accelerometer_h | |
| 7 | |
| 8 #include "modules/sensor/AccelerometerOptions.h" | |
| 9 #include "modules/sensor/Sensor.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class AccelerometerReading; | |
| 14 | |
| 15 class Accelerometer final : public Sensor { | |
| 16 DEFINE_WRAPPERTYPEINFO(); | |
| 17 | |
| 18 public: | |
| 19 static Accelerometer* create(ScriptState*, | |
| 20 const AccelerometerOptions&, | |
| 21 ExceptionState&); | |
| 22 static Accelerometer* create(ScriptState*, ExceptionState&); | |
| 23 | |
| 24 AccelerometerReading* reading() const; | |
| 25 bool includesGravity() const; | |
| 26 | |
| 27 DECLARE_VIRTUAL_TRACE(); | |
| 28 | |
| 29 private: | |
| 30 Accelerometer(ScriptState*, const AccelerometerOptions&, ExceptionState&); | |
| 31 // Sensor overrides. | |
| 32 SensorReading* createSensorReading(SensorProxy*) override; | |
|
Mikhail
2016/11/04 18:57:31
Please note:
This class (and apparently Accelerome
| |
| 33 SensorConfigurationPtr createSensorConfig( | |
| 34 const SensorOptions&, | |
| 35 const SensorConfiguration& defaultConfig) override; | |
| 36 AccelerometerOptions m_accelerometerOptions; | |
| 37 }; | |
| 38 | |
| 39 } // namespace blink | |
| 40 | |
| 41 #endif // Accelerometer_h | |
| OLD | NEW |