From 351d3d0e0be4e76ff6d6765fd58f598fd62a5224 Mon Sep 17 00:00:00 2001 From: "shrikant@chromium.org" Date: Wed, 22 May 2013 06:14:22 +0000 Subject: Modifying Aura delegate execute launch mode logic to match user intent. BUG=241609 R=ananta,cpu TEST=see bug Review URL: https://chromiumcodereview.appspot.com/14944014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201442 0039d316-1c4b-4281-b951-d872f2087c98 --- win8/delegate_execute/command_execute_impl.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'win8/delegate_execute/command_execute_impl.cc') diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc index 55a96bd..102f3e4 100644 --- a/win8/delegate_execute/command_execute_impl.cc +++ b/win8/delegate_execute/command_execute_impl.cc @@ -520,6 +520,30 @@ 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); + } + } + + 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