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 GyroscopeReading_h | |
| 6 #define GyroscopeReading_h | |
| 7 | |
| 8 #include "modules/sensor/GyroscopeReadingInit.h" | |
|
shalamov
2016/11/16 14:38:20
nit: can be forward declared
Mikhail
2016/11/17 13:47:46
Done.
| |
| 9 #include "modules/sensor/SensorReading.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class GyroscopeReading final : public SensorReading { | |
| 14 DEFINE_WRAPPERTYPEINFO(); | |
| 15 | |
| 16 public: | |
| 17 static GyroscopeReading* create(const GyroscopeReadingInit& init) { | |
| 18 return new GyroscopeReading(init); | |
| 19 } | |
| 20 | |
| 21 static GyroscopeReading* create(const device::SensorReading& data) { | |
| 22 return new GyroscopeReading(data); | |
| 23 } | |
| 24 | |
| 25 ~GyroscopeReading() 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 GyroscopeReading(const GyroscopeReadingInit&); | |
| 37 explicit GyroscopeReading(const device::SensorReading&); | |
| 38 }; | |
| 39 | |
| 40 } // namepsace blink | |
| 41 | |
| 42 #endif // GyroscopeReading_h | |
| OLD | NEW |