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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm

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, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
index af0c147365b2fa98c2a078c5b9241650a619bb04..3bf9d35310c84d287c974f980891d53ae6e10cfe 100644
--- a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
@@ -42,8 +42,8 @@ void ChromeWebContentsViewDelegateMac::ShowContextMenu(
}
void ChromeWebContentsViewDelegateMac::ShowMenu(
- scoped_ptr<RenderViewContextMenu> menu) {
- context_menu_.reset(static_cast<RenderViewContextMenuMac*>(menu.release()));
+ scoped_ptr<RenderViewContextMenuBase> menu) {
+ context_menu_ = menu.Pass();
if (!context_menu_.get())
return;
@@ -61,10 +61,11 @@ void ChromeWebContentsViewDelegateMac::ShowMenu(
context_menu_->Show();
}
-scoped_ptr<RenderViewContextMenu> ChromeWebContentsViewDelegateMac::BuildMenu(
+scoped_ptr<RenderViewContextMenuBase>
+ChromeWebContentsViewDelegateMac::BuildMenu(
content::WebContents* web_contents,
const content::ContextMenuParams& params) {
- scoped_ptr<RenderViewContextMenuMac> menu;
+ scoped_ptr<RenderViewContextMenuBase> menu;
content::RenderFrameHost* focused_frame = web_contents->GetFocusedFrame();
// If the frame tree does not have a focused frame at this point, do not
// bother creating RenderViewContextMenuMac.

Powered by Google App Engine
This is Rietveld 408576698