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

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

Issue 1280913002: Deliver action clicks to page notifications (blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@click_test
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 d04fcb393825d4b6f4660885a3c530f0ad671fe4..619f284489ebc61861dbd3c4db5ade3d53c77a46 100644
--- a/Source/modules/notifications/NotificationEvent.cpp
+++ b/Source/modules/notifications/NotificationEvent.cpp
@@ -4,29 +4,27 @@
#include "config.h"
#include "modules/notifications/NotificationEvent.h"
-#include "wtf/text/WTFString.h"
namespace blink {
-NotificationEvent::NotificationEvent()
- : m_action(emptyString())
-{
-}
+NotificationEvent::NotificationEvent() { }
NotificationEvent::NotificationEvent(const AtomicString& type, const NotificationEventInit& initializer)
: ExtendableEvent(type, initializer)
Peter Beverloo 2015/08/07 07:25:25 Use a delegated constructor w/ observer==nullptr?
- , m_action(initializer.action())
{
if (initializer.hasNotification())
m_notification = initializer.notification();
+ if (initializer.hasAction())
Peter Beverloo 2015/08/07 07:25:25 You explicitly used "emptyString()" before, now we
+ m_action = initializer.action();
}
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();
+ if (initializer.hasAction())
+ m_action = initializer.action();
}
NotificationEvent::~NotificationEvent()

Powered by Google App Engine
This is Rietveld 408576698