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

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: fix a compile error happened by a latest CL 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if (delegate_) 137 if (delegate_)
138 delegate_->DisableNotificationsFromSource(id); 138 delegate_->DisableNotificationsFromSource(id);
139 notification_list_->SendRemoveNotificationsBySource(id); 139 notification_list_->SendRemoveNotificationsBySource(id);
140 } 140 }
141 141
142 void MessageCenter::ShowNotificationSettings(const std::string& id) { 142 void MessageCenter::ShowNotificationSettings(const std::string& id) {
143 if (delegate_) 143 if (delegate_)
144 delegate_->ShowSettings(id); 144 delegate_->ShowSettings(id);
145 } 145 }
146 146
147 void MessageCenter::ShowNotificationSettingsDialog(gfx::NativeView context) {
148 if (delegate_)
149 delegate_->ShowSettingsDialog(context);
150 }
151
147 void MessageCenter::OnNotificationClicked(const std::string& id) { 152 void MessageCenter::OnNotificationClicked(const std::string& id) {
148 if (delegate_) 153 if (delegate_)
149 delegate_->OnClicked(id); 154 delegate_->OnClicked(id);
150 if (HasPopupNotifications()) { 155 if (HasPopupNotifications()) {
151 notification_list_->MarkSinglePopupAsShown(id, true); 156 notification_list_->MarkSinglePopupAsShown(id, true);
152 NotifyMessageCenterChanged(false); 157 NotifyMessageCenterChanged(false);
153 } 158 }
154 } 159 }
155 160
156 void MessageCenter::OnQuietModeChanged(bool quiet_mode) { 161 void MessageCenter::OnQuietModeChanged(bool quiet_mode) {
(...skipping 21 matching lines...) Expand all
178 // Private. 183 // Private.
179 184
180 void MessageCenter::NotifyMessageCenterChanged(bool new_notification) { 185 void MessageCenter::NotifyMessageCenterChanged(bool new_notification) {
181 FOR_EACH_OBSERVER(Observer, 186 FOR_EACH_OBSERVER(Observer,
182 observer_list_, 187 observer_list_,
183 OnMessageCenterChanged(new_notification)); 188 OnMessageCenterChanged(new_notification));
184 } 189 }
185 190
186 191
187 } // namespace message_center 192 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698