Chromium Code Reviews| Index: third_party/WebKit/Source/modules/sensor/Accelerometer.h |
| diff --git a/third_party/WebKit/Source/modules/sensor/Accelerometer.h b/third_party/WebKit/Source/modules/sensor/Accelerometer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..892a42a11e94ef733781a40480581aa895d4507e |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/sensor/Accelerometer.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef Accelerometer_h |
| +#define Accelerometer_h |
| + |
| +#include "modules/sensor/AccelerometerOptions.h" |
| +#include "modules/sensor/Sensor.h" |
| + |
| +namespace blink { |
| + |
| +class AccelerometerReading; |
| + |
| +class Accelerometer final : public Sensor { |
| + DEFINE_WRAPPERTYPEINFO(); |
| + |
| + public: |
| + static Accelerometer* create(ScriptState*, |
| + const AccelerometerOptions&, |
| + ExceptionState&); |
| + static Accelerometer* create(ScriptState*, ExceptionState&); |
| + |
| + AccelerometerReading* reading() const; |
| + bool includesGravity() const; |
| + |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| + private: |
| + Accelerometer(ScriptState*, const AccelerometerOptions&, ExceptionState&); |
| + // Sensor overrides. |
| + SensorReading* createSensorReading(SensorProxy*) override; |
|
Mikhail
2016/11/04 18:57:31
Please note:
This class (and apparently Accelerome
|
| + SensorConfigurationPtr createSensorConfig( |
| + const SensorOptions&, |
| + const SensorConfiguration& defaultConfig) override; |
| + AccelerometerOptions m_accelerometerOptions; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // Accelerometer_h |