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

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: Copy delegate in notification update too. 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 df02256a67e234bdef7fe96ecd3f1468bc0893ba..c66ba197ea116ecef987ebf6866a450aadc811c1 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -151,7 +151,8 @@ bool MessageCenterNotificationManager::UpdateNotification(
notification.notification_id(),
notification.title(),
notification.body(),
- notification.optional_fields());
+ notification.optional_fields(),
+ notification.delegate());
new_notification->StartDownloads();
return true;
}
@@ -250,30 +251,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
@@ -473,7 +450,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