OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 #ifndef PageNotificationEvent_h | |
6 #define PageNotificationEvent_h | |
7 | |
8 #include "modules/EventModules.h" | |
9 #include "modules/ModulesExport.h" | |
10 #include "modules/notifications/PageNotificationEventInit.h" | |
11 #include "platform/heap/Handle.h" | |
12 #include "wtf/text/WTFString.h" | |
13 | |
14 namespace blink { | |
15 | |
16 class MODULES_EXPORT PageNotificationEvent final : public Event { | |
17 DEFINE_WRAPPERTYPEINFO(); | |
18 public: | |
19 static PassRefPtrWillBeRawPtr<PageNotificationEvent> create() | |
20 { | |
21 return adoptRefWillBeNoop(new PageNotificationEvent); | |
22 } | |
23 static PassRefPtrWillBeRawPtr<PageNotificationEvent> create(const AtomicStri ng& type, const PageNotificationEventInit& initializer) | |
24 { | |
25 return adoptRefWillBeNoop(new PageNotificationEvent(type, initializer)); | |
26 } | |
27 | |
28 String action() const { return m_action; } | |
29 | |
30 const AtomicString& interfaceName() const override { return EventNames::Page NotificationEvent; } | |
31 | |
32 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } | |
33 | |
34 private: | |
35 PageNotificationEvent() { } | |
36 | |
37 PageNotificationEvent(const AtomicString& type, const PageNotificationEventI nit& initializer) | |
38 : Event(type, initializer) | |
39 { | |
40 if (initializer.hasAction()) | |
Peter Beverloo
2015/08/07 07:25:25
--> .cpp
| |
41 m_action = initializer.action(); | |
42 } | |
43 | |
44 String m_action; | |
45 }; | |
46 | |
47 } // namespace blink | |
48 | |
49 #endif // PageNotificationEvent_h | |
OLD | NEW |