| 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/service/cast_service_simple.h" | 5 #include "chromecast/service/cast_service_simple.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(FillLayout); | 67 DISALLOW_COPY_AND_ASSIGN(FillLayout); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace | 70 } // namespace |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 CastService* CastService::Create( | 73 CastService* CastService::Create( |
| 74 content::BrowserContext* browser_context, | 74 content::BrowserContext* browser_context, |
| 75 net::URLRequestContextGetter* request_context_getter, | 75 net::URLRequestContextGetter* request_context_getter, |
| 76 shell::CastNetworkDelegate* network_delegate, | |
| 77 const OptInStatsChangedCallback& opt_in_stats_callback) { | 76 const OptInStatsChangedCallback& opt_in_stats_callback) { |
| 78 return new CastServiceSimple(browser_context, opt_in_stats_callback); | 77 return new CastServiceSimple(browser_context, opt_in_stats_callback); |
| 79 } | 78 } |
| 80 | 79 |
| 81 CastServiceSimple::CastServiceSimple( | 80 CastServiceSimple::CastServiceSimple( |
| 82 content::BrowserContext* browser_context, | 81 content::BrowserContext* browser_context, |
| 83 const OptInStatsChangedCallback& opt_in_stats_callback) | 82 const OptInStatsChangedCallback& opt_in_stats_callback) |
| 84 : CastService(browser_context, opt_in_stats_callback) { | 83 : CastService(browser_context, opt_in_stats_callback) { |
| 85 } | 84 } |
| 86 | 85 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 127 |
| 129 void CastServiceSimple::StopInternal() { | 128 void CastServiceSimple::StopInternal() { |
| 130 web_contents_->GetRenderViewHost()->ClosePage(); | 129 web_contents_->GetRenderViewHost()->ClosePage(); |
| 131 window_tree_host_.reset(); | 130 window_tree_host_.reset(); |
| 132 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); | 131 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); |
| 133 aura::Env::DeleteInstance(); | 132 aura::Env::DeleteInstance(); |
| 134 web_contents_.reset(); | 133 web_contents_.reset(); |
| 135 } | 134 } |
| 136 | 135 |
| 137 } // namespace chromecast | 136 } // namespace chromecast |
| OLD | NEW |