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_WRENCH_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_WRENCH_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_WRENCH_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_WRENCH_MENU_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Overridden from menus::SimpleMenuModel: | 87 // Overridden from menus::SimpleMenuModel: |
88 virtual bool IsLabelDynamicAt(int index) const; | 88 virtual bool IsLabelDynamicAt(int index) const; |
89 virtual string16 GetLabelAt(int index) const; | 89 virtual string16 GetLabelAt(int index) const; |
90 virtual bool HasIcons() const { return true; } | 90 virtual bool HasIcons() const { return true; } |
91 virtual bool GetIconAt(int index, SkBitmap* icon) const; | 91 virtual bool GetIconAt(int index, SkBitmap* icon) const; |
92 | 92 |
93 // Overridden from menus::ButtonMenuItemModel::Delegate: | 93 // Overridden from menus::ButtonMenuItemModel::Delegate: |
94 virtual bool IsLabelForCommandIdDynamic(int command_id) const; | 94 virtual bool IsLabelForCommandIdDynamic(int command_id) const; |
95 virtual string16 GetLabelForCommandId(int command_id) const; | 95 virtual string16 GetLabelForCommandId(int command_id) const; |
96 virtual void ExecuteCommand(int command_id); | 96 virtual void ExecuteCommand(int command_id); |
| 97 virtual bool IsCommandIdEnabled(int command_id) const; |
97 | 98 |
98 // Overridden from TabStripModelObserver: | 99 // Overridden from TabStripModelObserver: |
99 virtual void TabSelectedAt(TabContents* old_contents, | 100 virtual void TabSelectedAt(TabContents* old_contents, |
100 TabContents* new_contents, | 101 TabContents* new_contents, |
101 int index, | 102 int index, |
102 bool user_gesture); | 103 bool user_gesture); |
103 virtual void TabReplacedAt(TabContents* old_contents, | 104 virtual void TabReplacedAt(TabContents* old_contents, |
104 TabContents* new_contents, int index); | 105 TabContents* new_contents, int index); |
105 virtual void TabStripModelDeleted(); | 106 virtual void TabStripModelDeleted(); |
106 | 107 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 147 |
147 Browser* browser_; // weak | 148 Browser* browser_; // weak |
148 TabStripModel* tabstrip_model_; // weak | 149 TabStripModel* tabstrip_model_; // weak |
149 | 150 |
150 NotificationRegistrar registrar_; | 151 NotificationRegistrar registrar_; |
151 | 152 |
152 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 153 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
153 }; | 154 }; |
154 | 155 |
155 #endif // CHROME_BROWSER_WRENCH_MENU_MODEL_H_ | 156 #endif // CHROME_BROWSER_WRENCH_MENU_MODEL_H_ |
OLD | NEW |