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 AccelerometerReading_h | |
6 #define AccelerometerReading_h | |
7 | |
8 #include "modules/sensor/AccelerometerReadingInit.h" | |
9 #include "modules/sensor/SensorReading.h" | |
10 | |
11 namespace blink { | |
12 | |
13 class AccelerometerReading final : public SensorReading { | |
14 DEFINE_WRAPPERTYPEINFO(); | |
15 | |
16 public: | |
17 static AccelerometerReading* create(const AccelerometerReadingInit& init) { | |
18 return new AccelerometerReading(init); | |
19 } | |
20 | |
21 static AccelerometerReading* create(const device::SensorReading& data) { | |
22 return new AccelerometerReading(data); | |
23 } | |
24 | |
25 ~AccelerometerReading() override; | |
26 | |
27 double x() const; | |
28 double y() const; | |
29 double z() const; | |
30 | |
31 bool isReadingUpdated(const device::SensorReading&) const override; | |
32 | |
33 DECLARE_VIRTUAL_TRACE(); | |
34 | |
35 private: | |
36 explicit AccelerometerReading(const AccelerometerReadingInit&); | |
37 explicit AccelerometerReading(const device::SensorReading&); | |
38 }; | |
39 | |
40 } // namepsace blink | |
41 | |
42 #endif // AccelerometerReading_h | |
OLD | NEW |