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

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

Issue 2380273002: Added reply field to blink NotificationEvent (not yet piped through) (Closed)
Patch Set: Add a test for default value of notificationevent.reply Created 4 years, 2 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 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 "modules/notifications/NotificationEvent.h" 5 #include "modules/notifications/NotificationEvent.h"
6 6
7 #include "modules/notifications/NotificationEventInit.h" 7 #include "modules/notifications/NotificationEventInit.h"
8 #include "wtf/text/WTFString.h" 8 #include "wtf/text/WTFString.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer) 12 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer)
13 : ExtendableEvent(type, initializer) 13 : ExtendableEvent(type, initializer)
14 , m_action(initializer.action()) 14 , m_action(initializer.action())
15 , m_reply(initializer.reply())
15 { 16 {
16 if (initializer.hasNotification()) 17 if (initializer.hasNotification())
17 m_notification = initializer.notification(); 18 m_notification = initializer.notification();
18 } 19 }
19 20
20 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer, WaitUntilObserver* observer) 21 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio nEventInit& initializer, WaitUntilObserver* observer)
21 : ExtendableEvent(type, initializer, observer) 22 : ExtendableEvent(type, initializer, observer)
22 , m_action(initializer.action()) 23 , m_action(initializer.action())
24 , m_reply(initializer.reply())
23 { 25 {
24 if (initializer.hasNotification()) 26 if (initializer.hasNotification())
25 m_notification = initializer.notification(); 27 m_notification = initializer.notification();
26 } 28 }
27 29
28 NotificationEvent::~NotificationEvent() 30 NotificationEvent::~NotificationEvent()
29 { 31 {
30 } 32 }
31 33
32 const AtomicString& NotificationEvent::interfaceName() const 34 const AtomicString& NotificationEvent::interfaceName() const
33 { 35 {
34 return EventNames::NotificationEvent; 36 return EventNames::NotificationEvent;
35 } 37 }
36 38
37 DEFINE_TRACE(NotificationEvent) 39 DEFINE_TRACE(NotificationEvent)
38 { 40 {
39 visitor->trace(m_notification); 41 visitor->trace(m_notification);
40 ExtendableEvent::trace(visitor); 42 ExtendableEvent::trace(visitor);
41 } 43 }
42 44
43 } // namespace blink 45 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698