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

Side by Side Diff: third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp

Issue 2472403002: [Sensors] Align sensor reading attribute implementation with the specification (Closed)
Patch Set: Comments from Tim Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698