| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void ChangeIconForCommandId(int command_id, const gfx::Image& icon); | 75 void ChangeIconForCommandId(int command_id, const gfx::Image& icon); |
| 76 | 76 |
| 77 void AddObserver(Observer* observer); | 77 void AddObserver(Observer* observer); |
| 78 void RemoveObserver(Observer* observer); | 78 void RemoveObserver(Observer* observer); |
| 79 | 79 |
| 80 // Overridden from ui::SimpleMenuModel::Delegate: | 80 // Overridden from ui::SimpleMenuModel::Delegate: |
| 81 bool IsCommandIdChecked(int command_id) const override; | 81 bool IsCommandIdChecked(int command_id) const override; |
| 82 bool IsCommandIdEnabled(int command_id) const override; | 82 bool IsCommandIdEnabled(int command_id) const override; |
| 83 bool IsCommandIdVisible(int command_id) const override; | 83 bool IsCommandIdVisible(int command_id) const override; |
| 84 bool GetAcceleratorForCommandId(int command_id, | 84 bool GetAcceleratorForCommandId(int command_id, |
| 85 ui::Accelerator* accelerator) override; | 85 ui::Accelerator* accelerator) const override; |
| 86 bool IsItemForCommandIdDynamic(int command_id) const override; | 86 bool IsItemForCommandIdDynamic(int command_id) const override; |
| 87 base::string16 GetLabelForCommandId(int command_id) const override; | 87 base::string16 GetLabelForCommandId(int command_id) const override; |
| 88 base::string16 GetSublabelForCommandId(int command_id) const override; | 88 base::string16 GetSublabelForCommandId(int command_id) const override; |
| 89 bool GetIconForCommandId(int command_id, gfx::Image* icon) const override; | 89 bool GetIconForCommandId(int command_id, gfx::Image* icon) const override; |
| 90 | 90 |
| 91 protected: | 91 protected: |
| 92 // Overriden from ui::SimpleMenuModel: | 92 // Overriden from ui::SimpleMenuModel: |
| 93 void MenuItemsChanged() override; | 93 void MenuItemsChanged() override; |
| 94 | 94 |
| 95 void NotifyMenuStateChanged(); | 95 void NotifyMenuStateChanged(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 110 ItemStateMap item_states_; | 110 ItemStateMap item_states_; |
| 111 | 111 |
| 112 base::ObserverList<Observer> observer_list_; | 112 base::ObserverList<Observer> observer_list_; |
| 113 | 113 |
| 114 Delegate* delegate_; | 114 Delegate* delegate_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(StatusIconMenuModel); | 116 DISALLOW_COPY_AND_ASSIGN(StatusIconMenuModel); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_ | 119 #endif // CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_ |
| OLD | NEW |