OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 // Singletons are finally destroyed in AtExitManager. | 746 // Singletons are finally destroyed in AtExitManager. |
747 XInputHierarchyChangedEventListener::GetInstance()->Stop(); | 747 XInputHierarchyChangedEventListener::GetInstance()->Stop(); |
748 | 748 |
749 DeviceUMA::GetInstance()->Stop(); | 749 DeviceUMA::GetInstance()->Stop(); |
750 | 750 |
751 // SystemKeyEventListener::Shutdown() is always safe to call, | 751 // SystemKeyEventListener::Shutdown() is always safe to call, |
752 // even if Initialize() wasn't called. | 752 // even if Initialize() wasn't called. |
753 SystemKeyEventListener::Shutdown(); | 753 SystemKeyEventListener::Shutdown(); |
754 #endif | 754 #endif |
755 | 755 |
756 CrasAudioHandler::Shutdown(); | |
757 | |
758 // Detach D-Bus clients before DBusThreadManager is shut down. | 756 // Detach D-Bus clients before DBusThreadManager is shut down. |
759 power_button_observer_.reset(); | 757 power_button_observer_.reset(); |
760 idle_action_warning_observer_.reset(); | 758 idle_action_warning_observer_.reset(); |
761 | 759 |
762 #if !defined(USE_ATHENA) | 760 #if !defined(USE_ATHENA) |
763 MagnificationManager::Shutdown(); | 761 MagnificationManager::Shutdown(); |
764 #endif | 762 #endif |
765 | 763 |
766 AccessibilityManager::Shutdown(); | 764 AccessibilityManager::Shutdown(); |
767 | 765 |
(...skipping 29 matching lines...) Expand all Loading... |
797 | 795 |
798 // We first call PostMainMessageLoopRun and then destroy UserManager, because | 796 // We first call PostMainMessageLoopRun and then destroy UserManager, because |
799 // Ash needs to be closed before UserManager is destroyed. | 797 // Ash needs to be closed before UserManager is destroyed. |
800 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 798 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
801 | 799 |
802 input_method::Shutdown(); | 800 input_method::Shutdown(); |
803 | 801 |
804 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. | 802 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. |
805 DeviceOAuth2TokenServiceFactory::Shutdown(); | 803 DeviceOAuth2TokenServiceFactory::Shutdown(); |
806 | 804 |
| 805 // Shutdown after PostMainMessageLoopRun() which should destroy all observers. |
| 806 CrasAudioHandler::Shutdown(); |
| 807 |
807 // Called after | 808 // Called after |
808 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be | 809 // ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() to be |
809 // executed after execution of chrome::CloseAsh(), because some | 810 // executed after execution of chrome::CloseAsh(), because some |
810 // parts of WebUI depends on NetworkPortalDetector. | 811 // parts of WebUI depends on NetworkPortalDetector. |
811 NetworkPortalDetector::Shutdown(); | 812 NetworkPortalDetector::Shutdown(); |
812 | 813 |
813 g_browser_process->platform_part()->DestroyChromeUserManager(); | 814 g_browser_process->platform_part()->DestroyChromeUserManager(); |
814 | 815 |
815 g_browser_process->platform_part()->ShutdownSessionManager(); | 816 g_browser_process->platform_part()->ShutdownSessionManager(); |
816 } | 817 } |
817 | 818 |
818 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { | 819 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { |
819 // Destroy DBus services immediately after threads are stopped. | 820 // Destroy DBus services immediately after threads are stopped. |
820 dbus_services_.reset(); | 821 dbus_services_.reset(); |
821 | 822 |
822 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 823 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
823 | 824 |
824 // Destroy DeviceSettingsService after g_browser_process. | 825 // Destroy DeviceSettingsService after g_browser_process. |
825 DeviceSettingsService::Shutdown(); | 826 DeviceSettingsService::Shutdown(); |
826 } | 827 } |
827 | 828 |
828 } // namespace chromeos | 829 } // namespace chromeos |
OLD | NEW |