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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 void CastServiceSimple::StartInternal() { | 55 void CastServiceSimple::StartInternal() { |
56 window_ = CastContentWindow::Create(this); | 56 window_ = CastContentWindow::Create(this); |
57 web_contents_ = window_->CreateWebContents(browser_context()); | 57 web_contents_ = window_->CreateWebContents(browser_context()); |
58 window_->ShowWebContents(web_contents_.get()); | 58 window_->ShowWebContents(web_contents_.get()); |
59 | 59 |
60 web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), | 60 web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), |
61 ui::PAGE_TRANSITION_TYPED, | 61 ui::PAGE_TRANSITION_TYPED, |
62 std::string()); | 62 std::string()); |
| 63 web_contents_->Focus(); |
63 } | 64 } |
64 | 65 |
65 void CastServiceSimple::StopInternal() { | 66 void CastServiceSimple::StopInternal() { |
66 web_contents_->ClosePage(); | 67 web_contents_->ClosePage(); |
67 web_contents_.reset(); | 68 web_contents_.reset(); |
68 window_.reset(); | 69 window_.reset(); |
69 } | 70 } |
70 | 71 |
71 void CastServiceSimple::OnWindowDestroyed() {} | 72 void CastServiceSimple::OnWindowDestroyed() {} |
72 | 73 |
73 void CastServiceSimple::OnKeyEvent(const ui::KeyEvent& key_event) {} | 74 void CastServiceSimple::OnKeyEvent(const ui::KeyEvent& key_event) {} |
74 | 75 |
75 } // namespace shell | 76 } // namespace shell |
76 } // namespace chromecast | 77 } // namespace chromecast |
OLD | NEW |