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

Side by Side Diff: ui/message_center/message_center.cc

Issue 11639041: Added support for image notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/message_center.h" 5 #include "ui/message_center/message_center.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace message_center { 9 namespace message_center {
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (notification_list_->SetNotificationPrimaryIcon(id, image) && host_) 82 if (notification_list_->SetNotificationPrimaryIcon(id, image) && host_)
83 host_->MessageCenterChanged(true); 83 host_->MessageCenterChanged(true);
84 } 84 }
85 85
86 void MessageCenter::SetNotificationSecondaryIcon(const std::string& id, 86 void MessageCenter::SetNotificationSecondaryIcon(const std::string& id,
87 const gfx::ImageSkia& image) { 87 const gfx::ImageSkia& image) {
88 if (notification_list_->SetNotificationSecondaryIcon(id, image) && host_) 88 if (notification_list_->SetNotificationSecondaryIcon(id, image) && host_)
89 host_->MessageCenterChanged(true); 89 host_->MessageCenterChanged(true);
90 } 90 }
91 91
92 void MessageCenter::SetNotificationImage(const std::string& id,
93 const gfx::ImageSkia& image) {
94 if (notification_list_->SetNotificationImage(id, image) && host_)
95 host_->MessageCenterChanged(true);
96 }
97
92 //------------------------------------------------------------------------------ 98 //------------------------------------------------------------------------------
93 // Overridden from NotificationList::Delegate. 99 // Overridden from NotificationList::Delegate.
94 100
95 void MessageCenter::SendRemoveNotification(const std::string& id) { 101 void MessageCenter::SendRemoveNotification(const std::string& id) {
96 if (delegate_) 102 if (delegate_)
97 delegate_->NotificationRemoved(id); 103 delegate_->NotificationRemoved(id);
98 } 104 }
99 105
100 void MessageCenter::SendRemoveAllNotifications() { 106 void MessageCenter::SendRemoveAllNotifications() {
101 if (delegate_) { 107 if (delegate_) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 154
149 NotificationList* MessageCenter::GetNotificationList() { 155 NotificationList* MessageCenter::GetNotificationList() {
150 return notification_list_.get(); 156 return notification_list_.get();
151 } 157 }
152 158
153 void MessageCenter::Delegate::OnButtonClicked(const std::string& id, 159 void MessageCenter::Delegate::OnButtonClicked(const std::string& id,
154 int button_index) { 160 int button_index) {
155 } 161 }
156 162
157 } // namespace message_center 163 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698