| 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 14 matching lines...) Expand all Loading... |
| 25 // The model of the context menu for a notification card. | 25 // The model of the context menu for a notification card. |
| 26 class NotificationMenuModel : public ui::SimpleMenuModel, | 26 class NotificationMenuModel : public ui::SimpleMenuModel, |
| 27 public ui::SimpleMenuModel::Delegate { | 27 public ui::SimpleMenuModel::Delegate { |
| 28 public: | 28 public: |
| 29 NotificationMenuModel(MessageCenterTray* tray, | 29 NotificationMenuModel(MessageCenterTray* tray, |
| 30 const NotifierId& notifier_id, | 30 const NotifierId& notifier_id, |
| 31 const base::string16& display_source); | 31 const base::string16& display_source); |
| 32 virtual ~NotificationMenuModel(); | 32 virtual ~NotificationMenuModel(); |
| 33 | 33 |
| 34 // Overridden from ui::SimpleMenuModel::Delegate: | 34 // Overridden from ui::SimpleMenuModel::Delegate: |
| 35 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 35 virtual bool IsCommandIdChecked(int command_id) const override; |
| 36 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 36 virtual bool IsCommandIdEnabled(int command_id) const override; |
| 37 virtual bool GetAcceleratorForCommandId( | 37 virtual bool GetAcceleratorForCommandId( |
| 38 int command_id, | 38 int command_id, |
| 39 ui::Accelerator* accelerator) OVERRIDE; | 39 ui::Accelerator* accelerator) override; |
| 40 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 40 virtual void ExecuteCommand(int command_id, int event_flags) override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 MessageCenterTray* tray_; | 43 MessageCenterTray* tray_; |
| 44 NotifierId notifier_id_; | 44 NotifierId notifier_id_; |
| 45 DISALLOW_COPY_AND_ASSIGN(NotificationMenuModel); | 45 DISALLOW_COPY_AND_ASSIGN(NotificationMenuModel); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 NotificationMenuModel::NotificationMenuModel( | 48 NotificationMenuModel::NotificationMenuModel( |
| 49 MessageCenterTray* tray, | 49 MessageCenterTray* tray, |
| 50 const NotifierId& notifier_id, | 50 const NotifierId& notifier_id, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 ShowPopupBubble(); | 256 ShowPopupBubble(); |
| 257 | 257 |
| 258 NotifyMessageCenterTrayChanged(); | 258 NotifyMessageCenterTrayChanged(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 void MessageCenterTray::NotifyMessageCenterTrayChanged() { | 261 void MessageCenterTray::NotifyMessageCenterTrayChanged() { |
| 262 delegate_->OnMessageCenterTrayChanged(); | 262 delegate_->OnMessageCenterTrayChanged(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace message_center | 265 } // namespace message_center |
| OLD | NEW |