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

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 ef5b78dbb5e60b7e4fdd59bc5f46ac5783bfdeab..0d1b8ebd08ba46cdf41502b2835e8eeb9a6443c8 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 interface.
- 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;
« no previous file with comments | « content/common/platform_notification_messages.h ('k') | third_party/WebKit/Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698