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

Unified Diff: chrome/browser/ui/panels/panel_extension_browsertest.cc

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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/panels/panel_extension_browsertest.cc
===================================================================
--- chrome/browser/ui/panels/panel_extension_browsertest.cc (revision 247964)
+++ chrome/browser/ui/panels/panel_extension_browsertest.cc (working copy)
@@ -115,9 +115,9 @@
// Non-abstract RenderViewContextMenu class for testing context menus in Panels.
class PanelContextMenu : public RenderViewContextMenu {
public:
- PanelContextMenu(content::WebContents* web_contents,
+ PanelContextMenu(content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params)
- : RenderViewContextMenu(web_contents, params) {}
+ : RenderViewContextMenu(render_frame_host, params) {}
bool HasCommandWithId(int command_id) {
return menu_model_.GetIndexOfCommandId(command_id) != -1;
@@ -156,7 +156,7 @@
EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
scoped_ptr<PanelContextMenu> menu(
- new PanelContextMenu(web_contents, params));
+ new PanelContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
EXPECT_FALSE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
@@ -177,7 +177,7 @@
EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
scoped_ptr<PanelContextMenu> menu(
- new PanelContextMenu(web_contents, params));
+ new PanelContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
EXPECT_FALSE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
@@ -198,7 +198,7 @@
EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
scoped_ptr<PanelContextMenu> menu(
- new PanelContextMenu(web_contents, params));
+ new PanelContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
EXPECT_FALSE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
@@ -219,7 +219,7 @@
EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
scoped_ptr<PanelContextMenu> menu(
- new PanelContextMenu(web_contents, params));
+ new PanelContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
EXPECT_FALSE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
@@ -257,7 +257,7 @@
// Verify menu contents contains the custom item added by their own extension.
scoped_ptr<PanelContextMenu> menu;
- menu.reset(new PanelContextMenu(web_contents, params));
+ menu.reset(new PanelContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
EXPECT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST));
EXPECT_FALSE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST + 1));

Powered by Google App Engine
This is Rietveld 408576698