| 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; | 47 virtual bool IsCommandIdChecked(int command_id) const; |
| 48 virtual bool IsCommandIdEnabled(int command_id) const; | 48 virtual bool IsCommandIdEnabled(int command_id) const; |
| 49 virtual void ExecuteCommand(int command_id); | 49 virtual void ExecuteCommand(int command_id); |
| 50 virtual void ExecuteCommandWithDisposition( |
| 51 int command_id, |
| 52 WindowOpenDisposition disposition); |
| 50 virtual void MenuClosed(); | 53 virtual void MenuClosed(); |
| 51 | 54 |
| 52 protected: | 55 protected: |
| 53 void InitMenu(); | 56 void InitMenu(); |
| 54 | 57 |
| 55 // Platform specific functions. | 58 // Platform specific functions. |
| 56 virtual void PlatformInit() = 0; | 59 virtual void PlatformInit() = 0; |
| 57 virtual bool GetAcceleratorForCommandId( | 60 virtual bool GetAcceleratorForCommandId( |
| 58 int command_id, | 61 int command_id, |
| 59 ui::Accelerator* accelerator) = 0; | 62 ui::Accelerator* accelerator) = 0; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 GURL selection_navigation_url_; | 143 GURL selection_navigation_url_; |
| 141 | 144 |
| 142 ui::SimpleMenuModel spellcheck_submenu_model_; | 145 ui::SimpleMenuModel spellcheck_submenu_model_; |
| 143 ui::SimpleMenuModel bidi_submenu_model_; | 146 ui::SimpleMenuModel bidi_submenu_model_; |
| 144 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; | 147 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; |
| 145 | 148 |
| 146 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 149 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 147 }; | 150 }; |
| 148 | 151 |
| 149 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 152 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |