Chromium Code Reviews| Index: ui/message_center/message_center.h |
| diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h |
| index 880540d9e7f95ba83dca2cf0ede1599f06886702..c15442b00b65fc90d2a763879ad686848f64eaef 100644 |
| --- a/ui/message_center/message_center.h |
| +++ b/ui/message_center/message_center.h |
| @@ -24,8 +24,6 @@ class DictionaryValue; |
| // [Add|Remove|Update]Notification to create and update notifications in the |
| // list. It also sends those changes to its observers when a notification |
| // is shown, closed, or clicked on. |
| -// It can also implement Delegate to ask platform-dependent features like |
| -// disabling extensions or opening settings. |
| namespace message_center { |
| @@ -34,6 +32,15 @@ class NotificationList; |
| class NotifierSettingsDelegate; |
| class NotifierSettingsProvider; |
| +enum Visibility { |
|
Jun Mukai
2013/09/09 17:12:35
It would be better to declare this enum in another
dewittj
2013/09/10 21:23:24
Done.
|
| + // When nothing or just toast popups are being displayed. |
| + VISIBILITY_TRANSIENT = 0, |
| + // When the message center view is being displayed. |
| + VISIBILITY_MESSAGE_CENTER, |
| + // When the settings view is being displayed. |
| + VISIBILITY_SETTINGS |
| +}; |
| + |
| class MESSAGE_CENTER_EXPORT MessageCenter { |
| public: |
| // Creates the global message center object. |
| @@ -45,20 +52,6 @@ class MESSAGE_CENTER_EXPORT MessageCenter { |
| // Destroys the global message_center object. |
| static void Shutdown(); |
| - class MESSAGE_CENTER_EXPORT Delegate { |
| - public: |
| - virtual ~Delegate(); |
| - |
| - // Request to show the notification settings (|notification_id| is used |
| - // to identify the requesting browser context). |
| - virtual void ShowSettings(const std::string& notification_id) = 0; |
| - }; |
| - |
| - // Called to set the delegate. Generally called only once, except in tests. |
| - // Changing the delegate does not affect notifications in its |
| - // NotificationList. |
| - virtual void SetDelegate(Delegate* delegate) = 0; |
| - |
| // Management of the observer list. |
| virtual void AddObserver(MessageCenterObserver* observer) = 0; |
| virtual void RemoveObserver(MessageCenterObserver* observer) = 0; |
| @@ -111,11 +104,6 @@ class MESSAGE_CENTER_EXPORT MessageCenter { |
| virtual void DisableNotificationsByNotifier( |
| const NotifierId& notifier_id) = 0; |
| - // TODO(mukai): settings can be in another class? |
| - // Shows the settings for a web notification (profile is identified by the |
| - // given notification id). |
| - virtual void ShowNotificationSettings(const std::string& id) = 0; |
| - |
| // Reformat a notification to show its entire text content. |
| virtual void ExpandNotification(const std::string& id) = 0; |
| @@ -157,7 +145,7 @@ class MESSAGE_CENTER_EXPORT MessageCenter { |
| // Informs the notification list whether the message center is visible. |
| // This affects whether or not a message has been "read". |
| - virtual void SetMessageCenterVisible(bool visible) = 0; |
| + virtual void SetVisibility(Visibility visible) = 0; |
| // Allows querying the visibility of the center. |
| virtual bool IsMessageCenterVisible() = 0; |