| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
| 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "ui/gfx/geometry/vector2d.h" | 22 #include "ui/gfx/geometry/vector2d.h" |
| 23 | 23 |
| 24 #if defined(ENABLE_EXTENSIONS) | 24 #if defined(ENABLE_EXTENSIONS) |
| 25 #include "chrome/browser/extensions/context_menu_matcher.h" | 25 #include "chrome/browser/extensions/context_menu_matcher.h" |
| 26 #include "chrome/browser/extensions/menu_manager.h" | 26 #include "chrome/browser/extensions/menu_manager.h" |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 class PrintPreviewContextMenuObserver; | 29 class PrintPreviewContextMenuObserver; |
| 30 class Profile; | 30 class Profile; |
| 31 class SpellingMenuObserver; | 31 class SpellingMenuObserver; |
| 32 class SpellCheckerSubMenuObserver; | 32 class SpellingOptionsSubMenuObserver; |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 class RenderFrameHost; | 35 class RenderFrameHost; |
| 36 class WebContents; | 36 class WebContents; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace extensions { | 39 namespace extensions { |
| 40 class Extension; | 40 class Extension; |
| 41 class MenuItem; | 41 class MenuItem; |
| 42 } | 42 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void AppendVideoItems(); | 121 void AppendVideoItems(); |
| 122 void AppendMediaItems(); | 122 void AppendMediaItems(); |
| 123 void AppendPluginItems(); | 123 void AppendPluginItems(); |
| 124 void AppendPageItems(); | 124 void AppendPageItems(); |
| 125 void AppendCopyItem(); | 125 void AppendCopyItem(); |
| 126 void AppendPrintItem(); | 126 void AppendPrintItem(); |
| 127 void AppendMediaRouterItem(); | 127 void AppendMediaRouterItem(); |
| 128 void AppendRotationItems(); | 128 void AppendRotationItems(); |
| 129 void AppendEditableItems(); | 129 void AppendEditableItems(); |
| 130 void AppendLanguageSettings(); | 130 void AppendLanguageSettings(); |
| 131 void AppendSpellingSuggestionItems(); |
| 131 void AppendSearchProvider(); | 132 void AppendSearchProvider(); |
| 132 #if defined(ENABLE_EXTENSIONS) | 133 #if defined(ENABLE_EXTENSIONS) |
| 133 void AppendAllExtensionItems(); | 134 void AppendAllExtensionItems(); |
| 134 void AppendCurrentExtensionItems(); | 135 void AppendCurrentExtensionItems(); |
| 135 #endif | 136 #endif |
| 136 void AppendPrintPreviewItems(); | 137 void AppendPrintPreviewItems(); |
| 137 void AppendSearchWebForImageItems(); | 138 void AppendSearchWebForImageItems(); |
| 138 void AppendSpellingSuggestionsSubMenu(); | |
| 139 void AppendProtocolHandlerSubMenu(); | 139 void AppendProtocolHandlerSubMenu(); |
| 140 void AppendPasswordItems(); | 140 void AppendPasswordItems(); |
| 141 | 141 |
| 142 // Copy to the clipboard an image located at a point in the RenderView | 142 // Copy to the clipboard an image located at a point in the RenderView |
| 143 void CopyImageAt(int x, int y); | 143 void CopyImageAt(int x, int y); |
| 144 | 144 |
| 145 // Load the original image located at a point in the RenderView. | 145 // Load the original image located at a point in the RenderView. |
| 146 void LoadOriginalImage(); | 146 void LoadOriginalImage(); |
| 147 | 147 |
| 148 // Get an image located at a point in the RenderView for search. | 148 // Get an image located at a point in the RenderView for search. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 167 | 167 |
| 168 // The destination URL to use if the user tries to search for or navigate to | 168 // The destination URL to use if the user tries to search for or navigate to |
| 169 // a text selection. | 169 // a text selection. |
| 170 GURL selection_navigation_url_; | 170 GURL selection_navigation_url_; |
| 171 | 171 |
| 172 ui::SimpleMenuModel profile_link_submenu_model_; | 172 ui::SimpleMenuModel profile_link_submenu_model_; |
| 173 bool multiple_profiles_open_; | 173 bool multiple_profiles_open_; |
| 174 ui::SimpleMenuModel protocol_handler_submenu_model_; | 174 ui::SimpleMenuModel protocol_handler_submenu_model_; |
| 175 ProtocolHandlerRegistry* protocol_handler_registry_; | 175 ProtocolHandlerRegistry* protocol_handler_registry_; |
| 176 | 176 |
| 177 // An observer that handles spelling-menu items. | 177 // An observer that handles spelling suggestions, "Add to dictionary", and |
| 178 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; | 178 // "Ask Google for suggestions" items. |
| 179 scoped_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_; |
| 180 |
| 181 #if !defined(USE_BROWSER_SPELLCHECKER) |
| 182 // An observer that handles the submenu for showing spelling options. This |
| 183 // submenu lets users select the spelling language, for example. |
| 184 scoped_ptr<SpellingOptionsSubMenuObserver> spelling_options_submenu_observer_; |
| 185 #endif |
| 179 | 186 |
| 180 #if defined(ENABLE_PRINT_PREVIEW) | 187 #if defined(ENABLE_PRINT_PREVIEW) |
| 181 // An observer that disables menu items when print preview is active. | 188 // An observer that disables menu items when print preview is active. |
| 182 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 189 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
| 183 #endif | 190 #endif |
| 184 | 191 |
| 185 // In the case of a MimeHandlerView this will point to the WebContents that | 192 // In the case of a MimeHandlerView this will point to the WebContents that |
| 186 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as | 193 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as |
| 187 // |source_web_contents_|. | 194 // |source_web_contents_|. |
| 188 content::WebContents* const embedder_web_contents_; | 195 content::WebContents* const embedder_web_contents_; |
| 189 | 196 |
| 190 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 197 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 191 }; | 198 }; |
| 192 | 199 |
| 193 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 200 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |