| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include <sys/prctl.h> | 68 #include <sys/prctl.h> |
| 69 #endif | 69 #endif |
| 70 #if defined(OS_LINUX) | 70 #if defined(OS_LINUX) |
| 71 #include <fontconfig/fontconfig.h> | 71 #include <fontconfig/fontconfig.h> |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 #if defined(OS_ANDROID) | 74 #if defined(OS_ANDROID) |
| 75 #include "chromecast/app/android/crash_handler.h" | 75 #include "chromecast/app/android/crash_handler.h" |
| 76 #include "components/crash/content/browser/crash_dump_manager_android.h" | 76 #include "components/crash/content/browser/crash_dump_manager_android.h" |
| 77 #include "net/android/network_change_notifier_factory_android.h" | 77 #include "net/android/network_change_notifier_factory_android.h" |
| 78 #include "ui/android/screen_android.h" |
| 79 #include "ui/display/screen.h" |
| 78 #else | 80 #else |
| 79 #include "chromecast/net/network_change_notifier_factory_cast.h" | 81 #include "chromecast/net/network_change_notifier_factory_cast.h" |
| 80 #endif | 82 #endif |
| 81 | 83 |
| 82 #if defined(USE_AURA) | 84 #if defined(USE_AURA) |
| 83 // gn check ignored on OverlayManagerCast as it's not a public ozone | 85 // gn check ignored on OverlayManagerCast as it's not a public ozone |
| 84 // header, but is exported to allow injecting the overlay-composited | 86 // header, but is exported to allow injecting the overlay-composited |
| 85 // callback. | 87 // callback. |
| 86 #include "chromecast/graphics/cast_screen.h" | 88 #include "chromecast/graphics/cast_screen.h" |
| 87 #include "ui/display/screen.h" | 89 #include "ui/display/screen.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 405 |
| 404 // Set GL strings so GPU config code can make correct feature blacklisting/ | 406 // Set GL strings so GPU config code can make correct feature blacklisting/ |
| 405 // whitelisting decisions. | 407 // whitelisting decisions. |
| 406 // Note: SetGLStrings can be called before GpuDataManager::Initialize. | 408 // Note: SetGLStrings can be called before GpuDataManager::Initialize. |
| 407 std::unique_ptr<CastSysInfo> sys_info = CreateSysInfo(); | 409 std::unique_ptr<CastSysInfo> sys_info = CreateSysInfo(); |
| 408 content::GpuDataManager::GetInstance()->SetGLStrings( | 410 content::GpuDataManager::GetInstance()->SetGLStrings( |
| 409 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), | 411 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), |
| 410 sys_info->GetGlVersion()); | 412 sys_info->GetGlVersion()); |
| 411 #endif | 413 #endif |
| 412 | 414 |
| 413 #if defined(USE_AURA) | 415 #if defined(OS_ANDROID) |
| 416 display::Screen::SetScreenInstance(ui::CreateScreenAndroid()); |
| 417 #elif defined(USE_AURA) |
| 414 cast_browser_process_->SetCastScreen(base::WrapUnique(new CastScreen())); | 418 cast_browser_process_->SetCastScreen(base::WrapUnique(new CastScreen())); |
| 415 DCHECK(!display::Screen::GetScreen()); | 419 DCHECK(!display::Screen::GetScreen()); |
| 416 display::Screen::SetScreenInstance(cast_browser_process_->cast_screen()); | 420 display::Screen::SetScreenInstance(cast_browser_process_->cast_screen()); |
| 417 #endif | 421 #endif |
| 418 | 422 |
| 419 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | 423 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
| 420 kChromeResourceScheme); | 424 kChromeResourceScheme); |
| 421 return 0; | 425 return 0; |
| 422 } | 426 } |
| 423 | 427 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 545 |
| 542 void CastBrowserMainParts::PostDestroyThreads() { | 546 void CastBrowserMainParts::PostDestroyThreads() { |
| 543 #if !defined(OS_ANDROID) | 547 #if !defined(OS_ANDROID) |
| 544 media_resource_tracker_->FinalizeAndDestroy(); | 548 media_resource_tracker_->FinalizeAndDestroy(); |
| 545 media_resource_tracker_ = nullptr; | 549 media_resource_tracker_ = nullptr; |
| 546 #endif | 550 #endif |
| 547 } | 551 } |
| 548 | 552 |
| 549 } // namespace shell | 553 } // namespace shell |
| 550 } // namespace chromecast | 554 } // namespace chromecast |
| OLD | NEW |