diff options
author | shrikant@chromium.org <shrikant@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 06:14:22 +0000 |
---|---|---|
committer | shrikant@chromium.org <shrikant@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 06:14:22 +0000 |
commit | 351d3d0e0be4e76ff6d6765fd58f598fd62a5224 (patch) | |
tree | d8ddff1d8d196eabeca57226c583dadc796707c4 /win8/delegate_execute/command_execute_impl.cc | |
parent | 112409f936218b82ddf22be27d6ebed98af47a13 (diff) | |
download | chromium_src-351d3d0e0be4e76ff6d6765fd58f598fd62a5224.zip chromium_src-351d3d0e0be4e76ff6d6765fd58f598fd62a5224.tar.gz chromium_src-351d3d0e0be4e76ff6d6765fd58f598fd62a5224.tar.bz2 |
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
Diffstat (limited to 'win8/delegate_execute/command_execute_impl.cc')
-rw-r--r-- | win8/delegate_execute/command_execute_impl.cc | 24 |
1 files changed, 24 insertions, 0 deletions
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<IExecuteCommandHost> host; + CComQIPtr<IServiceProvider> 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, |