| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 frame id. |
| 184 const int render_frame_id_; | 184 const int render_frame_id_; |
| 185 | 185 |
| 186 // The RenderFrameHost's IDs. |
| 187 const int render_process_id_; |
| 188 |
| 186 // Our observers. | 189 // Our observers. |
| 187 mutable base::ObserverList<RenderViewContextMenuObserver> observers_; | 190 mutable base::ObserverList<RenderViewContextMenuObserver> observers_; |
| 188 | 191 |
| 189 // Whether a command has been executed. Used to track whether menu observers | 192 // Whether a command has been executed. Used to track whether menu observers |
| 190 // should be notified of menu closing without execution. | 193 // should be notified of menu closing without execution. |
| 191 bool command_executed_; | 194 bool command_executed_; |
| 192 | 195 |
| 193 std::unique_ptr<ContextMenuContentType> content_type_; | 196 std::unique_ptr<ContextMenuContentType> content_type_; |
| 194 | 197 |
| 195 private: | 198 private: |
| 196 bool AppendCustomItems(); | 199 bool AppendCustomItems(); |
| 197 | 200 |
| 198 // The RenderFrameHost's IDs. | |
| 199 const int render_process_id_; | |
| 200 | |
| 201 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; | 201 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; |
| 202 | 202 |
| 203 ScopedVector<ui::SimpleMenuModel> custom_submenus_; | 203 ScopedVector<ui::SimpleMenuModel> custom_submenus_; |
| 204 | 204 |
| 205 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 205 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 208 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
| OLD | NEW |