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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 void AppendCopyItem(); | 219 void AppendCopyItem(); |
220 void AppendPrintItem(); | 220 void AppendPrintItem(); |
221 void AppendEditableItems(); | 221 void AppendEditableItems(); |
222 void AppendSearchProvider(); | 222 void AppendSearchProvider(); |
223 void AppendAllExtensionItems(); | 223 void AppendAllExtensionItems(); |
224 void AppendCurrentExtensionItems(); | 224 void AppendCurrentExtensionItems(); |
225 void AppendPrintPreviewItems(); | 225 void AppendPrintPreviewItems(); |
226 void AppendSearchWebForImageItems(); | 226 void AppendSearchWebForImageItems(); |
227 void AppendSpellingSuggestionsSubMenu(); | 227 void AppendSpellingSuggestionsSubMenu(); |
228 void AppendSpellcheckOptionsSubMenu(); | 228 void AppendSpellcheckOptionsSubMenu(); |
229 void AppendSpeechInputOptionsSubMenu(); | |
230 void AppendProtocolHandlerSubMenu(); | 229 void AppendProtocolHandlerSubMenu(); |
231 | 230 |
232 // Opens the specified URL string in a new tab. | 231 // Opens the specified URL string in a new tab. |
233 void OpenURL(const GURL& url, const GURL& referrer, | 232 void OpenURL(const GURL& url, const GURL& referrer, |
234 WindowOpenDisposition disposition, | 233 WindowOpenDisposition disposition, |
235 content::PageTransition transition); | 234 content::PageTransition transition); |
236 | 235 |
237 // Copy to the clipboard an image located at a point in the RenderView | 236 // Copy to the clipboard an image located at a point in the RenderView |
238 void CopyImageAt(int x, int y); | 237 void CopyImageAt(int x, int y); |
239 | 238 |
(...skipping 18 matching lines...) Expand all Loading... |
258 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl(); | 257 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl(); |
259 | 258 |
260 // Returns a (possibly truncated) version of the current selection text | 259 // Returns a (possibly truncated) version of the current selection text |
261 // suitable or putting in the title of a menu item. | 260 // suitable or putting in the title of a menu item. |
262 base::string16 PrintableSelectionText(); | 261 base::string16 PrintableSelectionText(); |
263 | 262 |
264 // The destination URL to use if the user tries to search for or navigate to | 263 // The destination URL to use if the user tries to search for or navigate to |
265 // a text selection. | 264 // a text selection. |
266 GURL selection_navigation_url_; | 265 GURL selection_navigation_url_; |
267 | 266 |
268 ui::SimpleMenuModel speech_input_submenu_model_; | |
269 ui::SimpleMenuModel protocol_handler_submenu_model_; | 267 ui::SimpleMenuModel protocol_handler_submenu_model_; |
270 ProtocolHandlerRegistry* protocol_handler_registry_; | 268 ProtocolHandlerRegistry* protocol_handler_registry_; |
271 | 269 |
272 // An observer that handles spelling-menu items. | 270 // An observer that handles spelling-menu items. |
273 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; | 271 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; |
274 | 272 |
275 // An observer that handles a 'spell-checker options' submenu. | 273 // An observer that handles a 'spell-checker options' submenu. |
276 scoped_ptr<SpellCheckerSubMenuObserver> spellchecker_submenu_observer_; | 274 scoped_ptr<SpellCheckerSubMenuObserver> spellchecker_submenu_observer_; |
277 | 275 |
278 #if defined(ENABLE_FULL_PRINTING) | 276 #if defined(ENABLE_FULL_PRINTING) |
279 // An observer that disables menu items when print preview is active. | 277 // An observer that disables menu items when print preview is active. |
280 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 278 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
281 #endif | 279 #endif |
282 | 280 |
283 // Our observers. | 281 // Our observers. |
284 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 282 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
285 | 283 |
286 // Whether a command has been executed. Used to track whether menu observers | 284 // Whether a command has been executed. Used to track whether menu observers |
287 // should be notified of menu closing without execution. | 285 // should be notified of menu closing without execution. |
288 bool command_executed_; | 286 bool command_executed_; |
289 | 287 |
290 scoped_ptr<ContextMenuContentType> content_type_; | 288 scoped_ptr<ContextMenuContentType> content_type_; |
291 | 289 |
292 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 290 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
293 }; | 291 }; |
294 | 292 |
295 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 293 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |