| 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 COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
| 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 // Opens the specified URL string in a new tab with the extra headers. | 164 // Opens the specified URL string in a new tab with the extra headers. |
| 165 void OpenURLWithExtraHeaders(const GURL& url, | 165 void OpenURLWithExtraHeaders(const GURL& url, |
| 166 const GURL& referrer, | 166 const GURL& referrer, |
| 167 WindowOpenDisposition disposition, | 167 WindowOpenDisposition disposition, |
| 168 ui::PageTransition transition, | 168 ui::PageTransition transition, |
| 169 const std::string& extra_headers); | 169 const std::string& extra_headers); |
| 170 | 170 |
| 171 content::ContextMenuParams params_; | 171 content::ContextMenuParams params_; |
| 172 content::WebContents* source_web_contents_; | 172 content::WebContents* source_web_contents_; |
| 173 // In the case of a MimeHandlerView this will point to the WebContents that | |
| 174 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as | |
| 175 // source_web_contents_. | |
| 176 content::WebContents* embedder_web_contents_; | |
| 177 content::BrowserContext* browser_context_; | 173 content::BrowserContext* browser_context_; |
| 178 | 174 |
| 179 ui::SimpleMenuModel menu_model_; | 175 ui::SimpleMenuModel menu_model_; |
| 180 | 176 |
| 181 // Renderer's frame id. | 177 // Renderer's frame id. |
| 182 int render_frame_id_; | 178 int render_frame_id_; |
| 183 | 179 |
| 184 // Our observers. | 180 // Our observers. |
| 185 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 181 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
| 186 | 182 |
| 187 // Whether a command has been executed. Used to track whether menu observers | 183 // Whether a command has been executed. Used to track whether menu observers |
| 188 // should be notified of menu closing without execution. | 184 // should be notified of menu closing without execution. |
| 189 bool command_executed_; | 185 bool command_executed_; |
| 190 | 186 |
| 191 scoped_ptr<ContextMenuContentType> content_type_; | 187 scoped_ptr<ContextMenuContentType> content_type_; |
| 192 | 188 |
| 193 private: | 189 private: |
| 194 bool AppendCustomItems(); | 190 bool AppendCustomItems(); |
| 195 | 191 |
| 196 // The RenderFrameHost's IDs. | 192 // The RenderFrameHost's IDs. |
| 197 int render_process_id_; | 193 int render_process_id_; |
| 198 | 194 |
| 199 scoped_ptr<ToolkitDelegate> toolkit_delegate_; | 195 scoped_ptr<ToolkitDelegate> toolkit_delegate_; |
| 200 | 196 |
| 201 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 197 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
| 202 }; | 198 }; |
| 203 | 199 |
| 204 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 200 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
| OLD | NEW |