From 09b5135db1063c1ecef46e75b5f3773f7aeaff27 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Mon, 4 Jun 2012 23:33:30 +0000 Subject: Ensure that the new window context menu option does not show up in windows 8 metro mode. When the new window option is executed from the incognito window, we find an existing normal browser window and open the url in a new tab. BUG=124404 R=sky Review URL: https://chromiumcodereview.appspot.com/10442119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140426 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/external_tab/external_tab_container_win.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'chrome/browser/external_tab') diff --git a/chrome/browser/external_tab/external_tab_container_win.cc b/chrome/browser/external_tab/external_tab_container_win.cc index 9c06ad8..227c656 100644 --- a/chrome/browser/external_tab/external_tab_container_win.cc +++ b/chrome/browser/external_tab/external_tab_container_win.cc @@ -26,6 +26,7 @@ #include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/repost_form_warning_controller.h" +#include "chrome/browser/tab_contents/render_view_context_menu_win.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" @@ -34,7 +35,6 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/views/infobars/infobar_container_view.h" -#include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h" #include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_notification_types.h" @@ -625,9 +625,10 @@ bool ExternalTabContainer::HandleContextMenu( NOTREACHED(); return false; } - external_context_menu_.reset( - new RenderViewContextMenuViews(web_contents(), params)); - external_context_menu_->SetExternal(); + external_context_menu_.reset(RenderViewContextMenuViews::Create( + web_contents(), params)); + static_cast( + external_context_menu_.get())->SetExternal(); external_context_menu_->Init(); external_context_menu_->UpdateMenuItemStates(); -- cgit v1.1