Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: components/renderer_context_menu/render_view_context_menu_base.h

Issue 678653003: Remove Downcasting RVContextMenuBase in ContextMenuDeleagate implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove virtual keyword when override is specified Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/renderer_context_menu/context_menu_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 static int ConvertToContentCustomCommandId(int id); 62 static int ConvertToContentCustomCommandId(int id);
63 63
64 // True if the given id is the one generated for content context menu. 64 // True if the given id is the one generated for content context menu.
65 static bool IsContentCustomCommandId(int id); 65 static bool IsContentCustomCommandId(int id);
66 66
67 RenderViewContextMenuBase(content::RenderFrameHost* render_frame_host, 67 RenderViewContextMenuBase(content::RenderFrameHost* render_frame_host,
68 const content::ContextMenuParams& params); 68 const content::ContextMenuParams& params);
69 69
70 ~RenderViewContextMenuBase() override; 70 ~RenderViewContextMenuBase() override;
71 71
72 // Displays the menu.
73 // Different platform will have their own implementation.
74 virtual void Show() = 0;
75
72 // Initializes the context menu. 76 // Initializes the context menu.
73 void Init(); 77 void Init();
74 78
75 // Programmatically closes the context menu. 79 // Programmatically closes the context menu.
76 void Cancel(); 80 void Cancel();
77 81
78 const ui::SimpleMenuModel& menu_model() const { return menu_model_; } 82 const ui::SimpleMenuModel& menu_model() const { return menu_model_; }
79 const content::ContextMenuParams& params() const { return params_; } 83 const content::ContextMenuParams& params() const { return params_; }
80 84
81 // Returns true if the specified command id is known and valid for 85 // Returns true if the specified command id is known and valid for
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 185
182 // The RenderFrameHost's IDs. 186 // The RenderFrameHost's IDs.
183 int render_process_id_; 187 int render_process_id_;
184 188
185 scoped_ptr<ToolkitDelegate> toolkit_delegate_; 189 scoped_ptr<ToolkitDelegate> toolkit_delegate_;
186 190
187 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); 191 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase);
188 }; 192 };
189 193
190 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ 194 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_
OLDNEW
« no previous file with comments | « components/renderer_context_menu/context_menu_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698