| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chromecast/browser/service/cast_service_android.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 #include "chromecast/base/chromecast_config_android.h" | |
| 9 #include "chromecast/browser/metrics/cast_metrics_service_client.h" | |
| 10 | |
| 11 namespace chromecast { | |
| 12 | |
| 13 // static | |
| 14 scoped_ptr<CastService> CastService::Create( | |
| 15 content::BrowserContext* browser_context, | |
| 16 PrefService* pref_service, | |
| 17 metrics::CastMetricsServiceClient* metrics_service_client, | |
| 18 net::URLRequestContextGetter* request_context_getter) { | |
| 19 return scoped_ptr<CastService>( | |
| 20 new CastServiceAndroid(browser_context, | |
| 21 pref_service, | |
| 22 metrics_service_client)); | |
| 23 } | |
| 24 | |
| 25 CastServiceAndroid::CastServiceAndroid( | |
| 26 content::BrowserContext* browser_context, | |
| 27 PrefService* pref_service, | |
| 28 metrics::CastMetricsServiceClient* metrics_service_client) | |
| 29 : CastService(browser_context, pref_service, metrics_service_client) { | |
| 30 } | |
| 31 | |
| 32 CastServiceAndroid::~CastServiceAndroid() { | |
| 33 } | |
| 34 | |
| 35 void CastServiceAndroid::InitializeInternal() { | |
| 36 android::ChromecastConfigAndroid::GetInstance()-> | |
| 37 SetSendUsageStatsChangedCallback( | |
| 38 base::Bind(&metrics::CastMetricsServiceClient::EnableMetricsService, | |
| 39 base::Unretained(metrics_service_client()))); | |
| 40 } | |
| 41 | |
| 42 void CastServiceAndroid::FinalizeInternal() { | |
| 43 android::ChromecastConfigAndroid::GetInstance()-> | |
| 44 SetSendUsageStatsChangedCallback(base::Callback<void(bool)>()); | |
| 45 } | |
| 46 | |
| 47 void CastServiceAndroid::StartInternal() { | |
| 48 } | |
| 49 | |
| 50 void CastServiceAndroid::StopInternal() { | |
| 51 } | |
| 52 | |
| 53 } // namespace chromecast | |
| OLD | NEW |