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