diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 17:13:58 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 17:13:58 +0000 |
commit | 940c2ba4b46ca1c2f9e0667c3d9b24df3bf0cb11 (patch) | |
tree | 5f7acce00663f51e8b2004fad5f7edbfdae546a8 /ui/message_center/notifier_settings.h | |
parent | 8d7cea57d5969811a59125d201d7bb6bd02967cd (diff) | |
download | chromium_src-940c2ba4b46ca1c2f9e0667c3d9b24df3bf0cb11.zip chromium_src-940c2ba4b46ca1c2f9e0667c3d9b24df3bf0cb11.tar.gz chromium_src-940c2ba4b46ca1c2f9e0667c3d9b24df3bf0cb11.tar.bz2 |
Introduces a new settings UI in the center.
BUG=245869
R=dewittj@chromium.org, rsesek@chromium.org
TEST=manually / don't break existing tests
Review URL: https://chromiumcodereview.appspot.com/16867003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/message_center/notifier_settings.h')
-rw-r--r-- | ui/message_center/notifier_settings.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/ui/message_center/notifier_settings.h b/ui/message_center/notifier_settings.h index aec1815..4b913f8 100644 --- a/ui/message_center/notifier_settings.h +++ b/ui/message_center/notifier_settings.h @@ -17,13 +17,6 @@ namespace message_center { class NotifierSettingsDelegate; class NotifierSettingsProvider; -// Brings up the settings dialog and returns a weak reference to the delegate, -// which is typically the view. If the dialog already exists, it is brought to -// the front, otherwise it is created. -MESSAGE_CENTER_EXPORT NotifierSettingsDelegate* ShowSettings( - NotifierSettingsProvider* provider, - gfx::NativeView context); - // The struct to hold the information of notifiers. The information will be // used by NotifierSettingsView. struct MESSAGE_CENTER_EXPORT Notifier { @@ -81,10 +74,26 @@ MESSAGE_CENTER_EXPORT std::string ToString( MESSAGE_CENTER_EXPORT Notifier::SystemComponentNotifierType ParseSystemComponentName(const std::string& name); +// An observer class implemented by the view of the NotifierSettings to get +// notified when the controller has changed data. +class MESSAGE_CENTER_EXPORT NotifierSettingsObserver { + public: + // Called when an icon in the controller has been updated. + virtual void UpdateIconImage(const std::string& id, + const gfx::Image& icon) = 0; + + // Called when the controller detects that a favicon has changed. + virtual void UpdateFavicon(const GURL& url, const gfx::Image& icon) = 0; +}; + // A class used by NotifierSettingsView to integrate with a setting system // for the clients of this module. class MESSAGE_CENTER_EXPORT NotifierSettingsProvider { public: + // Sets the delegate. + virtual void AddObserver(NotifierSettingsObserver* observer) = 0; + virtual void RemoveObserver(NotifierSettingsObserver* observer) = 0; + // Collects the current notifier list and fills to |notifiers|. Caller takes // the ownership of the elements of |notifiers|. virtual void GetNotifierList(std::vector<Notifier*>* notifiers) = 0; @@ -97,18 +106,6 @@ class MESSAGE_CENTER_EXPORT NotifierSettingsProvider { virtual void OnNotifierSettingsClosing() = 0; }; -// A delegate class implemented by the view of the NotifierSettings to get -// notified when the controller has changed data. -class MESSAGE_CENTER_EXPORT NotifierSettingsDelegate { - public: - // Called when an icon in the controller has been updated. - virtual void UpdateIconImage(const std::string& id, - const gfx::Image& icon) = 0; - - // Called when the controller detects that a favicon has changed. - virtual void UpdateFavicon(const GURL& url, const gfx::Image& icon) = 0; -}; - } // namespace message_center #endif // UI_MESSAGE_CENTER_NOTIFIER_SETTINGS_H_ |