| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 #include "components/signin/core/account_id/account_id.h" | 137 #include "components/signin/core/account_id/account_id.h" |
| 138 #include "components/user_manager/user.h" | 138 #include "components/user_manager/user.h" |
| 139 #include "components/user_manager/user_manager.h" | 139 #include "components/user_manager/user_manager.h" |
| 140 #include "components/user_manager/user_names.h" | 140 #include "components/user_manager/user_names.h" |
| 141 #include "components/version_info/version_info.h" | 141 #include "components/version_info/version_info.h" |
| 142 #include "components/wallpaper/wallpaper_manager_base.h" | 142 #include "components/wallpaper/wallpaper_manager_base.h" |
| 143 #include "content/public/browser/browser_thread.h" | 143 #include "content/public/browser/browser_thread.h" |
| 144 #include "content/public/browser/notification_service.h" | 144 #include "content/public/browser/notification_service.h" |
| 145 #include "content/public/common/content_switches.h" | 145 #include "content/public/common/content_switches.h" |
| 146 #include "content/public/common/main_function_params.h" | 146 #include "content/public/common/main_function_params.h" |
| 147 #include "dbus/object_path.h" |
| 147 #include "device/bluetooth/bluetooth_adapter_factory.h" | 148 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 148 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 149 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 149 #include "media/audio/sounds/sounds_manager.h" | 150 #include "media/audio/sounds/sounds_manager.h" |
| 150 #include "net/base/network_change_notifier.h" | 151 #include "net/base/network_change_notifier.h" |
| 151 #include "net/url_request/url_request.h" | 152 #include "net/url_request/url_request.h" |
| 152 #include "net/url_request/url_request_context_getter.h" | 153 #include "net/url_request/url_request_context_getter.h" |
| 153 #include "printing/backend/print_backend.h" | 154 #include "printing/backend/print_backend.h" |
| 154 #include "rlz/features/features.h" | 155 #include "rlz/features/features.h" |
| 156 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 155 #include "ui/base/ime/chromeos/ime_keyboard.h" | 157 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 156 #include "ui/base/ime/chromeos/input_method_manager.h" | 158 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 157 #include "ui/base/touch/touch_device.h" | 159 #include "ui/base/touch/touch_device.h" |
| 158 #include "ui/events/event_utils.h" | 160 #include "ui/events/event_utils.h" |
| 159 | 161 |
| 160 #if BUILDFLAG(ENABLE_RLZ) | 162 #if BUILDFLAG(ENABLE_RLZ) |
| 161 #include "components/rlz/rlz_tracker.h" | 163 #include "components/rlz/rlz_tracker.h" |
| 162 #endif | 164 #endif |
| 163 | 165 |
| 164 // Exclude X11 dependents for ozone | 166 // Exclude X11 dependents for ozone |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 service_providers.push_back(base::MakeUnique<LivenessServiceProvider>()); | 239 service_providers.push_back(base::MakeUnique<LivenessServiceProvider>()); |
| 238 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>()); | 240 service_providers.push_back(base::MakeUnique<ScreenLockServiceProvider>()); |
| 239 if (chrome::IsRunningInMash()) { | 241 if (chrome::IsRunningInMash()) { |
| 240 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( | 242 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( |
| 241 base::MakeUnique<MusConsoleServiceProviderDelegate>())); | 243 base::MakeUnique<MusConsoleServiceProviderDelegate>())); |
| 242 } else { | 244 } else { |
| 243 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( | 245 service_providers.push_back(base::MakeUnique<ConsoleServiceProvider>( |
| 244 base::MakeUnique<ChromeConsoleServiceProviderDelegate>())); | 246 base::MakeUnique<ChromeConsoleServiceProviderDelegate>())); |
| 245 } | 247 } |
| 246 service_providers.push_back(base::MakeUnique<KioskInfoService>()); | 248 service_providers.push_back(base::MakeUnique<KioskInfoService>()); |
| 247 CrosDBusService::Initialize(std::move(service_providers)); | 249 cros_dbus_service_ = CrosDBusService::Create( |
| 250 kLibCrosServiceName, dbus::ObjectPath(kLibCrosServicePath), |
| 251 std::move(service_providers)); |
| 248 | 252 |
| 249 // Initialize PowerDataCollector after DBusThreadManager is initialized. | 253 // Initialize PowerDataCollector after DBusThreadManager is initialized. |
| 250 PowerDataCollector::Initialize(); | 254 PowerDataCollector::Initialize(); |
| 251 | 255 |
| 252 LoginState::Initialize(); | 256 LoginState::Initialize(); |
| 253 SystemSaltGetter::Initialize(); | 257 SystemSaltGetter::Initialize(); |
| 254 TPMTokenLoader::Initialize(); | 258 TPMTokenLoader::Initialize(); |
| 255 CertLoader::Initialize(); | 259 CertLoader::Initialize(); |
| 256 | 260 |
| 257 disks::DiskMountManager::Initialize(); | 261 disks::DiskMountManager::Initialize(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 287 NetworkConnect::Shutdown(); | 291 NetworkConnect::Shutdown(); |
| 288 network_connect_delegate_.reset(); | 292 network_connect_delegate_.reset(); |
| 289 CertLibrary::Shutdown(); | 293 CertLibrary::Shutdown(); |
| 290 NetworkHandler::Shutdown(); | 294 NetworkHandler::Shutdown(); |
| 291 cryptohome::AsyncMethodCaller::Shutdown(); | 295 cryptohome::AsyncMethodCaller::Shutdown(); |
| 292 disks::DiskMountManager::Shutdown(); | 296 disks::DiskMountManager::Shutdown(); |
| 293 SystemSaltGetter::Shutdown(); | 297 SystemSaltGetter::Shutdown(); |
| 294 LoginState::Shutdown(); | 298 LoginState::Shutdown(); |
| 295 CertLoader::Shutdown(); | 299 CertLoader::Shutdown(); |
| 296 TPMTokenLoader::Shutdown(); | 300 TPMTokenLoader::Shutdown(); |
| 297 CrosDBusService::Shutdown(); | 301 cros_dbus_service_.reset(); |
| 298 PowerDataCollector::Shutdown(); | 302 PowerDataCollector::Shutdown(); |
| 299 PowerPolicyController::Shutdown(); | 303 PowerPolicyController::Shutdown(); |
| 300 device::BluetoothAdapterFactory::Shutdown(); | 304 device::BluetoothAdapterFactory::Shutdown(); |
| 301 bluez::BluezDBusManager::Shutdown(); | 305 bluez::BluezDBusManager::Shutdown(); |
| 302 | 306 |
| 303 // NOTE: This must only be called if Initialize() was called. | 307 // NOTE: This must only be called if Initialize() was called. |
| 304 DBusThreadManager::Shutdown(); | 308 DBusThreadManager::Shutdown(); |
| 305 } | 309 } |
| 306 | 310 |
| 307 private: | 311 private: |
| 312 // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned |
| 313 // by Chrome. The name of this service was chosen for historical reasons that |
| 314 // are irrelevant now. |
| 315 // TODO(derat): Move these providers into more-specific services that are |
| 316 // split between different processes: http://crbug.com/692246 |
| 317 std::unique_ptr<CrosDBusService> cros_dbus_service_; |
| 318 |
| 308 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; | 319 std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; |
| 309 | 320 |
| 310 DISALLOW_COPY_AND_ASSIGN(DBusServices); | 321 DISALLOW_COPY_AND_ASSIGN(DBusServices); |
| 311 }; | 322 }; |
| 312 | 323 |
| 313 } // namespace internal | 324 } // namespace internal |
| 314 | 325 |
| 315 // ChromeBrowserMainPartsChromeos ---------------------------------------------- | 326 // ChromeBrowserMainPartsChromeos ---------------------------------------------- |
| 316 | 327 |
| 317 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( | 328 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 | 951 |
| 941 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 952 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 942 | 953 |
| 943 // Destroy DeviceSettingsService after g_browser_process. | 954 // Destroy DeviceSettingsService after g_browser_process. |
| 944 DeviceSettingsService::Shutdown(); | 955 DeviceSettingsService::Shutdown(); |
| 945 | 956 |
| 946 chromeos::ShutdownCloseTracking(); | 957 chromeos::ShutdownCloseTracking(); |
| 947 } | 958 } |
| 948 | 959 |
| 949 } // namespace chromeos | 960 } // namespace chromeos |
| OLD | NEW |