summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authordewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 04:48:57 +0000
committerdewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 04:48:57 +0000
commit0fa85dd72dad4416aa8dd2c9d06cea7e413031cd (patch)
tree10c2795922686d59950df01d8cd39e249789246e /ash/shell
parent91a43c197b68ac384d1ad2fef900f7a536b0d8b7 (diff)
downloadchromium_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/shell')
-rw-r--r--ash/shell/window_type_launcher.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
index bf7d059..3080f91 100644
--- a/ash/shell/window_type_launcher.cc
+++ b/ash/shell/window_type_launcher.cc
@@ -347,16 +347,21 @@ 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(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 */);
+ ->AddNotification(notification.Pass());
}
#if !defined(OS_MACOSX)
else if (sender == examples_button_) {