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

Unified Diff: third_party/WebKit/Source/modules/notifications/Notification.cpp

Issue 1619703002: Implement notificationclose event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 11 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: third_party/WebKit/Source/modules/notifications/Notification.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index 00801a281c23bbe7999da1cdf14e399a025ebd59..1ef281c97cd6caff31e6ba0e4542ea4b04456ece 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -101,11 +101,11 @@ Notification* Notification::create(ExecutionContext* context, const String& titl
return notification;
}
-Notification* Notification::create(ExecutionContext* context, int64_t persistentId, const WebNotificationData& data)
+Notification* Notification::create(ExecutionContext* context, int64_t persistentId, const WebNotificationData& data, bool showing)
{
Notification* notification = new Notification(context, data);
notification->setPersistentId(persistentId);
- notification->setState(NotificationStateShowing);
+ notification->setState(showing ? NotificationStateShowing : NotificationStateClosing);
notification->suspendIfNeeded();
return notification;

Powered by Google App Engine
This is Rietveld 408576698