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_) { |