| 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/cast_browser_main_parts.h" | 5 #include "chromecast/browser/cast_browser_main_parts.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "chromecast/browser/cast_memory_pressure_monitor.h" | 33 #include "chromecast/browser/cast_memory_pressure_monitor.h" |
| 34 #include "chromecast/browser/cast_net_log.h" | 34 #include "chromecast/browser/cast_net_log.h" |
| 35 #include "chromecast/browser/devtools/remote_debugging_server.h" | 35 #include "chromecast/browser/devtools/remote_debugging_server.h" |
| 36 #include "chromecast/browser/geolocation/cast_access_token_store.h" | 36 #include "chromecast/browser/geolocation/cast_access_token_store.h" |
| 37 #include "chromecast/browser/media/media_caps_impl.h" | 37 #include "chromecast/browser/media/media_caps_impl.h" |
| 38 #include "chromecast/browser/metrics/cast_metrics_prefs.h" | 38 #include "chromecast/browser/metrics/cast_metrics_prefs.h" |
| 39 #include "chromecast/browser/metrics/cast_metrics_service_client.h" | 39 #include "chromecast/browser/metrics/cast_metrics_service_client.h" |
| 40 #include "chromecast/browser/pref_service_helper.h" | 40 #include "chromecast/browser/pref_service_helper.h" |
| 41 #include "chromecast/browser/url_request_context_factory.h" | 41 #include "chromecast/browser/url_request_context_factory.h" |
| 42 #include "chromecast/chromecast_features.h" | 42 #include "chromecast/chromecast_features.h" |
| 43 #include "chromecast/common/platform_client_auth.h" | |
| 44 #include "chromecast/media/base/key_systems_common.h" | 43 #include "chromecast/media/base/key_systems_common.h" |
| 45 #include "chromecast/media/base/media_resource_tracker.h" | 44 #include "chromecast/media/base/media_resource_tracker.h" |
| 46 #include "chromecast/media/base/video_plane_controller.h" | 45 #include "chromecast/media/base/video_plane_controller.h" |
| 47 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" | 46 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" |
| 48 #include "chromecast/net/connectivity_checker.h" | 47 #include "chromecast/net/connectivity_checker.h" |
| 49 #include "chromecast/public/cast_media_shlib.h" | 48 #include "chromecast/public/cast_media_shlib.h" |
| 50 #include "chromecast/public/cast_sys_info.h" | 49 #include "chromecast/public/cast_sys_info.h" |
| 51 #include "chromecast/service/cast_service.h" | 50 #include "chromecast/service/cast_service.h" |
| 52 #include "components/prefs/pref_registry_simple.h" | 51 #include "components/prefs/pref_registry_simple.h" |
| 53 #include "content/public/browser/browser_thread.h" | 52 #include "content/public/browser/browser_thread.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 cast_browser_process_->SetBrowserContext( | 441 cast_browser_process_->SetBrowserContext( |
| 443 base::MakeUnique<CastBrowserContext>(url_request_context_factory_)); | 442 base::MakeUnique<CastBrowserContext>(url_request_context_factory_)); |
| 444 cast_browser_process_->SetMetricsServiceClient( | 443 cast_browser_process_->SetMetricsServiceClient( |
| 445 metrics::CastMetricsServiceClient::Create( | 444 metrics::CastMetricsServiceClient::Create( |
| 446 content::BrowserThread::GetBlockingPool(), | 445 content::BrowserThread::GetBlockingPool(), |
| 447 cast_browser_process_->pref_service(), | 446 cast_browser_process_->pref_service(), |
| 448 content::BrowserContext::GetDefaultStoragePartition( | 447 content::BrowserContext::GetDefaultStoragePartition( |
| 449 cast_browser_process_->browser_context())-> | 448 cast_browser_process_->browser_context())-> |
| 450 GetURLRequestContext())); | 449 GetURLRequestContext())); |
| 451 | 450 |
| 452 if (!PlatformClientAuth::Initialize()) | |
| 453 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; | |
| 454 | |
| 455 cast_browser_process_->SetRemoteDebuggingServer( | 451 cast_browser_process_->SetRemoteDebuggingServer( |
| 456 base::MakeUnique<RemoteDebuggingServer>( | 452 base::MakeUnique<RemoteDebuggingServer>( |
| 457 cast_browser_process_->browser_client() | 453 cast_browser_process_->browser_client() |
| 458 ->EnableRemoteDebuggingImmediately())); | 454 ->EnableRemoteDebuggingImmediately())); |
| 459 | 455 |
| 460 #if defined(USE_AURA) && !BUILDFLAG(IS_CAST_AUDIO_ONLY) | 456 #if defined(USE_AURA) && !BUILDFLAG(IS_CAST_AUDIO_ONLY) |
| 461 // TODO(halliwell) move audio builds to use ozone_platform_cast, then can | 457 // TODO(halliwell) move audio builds to use ozone_platform_cast, then can |
| 462 // simplify this by removing IS_CAST_AUDIO_ONLY condition. Should then also | 458 // simplify this by removing IS_CAST_AUDIO_ONLY condition. Should then also |
| 463 // assert(ozone_platform_cast) in BUILD.gn where it depends on //ui/ozone. | 459 // assert(ozone_platform_cast) in BUILD.gn where it depends on //ui/ozone. |
| 464 gfx::Size display_size = | 460 gfx::Size display_size = |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 537 |
| 542 void CastBrowserMainParts::PostDestroyThreads() { | 538 void CastBrowserMainParts::PostDestroyThreads() { |
| 543 #if !defined(OS_ANDROID) | 539 #if !defined(OS_ANDROID) |
| 544 media_resource_tracker_->FinalizeAndDestroy(); | 540 media_resource_tracker_->FinalizeAndDestroy(); |
| 545 media_resource_tracker_ = nullptr; | 541 media_resource_tracker_ = nullptr; |
| 546 #endif | 542 #endif |
| 547 } | 543 } |
| 548 | 544 |
| 549 } // namespace shell | 545 } // namespace shell |
| 550 } // namespace chromecast | 546 } // namespace chromecast |
| OLD | NEW |