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 SensorReading_h | |
| 6 #define SensorReading_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | |
| 9 #include "core/dom/DOMHighResTimeStamp.h" | |
| 10 #include "core/dom/DOMTimeStamp.h" | |
| 11 #include "modules/ModulesExport.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class MODULES_EXPORT SensorReading : public GarbageCollectedFinalized<SensorRead ing>, public ScriptWrappable { | |
| 16 DEFINE_WRAPPERTYPEINFO(); | |
| 17 | |
| 18 public: | |
| 19 static SensorReading* create() | |
| 20 { | |
| 21 return new SensorReading; | |
| 22 } | |
| 23 | |
| 24 static SensorReading* create(bool providesTimeStamp, DOMHighResTimeStamp tim estamp) | |
| 25 { | |
| 26 return new SensorReading(providesTimeStamp, timestamp); | |
| 27 } | |
| 28 | |
| 29 virtual ~SensorReading(); | |
| 30 | |
| 31 DECLARE_VIRTUAL_TRACE(); | |
|
timvolodine
2016/05/24 15:30:35
for consistency best to put as below as last state
riju_
2016/05/25 15:07:18
Done.
| |
| 32 | |
| 33 DOMHighResTimeStamp timeStamp(bool& isNull); | |
| 34 | |
| 35 void setTimeStamp(DOMHighResTimeStamp time) { m_timeStamp = time; } | |
| 36 | |
| 37 SensorReading(); | |
|
timvolodine
2016/05/24 15:30:35
private or protected? since we have create methods
riju_
2016/05/25 15:07:18
Done.
| |
| 38 SensorReading(bool providesTimeStamp, DOMHighResTimeStamp timestamp); | |
| 39 | |
| 40 protected: | |
| 41 bool m_canProvideTimeStamp; | |
| 42 DOMHighResTimeStamp m_timeStamp; | |
| 43 }; | |
| 44 | |
| 45 } // namepsace blink | |
| 46 | |
| 47 #endif // SensorReading_h | |
| OLD | NEW |