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

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

Issue 12052057: Introduces 'context' param to NotifierSettingsView. (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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (delegate_) 136 if (delegate_)
137 delegate_->DisableNotificationsFromSource(id); 137 delegate_->DisableNotificationsFromSource(id);
138 notification_list_->SendRemoveNotificationsBySource(id); 138 notification_list_->SendRemoveNotificationsBySource(id);
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::ShowNotificationSettingsDialog(gfx::NativeView context) {
147 if (delegate_)
148 delegate_->ShowSettingsDialog(context);
149 }
150
146 void MessageCenter::OnNotificationClicked(const std::string& id) { 151 void MessageCenter::OnNotificationClicked(const std::string& id) {
147 if (delegate_) 152 if (delegate_)
148 delegate_->OnClicked(id); 153 delegate_->OnClicked(id);
149 if (HasPopupNotifications()) { 154 if (HasPopupNotifications()) {
150 notification_list_->MarkSinglePopupAsShown(id, true); 155 notification_list_->MarkSinglePopupAsShown(id, true);
151 NotifyMessageCenterChanged(false); 156 NotifyMessageCenterChanged(false);
152 } 157 }
153 } 158 }
154 159
155 void MessageCenter::OnQuietModeChanged(bool quiet_mode) { 160 void MessageCenter::OnQuietModeChanged(bool quiet_mode) {
(...skipping 26 matching lines...) Expand all
182 } 187 }
183 188
184 void MessageCenter::NotifyMessageCenterChanged(bool new_notification) { 189 void MessageCenter::NotifyMessageCenterChanged(bool new_notification) {
185 FOR_EACH_OBSERVER(Observer, 190 FOR_EACH_OBSERVER(Observer,
186 observer_list_, 191 observer_list_,
187 OnMessageCenterChanged(new_notification)); 192 OnMessageCenterChanged(new_notification));
188 } 193 }
189 194
190 195
191 } // namespace message_center 196 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698