Chromium Code Reviews| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 #include "components/metrics/metrics_service.h" | 111 #include "components/metrics/metrics_service.h" |
| 112 #include "components/ownership/owner_key_util.h" | 112 #include "components/ownership/owner_key_util.h" |
| 113 #include "components/session_manager/core/session_manager.h" | 113 #include "components/session_manager/core/session_manager.h" |
| 114 #include "components/user_manager/user.h" | 114 #include "components/user_manager/user.h" |
| 115 #include "components/user_manager/user_manager.h" | 115 #include "components/user_manager/user_manager.h" |
| 116 #include "components/wallpaper/wallpaper_manager_base.h" | 116 #include "components/wallpaper/wallpaper_manager_base.h" |
| 117 #include "content/public/browser/browser_thread.h" | 117 #include "content/public/browser/browser_thread.h" |
| 118 #include "content/public/browser/notification_service.h" | 118 #include "content/public/browser/notification_service.h" |
| 119 #include "content/public/common/main_function_params.h" | 119 #include "content/public/common/main_function_params.h" |
| 120 #include "device/bluetooth/bluetooth_adapter_factory.h" | 120 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 121 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | |
| 121 #include "media/audio/sounds/sounds_manager.h" | 122 #include "media/audio/sounds/sounds_manager.h" |
| 122 #include "net/base/network_change_notifier.h" | 123 #include "net/base/network_change_notifier.h" |
| 123 #include "net/socket/ssl_server_socket.h" | 124 #include "net/socket/ssl_server_socket.h" |
| 124 #include "net/url_request/url_request.h" | 125 #include "net/url_request/url_request.h" |
| 125 #include "net/url_request/url_request_context_getter.h" | 126 #include "net/url_request/url_request_context_getter.h" |
| 126 #include "ui/base/ime/chromeos/ime_keyboard.h" | 127 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 127 #include "ui/base/ime/chromeos/input_method_manager.h" | 128 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 128 #include "ui/base/touch/touch_device.h" | 129 #include "ui/base/touch/touch_device.h" |
| 129 #include "ui/events/event_utils.h" | 130 #include "ui/events/event_utils.h" |
| 130 | 131 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 161 | 162 |
| 162 // Wrapper class for initializing dbus related services and shutting them | 163 // Wrapper class for initializing dbus related services and shutting them |
| 163 // down. This gets instantiated in a scoped_ptr so that shutdown methods in the | 164 // down. This gets instantiated in a scoped_ptr so that shutdown methods in the |
| 164 // destructor will get called if and only if this has been instantiated. | 165 // destructor will get called if and only if this has been instantiated. |
| 165 class DBusServices { | 166 class DBusServices { |
| 166 public: | 167 public: |
| 167 explicit DBusServices(const content::MainFunctionParams& parameters) { | 168 explicit DBusServices(const content::MainFunctionParams& parameters) { |
| 168 // Initialize DBusThreadManager for the browser. This must be done after | 169 // Initialize DBusThreadManager for the browser. This must be done after |
| 169 // the main message loop is started, as it uses the message loop. | 170 // the main message loop is started, as it uses the message loop. |
| 170 DBusThreadManager::Initialize(); | 171 DBusThreadManager::Initialize(); |
| 172 | |
| 173 // This can only be initialized after DBusThreadManager has been | |
| 174 // initialized. | |
|
stevenjb
2015/09/17 21:48:01
See my other comments, but we should avoid this im
rkc
2015/09/21 18:54:22
Done.
| |
| 175 bluez::BluezDBusManager::Initialize(); | |
| 176 | |
| 171 PowerPolicyController::Initialize( | 177 PowerPolicyController::Initialize( |
| 172 DBusThreadManager::Get()->GetPowerManagerClient()); | 178 DBusThreadManager::Get()->GetPowerManagerClient()); |
| 173 | 179 |
| 174 ScopedVector<CrosDBusService::ServiceProviderInterface> service_providers; | 180 ScopedVector<CrosDBusService::ServiceProviderInterface> service_providers; |
| 175 service_providers.push_back(ProxyResolutionServiceProvider::Create( | 181 service_providers.push_back(ProxyResolutionServiceProvider::Create( |
| 176 make_scoped_ptr(new ChromeProxyResolverDelegate()))); | 182 make_scoped_ptr(new ChromeProxyResolverDelegate()))); |
| 177 service_providers.push_back(new DisplayPowerServiceProvider( | 183 service_providers.push_back(new DisplayPowerServiceProvider( |
| 178 make_scoped_ptr(new ChromeDisplayPowerServiceProviderDelegate))); | 184 make_scoped_ptr(new ChromeDisplayPowerServiceProviderDelegate))); |
| 179 service_providers.push_back(new LivenessServiceProvider); | 185 service_providers.push_back(new LivenessServiceProvider); |
| 180 service_providers.push_back(new ScreenLockServiceProvider); | 186 service_providers.push_back(new ScreenLockServiceProvider); |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 773 // Destroy DBus services immediately after threads are stopped. | 779 // Destroy DBus services immediately after threads are stopped. |
| 774 dbus_services_.reset(); | 780 dbus_services_.reset(); |
| 775 | 781 |
| 776 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 782 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 777 | 783 |
| 778 // Destroy DeviceSettingsService after g_browser_process. | 784 // Destroy DeviceSettingsService after g_browser_process. |
| 779 DeviceSettingsService::Shutdown(); | 785 DeviceSettingsService::Shutdown(); |
| 780 } | 786 } |
| 781 | 787 |
| 782 } // namespace chromeos | 788 } // namespace chromeos |
| OLD | NEW |