Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1787)

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h

Issue 2317743002: [Sensors] Implementation of the Generic Sensor API (Closed)
Patch Set: Comments from Tim and haraken Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h
diff --git a/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h b/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h
index d2c1b44158baf1e37cf898bb9c05f91ac1e3d498..df8094aeb20c06e01da1b5a10f3c0100c518952c 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h
@@ -16,12 +16,7 @@ class SensorReadingEvent : public Event {
DEFINE_WRAPPERTYPEINFO();
public:
- static SensorReadingEvent* create(const AtomicString& eventType)
- {
- return new SensorReadingEvent(eventType);
- }
-
- static SensorReadingEvent* create(const AtomicString& eventType, SensorReading& reading)
+ static SensorReadingEvent* create(const AtomicString& eventType, SensorReading* reading)
{
return new SensorReadingEvent(eventType, reading);
}
@@ -33,8 +28,8 @@ public:
~SensorReadingEvent() override;
- // TODO(riju): crbug.com/614797 .
- SensorReading* reading() const { return m_reading.get(); }
+ const SensorReading* reading() const { return m_reading.get(); }
+ SensorReading* reading() { return m_reading.get(); }
const AtomicString& interfaceName() const override;
DECLARE_VIRTUAL_TRACE();
@@ -43,8 +38,7 @@ protected:
Member<SensorReading> m_reading;
private:
- explicit SensorReadingEvent(const AtomicString& eventType);
- SensorReadingEvent(const AtomicString& eventType, SensorReading&);
+ SensorReadingEvent(const AtomicString& eventType, SensorReading*);
SensorReadingEvent(const AtomicString& eventType, const SensorReadingEventInit& initializer);
};

Powered by Google App Engine
This is Rietveld 408576698