OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/menus/simple_menu_model.h" | 9 #include "app/menus/simple_menu_model.h" |
10 #include "chrome/browser/notifications/balloon.h" | 10 #include "chrome/browser/notifications/balloon.h" |
11 | 11 |
12 class NotificationOptionsMenuModel : public menus::SimpleMenuModel, | 12 class NotificationOptionsMenuModel : public menus::SimpleMenuModel, |
13 public menus::SimpleMenuModel::Delegate { | 13 public menus::SimpleMenuModel::Delegate { |
14 public: | 14 public: |
15 explicit NotificationOptionsMenuModel(Balloon* balloon); | 15 explicit NotificationOptionsMenuModel(Balloon* balloon); |
16 virtual ~NotificationOptionsMenuModel(); | 16 virtual ~NotificationOptionsMenuModel(); |
17 | 17 |
18 // Overridden from menus::SimpleMenuModel: | 18 // Overridden from menus::SimpleMenuModel: |
19 virtual bool IsLabelForCommandIdDynamic(int command_id) const; | 19 virtual bool IsItemForCommandIdDynamic(int command_id) const; |
20 virtual string16 GetLabelForCommandId(int command_id) const; | 20 virtual string16 GetLabelForCommandId(int command_id) const; |
21 | 21 |
22 // Overridden from menus::SimpleMenuModel::Delegate: | 22 // Overridden from menus::SimpleMenuModel::Delegate: |
23 virtual bool IsCommandIdChecked(int command_id) const; | 23 virtual bool IsCommandIdChecked(int command_id) const; |
24 virtual bool IsCommandIdEnabled(int command_id) const; | 24 virtual bool IsCommandIdEnabled(int command_id) const; |
25 virtual bool GetAcceleratorForCommandId(int command_id, | 25 virtual bool GetAcceleratorForCommandId(int command_id, |
26 menus::Accelerator* accelerator); | 26 menus::Accelerator* accelerator); |
27 virtual void ExecuteCommand(int command_id); | 27 virtual void ExecuteCommand(int command_id); |
28 | 28 |
29 private: | 29 private: |
30 Balloon* balloon_; // Not owned. | 30 Balloon* balloon_; // Not owned. |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(NotificationOptionsMenuModel); | 32 DISALLOW_COPY_AND_ASSIGN(NotificationOptionsMenuModel); |
33 }; | 33 }; |
34 | 34 |
35 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_ | 35 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_ |
OLD | NEW |