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

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

Issue 718093002: Introduce the NotificationEvent object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add a test Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/notifications/DEPS ('k') | Source/modules/notifications/NotificationEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NotificationEvent_h
6 #define NotificationEvent_h
7
8 #include "modules/EventModules.h"
9 #include "modules/notifications/Notification.h"
10 #include "modules/serviceworkers/ExtendableEvent.h"
11 #include "platform/heap/Handle.h"
12
13 namespace blink {
14
15 struct NotificationEventInit : public EventInit {
16 NotificationEventInit();
17
18 Member<Notification> notification;
19 };
20
21 class NotificationEvent final : public ExtendableEvent {
22 DEFINE_WRAPPERTYPEINFO();
23 public:
24 static PassRefPtrWillBeRawPtr<NotificationEvent> create()
25 {
26 return adoptRefWillBeNoop(new NotificationEvent);
27 }
28 static PassRefPtrWillBeRawPtr<NotificationEvent> create(const AtomicString& type, const NotificationEventInit& initializer, WaitUntilObserver* observer)
29 {
30 return adoptRefWillBeNoop(new NotificationEvent(type, initializer, obser ver));
31 }
32
33 ~NotificationEvent() override;
34
35 Notification* notification() const { return m_notification.get(); }
36
37 const AtomicString& interfaceName() const override;
38
39 void trace(Visitor*) override;
40
41 private:
42 NotificationEvent();
43 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa itUntilObserver*);
44
45 PersistentWillBeMember<Notification> m_notification;
46 };
47
48 } // namespace blink
49
50 #endif // NotificationEvent_h
OLDNEW
« no previous file with comments | « Source/modules/notifications/DEPS ('k') | Source/modules/notifications/NotificationEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698