| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/dbus/dbus_thread_manager.h" | 5 #include "chromeos/dbus/dbus_thread_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "chromeos/chromeos_switches.h" | 13 #include "chromeos/chromeos_switches.h" |
| 14 #include "chromeos/dbus/arc_obb_mounter_client.h" | 14 #include "chromeos/dbus/arc_obb_mounter_client.h" |
| 15 #include "chromeos/dbus/cras_audio_client.h" | 15 #include "chromeos/dbus/cras_audio_client.h" |
| 16 #include "chromeos/dbus/cros_disks_client.h" | 16 #include "chromeos/dbus/cros_disks_client.h" |
| 17 #include "chromeos/dbus/cryptohome_client.h" | 17 #include "chromeos/dbus/cryptohome_client.h" |
| 18 #include "chromeos/dbus/dbus_client.h" | 18 #include "chromeos/dbus/dbus_client.h" |
| 19 #include "chromeos/dbus/debug_daemon_client.h" | 19 #include "chromeos/dbus/debug_daemon_client.h" |
| 20 #include "chromeos/dbus/easy_unlock_client.h" | 20 #include "chromeos/dbus/easy_unlock_client.h" |
| 21 #include "chromeos/dbus/gsm_sms_client.h" | 21 #include "chromeos/dbus/gsm_sms_client.h" |
| 22 #include "chromeos/dbus/image_burner_client.h" | 22 #include "chromeos/dbus/image_burner_client.h" |
| 23 #include "chromeos/dbus/introspectable_client.h" | |
| 24 #include "chromeos/dbus/lorgnette_manager_client.h" | 23 #include "chromeos/dbus/lorgnette_manager_client.h" |
| 25 #include "chromeos/dbus/modem_messaging_client.h" | 24 #include "chromeos/dbus/modem_messaging_client.h" |
| 26 #include "chromeos/dbus/permission_broker_client.h" | 25 #include "chromeos/dbus/permission_broker_client.h" |
| 27 #include "chromeos/dbus/power_manager_client.h" | 26 #include "chromeos/dbus/power_manager_client.h" |
| 28 #include "chromeos/dbus/session_manager_client.h" | 27 #include "chromeos/dbus/session_manager_client.h" |
| 29 #include "chromeos/dbus/shill_device_client.h" | 28 #include "chromeos/dbus/shill_device_client.h" |
| 30 #include "chromeos/dbus/shill_ipconfig_client.h" | 29 #include "chromeos/dbus/shill_ipconfig_client.h" |
| 31 #include "chromeos/dbus/shill_manager_client.h" | 30 #include "chromeos/dbus/shill_manager_client.h" |
| 32 #include "chromeos/dbus/shill_profile_client.h" | 31 #include "chromeos/dbus/shill_profile_client.h" |
| 33 #include "chromeos/dbus/shill_service_client.h" | 32 #include "chromeos/dbus/shill_service_client.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 157 } |
| 159 | 158 |
| 160 GsmSMSClient* DBusThreadManager::GetGsmSMSClient() { | 159 GsmSMSClient* DBusThreadManager::GetGsmSMSClient() { |
| 161 return client_bundle_->gsm_sms_client(); | 160 return client_bundle_->gsm_sms_client(); |
| 162 } | 161 } |
| 163 | 162 |
| 164 ImageBurnerClient* DBusThreadManager::GetImageBurnerClient() { | 163 ImageBurnerClient* DBusThreadManager::GetImageBurnerClient() { |
| 165 return client_bundle_->image_burner_client(); | 164 return client_bundle_->image_burner_client(); |
| 166 } | 165 } |
| 167 | 166 |
| 168 IntrospectableClient* DBusThreadManager::GetIntrospectableClient() { | |
| 169 return client_bundle_->introspectable_client(); | |
| 170 } | |
| 171 | |
| 172 ModemMessagingClient* DBusThreadManager::GetModemMessagingClient() { | 167 ModemMessagingClient* DBusThreadManager::GetModemMessagingClient() { |
| 173 return client_bundle_->modem_messaging_client(); | 168 return client_bundle_->modem_messaging_client(); |
| 174 } | 169 } |
| 175 | 170 |
| 176 PermissionBrokerClient* DBusThreadManager::GetPermissionBrokerClient() { | 171 PermissionBrokerClient* DBusThreadManager::GetPermissionBrokerClient() { |
| 177 return client_bundle_->permission_broker_client(); | 172 return client_bundle_->permission_broker_client(); |
| 178 } | 173 } |
| 179 | 174 |
| 180 PowerManagerClient* DBusThreadManager::GetPowerManagerClient() { | 175 PowerManagerClient* DBusThreadManager::GetPowerManagerClient() { |
| 181 return client_bundle_->power_manager_client(); | 176 return client_bundle_->power_manager_client(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 199 | 194 |
| 200 void DBusThreadManager::InitializeClients() { | 195 void DBusThreadManager::InitializeClients() { |
| 201 GetArcObbMounterClient()->Init(GetSystemBus()); | 196 GetArcObbMounterClient()->Init(GetSystemBus()); |
| 202 GetCrasAudioClient()->Init(GetSystemBus()); | 197 GetCrasAudioClient()->Init(GetSystemBus()); |
| 203 GetCrosDisksClient()->Init(GetSystemBus()); | 198 GetCrosDisksClient()->Init(GetSystemBus()); |
| 204 GetCryptohomeClient()->Init(GetSystemBus()); | 199 GetCryptohomeClient()->Init(GetSystemBus()); |
| 205 GetDebugDaemonClient()->Init(GetSystemBus()); | 200 GetDebugDaemonClient()->Init(GetSystemBus()); |
| 206 GetEasyUnlockClient()->Init(GetSystemBus()); | 201 GetEasyUnlockClient()->Init(GetSystemBus()); |
| 207 GetGsmSMSClient()->Init(GetSystemBus()); | 202 GetGsmSMSClient()->Init(GetSystemBus()); |
| 208 GetImageBurnerClient()->Init(GetSystemBus()); | 203 GetImageBurnerClient()->Init(GetSystemBus()); |
| 209 GetIntrospectableClient()->Init(GetSystemBus()); | |
| 210 GetLorgnetteManagerClient()->Init(GetSystemBus()); | 204 GetLorgnetteManagerClient()->Init(GetSystemBus()); |
| 211 GetModemMessagingClient()->Init(GetSystemBus()); | 205 GetModemMessagingClient()->Init(GetSystemBus()); |
| 212 GetPermissionBrokerClient()->Init(GetSystemBus()); | 206 GetPermissionBrokerClient()->Init(GetSystemBus()); |
| 213 GetPowerManagerClient()->Init(GetSystemBus()); | 207 GetPowerManagerClient()->Init(GetSystemBus()); |
| 214 GetSessionManagerClient()->Init(GetSystemBus()); | 208 GetSessionManagerClient()->Init(GetSystemBus()); |
| 215 GetShillDeviceClient()->Init(GetSystemBus()); | 209 GetShillDeviceClient()->Init(GetSystemBus()); |
| 216 GetShillIPConfigClient()->Init(GetSystemBus()); | 210 GetShillIPConfigClient()->Init(GetSystemBus()); |
| 217 GetShillManagerClient()->Init(GetSystemBus()); | 211 GetShillManagerClient()->Init(GetSystemBus()); |
| 218 GetShillServiceClient()->Init(GetSystemBus()); | 212 GetShillServiceClient()->Init(GetSystemBus()); |
| 219 GetShillProfileClient()->Init(GetSystemBus()); | 213 GetShillProfileClient()->Init(GetSystemBus()); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 std::unique_ptr<GsmSMSClient> client) { | 404 std::unique_ptr<GsmSMSClient> client) { |
| 411 DBusThreadManager::Get()->client_bundle_->gsm_sms_client_ = std::move(client); | 405 DBusThreadManager::Get()->client_bundle_->gsm_sms_client_ = std::move(client); |
| 412 } | 406 } |
| 413 | 407 |
| 414 void DBusThreadManagerSetter::SetImageBurnerClient( | 408 void DBusThreadManagerSetter::SetImageBurnerClient( |
| 415 std::unique_ptr<ImageBurnerClient> client) { | 409 std::unique_ptr<ImageBurnerClient> client) { |
| 416 DBusThreadManager::Get()->client_bundle_->image_burner_client_ = | 410 DBusThreadManager::Get()->client_bundle_->image_burner_client_ = |
| 417 std::move(client); | 411 std::move(client); |
| 418 } | 412 } |
| 419 | 413 |
| 420 void DBusThreadManagerSetter::SetIntrospectableClient( | |
| 421 std::unique_ptr<IntrospectableClient> client) { | |
| 422 DBusThreadManager::Get()->client_bundle_->introspectable_client_ = | |
| 423 std::move(client); | |
| 424 } | |
| 425 | |
| 426 void DBusThreadManagerSetter::SetModemMessagingClient( | 414 void DBusThreadManagerSetter::SetModemMessagingClient( |
| 427 std::unique_ptr<ModemMessagingClient> client) { | 415 std::unique_ptr<ModemMessagingClient> client) { |
| 428 DBusThreadManager::Get()->client_bundle_->modem_messaging_client_ = | 416 DBusThreadManager::Get()->client_bundle_->modem_messaging_client_ = |
| 429 std::move(client); | 417 std::move(client); |
| 430 } | 418 } |
| 431 | 419 |
| 432 void DBusThreadManagerSetter::SetPermissionBrokerClient( | 420 void DBusThreadManagerSetter::SetPermissionBrokerClient( |
| 433 std::unique_ptr<PermissionBrokerClient> client) { | 421 std::unique_ptr<PermissionBrokerClient> client) { |
| 434 DBusThreadManager::Get()->client_bundle_->permission_broker_client_ = | 422 DBusThreadManager::Get()->client_bundle_->permission_broker_client_ = |
| 435 std::move(client); | 423 std::move(client); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 457 std::move(client); | 445 std::move(client); |
| 458 } | 446 } |
| 459 | 447 |
| 460 void DBusThreadManagerSetter::SetUpdateEngineClient( | 448 void DBusThreadManagerSetter::SetUpdateEngineClient( |
| 461 std::unique_ptr<UpdateEngineClient> client) { | 449 std::unique_ptr<UpdateEngineClient> client) { |
| 462 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = | 450 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = |
| 463 std::move(client); | 451 std::move(client); |
| 464 } | 452 } |
| 465 | 453 |
| 466 } // namespace chromeos | 454 } // namespace chromeos |
| OLD | NEW |