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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 #endif | 472 #endif |
473 | 473 |
474 window_manager_ = | 474 window_manager_ = |
475 CastWindowManager::Create(CAST_IS_DEBUG_BUILD() /* enable input */); | 475 CastWindowManager::Create(CAST_IS_DEBUG_BUILD() /* enable input */); |
476 | 476 |
477 cast_browser_process_->SetCastService( | 477 cast_browser_process_->SetCastService( |
478 cast_browser_process_->browser_client()->CreateCastService( | 478 cast_browser_process_->browser_client()->CreateCastService( |
479 cast_browser_process_->browser_context(), | 479 cast_browser_process_->browser_context(), |
480 cast_browser_process_->pref_service(), | 480 cast_browser_process_->pref_service(), |
481 url_request_context_factory_->GetSystemGetter(), | 481 url_request_context_factory_->GetSystemGetter(), |
| 482 base::BindOnce(&URLRequestContextFactory::DisableQuic, |
| 483 // Safe since |url_request_context_factory_| is owned |
| 484 // by CastContentBrowserClient, which lives for the |
| 485 // entire lifetime of cast_shell. |
| 486 base::Unretained(url_request_context_factory_)), |
482 video_plane_controller_.get(), window_manager_.get())); | 487 video_plane_controller_.get(), window_manager_.get())); |
483 cast_browser_process_->cast_service()->Initialize(); | 488 cast_browser_process_->cast_service()->Initialize(); |
484 | 489 |
485 #if !defined(OS_ANDROID) | 490 #if !defined(OS_ANDROID) |
486 media_resource_tracker()->InitializeMediaLib(); | 491 media_resource_tracker()->InitializeMediaLib(); |
487 #endif | 492 #endif |
488 ::media::InitializeMediaLibrary(); | 493 ::media::InitializeMediaLibrary(); |
489 | 494 |
490 device::GeolocationProvider::SetGeolocationDelegate( | 495 device::GeolocationProvider::SetGeolocationDelegate( |
491 new CastGeolocationDelegate(cast_browser_process_->browser_context())); | 496 new CastGeolocationDelegate(cast_browser_process_->browser_context())); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 552 |
548 void CastBrowserMainParts::PostDestroyThreads() { | 553 void CastBrowserMainParts::PostDestroyThreads() { |
549 #if !defined(OS_ANDROID) | 554 #if !defined(OS_ANDROID) |
550 media_resource_tracker_->FinalizeAndDestroy(); | 555 media_resource_tracker_->FinalizeAndDestroy(); |
551 media_resource_tracker_ = nullptr; | 556 media_resource_tracker_ = nullptr; |
552 #endif | 557 #endif |
553 } | 558 } |
554 | 559 |
555 } // namespace shell | 560 } // namespace shell |
556 } // namespace chromecast | 561 } // namespace chromecast |
OLD | NEW |