diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-05 07:16:20 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-05 07:16:20 +0000 |
commit | ca1f539fa5613eac3cfca1dff40e5cd13214c540 (patch) | |
tree | 31d0e054c8a96681eb7a280b5db83eb68b31f774 /ash | |
parent | 45ba7cc5018ecb3a868fe834da80a8a1a384ae81 (diff) | |
download | chromium_src-ca1f539fa5613eac3cfca1dff40e5cd13214c540.zip chromium_src-ca1f539fa5613eac3cfca1dff40e5cd13214c540.tar.gz chromium_src-ca1f539fa5613eac3cfca1dff40e5cd13214c540.tar.bz2 |
Revert 204181 "Enable users of NotificationUIManager to specify ..."
Broke Mac builders.
http://build.chromium.org/p/chromium.mac/builders/Mac%20Builder/builds/14414
http://build.chromium.org/p/chromium.mac/builders/Mac%20Builder%20%28dbg%29/builds/46042
> 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
>
> Review URL: https://chromiumcodereview.appspot.com/14631005
TBR=dewittj@chromium.org
Review URL: https://codereview.chromium.org/16429004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204185 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shell/window_type_launcher.cc | 21 | ||||
-rw-r--r-- | ash/system/web_notification/web_notification_tray_unittest.cc | 20 |
2 files changed, 14 insertions, 27 deletions
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 3080f91..bf7d059 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -347,21 +347,16 @@ void WindowTypeLauncher::ButtonPressed(views::Button* sender, base::TimeDelta::FromSeconds(5)); } else if (sender == show_web_notification_) { - scoped_ptr<message_center::Notification> notification; - notification.reset(new message_center::Notification( - message_center::NOTIFICATION_TYPE_SIMPLE, - "id0", - ASCIIToUTF16("Test Shell Web Notification"), - ASCIIToUTF16("Notification message body."), - gfx::Image(), - ASCIIToUTF16("www.testshell.org"), - "" /* extension id */, - NULL /* optional_fields */, - NULL /* delegate */)); - ash::Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget() ->web_notification_tray()->message_center() - ->AddNotification(notification.Pass()); + ->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE, + "id0", + ASCIIToUTF16("Test Shell Web Notification"), + ASCIIToUTF16("Notification message body."), + ASCIIToUTF16("www.testshell.org"), + "" /* extension id */, + NULL /* optional_fields */, + NULL /* delegate */); } #if !defined(OS_MACOSX) else if (sender == examples_button_) { diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc index 5b59312..e144fe9 100644 --- a/ash/system/web_notification/web_notification_tray_unittest.cc +++ b/ash/system/web_notification/web_notification_tray_unittest.cc @@ -56,34 +56,26 @@ class WebNotificationTrayTest : public test::AshTestBase { protected: void AddNotification(const std::string& id) { - scoped_ptr<message_center::Notification> notification; - notification.reset(new message_center::Notification( + GetMessageCenter()->AddNotification( 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 */)); - GetMessageCenter()->AddNotification(notification.Pass()); + NULL /* delegate */); } void UpdateNotification(const std::string& old_id, const std::string& new_id) { - scoped_ptr<message_center::Notification> notification; - notification.reset(new message_center::Notification( - message_center::NOTIFICATION_TYPE_SIMPLE, + GetMessageCenter()->UpdateNotification( + old_id, new_id, ASCIIToUTF16("Updated Web Notification"), ASCIIToUTF16("Updated message body."), - gfx::Image(), - ASCIIToUTF16("www.test.org"), - "" /* extension id */, - NULL /* optional_fields */, - NULL /* delegate */)); - GetMessageCenter()->UpdateNotification(old_id, notification.Pass()); + NULL, + NULL); } void RemoveNotification(const std::string& id) { |