| 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 <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 base::string16 PrintableSelectionText(); | 85 base::string16 PrintableSelectionText(); |
| 86 | 86 |
| 87 // Helper function to escape "&" as "&&". | 87 // Helper function to escape "&" as "&&". |
| 88 void EscapeAmpersands(base::string16* text); | 88 void EscapeAmpersands(base::string16* text); |
| 89 | 89 |
| 90 #if defined(ENABLE_EXTENSIONS) | 90 #if defined(ENABLE_EXTENSIONS) |
| 91 extensions::ContextMenuMatcher extension_items_; | 91 extensions::ContextMenuMatcher extension_items_; |
| 92 #endif | 92 #endif |
| 93 void RecordUsedItem(int id) override; | 93 void RecordUsedItem(int id) override; |
| 94 | 94 |
| 95 // Returns true if the browser is in HTML fullscreen mode, initiated by the |
| 96 // page (as opposed to the user). Used to determine which shortcut to display. |
| 97 bool IsHTML5Fullscreen() const; |
| 98 |
| 95 private: | 99 private: |
| 96 friend class RenderViewContextMenuTest; | 100 friend class RenderViewContextMenuTest; |
| 97 friend class TestRenderViewContextMenu; | 101 friend class TestRenderViewContextMenu; |
| 98 | 102 |
| 99 static bool IsDevToolsURL(const GURL& url); | 103 static bool IsDevToolsURL(const GURL& url); |
| 100 static bool IsInternalResourcesURL(const GURL& url); | 104 static bool IsInternalResourcesURL(const GURL& url); |
| 101 #if defined(ENABLE_EXTENSIONS) | 105 #if defined(ENABLE_EXTENSIONS) |
| 102 static bool ExtensionContextAndPatternMatch( | 106 static bool ExtensionContextAndPatternMatch( |
| 103 const content::ContextMenuParams& params, | 107 const content::ContextMenuParams& params, |
| 104 const extensions::MenuItem::ContextList& contexts, | 108 const extensions::MenuItem::ContextList& contexts, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 124 void AppendDevtoolsForUnpackedExtensions(); | 128 void AppendDevtoolsForUnpackedExtensions(); |
| 125 void AppendLinkItems(); | 129 void AppendLinkItems(); |
| 126 void AppendOpenWithLinkItems(); | 130 void AppendOpenWithLinkItems(); |
| 127 void AppendImageItems(); | 131 void AppendImageItems(); |
| 128 void AppendAudioItems(); | 132 void AppendAudioItems(); |
| 129 void AppendCanvasItems(); | 133 void AppendCanvasItems(); |
| 130 void AppendVideoItems(); | 134 void AppendVideoItems(); |
| 131 void AppendMediaItems(); | 135 void AppendMediaItems(); |
| 132 void AppendPluginItems(); | 136 void AppendPluginItems(); |
| 133 void AppendPageItems(); | 137 void AppendPageItems(); |
| 138 void AppendExitFullscreenItem(); |
| 134 void AppendCopyItem(); | 139 void AppendCopyItem(); |
| 135 void AppendPrintItem(); | 140 void AppendPrintItem(); |
| 136 void AppendMediaRouterItem(); | 141 void AppendMediaRouterItem(); |
| 137 void AppendRotationItems(); | 142 void AppendRotationItems(); |
| 138 void AppendEditableItems(); | 143 void AppendEditableItems(); |
| 139 void AppendLanguageSettings(); | 144 void AppendLanguageSettings(); |
| 140 void AppendSpellingSuggestionItems(); | 145 void AppendSpellingSuggestionItems(); |
| 141 void AppendSearchProvider(); | 146 void AppendSearchProvider(); |
| 142 #if defined(ENABLE_EXTENSIONS) | 147 #if defined(ENABLE_EXTENSIONS) |
| 143 void AppendAllExtensionItems(); | 148 void AppendAllExtensionItems(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 162 bool IsRouteMediaEnabled() const; | 167 bool IsRouteMediaEnabled() const; |
| 163 | 168 |
| 164 // Command execution functions. | 169 // Command execution functions. |
| 165 void ExecOpenLinkNewTab(); | 170 void ExecOpenLinkNewTab(); |
| 166 void ExecProtocolHandler(int event_flags, int handler_index); | 171 void ExecProtocolHandler(int event_flags, int handler_index); |
| 167 void ExecOpenLinkInProfile(int profile_index); | 172 void ExecOpenLinkInProfile(int profile_index); |
| 168 void ExecInspectElement(); | 173 void ExecInspectElement(); |
| 169 void ExecInspectBackgroundPage(); | 174 void ExecInspectBackgroundPage(); |
| 170 void ExecSaveLinkAs(); | 175 void ExecSaveLinkAs(); |
| 171 void ExecSaveAs(); | 176 void ExecSaveAs(); |
| 177 void ExecExitFullscreen(); |
| 172 void ExecCopyLinkText(); | 178 void ExecCopyLinkText(); |
| 173 void ExecCopyImageAt(); | 179 void ExecCopyImageAt(); |
| 174 void ExecSearchWebForImage(); | 180 void ExecSearchWebForImage(); |
| 175 void ExecLoadOriginalImage(); | 181 void ExecLoadOriginalImage(); |
| 176 void ExecPlayPause(); | 182 void ExecPlayPause(); |
| 177 void ExecMute(); | 183 void ExecMute(); |
| 178 void ExecLoop(); | 184 void ExecLoop(); |
| 179 void ExecControls(); | 185 void ExecControls(); |
| 180 void ExecRotateCW(); | 186 void ExecRotateCW(); |
| 181 void ExecRotateCCW(); | 187 void ExecRotateCCW(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 236 |
| 231 // In the case of a MimeHandlerView this will point to the WebContents that | 237 // In the case of a MimeHandlerView this will point to the WebContents that |
| 232 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as | 238 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as |
| 233 // |source_web_contents_|. | 239 // |source_web_contents_|. |
| 234 content::WebContents* const embedder_web_contents_; | 240 content::WebContents* const embedder_web_contents_; |
| 235 | 241 |
| 236 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 242 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 237 }; | 243 }; |
| 238 | 244 |
| 239 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 245 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |