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

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

Issue 2121313002: [sensors] Generic Sensors Framework blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sensors_mojo_interfaces
Patch Set: Rebased Created 4 years, 4 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.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp b/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp
index 911ea9067ad1dc4d314f6560203f1d1a28ecf691..a4bb9f81a7a7366a5cec7e6ba7ded8548e398b73 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp
@@ -6,27 +6,19 @@
namespace blink {
-SensorReadingEvent::~SensorReadingEvent()
-{
-}
+SensorReadingEvent::~SensorReadingEvent() = default;
-SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType)
- : Event(eventType, true, false) // let default be bubbles but is not cancelable.
- , m_reading(SensorReading::create())
-{
-}
+SensorReadingEvent::SensorReadingEvent() = default;
-SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, SensorReading& reading)
- : Event(eventType, true, false) // let default be bubbles but is not cancelable.
+SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, SensorReading* reading)
+ : Event(eventType, false, false) // Does not bubble and is not cancelable.
, m_reading(reading)
{
}
SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, const SensorReadingEventInit& initializer)
- : Event(eventType, initializer)
- , m_reading(SensorReading::create())
+ : SensorReadingEvent(eventType, initializer.reading())
{
- setCanBubble(true);
}
const AtomicString& SensorReadingEvent::interfaceName() const

Powered by Google App Engine
This is Rietveld 408576698