Drop the shell dependency on web test switches.

Don't use test-only switches in production content_shell code. This
moves all of the support for "headless" content shell out of production
and into WebTestShellPlatformDelegate implementations.

[email protected]

Bug: 866140
Change-Id: Ide5fe95da6019420faa418547bc6d46c6c53f919
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2276637
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: danakj <[email protected]>
Cr-Commit-Position: refs/heads/master@{#784880}
diff --git a/content/shell/browser/shell_platform_delegate_aura.cc b/content/shell/browser/shell_platform_delegate_aura.cc
index 782d92c3..12f62d2 100644
--- a/content/shell/browser/shell_platform_delegate_aura.cc
+++ b/content/shell/browser/shell_platform_delegate_aura.cc
@@ -25,6 +25,10 @@
 ShellPlatformDelegate::ShellPlatformDelegate() = default;
 ShellPlatformDelegate::~ShellPlatformDelegate() = default;
 
+ShellPlatformDataAura* ShellPlatformDelegate::GetShellPlatformDataAura() {
+  return platform_->aura.get();
+}
+
 void ShellPlatformDelegate::Initialize(const gfx::Size& default_window_size) {
   platform_ = std::make_unique<PlatformData>();
   platform_->aura =
@@ -37,8 +41,6 @@
   DCHECK(!base::Contains(shell_data_map_, shell));
   ShellData& shell_data = shell_data_map_[shell];
 
-  if (!shell->headless())
-    platform_->aura->ShowWindow();
   platform_->aura->ResizeWindow(initial_size);
 
   shell_data.window = platform_->aura->host()->window();