Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4833)

Unified Diff: ash/shell/window_type_launcher.cc

Issue 14631005: Enable users of NotificationUIManager to specify binary images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for relanding. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/window_type_launcher.cc
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
index bf7d059ca9e7359ce4050f468798b182b5ad5240..3080f91c9a158a09927621ca6871713dbf0fadf6 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_) {
« no previous file with comments | « no previous file | ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698