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

Side by Side Diff: Source/modules/notifications/NotificationEvent.cpp

Issue 780963004: Use event init dictionaries in modules/{notifications,push_messaging,serviceworkers} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "modules/notifications/NotificationEvent.h" 6 #include "modules/notifications/NotificationEvent.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 NotificationEventInit::NotificationEventInit()
11 {
12 }
13
14 NotificationEvent::NotificationEvent() 10 NotificationEvent::NotificationEvent()
15 { 11 {
16 } 12 }
17 13
18 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer) 14 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer)
19 : ExtendableEvent(type, initializer) 15 : ExtendableEvent(type, initializer)
20 , m_notification(initializer.notification)
21 { 16 {
17 if (initializer.hasNotification())
18 m_notification = initializer.notification();
22 } 19 }
23 20
24 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer, WaitUntilObserver* observer) 21 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer, WaitUntilObserver* observer)
25 : ExtendableEvent(type, initializer, observer) 22 : ExtendableEvent(type, initializer, observer)
26 , m_notification(initializer.notification)
27 { 23 {
24 if (initializer.hasNotification())
25 m_notification = initializer.notification();
28 } 26 }
29 27
30 NotificationEvent::~NotificationEvent() 28 NotificationEvent::~NotificationEvent()
31 { 29 {
32 } 30 }
33 31
34 const AtomicString& NotificationEvent::interfaceName() const 32 const AtomicString& NotificationEvent::interfaceName() const
35 { 33 {
36 return EventNames::NotificationEvent; 34 return EventNames::NotificationEvent;
37 } 35 }
38 36
39 void NotificationEvent::trace(Visitor* visitor) 37 void NotificationEvent::trace(Visitor* visitor)
40 { 38 {
41 visitor->trace(m_notification); 39 visitor->trace(m_notification);
42 ExtendableEvent::trace(visitor); 40 ExtendableEvent::trace(visitor);
43 } 41 }
44 42
45 } // namespace blink 43 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698