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

Unified Diff: content/public/browser/notification_event_dispatcher.h

Issue 2888303004: Minimize the delegate dependencies for non persistent notifications. (Closed)
Patch Set: review Created 3 years, 7 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
« no previous file with comments | « content/browser/notifications/notification_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/notification_event_dispatcher.h
diff --git a/content/public/browser/notification_event_dispatcher.h b/content/public/browser/notification_event_dispatcher.h
index ce2261b3044b878d67a1110329b87ce2ecf792f5..5ffdc6f5e378d12affca695917a6995ef4bfa8b1 100644
--- a/content/public/browser/notification_event_dispatcher.h
+++ b/content/public/browser/notification_event_dispatcher.h
@@ -32,6 +32,9 @@ class CONTENT_EXPORT NotificationEventDispatcher {
using NotificationDispatchCompleteCallback =
base::Callback<void(PersistentNotificationStatus)>;
+ // Dispatch methods for persistent (SW backed) notifications.
+ // TODO(miguelg) consider merging them with the non persistent ones below.
+
// Dispatches the "notificationclick" event on the Service Worker associated
// with |notification_id| belonging to |origin|. The |callback| will be
// invoked when it's known whether the event successfully executed.
@@ -56,6 +59,15 @@ class CONTENT_EXPORT NotificationEventDispatcher {
const NotificationDispatchCompleteCallback&
dispatch_complete_callback) = 0;
+ // Dispatch methods for the different non persistent (not backed by a service
+ // worker) notification events.
+ virtual void DispatchNonPersistentShowEvent(
+ const std::string& notification_id) = 0;
+ virtual void DispatchNonPersistentClickEvent(
+ const std::string& notification_id) = 0;
+ virtual void DispatchNonPersistentCloseEvent(
+ const std::string& notification_id) = 0;
+
protected:
virtual ~NotificationEventDispatcher() {}
};
« no previous file with comments | « content/browser/notifications/notification_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698