From d51373d3f34d05fae96940a523da2383b2261c33 Mon Sep 17 00:00:00 2001 From: "shrikant@chromium.org" Date: Thu, 31 Oct 2013 15:22:00 +0000 Subject: Adding relaunch menu to Windows 8 Aura code. We expect following transitions with new menu: 1. When in desktop mode, you should see "Relaunch Chrome in Windows 8 mode", if clicked it will kill current browser process and relaunches all open tabs in Windows 8 mode. 2. When in Windows 8 mode, menu is "Relaunch Chrome in desktop mode", if clicked it will kill current browser process (gets user out of Ash shell) and relaunches all tabs in desktop mode. Once we select to launch in different mode through these menu items we store new mode in registry and use this mode as default mode for next time launch. This means even if you click on desktop icon and last mode stored is metro, user will be switched to metro mode. BUG=280823 R=cpu@chromium.org, jschuh@chromium.org, sky@chromium.org, ananta, cpu Review URL: https://codereview.chromium.org/32843009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232120 0039d316-1c4b-4281-b951-d872f2087c98 --- win8/delegate_execute/command_execute_impl.cc | 32 --------------------------- 1 file changed, 32 deletions(-) (limited to 'win8/delegate_execute') diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc index 463bbb7..0a9fbcc 100644 --- a/win8/delegate_execute/command_execute_impl.cc +++ b/win8/delegate_execute/command_execute_impl.cc @@ -529,38 +529,6 @@ EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() { parameters_ = CommandLine(CommandLine::NO_PROGRAM); } -#if defined(USE_AURA) - if (launch_mode_determined) - return launch_mode; - - CComPtr host; - CComQIPtr service_provider = m_spUnkSite; - if (service_provider) { - service_provider->QueryService(IID_IExecuteCommandHost, &host); - if (host) { - host->GetUIMode(&launch_mode); - } - } - - // According to 'developing metro style enabled desktop browser' document - // ECHUIM_SYSTEM_LAUNCHER – Start menu launch (includes Tile activation, - // typing a URL into the search box in Start, etc.) - // In non aura world we apparently used ECHUIM_SYSTEM_LAUNCHER to mean - // launch on desktop. For Aura we are changing ECHUIM_SYSTEM to mean - // immersive mode. - if (launch_mode == ECHUIM_SYSTEM_LAUNCHER) - launch_mode = ECHUIM_IMMERSIVE; - else if (launch_mode > ECHUIM_SYSTEM_LAUNCHER) { - // At the end if launch mode is not proper apply heuristics. - launch_mode = base::win::IsTouchEnabledDevice() ? - ECHUIM_IMMERSIVE : ECHUIM_DESKTOP; - } - - AtlTrace("Launching mode is %d\n", launch_mode); - launch_mode_determined = true; - return launch_mode; -#endif - base::win::RegKey reg_key; LONG key_result = reg_key.Create(HKEY_CURRENT_USER, chrome::kMetroRegistryPath, -- cgit v1.1