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

Side by Side Diff: Source/modules/push_messaging/PushEvent.h

Issue 780963004: Use event init dictionaries in modules/{notifications,push_messaging,serviceworkers} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/push_messaging/PushEventInit.h"
9 #include "modules/push_messaging/PushMessageData.h" 10 #include "modules/push_messaging/PushMessageData.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 #include "wtf/text/AtomicString.h" 13 #include "wtf/text/AtomicString.h"
13 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 struct PushEventInit : public ExtendableEventInit {
18 PushEventInit();
19
20 Member<PushMessageData> data;
21 };
22
23 class PushEvent final : public ExtendableEvent { 18 class PushEvent final : public ExtendableEvent {
24 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
25 public: 20 public:
26 static PassRefPtrWillBeRawPtr<PushEvent> create() 21 static PassRefPtrWillBeRawPtr<PushEvent> create()
27 { 22 {
28 return adoptRefWillBeNoop(new PushEvent); 23 return adoptRefWillBeNoop(new PushEvent);
29 } 24 }
30 static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, Pu shMessageData* data, WaitUntilObserver* observer) 25 static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, Pu shMessageData* data, WaitUntilObserver* observer)
31 { 26 {
32 return adoptRefWillBeNoop(new PushEvent(type, data, observer)); 27 return adoptRefWillBeNoop(new PushEvent(type, data, observer));
(...skipping 15 matching lines...) Expand all
48 PushEvent(); 43 PushEvent();
49 PushEvent(const AtomicString& type, PushMessageData*, WaitUntilObserver*); 44 PushEvent(const AtomicString& type, PushMessageData*, WaitUntilObserver*);
50 PushEvent(const AtomicString& type, const PushEventInit&); 45 PushEvent(const AtomicString& type, const PushEventInit&);
51 46
52 PersistentWillBeMember<PushMessageData> m_data; 47 PersistentWillBeMember<PushMessageData> m_data;
53 }; 48 };
54 49
55 } // namespace blink 50 } // namespace blink
56 51
57 #endif // PushEvent_h 52 #endif // PushEvent_h
OLDNEW
« no previous file with comments | « Source/modules/notifications/NotificationEventInit.idl ('k') | Source/modules/push_messaging/PushEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698