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

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

Issue 1262893005: Add NotificationEvent.action property in SW events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@actions3_fix
Patch Set: Created 5 years, 4 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"
(...skipping 15 matching lines...) Expand all
26 return adoptRefWillBeNoop(new NotificationEvent(type, initializer)); 26 return adoptRefWillBeNoop(new NotificationEvent(type, initializer));
27 } 27 }
28 static PassRefPtrWillBeRawPtr<NotificationEvent> create(const AtomicString& type, const NotificationEventInit& initializer, WaitUntilObserver* observer) 28 static PassRefPtrWillBeRawPtr<NotificationEvent> create(const AtomicString& type, const NotificationEventInit& initializer, WaitUntilObserver* observer)
29 { 29 {
30 return adoptRefWillBeNoop(new NotificationEvent(type, initializer, obser ver)); 30 return adoptRefWillBeNoop(new NotificationEvent(type, initializer, obser ver));
31 } 31 }
32 32
33 ~NotificationEvent() override; 33 ~NotificationEvent() override;
34 34
35 Notification* notification() const { return m_notification.get(); } 35 Notification* notification() const { return m_notification.get(); }
36 String action() const { return m_action; }
36 37
37 const AtomicString& interfaceName() const override; 38 const AtomicString& interfaceName() const override;
38 39
39 DECLARE_VIRTUAL_TRACE(); 40 DECLARE_VIRTUAL_TRACE();
40 41
41 private: 42 private:
42 NotificationEvent(); 43 NotificationEvent();
43 NotificationEvent(const AtomicString& type, const NotificationEventInit&); 44 NotificationEvent(const AtomicString& type, const NotificationEventInit&);
44 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa itUntilObserver*); 45 NotificationEvent(const AtomicString& type, const NotificationEventInit&, Wa itUntilObserver*);
45 46
46 PersistentWillBeMember<Notification> m_notification; 47 PersistentWillBeMember<Notification> m_notification;
48 String m_action;
47 }; 49 };
48 50
49 } // namespace blink 51 } // namespace blink
50 52
51 #endif // NotificationEvent_h 53 #endif // NotificationEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698