Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 173 WindowOpenDisposition disposition, | 173 WindowOpenDisposition disposition, |
| 174 ui::PageTransition transition, | 174 ui::PageTransition transition, |
| 175 const std::string& extra_headers); | 175 const std::string& extra_headers); |
| 176 | 176 |
| 177 content::ContextMenuParams params_; | 177 content::ContextMenuParams params_; |
| 178 content::WebContents* const source_web_contents_; | 178 content::WebContents* const source_web_contents_; |
| 179 content::BrowserContext* const browser_context_; | 179 content::BrowserContext* const browser_context_; |
| 180 | 180 |
| 181 ui::SimpleMenuModel menu_model_; | 181 ui::SimpleMenuModel menu_model_; |
| 182 | 182 |
| 183 // Renderer's frame id. | 183 // Renderer's process and frame id. |
| 184 const int render_process_host_id_; | |
| 184 const int render_frame_id_; | 185 const int render_frame_id_; |
| 185 | 186 |
| 186 // Our observers. | 187 // Our observers. |
| 187 mutable base::ObserverList<RenderViewContextMenuObserver> observers_; | 188 mutable base::ObserverList<RenderViewContextMenuObserver> observers_; |
| 188 | 189 |
| 189 // Whether a command has been executed. Used to track whether menu observers | 190 // Whether a command has been executed. Used to track whether menu observers |
| 190 // should be notified of menu closing without execution. | 191 // should be notified of menu closing without execution. |
| 191 bool command_executed_; | 192 bool command_executed_; |
| 192 | 193 |
| 193 std::unique_ptr<ContextMenuContentType> content_type_; | 194 std::unique_ptr<ContextMenuContentType> content_type_; |
| 194 | 195 |
| 195 private: | 196 private: |
| 196 bool AppendCustomItems(); | 197 bool AppendCustomItems(); |
| 197 | 198 |
| 198 // The RenderFrameHost's IDs. | 199 // The RenderFrameHost's IDs. |
| 199 const int render_process_id_; | 200 const int render_process_id_; |
|
Charlie Reis
2016/10/03 22:15:23
Looks like we already have it?
nasko
2016/10/03 22:38:04
D'oh! I moved it to public, as it is used by a sub
| |
| 200 | 201 |
| 201 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; | 202 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; |
| 202 | 203 |
| 203 ScopedVector<ui::SimpleMenuModel> custom_submenus_; | 204 ScopedVector<ui::SimpleMenuModel> custom_submenus_; |
| 204 | 205 |
| 205 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 206 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
| 206 }; | 207 }; |
| 207 | 208 |
| 208 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 209 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
| OLD | NEW |