OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromecast/browser/service/cast_service_simple.h" | 5 #include "chromecast/browser/service/cast_service_simple.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chromecast/browser/cast_content_window.h" | 8 #include "chromecast/browser/cast_content_window.h" |
9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 window_.reset(new CastContentWindow); | 66 window_.reset(new CastContentWindow); |
67 web_contents_ = window_->CreateWebContents(initial_size, browser_context()); | 67 web_contents_ = window_->CreateWebContents(initial_size, browser_context()); |
68 window_->CreateWindowTree(initial_size, web_contents_.get()); | 68 window_->CreateWindowTree(initial_size, web_contents_.get()); |
69 | 69 |
70 web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), | 70 web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), |
71 ui::PAGE_TRANSITION_TYPED, | 71 ui::PAGE_TRANSITION_TYPED, |
72 std::string()); | 72 std::string()); |
73 } | 73 } |
74 | 74 |
75 void CastServiceSimple::StopInternal() { | 75 void CastServiceSimple::StopInternal() { |
76 web_contents_->GetRenderViewHost()->ClosePage(); | 76 web_contents_->ClosePage(); |
77 web_contents_.reset(); | 77 web_contents_.reset(); |
78 window_.reset(); | 78 window_.reset(); |
79 } | 79 } |
80 | 80 |
81 } // namespace chromecast | 81 } // namespace chromecast |
OLD | NEW |