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

Side by Side Diff: third_party/WebKit/Source/modules/push_messaging/PushEvent.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 PushEvent_h 5 #ifndef PushEvent_h
6 #define PushEvent_h 6 #define PushEvent_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/push_messaging/PushMessageData.h" 10 #include "modules/push_messaging/PushMessageData.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 #include "wtf/text/AtomicString.h" 13 #include "wtf/text/AtomicString.h"
14 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class PushEventInit; 18 class PushEventInit;
19 19
20 class MODULES_EXPORT PushEvent final : public ExtendableEvent { 20 class MODULES_EXPORT PushEvent final : public ExtendableEvent {
21 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
22 public: 22 public:
23 static PushEvent* create()
24 {
25 return new PushEvent;
26 }
27 static PushEvent* create(const AtomicString& type, PushMessageData* data, Wa itUntilObserver* observer) 23 static PushEvent* create(const AtomicString& type, PushMessageData* data, Wa itUntilObserver* observer)
28 { 24 {
29 return new PushEvent(type, data, observer); 25 return new PushEvent(type, data, observer);
30 } 26 }
31 static PushEvent* create(const AtomicString& type, const PushEventInit& init ializer) 27 static PushEvent* create(const AtomicString& type, const PushEventInit& init ializer)
32 { 28 {
33 return new PushEvent(type, initializer); 29 return new PushEvent(type, initializer);
34 } 30 }
35 31
36 ~PushEvent() override; 32 ~PushEvent() override;
37 33
38 const AtomicString& interfaceName() const override; 34 const AtomicString& interfaceName() const override;
39 35
40 PushMessageData* data(); 36 PushMessageData* data();
41 37
42 DECLARE_VIRTUAL_TRACE(); 38 DECLARE_VIRTUAL_TRACE();
43 39
44 private: 40 private:
45 PushEvent();
46 PushEvent(const AtomicString& type, PushMessageData*, WaitUntilObserver*); 41 PushEvent(const AtomicString& type, PushMessageData*, WaitUntilObserver*);
47 PushEvent(const AtomicString& type, const PushEventInit&); 42 PushEvent(const AtomicString& type, const PushEventInit&);
48 43
49 Member<PushMessageData> m_data; 44 Member<PushMessageData> m_data;
50 }; 45 };
51 46
52 } // namespace blink 47 } // namespace blink
53 48
54 #endif // PushEvent_h 49 #endif // PushEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698