| 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 #ifndef NotificationEvent_h | 5 #ifndef NotificationEvent_h |
| 6 #define NotificationEvent_h | 6 #define NotificationEvent_h |
| 7 | 7 |
| 8 #include "modules/EventModules.h" | 8 #include "modules/EventModules.h" |
| 9 #include "modules/notifications/Notification.h" | 9 #include "modules/notifications/Notification.h" |
| 10 #include "modules/notifications/NotificationEventInit.h" |
| 10 #include "modules/serviceworkers/ExtendableEvent.h" | 11 #include "modules/serviceworkers/ExtendableEvent.h" |
| 11 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 struct NotificationEventInit : public ExtendableEventInit { | |
| 16 NotificationEventInit(); | |
| 17 | |
| 18 Member<Notification> notification; | |
| 19 }; | |
| 20 | |
| 21 class NotificationEvent final : public ExtendableEvent { | 16 class NotificationEvent final : public ExtendableEvent { |
| 22 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 23 public: | 18 public: |
| 24 static PassRefPtrWillBeRawPtr<NotificationEvent> create() | 19 static PassRefPtrWillBeRawPtr<NotificationEvent> create() |
| 25 { | 20 { |
| 26 return adoptRefWillBeNoop(new NotificationEvent); | 21 return adoptRefWillBeNoop(new NotificationEvent); |
| 27 } | 22 } |
| 28 static PassRefPtrWillBeRawPtr<NotificationEvent> create(const AtomicString&
type, const NotificationEventInit& initializer) | 23 static PassRefPtrWillBeRawPtr<NotificationEvent> create(const AtomicString&
type, const NotificationEventInit& initializer) |
| 29 { | 24 { |
| 30 return adoptRefWillBeNoop(new NotificationEvent(type, initializer)); | 25 return adoptRefWillBeNoop(new NotificationEvent(type, initializer)); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 46 NotificationEvent(); | 41 NotificationEvent(); |
| 47 NotificationEvent(const AtomicString& type, const NotificationEventInit&); | 42 NotificationEvent(const AtomicString& type, const NotificationEventInit&); |
| 48 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa
itUntilObserver*); | 43 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa
itUntilObserver*); |
| 49 | 44 |
| 50 PersistentWillBeMember<Notification> m_notification; | 45 PersistentWillBeMember<Notification> m_notification; |
| 51 }; | 46 }; |
| 52 | 47 |
| 53 } // namespace blink | 48 } // namespace blink |
| 54 | 49 |
| 55 #endif // NotificationEvent_h | 50 #endif // NotificationEvent_h |
| OLD | NEW |