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

Unified Diff: chrome/browser/apps/app_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/apps/app_browsertest.cc
===================================================================
--- chrome/browser/apps/app_browsertest.cc (revision 247964)
+++ chrome/browser/apps/app_browsertest.cc (working copy)
@@ -70,9 +70,9 @@
// Non-abstract RenderViewContextMenu class.
class PlatformAppContextMenu : public RenderViewContextMenu {
public:
- PlatformAppContextMenu(WebContents* web_contents,
+ PlatformAppContextMenu(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;
@@ -229,7 +229,7 @@
ASSERT_TRUE(web_contents);
content::ContextMenuParams params;
scoped_ptr<PlatformAppContextMenu> menu;
- menu.reset(new PlatformAppContextMenu(web_contents, params));
+ menu.reset(new PlatformAppContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
ASSERT_TRUE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
ASSERT_TRUE(
@@ -253,7 +253,7 @@
ASSERT_TRUE(web_contents);
content::ContextMenuParams params;
scoped_ptr<PlatformAppContextMenu> menu;
- menu.reset(new PlatformAppContextMenu(web_contents, params));
+ menu.reset(new PlatformAppContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST));
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST + 1));
@@ -280,7 +280,7 @@
ASSERT_TRUE(web_contents);
content::ContextMenuParams params;
scoped_ptr<PlatformAppContextMenu> menu;
- menu.reset(new PlatformAppContextMenu(web_contents, params));
+ menu.reset(new PlatformAppContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST));
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST + 1));
@@ -308,7 +308,7 @@
content::ContextMenuParams params;
params.is_editable = true;
scoped_ptr<PlatformAppContextMenu> menu;
- menu.reset(new PlatformAppContextMenu(web_contents, params));
+ menu.reset(new PlatformAppContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST));
ASSERT_TRUE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
@@ -336,7 +336,7 @@
content::ContextMenuParams params;
params.selection_text = base::ASCIIToUTF16("Hello World");
scoped_ptr<PlatformAppContextMenu> menu;
- menu.reset(new PlatformAppContextMenu(web_contents, params));
+ menu.reset(new PlatformAppContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST));
ASSERT_TRUE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
@@ -363,7 +363,7 @@
content::ContextMenuParams params;
params.page_url = GURL("http://foo.bar");
scoped_ptr<PlatformAppContextMenu> menu;
- menu.reset(new PlatformAppContextMenu(web_contents, params));
+ menu.reset(new PlatformAppContextMenu(web_contents->GetMainFrame(), params));
menu->Init();
ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST));

Powered by Google App Engine
This is Rietveld 408576698