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 e6be06dd24c062da2c72692ac30e9c84372a7d02..ae4cde1129c911dfe7b5d77d6f0eb14f445e312d 100644 |
--- a/chrome/browser/browser_process_platform_part_aurawin.cc |
+++ b/chrome/browser/browser_process_platform_part_aurawin.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h" |
#include "chrome/common/chrome_switches.h" |
+#include "win8/test/test_registrar_constants.h" |
BrowserProcessPlatformPart::BrowserProcessPlatformPart() { |
} |
@@ -24,13 +25,22 @@ void BrowserProcessPlatformPart::OnMetroViewerProcessTerminated() { |
void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing( |
const CommandLine& command_line) { |
- if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
- command_line.HasSwitch(switches::kViewerConnection) && |
- !metro_viewer_process_host_.get()) { |
- // Tell the metro viewer process host to connect to the given IPC channel. |
- metro_viewer_process_host_.reset( |
- new ChromeMetroViewerProcessHost( |
- command_line.GetSwitchValueASCII(switches::kViewerConnection))); |
+ // 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) { |
+ if (command_line.HasSwitch(switches::kViewerConnection) && |
+ !metro_viewer_process_host_.get()) { |
+ // Tell the metro viewer process host to connect to the given IPC channel. |
+ metro_viewer_process_host_.reset( |
+ new ChromeMetroViewerProcessHost( |
+ command_line.GetSwitchValueASCII(switches::kViewerConnection))); |
+ } else if (command_line.HasSwitch(switches::kAshBrowserTests)) { |
grt (UTC plus 2)
2013/05/29 02:22:51
i'm a little uncomfortable with this test-only cod
gab
2013/05/29 14:52:20
Ya, I agree that this is ugly, especially that I a
grt (UTC plus 2)
2013/05/29 15:51:03
If I understand, yeah, this seems better. For what
gab
2013/05/29 23:09:42
Okay, did that in patch set 6, let me know if you
|
+ metro_viewer_process_host_.reset( |
+ new ChromeMetroViewerProcessHost("viewer")); |
+ CHECK(metro_viewer_process_host_->LaunchViewerAndWaitForConnection( |
+ win8::test::kDefaultTestAppUserModelId)); |
+ } |
} |
} |