diff options
author | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-06 04:48:57 +0000 |
---|---|---|
committer | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-06 04:48:57 +0000 |
commit | 0fa85dd72dad4416aa8dd2c9d06cea7e413031cd (patch) | |
tree | 10c2795922686d59950df01d8cd39e249789246e /ash/system | |
parent | 91a43c197b68ac384d1ad2fef900f7a536b0d8b7 (diff) | |
download | chromium_src-0fa85dd72dad4416aa8dd2c9d06cea7e413031cd.zip chromium_src-0fa85dd72dad4416aa8dd2c9d06cea7e413031cd.tar.gz chromium_src-0fa85dd72dad4416aa8dd2c9d06cea7e413031cd.tar.bz2 |
Enable users of NotificationUIManager to specify binary images.
This refactors message_center::Notification to hold a class
containing the optional data associated with the
notification. It also alters chrome/browser/notification so
that you can manually set this.
Ash tests only updated to use new API.
TBR=sky@chromium.org,stevenjb@chromium.org
BUG=227093
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204181
Review URL: https://chromiumcodereview.appspot.com/14631005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r-- | ash/system/web_notification/web_notification_tray_unittest.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc index e144fe9..5b59312 100644 --- a/ash/system/web_notification/web_notification_tray_unittest.cc +++ b/ash/system/web_notification/web_notification_tray_unittest.cc @@ -56,26 +56,34 @@ class WebNotificationTrayTest : public test::AshTestBase { protected: void AddNotification(const std::string& id) { - GetMessageCenter()->AddNotification( + scoped_ptr<message_center::Notification> notification; + notification.reset(new message_center::Notification( message_center::NOTIFICATION_TYPE_SIMPLE, id, ASCIIToUTF16("Test Web Notification"), ASCIIToUTF16("Notification message body."), + gfx::Image(), ASCIIToUTF16("www.test.org"), "" /* extension id */, NULL /* optional_fields */, - NULL /* delegate */); + NULL /* delegate */)); + GetMessageCenter()->AddNotification(notification.Pass()); } void UpdateNotification(const std::string& old_id, const std::string& new_id) { - GetMessageCenter()->UpdateNotification( - old_id, + scoped_ptr<message_center::Notification> notification; + notification.reset(new message_center::Notification( + message_center::NOTIFICATION_TYPE_SIMPLE, new_id, ASCIIToUTF16("Updated Web Notification"), ASCIIToUTF16("Updated message body."), - NULL, - NULL); + gfx::Image(), + ASCIIToUTF16("www.test.org"), + "" /* extension id */, + NULL /* optional_fields */, + NULL /* delegate */)); + GetMessageCenter()->UpdateNotification(old_id, notification.Pass()); } void RemoveNotification(const std::string& id) { |