| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/sensor/SensorReadingEvent.h" | 5 #include "modules/sensor/SensorReadingEvent.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 SensorReadingEvent::~SensorReadingEvent() = default; | 9 SensorReadingEvent::~SensorReadingEvent() = default; |
| 10 | 10 |
| 11 SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, | 11 SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, |
| 12 SensorReading* reading) | 12 SensorReading* reading) |
| 13 : Event(eventType, false, false) // Does not bubble and is not cancelable. | 13 : Event(eventType, false, false), // Does not bubble and is not cancelable. |
| 14 , | |
| 15 m_reading(reading) { | 14 m_reading(reading) { |
| 16 DCHECK(m_reading); | 15 DCHECK(m_reading); |
| 17 } | 16 } |
| 18 | 17 |
| 19 SensorReadingEvent::SensorReadingEvent( | 18 SensorReadingEvent::SensorReadingEvent( |
| 20 const AtomicString& eventType, | 19 const AtomicString& eventType, |
| 21 const SensorReadingEventInit& initializer) | 20 const SensorReadingEventInit& initializer) |
| 22 : SensorReadingEvent(eventType, initializer.reading()) {} | 21 : SensorReadingEvent(eventType, initializer.reading()) {} |
| 23 | 22 |
| 24 const AtomicString& SensorReadingEvent::interfaceName() const { | 23 const AtomicString& SensorReadingEvent::interfaceName() const { |
| 25 return EventNames::SensorReadingEvent; | 24 return EventNames::SensorReadingEvent; |
| 26 } | 25 } |
| 27 | 26 |
| 28 DEFINE_TRACE(SensorReadingEvent) { | 27 DEFINE_TRACE(SensorReadingEvent) { |
| 29 Event::trace(visitor); | 28 Event::trace(visitor); |
| 30 visitor->trace(m_reading); | 29 visitor->trace(m_reading); |
| 31 } | 30 } |
| 32 | 31 |
| 33 } // namespace blink | 32 } // namespace blink |
| OLD | NEW |