| 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_android.h" | 5 #include "chromecast/service/cast_service_android.h" |
| 6 | 6 |
| 7 #include "chromecast/android/chromecast_config_android.h" | 7 #include "chromecast/android/chromecast_config_android.h" |
| 8 | 8 |
| 9 namespace chromecast { | 9 namespace chromecast { |
| 10 | 10 |
| 11 // static | 11 // static |
| 12 CastService* CastService::Create( | 12 CastService* CastService::Create( |
| 13 content::BrowserContext* browser_context, | 13 content::BrowserContext* browser_context, |
| 14 net::URLRequestContextGetter* request_context_getter, | 14 net::URLRequestContextGetter* request_context_getter, |
| 15 shell::CastNetworkDelegate* network_delegate) { | 15 shell::CastNetworkDelegate* network_delegate, |
| 16 return new CastServiceAndroid(browser_context); | 16 const OptInStatsChangedCallback& opt_in_stats_callback) { |
| 17 return new CastServiceAndroid(browser_context, opt_in_stats_callback); |
| 17 } | 18 } |
| 18 | 19 |
| 19 CastServiceAndroid::CastServiceAndroid(content::BrowserContext* browser_context) | 20 CastServiceAndroid::CastServiceAndroid( |
| 20 : CastService(browser_context) { | 21 content::BrowserContext* browser_context, |
| 22 const OptInStatsChangedCallback& opt_in_stats_callback) |
| 23 : CastService(browser_context, opt_in_stats_callback) { |
| 21 } | 24 } |
| 22 | 25 |
| 23 CastServiceAndroid::~CastServiceAndroid() { | 26 CastServiceAndroid::~CastServiceAndroid() { |
| 24 } | 27 } |
| 25 | 28 |
| 26 void CastServiceAndroid::Initialize() { | 29 void CastServiceAndroid::Initialize() { |
| 27 // TODO(gunsch): Wire this the SendUsageStatsChanged callback once | 30 android::ChromecastConfigAndroid::GetInstance()-> |
| 28 // CastService::Delegate is added. | 31 SetSendUsageStatsChangedCallback(opt_in_stats_callback()); |
| 29 } | 32 } |
| 30 | 33 |
| 31 void CastServiceAndroid::StartInternal() { | 34 void CastServiceAndroid::StartInternal() { |
| 32 } | 35 } |
| 33 | 36 |
| 34 void CastServiceAndroid::StopInternal() { | 37 void CastServiceAndroid::StopInternal() { |
| 35 } | 38 } |
| 36 | 39 |
| 37 } // namespace chromecast | 40 } // namespace chromecast |
| OLD | NEW |