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

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

Issue 2344983003: Merge the code paths for closing different kinds of notifications. (Closed)
Patch Set: rebase Created 4 years, 2 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.h
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.h b/third_party/WebKit/Source/modules/notifications/Notification.h
index 5cc8ad2decc4a599e267bf0f921db116ae17fb2d..ceebf9e97b6a3f6aa0965285457d1877df5e366c 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.h
+++ b/third_party/WebKit/Source/modules/notifications/Notification.h
@@ -90,10 +90,9 @@ class MODULES_EXPORT Notification final : public EventTargetWithInlineData,
DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
// WebNotificationDelegate implementation.
- void dispatchShowEvent() override;
- void dispatchClickEvent() override;
- void dispatchErrorEvent() override;
- void dispatchCloseEvent() override;
+ void didShowNotification(const WebString& notificationId) override;
+ void didClickNotification() override;
+ void didCloseNotification() override;
String title() const;
String dir() const;
@@ -175,6 +174,10 @@ class MODULES_EXPORT Notification final : public EventTargetWithInlineData,
String m_notificationId;
+ // Whether the developer has requested the notification to be closed whilst
+ // it's still in process of being shown.
+ bool m_requestedClose;
+
Member<AsyncMethodRunner<Notification>> m_prepareShowMethodRunner;
Member<NotificationResourcesLoader> m_loader;

Powered by Google App Engine
This is Rietveld 408576698