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

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 the ever-changing Mac unit tests. 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..0d37a907e51cc681e1170c166eeb1cdda5fc95ad 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;
}
@@ -228,14 +229,6 @@ void MessageCenterNotificationManager::ShowSettingsDialog(
settings_controller_->ShowSettingsDialog(context);
}
-bool MessageCenterNotificationManager::HasClickedListener(
- const std::string& notification_id) {
- ProfileNotification* profile_notification =
- FindProfileNotification(notification_id);
- return profile_notification &&
- profile_notification->notification().HasClickedListener();
-}
-
////////////////////////////////////////////////////////////////////////////////
// MessageCenter::Observer
void MessageCenterNotificationManager::OnNotificationRemoved(
@@ -250,30 +243,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 +442,8 @@ void MessageCenterNotificationManager::AddProfileNotification(
notification.body(),
notification.display_source(),
profile_notification->GetExtensionId(),
- notification.optional_fields());
+ notification.optional_fields(),
+ notification.delegate());
profile_notification->StartDownloads();
}
« no previous file with comments | « chrome/browser/notifications/message_center_notification_manager.h ('k') | chrome/browser/notifications/notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698