| 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 <string> | 7 #include <string> |
| 8 #if !defined(OS_ANDROID) | 8 #if !defined(OS_ANDROID) |
| 9 #include <signal.h> | 9 #include <signal.h> |
| 10 #include <sys/prctl.h> | 10 #include <sys/prctl.h> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "chromecast/crash/android/crash_handler.h" | 48 #include "chromecast/crash/android/crash_handler.h" |
| 49 #include "components/crash/browser/crash_dump_manager_android.h" | 49 #include "components/crash/browser/crash_dump_manager_android.h" |
| 50 #include "media/base/android/media_client_android.h" | 50 #include "media/base/android/media_client_android.h" |
| 51 #include "net/android/network_change_notifier_factory_android.h" | 51 #include "net/android/network_change_notifier_factory_android.h" |
| 52 #else | 52 #else |
| 53 #include "chromecast/browser/media/cast_browser_cdm_factory.h" | 53 #include "chromecast/browser/media/cast_browser_cdm_factory.h" |
| 54 #include "chromecast/net/network_change_notifier_factory_cast.h" | 54 #include "chromecast/net/network_change_notifier_factory_cast.h" |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 #if defined(USE_AURA) | 57 #if defined(USE_AURA) |
| 58 #include "ui/aura/env.h" |
| 58 #include "ui/aura/test/test_screen.h" | 59 #include "ui/aura/test/test_screen.h" |
| 59 #include "ui/gfx/screen.h" | 60 #include "ui/gfx/screen.h" |
| 60 #endif | 61 #endif |
| 61 | 62 |
| 62 namespace { | 63 namespace { |
| 63 | 64 |
| 64 #if !defined(OS_ANDROID) | 65 #if !defined(OS_ANDROID) |
| 65 int kSignalsToRunClosure[] = { SIGTERM, SIGINT, }; | 66 int kSignalsToRunClosure[] = { SIGTERM, SIGINT, }; |
| 66 | 67 |
| 67 // Closure to run on SIGTERM and SIGINT. | 68 // Closure to run on SIGTERM and SIGINT. |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 367 } |
| 367 | 368 |
| 368 void CastBrowserMainParts::PostMainMessageLoopRun() { | 369 void CastBrowserMainParts::PostMainMessageLoopRun() { |
| 369 #if defined(OS_ANDROID) | 370 #if defined(OS_ANDROID) |
| 370 // Android does not use native main MessageLoop. | 371 // Android does not use native main MessageLoop. |
| 371 NOTREACHED(); | 372 NOTREACHED(); |
| 372 #else | 373 #else |
| 373 cast_browser_process_->cast_service()->Finalize(); | 374 cast_browser_process_->cast_service()->Finalize(); |
| 374 cast_browser_process_->metrics_service_client()->Finalize(); | 375 cast_browser_process_->metrics_service_client()->Finalize(); |
| 375 cast_browser_process_.reset(); | 376 cast_browser_process_.reset(); |
| 377 |
| 378 #if defined(USE_AURA) |
| 379 aura::Env::DeleteInstance(); |
| 380 #endif |
| 381 |
| 376 DeregisterKillOnAlarm(); | 382 DeregisterKillOnAlarm(); |
| 377 #endif | 383 #endif |
| 378 | 384 |
| 379 media::CastMediaShlib::Finalize(); | 385 media::CastMediaShlib::Finalize(); |
| 380 } | 386 } |
| 381 | 387 |
| 382 } // namespace shell | 388 } // namespace shell |
| 383 } // namespace chromecast | 389 } // namespace chromecast |
| OLD | NEW |