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

Unified Diff: Source/modules/notifications/NotificationEvent.cpp

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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/notifications/NotificationEvent.cpp
diff --git a/Source/modules/notifications/NotificationEvent.cpp b/Source/modules/notifications/NotificationEvent.cpp
index 9d30dceb30ad879e610ebf496b3ff7c981f0217a..d04fcb393825d4b6f4660885a3c530f0ad671fe4 100644
--- a/Source/modules/notifications/NotificationEvent.cpp
+++ b/Source/modules/notifications/NotificationEvent.cpp
@@ -4,15 +4,18 @@
#include "config.h"
#include "modules/notifications/NotificationEvent.h"
+#include "wtf/text/WTFString.h"
namespace blink {
NotificationEvent::NotificationEvent()
+ : m_action(emptyString())
{
}
NotificationEvent::NotificationEvent(const AtomicString& type, const NotificationEventInit& initializer)
: ExtendableEvent(type, initializer)
+ , m_action(initializer.action())
{
if (initializer.hasNotification())
m_notification = initializer.notification();
@@ -20,6 +23,7 @@ NotificationEvent::NotificationEvent(const AtomicString& type, const Notificatio
NotificationEvent::NotificationEvent(const AtomicString& type, const NotificationEventInit& initializer, WaitUntilObserver* observer)
: ExtendableEvent(type, initializer, observer)
+ , m_action(initializer.action())
{
if (initializer.hasNotification())
m_notification = initializer.notification();

Powered by Google App Engine
This is Rietveld 408576698