| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "net/android/network_change_notifier_factory_android.h" | 72 #include "net/android/network_change_notifier_factory_android.h" |
| 73 #else | 73 #else |
| 74 #include "chromecast/net/network_change_notifier_factory_cast.h" | 74 #include "chromecast/net/network_change_notifier_factory_cast.h" |
| 75 #endif | 75 #endif |
| 76 | 76 |
| 77 #if defined(USE_AURA) | 77 #if defined(USE_AURA) |
| 78 // gn check ignored on OverlayManagerCast as it's not a public ozone | 78 // gn check ignored on OverlayManagerCast as it's not a public ozone |
| 79 // header, but is exported to allow injecting the overlay-composited | 79 // header, but is exported to allow injecting the overlay-composited |
| 80 // callback. | 80 // callback. |
| 81 #include "chromecast/graphics/cast_screen.h" | 81 #include "chromecast/graphics/cast_screen.h" |
| 82 #include "ui/aura/env.h" | |
| 83 #include "ui/gfx/screen.h" | 82 #include "ui/gfx/screen.h" |
| 84 #include "ui/ozone/platform/cast/overlay_manager_cast.h" // nogncheck | 83 #include "ui/ozone/platform/cast/overlay_manager_cast.h" // nogncheck |
| 85 #endif | 84 #endif |
| 86 | 85 |
| 87 namespace { | 86 namespace { |
| 88 | 87 |
| 89 #if !defined(OS_ANDROID) | 88 #if !defined(OS_ANDROID) |
| 90 int kSignalsToRunClosure[] = { SIGTERM, SIGINT, }; | 89 int kSignalsToRunClosure[] = { SIGTERM, SIGINT, }; |
| 91 // Closure to run on SIGTERM and SIGINT. | 90 // Closure to run on SIGTERM and SIGINT. |
| 92 base::Closure* g_signal_closure = nullptr; | 91 base::Closure* g_signal_closure = nullptr; |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 477 |
| 479 void CastBrowserMainParts::PostMainMessageLoopRun() { | 478 void CastBrowserMainParts::PostMainMessageLoopRun() { |
| 480 #if defined(OS_ANDROID) | 479 #if defined(OS_ANDROID) |
| 481 // Android does not use native main MessageLoop. | 480 // Android does not use native main MessageLoop. |
| 482 NOTREACHED(); | 481 NOTREACHED(); |
| 483 #else | 482 #else |
| 484 cast_browser_process_->cast_service()->Finalize(); | 483 cast_browser_process_->cast_service()->Finalize(); |
| 485 cast_browser_process_->metrics_service_client()->Finalize(); | 484 cast_browser_process_->metrics_service_client()->Finalize(); |
| 486 cast_browser_process_.reset(); | 485 cast_browser_process_.reset(); |
| 487 | 486 |
| 488 #if defined(USE_AURA) | |
| 489 aura::Env::DeleteInstance(); | |
| 490 #endif | |
| 491 | |
| 492 DeregisterKillOnAlarm(); | 487 DeregisterKillOnAlarm(); |
| 493 #endif | 488 #endif |
| 494 } | 489 } |
| 495 | 490 |
| 496 void CastBrowserMainParts::PostDestroyThreads() { | 491 void CastBrowserMainParts::PostDestroyThreads() { |
| 497 #if !defined(OS_ANDROID) | 492 #if !defined(OS_ANDROID) |
| 498 media_resource_tracker_->FinalizeAndDestroy(); | 493 media_resource_tracker_->FinalizeAndDestroy(); |
| 499 media_resource_tracker_ = nullptr; | 494 media_resource_tracker_ = nullptr; |
| 500 media_pipeline_backend_manager_.reset(); | 495 media_pipeline_backend_manager_.reset(); |
| 501 #endif | 496 #endif |
| 502 } | 497 } |
| 503 | 498 |
| 504 } // namespace shell | 499 } // namespace shell |
| 505 } // namespace chromecast | 500 } // namespace chromecast |
| OLD | NEW |