| 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_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 MenuClosed(); |
| 50 | 51 |
| 51 protected: | 52 protected: |
| 52 void InitMenu(); | 53 void InitMenu(); |
| 53 | 54 |
| 54 // Platform specific functions. | 55 // Platform specific functions. |
| 55 virtual void PlatformInit() = 0; | 56 virtual void PlatformInit() = 0; |
| 56 virtual bool GetAcceleratorForCommandId( | 57 virtual bool GetAcceleratorForCommandId( |
| 57 int command_id, | 58 int command_id, |
| 58 ui::Accelerator* accelerator) = 0; | 59 ui::Accelerator* accelerator) = 0; |
| 59 virtual void LookUpInDictionary(); | 60 virtual void LookUpInDictionary(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 78 private: | 79 private: |
| 79 static bool IsDevToolsURL(const GURL& url); | 80 static bool IsDevToolsURL(const GURL& url); |
| 80 static bool IsInternalResourcesURL(const GURL& url); | 81 static bool IsInternalResourcesURL(const GURL& url); |
| 81 bool AppendCustomItems(); | 82 bool AppendCustomItems(); |
| 82 void AppendDeveloperItems(); | 83 void AppendDeveloperItems(); |
| 83 void AppendLinkItems(); | 84 void AppendLinkItems(); |
| 84 void AppendImageItems(); | 85 void AppendImageItems(); |
| 85 void AppendAudioItems(); | 86 void AppendAudioItems(); |
| 86 void AppendVideoItems(); | 87 void AppendVideoItems(); |
| 87 void AppendMediaItems(); | 88 void AppendMediaItems(); |
| 89 void AppendPluginItems(); |
| 88 void AppendPageItems(); | 90 void AppendPageItems(); |
| 89 void AppendFrameItems(); | 91 void AppendFrameItems(); |
| 90 void AppendCopyItem(); | 92 void AppendCopyItem(); |
| 91 void AppendEditableItems(); | 93 void AppendEditableItems(); |
| 92 void AppendSearchProvider(); | 94 void AppendSearchProvider(); |
| 93 void AppendAllExtensionItems(); | 95 void AppendAllExtensionItems(); |
| 94 void AppendSpellcheckOptionsSubMenu(); | 96 void AppendSpellcheckOptionsSubMenu(); |
| 95 // Add writing direction sub menu (only used on Mac). | 97 // Add writing direction sub menu (only used on Mac). |
| 96 void AppendBidiSubMenu(); | 98 void AppendBidiSubMenu(); |
| 97 | 99 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 GURL selection_navigation_url_; | 140 GURL selection_navigation_url_; |
| 139 | 141 |
| 140 ui::SimpleMenuModel spellcheck_submenu_model_; | 142 ui::SimpleMenuModel spellcheck_submenu_model_; |
| 141 ui::SimpleMenuModel bidi_submenu_model_; | 143 ui::SimpleMenuModel bidi_submenu_model_; |
| 142 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; | 144 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; |
| 143 | 145 |
| 144 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 146 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 149 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |