| 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_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "app/menus/accelerator.h" | 9 #include "app/menus/accelerator.h" |
| 10 #include "app/menus/button_menu_item_model.h" | 10 #include "app/menus/button_menu_item_model.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 public TabStripModelObserver, | 75 public TabStripModelObserver, |
| 76 public NotificationObserver { | 76 public NotificationObserver { |
| 77 public: | 77 public: |
| 78 WrenchMenuModel(menus::AcceleratorProvider* provider, Browser* browser); | 78 WrenchMenuModel(menus::AcceleratorProvider* provider, Browser* browser); |
| 79 virtual ~WrenchMenuModel(); | 79 virtual ~WrenchMenuModel(); |
| 80 | 80 |
| 81 // Overridden for ButtonMenuItemModel::Delegate: | 81 // Overridden for ButtonMenuItemModel::Delegate: |
| 82 virtual bool DoesCommandIdDismissMenu(int command_id) const; | 82 virtual bool DoesCommandIdDismissMenu(int command_id) const; |
| 83 | 83 |
| 84 // Overridden for both ButtonMenuItemModel::Delegate and SimpleMenuModel: | 84 // Overridden for both ButtonMenuItemModel::Delegate and SimpleMenuModel: |
| 85 virtual bool IsLabelForCommandIdDynamic(int command_id) const; | 85 virtual bool IsItemForCommandIdDynamic(int command_id) const; |
| 86 virtual string16 GetLabelForCommandId(int command_id) const; | 86 virtual string16 GetLabelForCommandId(int command_id) const; |
| 87 virtual bool GetIconForCommandId(int command_id, SkBitmap* icon) const; |
| 87 virtual void ExecuteCommand(int command_id); | 88 virtual void ExecuteCommand(int command_id); |
| 88 virtual bool IsCommandIdChecked(int command_id) const; | 89 virtual bool IsCommandIdChecked(int command_id) const; |
| 89 virtual bool IsCommandIdEnabled(int command_id) const; | 90 virtual bool IsCommandIdEnabled(int command_id) const; |
| 90 virtual bool IsCommandIdVisible(int command_id) const; | 91 virtual bool IsCommandIdVisible(int command_id) const; |
| 91 virtual bool GetAcceleratorForCommandId( | 92 virtual bool GetAcceleratorForCommandId( |
| 92 int command_id, | 93 int command_id, |
| 93 menus::Accelerator* accelerator); | 94 menus::Accelerator* accelerator); |
| 94 | 95 |
| 95 // Overridden from TabStripModelObserver: | 96 // Overridden from TabStripModelObserver: |
| 96 virtual void TabSelectedAt(TabContentsWrapper* old_contents, | 97 virtual void TabSelectedAt(TabContentsWrapper* old_contents, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 141 |
| 141 Browser* browser_; // weak | 142 Browser* browser_; // weak |
| 142 TabStripModel* tabstrip_model_; // weak | 143 TabStripModel* tabstrip_model_; // weak |
| 143 | 144 |
| 144 NotificationRegistrar registrar_; | 145 NotificationRegistrar registrar_; |
| 145 | 146 |
| 146 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 147 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 150 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| OLD | NEW |