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

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

Issue 2217763003: Remove Blink-WebKit-only document.createEvent strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 #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/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "modules/notifications/Notification.h" 10 #include "modules/notifications/Notification.h"
11 #include "modules/serviceworkers/ExtendableEvent.h" 11 #include "modules/serviceworkers/ExtendableEvent.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class NotificationEventInit; 16 class NotificationEventInit;
17 17
18 class MODULES_EXPORT NotificationEvent final : public ExtendableEvent { 18 class MODULES_EXPORT NotificationEvent final : public ExtendableEvent {
19 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
20 public: 20 public:
21 static NotificationEvent* create()
22 {
23 return new NotificationEvent;
24 }
25 static NotificationEvent* create(const AtomicString& type, const Notificatio nEventInit& initializer) 21 static NotificationEvent* create(const AtomicString& type, const Notificatio nEventInit& initializer)
26 { 22 {
27 return new NotificationEvent(type, initializer); 23 return new NotificationEvent(type, initializer);
28 } 24 }
29 static NotificationEvent* create(const AtomicString& type, const Notificatio nEventInit& initializer, WaitUntilObserver* observer) 25 static NotificationEvent* create(const AtomicString& type, const Notificatio nEventInit& initializer, WaitUntilObserver* observer)
30 { 26 {
31 return new NotificationEvent(type, initializer, observer); 27 return new NotificationEvent(type, initializer, observer);
32 } 28 }
33 29
34 ~NotificationEvent() override; 30 ~NotificationEvent() override;
35 31
36 Notification* getNotification() const { return m_notification.get(); } 32 Notification* getNotification() const { return m_notification.get(); }
37 String action() const { return m_action; } 33 String action() const { return m_action; }
38 34
39 const AtomicString& interfaceName() const override; 35 const AtomicString& interfaceName() const override;
40 36
41 DECLARE_VIRTUAL_TRACE(); 37 DECLARE_VIRTUAL_TRACE();
42 38
43 private: 39 private:
44 NotificationEvent();
45 NotificationEvent(const AtomicString& type, const NotificationEventInit&); 40 NotificationEvent(const AtomicString& type, const NotificationEventInit&);
46 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa itUntilObserver*); 41 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa itUntilObserver*);
47 42
48 Member<Notification> m_notification; 43 Member<Notification> m_notification;
49 String m_action; 44 String m_action;
50 }; 45 };
51 46
52 } // namespace blink 47 } // namespace blink
53 48
54 #endif // NotificationEvent_h 49 #endif // NotificationEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698