[Chromecast] Reuse the Aura window manager across receiver apps.

Always makes the root window transparent for seeing the video plane
beneath it.

Allows tearing down and rebuilding the window manager.

BUG=internal b/34103918, internal b/33835219, internal b/33046596
TEST=manually test all categories of receiver apps and mirroring.

Change-Id: Ic84079e6eae012896b2a1d8bdf39dc64578f2307
Review-Url: https://codereview.chromium.org/2643553002
Cr-Commit-Position: refs/heads/master@{#445424}
diff --git a/chromecast/browser/service/cast_service_simple.cc b/chromecast/browser/service/cast_service_simple.cc
index 9cc0f78..92de391 100644
--- a/chromecast/browser/service/cast_service_simple.cc
+++ b/chromecast/browser/service/cast_service_simple.cc
@@ -36,10 +36,12 @@
 
 }  // namespace
 
-CastServiceSimple::CastServiceSimple(
-    content::BrowserContext* browser_context,
-    PrefService* pref_service)
-    : CastService(browser_context, pref_service) {
+CastServiceSimple::CastServiceSimple(content::BrowserContext* browser_context,
+                                     PrefService* pref_service,
+                                     CastWindowManager* window_manager)
+    : CastService(browser_context, pref_service),
+      window_manager_(window_manager) {
+  DCHECK(window_manager_);
 }
 
 CastServiceSimple::~CastServiceSimple() {
@@ -55,7 +57,7 @@
 void CastServiceSimple::StartInternal() {
   window_ = CastContentWindow::Create(this);
   web_contents_ = window_->CreateWebContents(browser_context());
-  window_->ShowWebContents(web_contents_.get());
+  window_->ShowWebContents(web_contents_.get(), window_manager_);
 
   web_contents_->GetController().LoadURL(startup_url_, content::Referrer(),
                                          ui::PAGE_TRANSITION_TYPED,