OLD | NEW |
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/views/message_view.h" | 5 #include "ui/message_center/views/message_view.h" |
6 | 6 |
7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
8 #include "grit/ui_strings.h" | 8 #include "grit/ui_strings.h" |
9 #include "ui/base/accessibility/accessible_view_state.h" | 9 #include "ui/base/accessibility/accessible_view_state.h" |
10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 233 |
234 void MenuModel::ExecuteCommand(int command_id, int event_flags) { | 234 void MenuModel::ExecuteCommand(int command_id, int event_flags) { |
235 switch (command_id) { | 235 switch (command_id) { |
236 case kTogglePermissionCommand: | 236 case kTogglePermissionCommand: |
237 message_center_->DisableNotificationsByNotifier(notifier_id_); | 237 message_center_->DisableNotificationsByNotifier(notifier_id_); |
238 break; | 238 break; |
239 case kShowSettingsCommand: | 239 case kShowSettingsCommand: |
240 // |tray_| may be NULL in tests. | 240 // |tray_| may be NULL in tests. |
241 if (tray_) | 241 if (tray_) |
242 tray_->ShowNotifierSettingsBubble(); | 242 tray_->ShowNotifierSettingsBubble(); |
243 else | |
244 message_center_->ShowNotificationSettings(notification_id_); | |
245 break; | 243 break; |
246 default: | 244 default: |
247 NOTREACHED(); | 245 NOTREACHED(); |
248 } | 246 } |
249 } | 247 } |
250 | 248 |
251 } // namespace | 249 } // namespace |
252 | 250 |
253 namespace message_center { | 251 namespace message_center { |
254 | 252 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 is_expanded_ = true; | 445 is_expanded_ = true; |
448 message_center_->ExpandNotification(notification_id_); | 446 message_center_->ExpandNotification(notification_id_); |
449 } | 447 } |
450 } | 448 } |
451 | 449 |
452 void MessageView::OnSlideOut() { | 450 void MessageView::OnSlideOut() { |
453 message_center_->RemoveNotification(notification_id_, true); // By user. | 451 message_center_->RemoveNotification(notification_id_, true); // By user. |
454 } | 452 } |
455 | 453 |
456 } // namespace message_center | 454 } // namespace message_center |
OLD | NEW |