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" |
53 #include "content/public/common/content_switches.h" | 54 #include "content/public/common/content_switches.h" |
54 #include "gpu/command_buffer/service/gpu_switches.h" | 55 #include "gpu/command_buffer/service/gpu_switches.h" |
55 #include "media/audio/audio_manager.h" | 56 #include "media/audio/audio_manager.h" |
56 #include "media/base/media.h" | 57 #include "media/base/media.h" |
57 #include "ui/compositor/compositor_switches.h" | 58 #include "ui/compositor/compositor_switches.h" |
58 | 59 |
59 #if !defined(OS_ANDROID) | 60 #if !defined(OS_ANDROID) |
60 #include <signal.h> | 61 #include <signal.h> |
61 #include <sys/prctl.h> | 62 #include <sys/prctl.h> |
62 #endif | 63 #endif |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 cast_browser_process_->SetNetLog(net_log_.get()); | 393 cast_browser_process_->SetNetLog(net_log_.get()); |
393 | 394 |
394 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); | 395 url_request_context_factory_->InitializeOnUIThread(net_log_.get()); |
395 | 396 |
396 cast_browser_process_->SetBrowserContext( | 397 cast_browser_process_->SetBrowserContext( |
397 base::WrapUnique(new CastBrowserContext(url_request_context_factory_))); | 398 base::WrapUnique(new CastBrowserContext(url_request_context_factory_))); |
398 cast_browser_process_->SetMetricsServiceClient( | 399 cast_browser_process_->SetMetricsServiceClient( |
399 metrics::CastMetricsServiceClient::Create( | 400 metrics::CastMetricsServiceClient::Create( |
400 content::BrowserThread::GetBlockingPool(), | 401 content::BrowserThread::GetBlockingPool(), |
401 cast_browser_process_->pref_service(), | 402 cast_browser_process_->pref_service(), |
402 cast_browser_process_->browser_context()->GetRequestContext())); | 403 content::BrowserContext::GetDefaultStoragePartition( |
| 404 cast_browser_process_->browser_context())-> |
| 405 GetURLRequestContext())); |
403 | 406 |
404 if (!PlatformClientAuth::Initialize()) | 407 if (!PlatformClientAuth::Initialize()) |
405 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; | 408 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; |
406 | 409 |
407 cast_browser_process_->SetRemoteDebuggingServer(base::WrapUnique( | 410 cast_browser_process_->SetRemoteDebuggingServer(base::WrapUnique( |
408 new RemoteDebuggingServer(cast_browser_process_->browser_client() | 411 new RemoteDebuggingServer(cast_browser_process_->browser_client() |
409 ->EnableRemoteDebuggingImmediately()))); | 412 ->EnableRemoteDebuggingImmediately()))); |
410 | 413 |
411 #if defined(USE_AURA) && !BUILDFLAG(DISABLE_DISPLAY) | 414 #if defined(USE_AURA) && !BUILDFLAG(DISABLE_DISPLAY) |
412 // TODO(halliwell) move audio builds to use ozone_platform_cast, then can | 415 // TODO(halliwell) move audio builds to use ozone_platform_cast, then can |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 void CastBrowserMainParts::PostDestroyThreads() { | 494 void CastBrowserMainParts::PostDestroyThreads() { |
492 #if !defined(OS_ANDROID) | 495 #if !defined(OS_ANDROID) |
493 media_resource_tracker_->FinalizeAndDestroy(); | 496 media_resource_tracker_->FinalizeAndDestroy(); |
494 media_resource_tracker_ = nullptr; | 497 media_resource_tracker_ = nullptr; |
495 media_pipeline_backend_manager_.reset(); | 498 media_pipeline_backend_manager_.reset(); |
496 #endif | 499 #endif |
497 } | 500 } |
498 | 501 |
499 } // namespace shell | 502 } // namespace shell |
500 } // namespace chromecast | 503 } // namespace chromecast |
OLD | NEW |