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

Unified Diff: ui/message_center/notification_blocker.h

Issue 2198363002: Pass Notification into NotificationBlocker ShouldShow* methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ash build errors Created 4 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
« no previous file with comments | « ui/message_center/message_center_impl_unittest.cc ('k') | ui/message_center/notification_blocker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification_blocker.h
diff --git a/ui/message_center/notification_blocker.h b/ui/message_center/notification_blocker.h
index 4bcb36123b54c7d3be0bdb98b81841f29812f458..f9408f0f0a573bff36a268baadea98e54436b87f 100644
--- a/ui/message_center/notification_blocker.h
+++ b/ui/message_center/notification_blocker.h
@@ -31,16 +31,17 @@ class MESSAGE_CENTER_EXPORT NotificationBlocker {
// Checks the current state and updates the availability.
virtual void CheckState() {}
- // Returns true when notifications from |notifier_id| should appear in the
- // message center. Default returns true always.
- virtual bool ShouldShowNotification(const NotifierId& notifier_id) const;
+ // Returns true should be shown in the message center. Default returns true
+ // always.
+ virtual bool ShouldShowNotification(
+ const Notification& notification) const;
- // Returns true when notifications from |notifier_id| should be shown as
- // popups on screen. If it's false, those notifications should be queued.
+ // Returns true if this notification should be shown as popups on screen.
+ // If it's false, those notifications should be queued.
// When a blocker starts returning false for a notification which is already
// shown as a popup, the notification should be closed as a popup immediately.
virtual bool ShouldShowNotificationAsPopup(
- const NotifierId& notifier_id) const = 0;
+ const Notification& notification) const = 0;
protected:
MessageCenter* message_center() { return message_center_; }
« no previous file with comments | « ui/message_center/message_center_impl_unittest.cc ('k') | ui/message_center/notification_blocker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698