Index: chrome/browser/status_icons/desktop_notification_balloon.cc |
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc |
index c6d2d375e28d3c1f94c98b2e2da13b5652b8a0ea..8a0748ed36721f050643a7dda7d2b1cbb1252422 100644 |
--- a/chrome/browser/status_icons/desktop_notification_balloon.cc |
+++ b/chrome/browser/status_icons/desktop_notification_balloon.cc |
@@ -17,6 +17,8 @@ |
#include "chrome/browser/profiles/profile_manager.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "ui/gfx/image/image_skia.h" |
+#include "ui/message_center/notification_types.h" |
+#include "ui/message_center/notifier_settings.h" |
namespace { |
@@ -30,6 +32,7 @@ void CloseBalloon(const std::string& id, ProfileID profile_id) { |
} |
// Prefix added to the notification ids. |
+const char kNotifierId[] = "status-icons.desktop-notification-balloon"; |
Peter Beverloo
2015/10/09 12:55:23
micro nit: alphabetise.
johnme
2015/10/09 14:20:41
Done.
|
const char kNotificationPrefix[] = "desktop_notification_balloon."; |
// Timeout for automatically dismissing the notification balloon. |
@@ -81,10 +84,17 @@ void DesktopNotificationBalloon::DisplayBalloon( |
profile = ProfileManager::GetLastUsedProfile(); |
} |
- NotificationDelegate* delegate = |
+ DummyNotificationDelegate* delegate = |
new DummyNotificationDelegate(base::IntToString(id_count_++), profile_); |
- Notification notification(GURL(), title, contents, gfx::Image(icon), |
- base::string16(), std::string(), delegate); |
+ Notification notification(message_center::NOTIFICATION_TYPE_SIMPLE, title, |
+ contents, gfx::Image(icon), |
+ // TODO(johnme): In theory the desktop notification balloon class can be |
Peter Beverloo
2015/10/09 12:55:23
Please place this comment above the call, not in t
johnme
2015/10/09 14:20:41
Done (I linked directly to https://codereview.chro
|
+ // used by lots of other features, which would not fall under a single |
+ // system component id. So callers should pass in the id to be used here. |
+ message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
+ kNotifierId), |
+ base::string16(), GURL(), std::string(), |
+ message_center::RichNotificationData(), delegate); |
g_browser_process->notification_ui_manager()->Add(notification, profile); |