| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 WrenchMenuModel(ui::AcceleratorProvider* provider, Browser* browser); | 80 WrenchMenuModel(ui::AcceleratorProvider* provider, Browser* browser); |
| 81 virtual ~WrenchMenuModel(); | 81 virtual ~WrenchMenuModel(); |
| 82 | 82 |
| 83 // Overridden for ButtonMenuItemModel::Delegate: | 83 // Overridden for ButtonMenuItemModel::Delegate: |
| 84 virtual bool DoesCommandIdDismissMenu(int command_id) const OVERRIDE; | 84 virtual bool DoesCommandIdDismissMenu(int command_id) const OVERRIDE; |
| 85 | 85 |
| 86 // Overridden for both ButtonMenuItemModel::Delegate and SimpleMenuModel: | 86 // Overridden for both ButtonMenuItemModel::Delegate and SimpleMenuModel: |
| 87 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; | 87 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; |
| 88 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; | 88 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; |
| 89 virtual bool GetIconForCommandId(int command_id, | 89 virtual bool GetIconForCommandId(int command_id, |
| 90 gfx::ImageSkia* icon) const OVERRIDE; | 90 gfx::Image* icon) const OVERRIDE; |
| 91 virtual void ExecuteCommand(int command_id) OVERRIDE; | 91 virtual void ExecuteCommand(int command_id) OVERRIDE; |
| 92 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 92 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 93 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 93 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 94 virtual bool IsCommandIdVisible(int command_id) const OVERRIDE; | 94 virtual bool IsCommandIdVisible(int command_id) const OVERRIDE; |
| 95 virtual bool GetAcceleratorForCommandId( | 95 virtual bool GetAcceleratorForCommandId( |
| 96 int command_id, | 96 int command_id, |
| 97 ui::Accelerator* accelerator) OVERRIDE; | 97 ui::Accelerator* accelerator) OVERRIDE; |
| 98 | 98 |
| 99 // Overridden from TabStripModelObserver: | 99 // Overridden from TabStripModelObserver: |
| 100 virtual void ActiveTabChanged(TabContents* old_contents, | 100 virtual void ActiveTabChanged(TabContents* old_contents, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 Browser* browser_; // weak | 161 Browser* browser_; // weak |
| 162 TabStripModel* tab_strip_model_; // weak | 162 TabStripModel* tab_strip_model_; // weak |
| 163 | 163 |
| 164 content::NotificationRegistrar registrar_; | 164 content::NotificationRegistrar registrar_; |
| 165 | 165 |
| 166 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 166 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 169 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| OLD | NEW |