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

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

Issue 11778012: Changes the OnClick behavior in message center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 void MessageCenter::ShowNotificationSettings(const std::string& id) { 141 void MessageCenter::ShowNotificationSettings(const std::string& id) {
142 if (delegate_) 142 if (delegate_)
143 delegate_->ShowSettings(id); 143 delegate_->ShowSettings(id);
144 } 144 }
145 145
146 void MessageCenter::OnNotificationClicked(const std::string& id) { 146 void MessageCenter::OnNotificationClicked(const std::string& id) {
147 if (delegate_) 147 if (delegate_)
148 delegate_->OnClicked(id); 148 delegate_->OnClicked(id);
149 if (HasPopupNotifications()) {
150 notification_list_->MarkSinglePopupAsShown(id);
151 NotifyMessageCenterChanged(false);
152 }
149 } 153 }
150 154
151 void MessageCenter::OnQuietModeChanged(bool quiet_mode) { 155 void MessageCenter::OnQuietModeChanged(bool quiet_mode) {
152 NotifyMessageCenterChanged(true); 156 NotifyMessageCenterChanged(true);
153 } 157 }
154 158
155 void MessageCenter::OnButtonClicked(const std::string& id, int button_index) { 159 void MessageCenter::OnButtonClicked(const std::string& id, int button_index) {
156 if (delegate_) 160 if (delegate_)
157 delegate_->OnButtonClicked(id, button_index); 161 delegate_->OnButtonClicked(id, button_index);
158 } 162 }
(...skipping 15 matching lines...) Expand all
174 } 178 }
175 179
176 void MessageCenter::NotifyMessageCenterChanged(bool new_notification) { 180 void MessageCenter::NotifyMessageCenterChanged(bool new_notification) {
177 FOR_EACH_OBSERVER(Observer, 181 FOR_EACH_OBSERVER(Observer,
178 observer_list_, 182 observer_list_,
179 OnMessageCenterChanged(new_notification)); 183 OnMessageCenterChanged(new_notification));
180 } 184 }
181 185
182 186
183 } // namespace message_center 187 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc ('k') | ui/message_center/notification_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698