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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "chromecast/media/base/video_plane_controller.h" | 43 #include "chromecast/media/base/video_plane_controller.h" |
44 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" | 44 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" |
45 #include "chromecast/net/connectivity_checker.h" | 45 #include "chromecast/net/connectivity_checker.h" |
46 #include "chromecast/public/cast_media_shlib.h" | 46 #include "chromecast/public/cast_media_shlib.h" |
47 #include "chromecast/public/cast_sys_info.h" | 47 #include "chromecast/public/cast_sys_info.h" |
48 #include "chromecast/service/cast_service.h" | 48 #include "chromecast/service/cast_service.h" |
49 #include "components/prefs/pref_registry_simple.h" | 49 #include "components/prefs/pref_registry_simple.h" |
50 #include "content/public/browser/browser_thread.h" | 50 #include "content/public/browser/browser_thread.h" |
51 #include "content/public/browser/child_process_security_policy.h" | 51 #include "content/public/browser/child_process_security_policy.h" |
52 #include "content/public/browser/gpu_data_manager.h" | 52 #include "content/public/browser/gpu_data_manager.h" |
53 #include "content/public/browser/storage_partition.h" | |
54 #include "content/public/common/content_switches.h" | 53 #include "content/public/common/content_switches.h" |
55 #include "gpu/command_buffer/service/gpu_switches.h" | 54 #include "gpu/command_buffer/service/gpu_switches.h" |
56 #include "media/audio/audio_manager.h" | 55 #include "media/audio/audio_manager.h" |
57 #include "media/base/media.h" | 56 #include "media/base/media.h" |
58 #include "ui/compositor/compositor_switches.h" | 57 #include "ui/compositor/compositor_switches.h" |
59 | 58 |
60 #if !defined(OS_ANDROID) | 59 #if !defined(OS_ANDROID) |
61 #include <signal.h> | 60 #include <signal.h> |
62 #include <sys/prctl.h> | 61 #include <sys/prctl.h> |
63 #endif | 62 #endif |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 cast_browser_process_->SetNetLog(net_log_.get()); | 393 cast_browser_process_->SetNetLog(net_log_.get()); |
395 | 394 |
396 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); | 395 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); |
397 | 396 |
398 cast_browser_process_->SetBrowserContext( | 397 cast_browser_process_->SetBrowserContext( |
399 base::WrapUnique(new CastBrowserContext(url_request_context_factory_))); | 398 base::WrapUnique(new CastBrowserContext(url_request_context_factory_))); |
400 cast_browser_process_->SetMetricsServiceClient( | 399 cast_browser_process_->SetMetricsServiceClient( |
401 metrics::CastMetricsServiceClient::Create( | 400 metrics::CastMetricsServiceClient::Create( |
402 content::BrowserThread::GetBlockingPool(), | 401 content::BrowserThread::GetBlockingPool(), |
403 cast_browser_process_->pref_service(), | 402 cast_browser_process_->pref_service(), |
404 content::BrowserContext::GetDefaultStoragePartition( | 403 cast_browser_process_->browser_context()->GetRequestContext())); |
405 cast_browser_process_->browser_context())-> | |
406 GetURLRequestContext())); | |
407 | 404 |
408 if (!PlatformClientAuth::Initialize()) | 405 if (!PlatformClientAuth::Initialize()) |
409 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; | 406 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; |
410 | 407 |
411 cast_browser_process_->SetRemoteDebuggingServer(base::WrapUnique( | 408 cast_browser_process_->SetRemoteDebuggingServer(base::WrapUnique( |
412 new RemoteDebuggingServer(cast_browser_process_->browser_client() | 409 new RemoteDebuggingServer(cast_browser_process_->browser_client() |
413 ->EnableRemoteDebuggingImmediately()))); | 410 ->EnableRemoteDebuggingImmediately()))); |
414 | 411 |
415 #if defined(USE_AURA) && !BUILDFLAG(DISABLE_DISPLAY) | 412 #if defined(USE_AURA) && !BUILDFLAG(DISABLE_DISPLAY) |
416 // TODO(halliwell) move audio builds to use ozone_platform_cast, then can | 413 // TODO(halliwell) move audio builds to use ozone_platform_cast, then can |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 void CastBrowserMainParts::PostDestroyThreads() { | 496 void CastBrowserMainParts::PostDestroyThreads() { |
500 #if !defined(OS_ANDROID) | 497 #if !defined(OS_ANDROID) |
501 media_resource_tracker_->FinalizeAndDestroy(); | 498 media_resource_tracker_->FinalizeAndDestroy(); |
502 media_resource_tracker_ = nullptr; | 499 media_resource_tracker_ = nullptr; |
503 media_pipeline_backend_manager_.reset(); | 500 media_pipeline_backend_manager_.reset(); |
504 #endif | 501 #endif |
505 } | 502 } |
506 | 503 |
507 } // namespace shell | 504 } // namespace shell |
508 } // namespace chromecast | 505 } // namespace chromecast |
OLD | NEW |