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 74c34f5affeff65660b553d08abe1091ec5c83a7..19b8ffbec586403ee72279fab7c48c7d4f7213fe 100644 |
--- a/chromecast/browser/service/cast_service_simple.cc |
+++ b/chromecast/browser/service/cast_service_simple.cc |
@@ -9,10 +9,8 @@ |
#include "base/command_line.h" |
#include "base/files/file_util.h" |
#include "base/memory/ptr_util.h" |
-#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
#include "net/base/filename_util.h" |
-#include "net/url_request/url_request_context_getter.h" |
namespace chromecast { |
namespace shell { |
@@ -53,21 +51,21 @@ void CastServiceSimple::FinalizeInternal() { |
} |
void CastServiceSimple::StartInternal() { |
- window_ = CastContentWindow::Create(this); |
- web_contents_ = window_->CreateWebContents(browser_context()); |
- window_->ShowWebContents(web_contents_.get()); |
- |
- web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), |
- ui::PAGE_TRANSITION_TYPED, |
- std::string()); |
+ cast_web_contents_ = |
+ base::MakeUnique<CastWebContents>(this, browser_context()); |
+ cast_web_contents_->MakeVisible(); |
+ cast_web_contents_->LoadUrl(startup_url_); |
} |
void CastServiceSimple::StopInternal() { |
- web_contents_->ClosePage(); |
- web_contents_.reset(); |
- window_.reset(); |
+ cast_web_contents_->ClosePage(); |
+ cast_web_contents_.reset(); |
} |
+void CastServiceSimple::OnPageStopped(int error_code) {} |
+ |
+void CastServiceSimple::OnLoadingStateChanged(bool loading) {} |
+ |
void CastServiceSimple::OnWindowDestroyed() {} |
void CastServiceSimple::OnKeyEvent(const ui::KeyEvent& key_event) {} |