OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_tray.h" | 5 #include "ui/message_center/message_center_tray.h" |
6 | 6 |
7 #include "base/observer_list.h" | 7 #include "base/observer_list.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 message_center_visible_ = delegate_->ShowNotifierSettings(); | 192 message_center_visible_ = delegate_->ShowNotifierSettings(); |
193 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS); | 193 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS); |
194 | 194 |
195 NotifyMessageCenterTrayChanged(); | 195 NotifyMessageCenterTrayChanged(); |
196 } | 196 } |
197 | 197 |
198 scoped_ptr<ui::MenuModel> MessageCenterTray::CreateNotificationMenuModel( | 198 scoped_ptr<ui::MenuModel> MessageCenterTray::CreateNotificationMenuModel( |
199 const NotifierId& notifier_id, | 199 const NotifierId& notifier_id, |
200 const base::string16& display_source) { | 200 const base::string16& display_source) { |
201 return scoped_ptr<ui::MenuModel>(new NotificationMenuModel( | 201 return make_scoped_ptr( |
202 this, notifier_id, display_source)); | 202 new NotificationMenuModel(this, notifier_id, display_source)); |
203 } | 203 } |
204 | 204 |
205 void MessageCenterTray::OnNotificationAdded( | 205 void MessageCenterTray::OnNotificationAdded( |
206 const std::string& notification_id) { | 206 const std::string& notification_id) { |
207 OnMessageCenterChanged(); | 207 OnMessageCenterChanged(); |
208 } | 208 } |
209 | 209 |
210 void MessageCenterTray::OnNotificationRemoved( | 210 void MessageCenterTray::OnNotificationRemoved( |
211 const std::string& notification_id, | 211 const std::string& notification_id, |
212 bool by_user) { | 212 bool by_user) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 ShowPopupBubble(); | 255 ShowPopupBubble(); |
256 | 256 |
257 NotifyMessageCenterTrayChanged(); | 257 NotifyMessageCenterTrayChanged(); |
258 } | 258 } |
259 | 259 |
260 void MessageCenterTray::NotifyMessageCenterTrayChanged() { | 260 void MessageCenterTray::NotifyMessageCenterTrayChanged() { |
261 delegate_->OnMessageCenterTrayChanged(); | 261 delegate_->OnMessageCenterTrayChanged(); |
262 } | 262 } |
263 | 263 |
264 } // namespace message_center | 264 } // namespace message_center |
OLD | NEW |