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 MagnetometerReading_h | |
6 #define MagnetometerReading_h | |
7 | |
8 #include "modules/sensor/SensorReading.h" | |
9 | |
10 namespace blink { | |
11 | |
12 class MagnetometerReadingInit; | |
13 | |
14 class MagnetometerReading final : public SensorReading { | |
15 DEFINE_WRAPPERTYPEINFO(); | |
16 | |
17 public: | |
18 static MagnetometerReading* create(const MagnetometerReadingInit& init) { | |
19 return new MagnetometerReading(init); | |
20 } | |
21 | |
22 static MagnetometerReading* create(const device::SensorReading& data) { | |
23 return new MagnetometerReading(data); | |
24 } | |
25 | |
26 ~MagnetometerReading() 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 MagnetometerReading(const MagnetometerReadingInit&); | |
38 explicit MagnetometerReading(const device::SensorReading&); | |
39 }; | |
40 | |
41 } // namepsace blink | |
42 | |
43 #endif // MagnetometerReading_h | |
OLD | NEW |