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

Unified Diff: ui/message_center/message_center.h

Issue 1645843003: Implement Non-Closable Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the comments Created 4 years, 10 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: ui/message_center/message_center.h
diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h
index 00d9545d63943719116e1715efd82ca7c96c25d9..e10eb2bfe6fb186917e8f1b1608ea0f24bb2ad10 100644
--- a/ui/message_center/message_center.h
+++ b/ui/message_center/message_center.h
@@ -50,6 +50,15 @@ class NotifierSettingsProvider;
class MESSAGE_CENTER_EXPORT MessageCenter {
public:
+ enum class RemoveType {
+ // Remove all notifications (including invisible ones and unclosable ones).
dewittj 2016/02/08 18:02:34 nit: remove the parenthetical phrase - I think |al
yoshiki 2016/02/09 23:42:25 Done.
+ ALL,
+ // Remove visible notifications including unclosable ones.
+ VISIBLE,
dewittj 2016/02/08 18:02:34 This flag is only used in a test, why don't we jus
yoshiki 2016/02/09 23:42:25 Removed. Done.
+ // Remove closable notification (doesn't remove invisible ones).
+ CLOSABLE,
dewittj 2016/02/08 18:02:34 These flag names are still confusing. I don't hav
yoshiki 2016/02/09 23:42:25 Thank you for suggestion! Renamed this to "pinned"
+ };
+
// Creates the global message center object.
static void Initialize();
@@ -102,8 +111,7 @@ class MESSAGE_CENTER_EXPORT MessageCenter {
// Removes an existing notification.
virtual void RemoveNotification(const std::string& id, bool by_user) = 0;
- virtual void RemoveAllNotifications(bool by_user) = 0;
- virtual void RemoveAllVisibleNotifications(bool by_user) = 0;
+ virtual void RemoveAllNotifications(bool by_user, RemoveType type) = 0;
// Sets the icon image. Icon appears at the top-left of the notification.
virtual void SetNotificationIcon(const std::string& notification_id,

Powered by Google App Engine
This is Rietveld 408576698