OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "modules/sensor/SensorReadingEvent.h" | |
6 | |
7 namespace blink { | |
8 | |
9 SensorReadingEvent::~SensorReadingEvent() = default; | |
10 | |
11 SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, | |
12 SensorReading* reading) | |
13 : Event(eventType, false, false), // Does not bubble and is not cancelable. | |
14 m_reading(reading) { | |
15 DCHECK(m_reading); | |
16 } | |
17 | |
18 SensorReadingEvent::SensorReadingEvent( | |
19 const AtomicString& eventType, | |
20 const SensorReadingEventInit& initializer) | |
21 : SensorReadingEvent(eventType, initializer.reading()) {} | |
22 | |
23 const AtomicString& SensorReadingEvent::interfaceName() const { | |
24 return EventNames::SensorReadingEvent; | |
25 } | |
26 | |
27 DEFINE_TRACE(SensorReadingEvent) { | |
28 Event::trace(visitor); | |
29 visitor->trace(m_reading); | |
30 } | |
31 | |
32 } // namespace blink | |
OLD | NEW |