| Index: third_party/WebKit/Source/modules/sensor/SensorReading.h
|
| diff --git a/third_party/WebKit/Source/modules/sensor/SensorReading.h b/third_party/WebKit/Source/modules/sensor/SensorReading.h
|
| index 0796dfcdec4fa16b9fd6823083690ba18e726e0b..cc56835992d0e9efb80242497b1d2b7e6169ce6b 100644
|
| --- a/third_party/WebKit/Source/modules/sensor/SensorReading.h
|
| +++ b/third_party/WebKit/Source/modules/sensor/SensorReading.h
|
| @@ -12,34 +12,36 @@
|
|
|
| namespace blink {
|
|
|
| -class MODULES_EXPORT SensorReading : public GarbageCollectedFinalized<SensorReading>, public ScriptWrappable {
|
| - DEFINE_WRAPPERTYPEINFO();
|
| +class ExecutionContext;
|
| +class SensorProxy;
|
|
|
| +class MODULES_EXPORT SensorReading
|
| + : public GarbageCollected<SensorReading>
|
| + , public ScriptWrappable {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| - static SensorReading* create()
|
| - {
|
| - return new SensorReading;
|
| - }
|
| -
|
| - static SensorReading* create(bool providesTimeStamp, DOMHighResTimeStamp timestamp)
|
| - {
|
| - return new SensorReading(providesTimeStamp, timestamp);
|
| - }
|
| -
|
| - virtual ~SensorReading();
|
| + DECLARE_VIRTUAL_TRACE();
|
|
|
| - DOMHighResTimeStamp timeStamp(bool& isNull);
|
| + DOMHighResTimeStamp timeStamp() const;
|
|
|
| - void setTimeStamp(DOMHighResTimeStamp time) { m_timeStamp = time; }
|
| + enum UpdateStatus {
|
| + Updated,
|
| + Error,
|
| + Same
|
| + };
|
| + virtual UpdateStatus updateInternalData() = 0;
|
|
|
| - DECLARE_VIRTUAL_TRACE();
|
| + void attach(SensorProxy*);
|
| + void detach();
|
|
|
| protected:
|
| - bool m_canProvideTimeStamp;
|
| - DOMHighResTimeStamp m_timeStamp;
|
| + explicit SensorReading(ExecutionContext*);
|
| + // Returns timestamp obtained from the shared buffer.
|
| + virtual double platformTimeStamp() const = 0;
|
|
|
| - SensorReading();
|
| - SensorReading(bool providesTimeStamp, DOMHighResTimeStamp timestamp);
|
| +protected:
|
| + WeakMember<SensorProxy> m_sensorProxy;
|
| + WeakMember<ExecutionContext> m_context;
|
| };
|
|
|
| } // namepsace blink
|
|
|