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..3ba59882c903c55ff9991276f29b817a155fabaf 100644 |
--- a/third_party/WebKit/Source/modules/sensor/SensorReading.h |
+++ b/third_party/WebKit/Source/modules/sensor/SensorReading.h |
@@ -8,38 +8,33 @@ |
#include "bindings/core/v8/ScriptWrappable.h" |
#include "core/dom/DOMHighResTimeStamp.h" |
#include "core/dom/DOMTimeStamp.h" |
-#include "modules/ModulesExport.h" |
+#include "modules/sensor/SensorProxy.h" |
riju_
2016/08/31 10:35:49
forward declaration below is enough
Mikhail
2016/08/31 12:01:07
We're using nested type SensorProxy::Reading, so u
|
namespace blink { |
-class MODULES_EXPORT SensorReading : public GarbageCollectedFinalized<SensorReading>, public ScriptWrappable { |
- DEFINE_WRAPPERTYPEINFO(); |
+class ExecutionContext; |
+class SensorProxy; |
+class 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; } |
+ void attach(SensorProxy*); |
+ void detach(); |
- DECLARE_VIRTUAL_TRACE(); |
+ virtual bool isReadingUpdated(const SensorProxy::Reading& previous) const = 0; |
protected: |
- bool m_canProvideTimeStamp; |
- DOMHighResTimeStamp m_timeStamp; |
+ explicit SensorReading(ExecutionContext*); |
- SensorReading(); |
- SensorReading(bool providesTimeStamp, DOMHighResTimeStamp timestamp); |
+protected: |
+ WeakMember<SensorProxy> m_sensorProxy; |
+ WeakMember<ExecutionContext> m_context; |
}; |
} // namepsace blink |