| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 #include "content/public/browser/browser_thread.h" | 110 #include "content/public/browser/browser_thread.h" |
| 111 #include "content/public/browser/notification_service.h" | 111 #include "content/public/browser/notification_service.h" |
| 112 #include "content/public/browser/power_save_blocker.h" | 112 #include "content/public/browser/power_save_blocker.h" |
| 113 #include "content/public/common/main_function_params.h" | 113 #include "content/public/common/main_function_params.h" |
| 114 #include "media/audio/sounds/sounds_manager.h" | 114 #include "media/audio/sounds/sounds_manager.h" |
| 115 #include "net/base/network_change_notifier.h" | 115 #include "net/base/network_change_notifier.h" |
| 116 #include "net/url_request/url_request.h" | 116 #include "net/url_request/url_request.h" |
| 117 #include "net/url_request/url_request_context_getter.h" | 117 #include "net/url_request/url_request_context_getter.h" |
| 118 #include "ui/base/touch/touch_device.h" | 118 #include "ui/base/touch/touch_device.h" |
| 119 #include "ui/events/event_utils.h" | 119 #include "ui/events/event_utils.h" |
| 120 #include "ui/wm/core/user_activity_detector.h" |
| 120 | 121 |
| 121 // Exclude X11 dependents for ozone | 122 // Exclude X11 dependents for ozone |
| 122 #if defined(USE_X11) | 123 #if defined(USE_X11) |
| 123 #include "chrome/browser/chromeos/device_uma.h" | 124 #include "chrome/browser/chromeos/device_uma.h" |
| 124 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 125 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
| 125 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" | 126 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" |
| 126 #endif | 127 #endif |
| 127 | 128 |
| 128 #if !defined(USE_ATHENA) | 129 #if !defined(USE_ATHENA) |
| 129 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" | 130 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // Load the default app order synchronously for restarting case. | 395 // Load the default app order synchronously for restarting case. |
| 395 app_order_loader_.reset( | 396 app_order_loader_.reset( |
| 396 new default_app_order::ExternalLoader(false /* async */)); | 397 new default_app_order::ExternalLoader(false /* async */)); |
| 397 } | 398 } |
| 398 | 399 |
| 399 if (!app_order_loader_) { | 400 if (!app_order_loader_) { |
| 400 app_order_loader_.reset( | 401 app_order_loader_.reset( |
| 401 new default_app_order::ExternalLoader(true /* async */)); | 402 new default_app_order::ExternalLoader(true /* async */)); |
| 402 } | 403 } |
| 403 | 404 |
| 405 // Initialize the UserActivityDetector before the ash Shell is created. |
| 406 wm::UserActivityDetector::Create(); |
| 407 |
| 404 media::SoundsManager::Create(); | 408 media::SoundsManager::Create(); |
| 405 | 409 |
| 406 // Initialize magnification manager before ash tray is created. And this must | 410 // Initialize magnification manager before ash tray is created. And this must |
| 407 // be placed after UserManager::SessionStarted(); | 411 // be placed after UserManager::SessionStarted(); |
| 408 AccessibilityManager::Initialize(); | 412 AccessibilityManager::Initialize(); |
| 409 #if !defined(USE_ATHENA) | 413 #if !defined(USE_ATHENA) |
| 410 // TODO(oshima): MagnificationManager/WallpaperManager depends on ash. | 414 // TODO(oshima): MagnificationManager/WallpaperManager depends on ash. |
| 411 // crbug.com/408733, crbug.com/408734. | 415 // crbug.com/408733, crbug.com/408734. |
| 412 MagnificationManager::Initialize(); | 416 MagnificationManager::Initialize(); |
| 413 | 417 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 idle_action_warning_observer_.reset(); | 731 idle_action_warning_observer_.reset(); |
| 728 | 732 |
| 729 #if !defined(USE_ATHENA) | 733 #if !defined(USE_ATHENA) |
| 730 MagnificationManager::Shutdown(); | 734 MagnificationManager::Shutdown(); |
| 731 #endif | 735 #endif |
| 732 | 736 |
| 733 AccessibilityManager::Shutdown(); | 737 AccessibilityManager::Shutdown(); |
| 734 | 738 |
| 735 media::SoundsManager::Shutdown(); | 739 media::SoundsManager::Shutdown(); |
| 736 | 740 |
| 741 wm::UserActivityDetector::Shutdown(); |
| 742 |
| 737 system::StatisticsProvider::GetInstance()->Shutdown(); | 743 system::StatisticsProvider::GetInstance()->Shutdown(); |
| 738 | 744 |
| 739 // Let the UserManager and WallpaperManager unregister itself as an observer | 745 // Let the UserManager and WallpaperManager unregister itself as an observer |
| 740 // of the CrosSettings singleton before it is destroyed. This also ensures | 746 // of the CrosSettings singleton before it is destroyed. This also ensures |
| 741 // that the UserManager has no URLRequest pending (see | 747 // that the UserManager has no URLRequest pending (see |
| 742 // http://crbug.com/276659). | 748 // http://crbug.com/276659). |
| 743 g_browser_process->platform_part()->user_manager()->Shutdown(); | 749 g_browser_process->platform_part()->user_manager()->Shutdown(); |
| 744 #if !defined(USE_ATHENA) | 750 #if !defined(USE_ATHENA) |
| 745 WallpaperManager::Get()->Shutdown(); | 751 WallpaperManager::Get()->Shutdown(); |
| 746 #endif | 752 #endif |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 // Destroy DBus services immediately after threads are stopped. | 788 // Destroy DBus services immediately after threads are stopped. |
| 783 dbus_services_.reset(); | 789 dbus_services_.reset(); |
| 784 | 790 |
| 785 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 791 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 786 | 792 |
| 787 // Destroy DeviceSettingsService after g_browser_process. | 793 // Destroy DeviceSettingsService after g_browser_process. |
| 788 DeviceSettingsService::Shutdown(); | 794 DeviceSettingsService::Shutdown(); |
| 789 } | 795 } |
| 790 | 796 |
| 791 } // namespace chromeos | 797 } // namespace chromeos |
| OLD | NEW |