| OLD | NEW |
| 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() | |
| 13 : m_action(emptyString()) | |
| 14 { | |
| 15 } | |
| 16 | |
| 17 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio
nEventInit& initializer) | 12 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio
nEventInit& initializer) |
| 18 : ExtendableEvent(type, initializer) | 13 : ExtendableEvent(type, initializer) |
| 19 , m_action(initializer.action()) | 14 , m_action(initializer.action()) |
| 20 { | 15 { |
| 21 if (initializer.hasNotification()) | 16 if (initializer.hasNotification()) |
| 22 m_notification = initializer.notification(); | 17 m_notification = initializer.notification(); |
| 23 } | 18 } |
| 24 | 19 |
| 25 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio
nEventInit& initializer, WaitUntilObserver* observer) | 20 NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio
nEventInit& initializer, WaitUntilObserver* observer) |
| 26 : ExtendableEvent(type, initializer, observer) | 21 : ExtendableEvent(type, initializer, observer) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 return EventNames::NotificationEvent; | 34 return EventNames::NotificationEvent; |
| 40 } | 35 } |
| 41 | 36 |
| 42 DEFINE_TRACE(NotificationEvent) | 37 DEFINE_TRACE(NotificationEvent) |
| 43 { | 38 { |
| 44 visitor->trace(m_notification); | 39 visitor->trace(m_notification); |
| 45 ExtendableEvent::trace(visitor); | 40 ExtendableEvent::trace(visitor); |
| 46 } | 41 } |
| 47 | 42 |
| 48 } // namespace blink | 43 } // namespace blink |
| OLD | NEW |