OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Initializes the context menu. | 45 // Initializes the context menu. |
46 void Init(); | 46 void Init(); |
47 | 47 |
48 // Provide access to the menu model for ExternalTabContainer. | 48 // Provide access to the menu model for ExternalTabContainer. |
49 const ui::MenuModel& menu_model() const { return menu_model_; } | 49 const ui::MenuModel& menu_model() const { return menu_model_; } |
50 | 50 |
51 // SimpleMenuModel::Delegate implementation. | 51 // SimpleMenuModel::Delegate implementation. |
52 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 52 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
53 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 53 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
54 virtual void ExecuteCommand(int command_id) OVERRIDE; | 54 virtual void ExecuteCommand(int command_id) OVERRIDE; |
55 virtual void MenuWillShow() OVERRIDE; | 55 virtual void MenuWillShow(ui::SimpleMenuModel* source) OVERRIDE; |
56 virtual void MenuClosed() OVERRIDE; | 56 virtual void MenuClosed(ui::SimpleMenuModel* source) OVERRIDE; |
57 | 57 |
58 protected: | 58 protected: |
59 void InitMenu(); | 59 void InitMenu(); |
60 | 60 |
61 // Platform specific functions. | 61 // Platform specific functions. |
62 virtual void PlatformInit() = 0; | 62 virtual void PlatformInit() = 0; |
63 virtual bool GetAcceleratorForCommandId( | 63 virtual bool GetAcceleratorForCommandId( |
64 int command_id, | 64 int command_id, |
65 ui::Accelerator* accelerator) = 0; | 65 ui::Accelerator* accelerator) = 0; |
66 virtual void LookUpInDictionary(); | 66 virtual void LookUpInDictionary(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 ui::SimpleMenuModel spellcheck_submenu_model_; | 165 ui::SimpleMenuModel spellcheck_submenu_model_; |
166 ui::SimpleMenuModel bidi_submenu_model_; | 166 ui::SimpleMenuModel bidi_submenu_model_; |
167 ui::SimpleMenuModel protocol_handler_submenu_model_; | 167 ui::SimpleMenuModel protocol_handler_submenu_model_; |
168 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; | 168 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; |
169 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; | 169 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 171 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
172 }; | 172 }; |
173 | 173 |
174 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 174 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |