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

Unified Diff: chrome/browser/browser_process_platform_part_aurawin.cc

Issue 16022003: Base for Ash browser_tests on Win8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not use SetUp/TearDownTestCase() Created 7 years, 6 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 | « no previous file | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_platform_part_aurawin.cc
diff --git a/chrome/browser/browser_process_platform_part_aurawin.cc b/chrome/browser/browser_process_platform_part_aurawin.cc
index 8299d01a3347fe8b7e997b74206070c07948ae07..34813a654bb852f66559808b5535aa8ed75915e2 100644
--- a/chrome/browser/browser_process_platform_part_aurawin.cc
+++ b/chrome/browser/browser_process_platform_part_aurawin.cc
@@ -24,11 +24,23 @@ void BrowserProcessPlatformPart::OnMetroViewerProcessTerminated() {
void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing(
const CommandLine& command_line) {
- if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
- command_line.HasSwitch(switches::kViewerConnect) &&
- !metro_viewer_process_host_.get()) {
- // Create a host to connect to the Metro viewer process over IPC.
- metro_viewer_process_host_.reset(new ChromeMetroViewerProcessHost());
+ // Check for Windows 8 specific commandlines requesting that this process
+ // either connect to an existing viewer or launch a new viewer and
+ // synchronously wait for it to connect.
+ if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
+ bool launch = command_line.HasSwitch(switches::kViewerLaunchViaAppId);
+ bool connect = (launch ||
+ (command_line.HasSwitch(switches::kViewerConnect) &&
+ !metro_viewer_process_host_.get()));
+ if (connect) {
+ // Create a host to connect to the Metro viewer process over IPC.
+ metro_viewer_process_host_.reset(new ChromeMetroViewerProcessHost());
+ if (launch) {
+ CHECK(metro_viewer_process_host_->LaunchViewerAndWaitForConnection(
+ command_line.GetSwitchValueNative(
+ switches::kViewerLaunchViaAppId)));
+ }
+ }
}
}
« no previous file with comments | « no previous file | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698