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