Index: chromecast/browser/service/cast_service_simple.cc |
diff --git a/chromecast/browser/service/cast_service_simple.cc b/chromecast/browser/service/cast_service_simple.cc |
index 25ebc50a4aeb0e60ebf4742f35d29699ffd7fdae..c80ba61b937e5738f62677417ad6092c68507f90 100644 |
--- a/chromecast/browser/service/cast_service_simple.cc |
+++ b/chromecast/browser/service/cast_service_simple.cc |
@@ -7,6 +7,7 @@ |
#include "base/command_line.h" |
#include "base/files/file_util.h" |
#include "chromecast/browser/cast_content_window.h" |
+#include "chromecast/browser/cast_window_manager.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
#include "net/base/filename_util.h" |
@@ -36,8 +37,10 @@ GURL GetStartupURL() { |
CastServiceSimple::CastServiceSimple( |
content::BrowserContext* browser_context, |
- PrefService* pref_service) |
- : CastService(browser_context, pref_service) { |
+ PrefService* pref_service, |
+ CastWindowManager* cast_window_manager) |
+ : CastService(browser_context, pref_service), |
+ cast_window_manager_(cast_window_manager) { |
} |
CastServiceSimple::~CastServiceSimple() { |
@@ -53,7 +56,7 @@ void CastServiceSimple::FinalizeInternal() { |
void CastServiceSimple::StartInternal() { |
window_.reset(new CastContentWindow); |
web_contents_ = window_->CreateWebContents(browser_context()); |
- window_->CreateWindowTree(web_contents_.get()); |
+ cast_window_manager_->AddWebContents(web_contents_.get(), false, false); |
web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), |
ui::PAGE_TRANSITION_TYPED, |