Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: win8/delegate_execute/command_execute_impl.cc

Issue 1602403002: Revert of Remove remote tree host and some related input and metro_driver code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-3
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « win8/delegate_execute/BUILD.gn ('k') | win8/delegate_execute/delegate_execute.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 2711336bff109e499c3a4d6c90b1ab677affcc05..236f86271560ff1c1cf3da0e2a8ada3a628aed65 100644
--- a/win8/delegate_execute/command_execute_impl.cc
+++ b/win8/delegate_execute/command_execute_impl.cc
@@ -32,6 +32,7 @@
#include "ui/gfx/win/dpi.h"
#include "win8/delegate_execute/chrome_util.h"
#include "win8/delegate_execute/delegate_execute_util.h"
+#include "win8/viewer/metro_viewer_constants.h"
namespace {
// Helper function to retrieve the url from IShellItem interface passed in.
@@ -218,8 +219,18 @@
return E_FAIL;
}
- // TODO(scottmg): Can all go eventually https://crbug.com/558054.
- *pahe = AHE_DESKTOP;
+ EC_HOST_UI_MODE mode = GetLaunchMode();
+ *pahe = (mode == ECHUIM_DESKTOP) ? AHE_DESKTOP : AHE_IMMERSIVE;
+
+ // If we're going to return AHE_IMMERSIVE, then both the browser process and
+ // the metro viewer need to launch and connect before the user can start
+ // browsing. However we must not launch the metro viewer until we get a
+ // call to CommandExecuteImpl::Execute(). If we wait until then to launch
+ // the browser process as well, it will appear laggy while they connect to
+ // each other, so we pre-launch the browser process now.
+ if (*pahe == AHE_IMMERSIVE && verb_ != win8::kMetroViewerConnectVerb) {
+ LaunchChromeBrowserProcess();
+ }
return S_OK;
}
« no previous file with comments | « win8/delegate_execute/BUILD.gn ('k') | win8/delegate_execute/delegate_execute.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698