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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 virtual ~RenderViewContextMenu(); | 41 virtual ~RenderViewContextMenu(); |
42 | 42 |
43 // Initializes the context menu. | 43 // Initializes the context menu. |
44 void Init(); | 44 void Init(); |
45 | 45 |
46 // SimpleMenuModel::Delegate implementation. | 46 // SimpleMenuModel::Delegate implementation. |
47 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 47 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
48 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 48 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
49 virtual void ExecuteCommand(int command_id) OVERRIDE; | 49 virtual void ExecuteCommand(int command_id) OVERRIDE; |
| 50 virtual void ExecuteCommandWithFlags(int command_id, int flags) OVERRIDE; |
50 virtual void MenuWillShow() OVERRIDE; | 51 virtual void MenuWillShow() OVERRIDE; |
51 virtual void MenuClosed() OVERRIDE; | 52 virtual void MenuClosed() OVERRIDE; |
52 | 53 |
53 protected: | 54 protected: |
54 void InitMenu(); | 55 void InitMenu(); |
55 | 56 |
56 // Platform specific functions. | 57 // Platform specific functions. |
57 virtual void PlatformInit() = 0; | 58 virtual void PlatformInit() = 0; |
58 virtual bool GetAcceleratorForCommandId( | 59 virtual bool GetAcceleratorForCommandId( |
59 int command_id, | 60 int command_id, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 GURL selection_navigation_url_; | 153 GURL selection_navigation_url_; |
153 | 154 |
154 ui::SimpleMenuModel spellcheck_submenu_model_; | 155 ui::SimpleMenuModel spellcheck_submenu_model_; |
155 ui::SimpleMenuModel bidi_submenu_model_; | 156 ui::SimpleMenuModel bidi_submenu_model_; |
156 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; | 157 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; |
157 | 158 |
158 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 159 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
159 }; | 160 }; |
160 | 161 |
161 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 162 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |