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

Unified Diff: chrome/browser/notifications/message_center_notification_manager.cc

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win browsertests. Created 7 years, 7 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
Index: chrome/browser/notifications/message_center_notification_manager.cc
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc
index 7be078329f2219bf73ccc49169562739f342be16..502ab17e71897af62e460df9cd9ce3e3f65abcc4 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -242,30 +242,6 @@ void MessageCenterNotificationManager::OnNotificationRemoved(
RemoveProfileNotification(iter->second, by_user);
}
-void MessageCenterNotificationManager::OnNotificationClicked(
- const std::string& notification_id) {
- ProfileNotification* profile_notification =
- FindProfileNotification(notification_id);
- if (!profile_notification)
- return;
- profile_notification->notification().Click();
-}
-
-void MessageCenterNotificationManager::OnNotificationButtonClicked(
- const std::string& notification_id,
- int button_index) {
- ProfileNotification* profile_notification =
- FindProfileNotification(notification_id);
- if (!profile_notification)
- return;
- profile_notification->notification().ButtonClick(button_index);
-}
-
-void MessageCenterNotificationManager::OnNotificationDisplayed(
- const std::string& notification_id) {
- FindProfileNotification(notification_id)->notification().Display();
-}
-
////////////////////////////////////////////////////////////////////////////////
// ImageDownloads
@@ -465,7 +441,8 @@ void MessageCenterNotificationManager::AddProfileNotification(
notification.body(),
notification.display_source(),
profile_notification->GetExtensionId(),
- notification.optional_fields());
+ notification.optional_fields(),
+ notification.delegate());
profile_notification->StartDownloads();
}

Powered by Google App Engine
This is Rietveld 408576698