summaryrefslogtreecommitdiff
path: root/win8
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-11-06 12:27:47 +0000
committerTorne (Richard Coles) <torne@google.com>2013-11-06 12:27:47 +0000
commit0f1bc08d4cfcc34181b0b5cbf065c40f687bf740 (patch)
tree08e3fb2fdca3674ceb4d6cf527cb65e755cd993e /win8
parent0bdaf95291fc46702f274f40e8e5081e9ef23011 (diff)
downloadchromium_org-0f1bc08d4cfcc34181b0b5cbf065c40f687bf740.tar.gz
Merge from Chromium at DEPS revision 232870
This commit was generated by merge_to_master.py. Change-Id: I9cd2139013538e8bcd17966e8ff30ca5651d1a3d
Diffstat (limited to 'win8')
-rw-r--r--win8/delegate_execute/command_execute_impl.cc35
-rw-r--r--win8/metro_driver/chrome_app_view_ash.cc26
-rw-r--r--win8/metro_driver/chrome_app_view_ash.h1
3 files changed, 28 insertions, 34 deletions
diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc
index 463bbb7015..6e1b9bebb6 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<IExecuteCommandHost> host;
- CComQIPtr<IServiceProvider> 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,
@@ -586,8 +554,7 @@ EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() {
DWORD reg_value;
if (reg_key.ReadValueDW(chrome::kLaunchModeValue,
&reg_value) != ERROR_SUCCESS) {
- launch_mode = base::win::IsTouchEnabledDevice() ?
- ECHUIM_IMMERSIVE : ECHUIM_DESKTOP;
+ launch_mode = ECHUIM_DESKTOP;
AtlTrace("Launch mode forced by heuristics to %s\n", modes[launch_mode]);
} else if (reg_value >= ECHUIM_SYSTEM_LAUNCHER) {
AtlTrace("Invalid registry launch mode value %u\n", reg_value);
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc
index b795b928bc..7dd7d396a7 100644
--- a/win8/metro_driver/chrome_app_view_ash.cc
+++ b/win8/metro_driver/chrome_app_view_ash.cc
@@ -81,6 +81,8 @@ class ChromeChannelListener : public IPC::Listener {
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
IPC_BEGIN_MESSAGE_MAP(ChromeChannelListener, message)
+ IPC_MESSAGE_HANDLER(MetroViewerHostMsg_ActivateDesktop,
+ OnActivateDesktop)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_OpenURLOnDesktop,
OnOpenURLOnDesktop)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetCursor, OnSetCursor)
@@ -102,6 +104,13 @@ class ChromeChannelListener : public IPC::Listener {
}
private:
+ void OnActivateDesktop(const base::FilePath& shortcut) {
+ ui_proxy_->PostTask(FROM_HERE,
+ base::Bind(&ChromeAppViewAsh::OnActivateDesktop,
+ base::Unretained(app_view_),
+ shortcut));
+ }
+
void OnOpenURLOnDesktop(const base::FilePath& shortcut,
const string16& url) {
ui_proxy_->PostTask(FROM_HERE,
@@ -524,6 +533,23 @@ HRESULT ChromeAppViewAsh::Unsnap() {
return hr;
}
+void ChromeAppViewAsh::OnActivateDesktop(const base::FilePath& file_path) {
+ DLOG(INFO) << "ChannelAppViewAsh::OnActivateDesktop\n";
+ // We are just executing delegate_execute here without parameters. Assumption
+ // here is that this process will be reused by shell when asking for
+ // IExecuteCommand interface.
+
+ // TODO(shrikant): Consolidate ShellExecuteEx with SEE_MASK_FLAG_LOG_USAGE
+ // and place it metro.h or similar accessible file from all code code paths
+ // using this function.
+ SHELLEXECUTEINFO sei = { sizeof(sei) };
+ sei.fMask = SEE_MASK_FLAG_LOG_USAGE;
+ sei.nShow = SW_SHOWNORMAL;
+ sei.lpFile = file_path.value().c_str();
+ sei.lpParameters = NULL;
+ ::ShellExecuteExW(&sei);
+ ui_channel_->Send(new MetroViewerHostMsg_ActivateDesktopDone());
+}
void ChromeAppViewAsh::OnOpenURLOnDesktop(const base::FilePath& shortcut,
const string16& url) {
diff --git a/win8/metro_driver/chrome_app_view_ash.h b/win8/metro_driver/chrome_app_view_ash.h
index 0f9a14a4c9..b301b3afc5 100644
--- a/win8/metro_driver/chrome_app_view_ash.h
+++ b/win8/metro_driver/chrome_app_view_ash.h
@@ -49,6 +49,7 @@ class ChromeAppViewAsh
// Returns S_OK on success.
static HRESULT Unsnap();
+ void OnActivateDesktop(const base::FilePath& file_path);
void OnOpenURLOnDesktop(const base::FilePath& shortcut, const string16& url);
void OnSetCursor(HCURSOR cursor);
void OnDisplayFileOpenDialog(const string16& title,