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

Unified Diff: ui/message_center/message_center_impl.cc

Issue 149433005: Adds a small icon to notifications, and connects it to synced notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add testing. Created 6 years, 11 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: ui/message_center/message_center_impl.cc
diff --git a/ui/message_center/message_center_impl.cc b/ui/message_center/message_center_impl.cc
index fe38696e2ff9696cbd6badc57a228a0ffa20d916..b9dfb23e73c5a2d303d5b69a2dc258f30b65a603 100644
--- a/ui/message_center/message_center_impl.cc
+++ b/ui/message_center/message_center_impl.cc
@@ -750,6 +750,28 @@ void MessageCenterImpl::SetNotificationButtonIcon(
}
}
+void MessageCenterImpl::SetNotificationSmallImage(
+ const std::string& notification_id,
+ const gfx::Image& image) {
+ bool updated = false;
+ Notification* queue_notification =
+ notification_queue_->GetLatestNotification(notification_id);
+
+ if (queue_notification) {
+ queue_notification->set_small_image(image);
+ updated = true;
+ } else {
+ updated =
+ notification_list_->SetNotificationSmallImage(notification_id, image);
+ }
+
+ if (updated) {
+ FOR_EACH_OBSERVER(MessageCenterObserver,
+ observer_list_,
+ OnNotificationUpdated(notification_id));
+ }
+}
+
void MessageCenterImpl::DisableNotificationsByNotifier(
const NotifierId& notifier_id) {
if (settings_provider_) {

Powered by Google App Engine
This is Rietveld 408576698