| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
| 11 #include "chromeos/dbus/bluetooth_adapter_client.h" | 11 #include "chromeos/dbus/bluetooth_adapter_client.h" |
| 12 #include "chromeos/dbus/bluetooth_agent_manager_client.h" | 12 #include "chromeos/dbus/bluetooth_agent_manager_client.h" |
| 13 #include "chromeos/dbus/bluetooth_device_client.h" | 13 #include "chromeos/dbus/bluetooth_device_client.h" |
| 14 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" | 14 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" |
| 15 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" | 15 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" |
| 16 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" | 16 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" |
| 17 #include "chromeos/dbus/bluetooth_gatt_service_client.h" | 17 #include "chromeos/dbus/bluetooth_gatt_service_client.h" |
| 18 #include "chromeos/dbus/bluetooth_input_client.h" | 18 #include "chromeos/dbus/bluetooth_input_client.h" |
| 19 #include "chromeos/dbus/bluetooth_profile_manager_client.h" | 19 #include "chromeos/dbus/bluetooth_profile_manager_client.h" |
| 20 #include "chromeos/dbus/console_service_client.h" |
| 20 #include "chromeos/dbus/cras_audio_client.h" | 21 #include "chromeos/dbus/cras_audio_client.h" |
| 21 #include "chromeos/dbus/cros_disks_client.h" | 22 #include "chromeos/dbus/cros_disks_client.h" |
| 22 #include "chromeos/dbus/cryptohome_client.h" | 23 #include "chromeos/dbus/cryptohome_client.h" |
| 23 #include "chromeos/dbus/dbus_client.h" | 24 #include "chromeos/dbus/dbus_client.h" |
| 24 #include "chromeos/dbus/dbus_client_bundle.h" | 25 #include "chromeos/dbus/dbus_client_bundle.h" |
| 25 #include "chromeos/dbus/debug_daemon_client.h" | 26 #include "chromeos/dbus/debug_daemon_client.h" |
| 26 #include "chromeos/dbus/easy_unlock_client.h" | 27 #include "chromeos/dbus/easy_unlock_client.h" |
| 27 #include "chromeos/dbus/gsm_sms_client.h" | 28 #include "chromeos/dbus/gsm_sms_client.h" |
| 28 #include "chromeos/dbus/image_burner_client.h" | 29 #include "chromeos/dbus/image_burner_client.h" |
| 29 #include "chromeos/dbus/introspectable_client.h" | 30 #include "chromeos/dbus/introspectable_client.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 BluetoothProfileManagerClient* | 156 BluetoothProfileManagerClient* |
| 156 DBusThreadManager::GetBluetoothProfileManagerClient() { | 157 DBusThreadManager::GetBluetoothProfileManagerClient() { |
| 157 return client_bundle_->bluetooth_profile_manager_client(); | 158 return client_bundle_->bluetooth_profile_manager_client(); |
| 158 } | 159 } |
| 159 | 160 |
| 160 CrasAudioClient* DBusThreadManager::GetCrasAudioClient() { | 161 CrasAudioClient* DBusThreadManager::GetCrasAudioClient() { |
| 161 return client_bundle_->cras_audio_client(); | 162 return client_bundle_->cras_audio_client(); |
| 162 } | 163 } |
| 163 | 164 |
| 165 ConsoleServiceClient* DBusThreadManager::GetConsoleServiceClient() { |
| 166 return client_bundle_->console_service_client(); |
| 167 } |
| 168 |
| 164 CrosDisksClient* DBusThreadManager::GetCrosDisksClient() { | 169 CrosDisksClient* DBusThreadManager::GetCrosDisksClient() { |
| 165 return client_bundle_->cros_disks_client(); | 170 return client_bundle_->cros_disks_client(); |
| 166 } | 171 } |
| 167 | 172 |
| 168 CryptohomeClient* DBusThreadManager::GetCryptohomeClient() { | 173 CryptohomeClient* DBusThreadManager::GetCryptohomeClient() { |
| 169 return client_bundle_->cryptohome_client(); | 174 return client_bundle_->cryptohome_client(); |
| 170 } | 175 } |
| 171 | 176 |
| 172 DebugDaemonClient* DBusThreadManager::GetDebugDaemonClient() { | 177 DebugDaemonClient* DBusThreadManager::GetDebugDaemonClient() { |
| 173 return client_bundle_->debug_daemon_client(); | 178 return client_bundle_->debug_daemon_client(); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 void DBusThreadManager::InitializeClients() { | 278 void DBusThreadManager::InitializeClients() { |
| 274 GetBluetoothAdapterClient()->Init(GetSystemBus()); | 279 GetBluetoothAdapterClient()->Init(GetSystemBus()); |
| 275 GetBluetoothAgentManagerClient()->Init(GetSystemBus()); | 280 GetBluetoothAgentManagerClient()->Init(GetSystemBus()); |
| 276 GetBluetoothDeviceClient()->Init(GetSystemBus()); | 281 GetBluetoothDeviceClient()->Init(GetSystemBus()); |
| 277 GetBluetoothGattCharacteristicClient()->Init(GetSystemBus()); | 282 GetBluetoothGattCharacteristicClient()->Init(GetSystemBus()); |
| 278 GetBluetoothGattDescriptorClient()->Init(GetSystemBus()); | 283 GetBluetoothGattDescriptorClient()->Init(GetSystemBus()); |
| 279 GetBluetoothGattManagerClient()->Init(GetSystemBus()); | 284 GetBluetoothGattManagerClient()->Init(GetSystemBus()); |
| 280 GetBluetoothGattServiceClient()->Init(GetSystemBus()); | 285 GetBluetoothGattServiceClient()->Init(GetSystemBus()); |
| 281 GetBluetoothInputClient()->Init(GetSystemBus()); | 286 GetBluetoothInputClient()->Init(GetSystemBus()); |
| 282 GetBluetoothProfileManagerClient()->Init(GetSystemBus()); | 287 GetBluetoothProfileManagerClient()->Init(GetSystemBus()); |
| 288 GetConsoleServiceClient()->Init(GetSystemBus()); |
| 283 GetCrasAudioClient()->Init(GetSystemBus()); | 289 GetCrasAudioClient()->Init(GetSystemBus()); |
| 284 GetCrosDisksClient()->Init(GetSystemBus()); | 290 GetCrosDisksClient()->Init(GetSystemBus()); |
| 285 GetCryptohomeClient()->Init(GetSystemBus()); | 291 GetCryptohomeClient()->Init(GetSystemBus()); |
| 286 GetDebugDaemonClient()->Init(GetSystemBus()); | 292 GetDebugDaemonClient()->Init(GetSystemBus()); |
| 287 GetEasyUnlockClient()->Init(GetSystemBus()); | 293 GetEasyUnlockClient()->Init(GetSystemBus()); |
| 288 GetGsmSMSClient()->Init(GetSystemBus()); | 294 GetGsmSMSClient()->Init(GetSystemBus()); |
| 289 GetImageBurnerClient()->Init(GetSystemBus()); | 295 GetImageBurnerClient()->Init(GetSystemBus()); |
| 290 GetIntrospectableClient()->Init(GetSystemBus()); | 296 GetIntrospectableClient()->Init(GetSystemBus()); |
| 291 GetLorgnetteManagerClient()->Init(GetSystemBus()); | 297 GetLorgnetteManagerClient()->Init(GetSystemBus()); |
| 292 GetModemMessagingClient()->Init(GetSystemBus()); | 298 GetModemMessagingClient()->Init(GetSystemBus()); |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 scoped_ptr<BluetoothProfileManagerClient> client) { | 484 scoped_ptr<BluetoothProfileManagerClient> client) { |
| 479 DBusThreadManager::Get()->client_bundle_->bluetooth_profile_manager_client_ = | 485 DBusThreadManager::Get()->client_bundle_->bluetooth_profile_manager_client_ = |
| 480 client.Pass(); | 486 client.Pass(); |
| 481 } | 487 } |
| 482 | 488 |
| 483 void DBusThreadManagerSetter::SetCrasAudioClient( | 489 void DBusThreadManagerSetter::SetCrasAudioClient( |
| 484 scoped_ptr<CrasAudioClient> client) { | 490 scoped_ptr<CrasAudioClient> client) { |
| 485 DBusThreadManager::Get()->client_bundle_->cras_audio_client_ = client.Pass(); | 491 DBusThreadManager::Get()->client_bundle_->cras_audio_client_ = client.Pass(); |
| 486 } | 492 } |
| 487 | 493 |
| 494 void DBusThreadManagerSetter::SetConsoleServiceClient( |
| 495 scoped_ptr<ConsoleServiceClient> client) { |
| 496 DBusThreadManager::Get()->client_bundle_->console_service_client_ = |
| 497 client.Pass(); |
| 498 } |
| 488 void DBusThreadManagerSetter::SetCrosDisksClient( | 499 void DBusThreadManagerSetter::SetCrosDisksClient( |
| 489 scoped_ptr<CrosDisksClient> client) { | 500 scoped_ptr<CrosDisksClient> client) { |
| 490 DBusThreadManager::Get()->client_bundle_->cros_disks_client_ = client.Pass(); | 501 DBusThreadManager::Get()->client_bundle_->cros_disks_client_ = client.Pass(); |
| 491 } | 502 } |
| 492 | 503 |
| 493 void DBusThreadManagerSetter::SetCryptohomeClient( | 504 void DBusThreadManagerSetter::SetCryptohomeClient( |
| 494 scoped_ptr<CryptohomeClient> client) { | 505 scoped_ptr<CryptohomeClient> client) { |
| 495 DBusThreadManager::Get()->client_bundle_->cryptohome_client_ = client.Pass(); | 506 DBusThreadManager::Get()->client_bundle_->cryptohome_client_ = client.Pass(); |
| 496 } | 507 } |
| 497 | 508 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 client.Pass(); | 634 client.Pass(); |
| 624 } | 635 } |
| 625 | 636 |
| 626 void DBusThreadManagerSetter::SetUpdateEngineClient( | 637 void DBusThreadManagerSetter::SetUpdateEngineClient( |
| 627 scoped_ptr<UpdateEngineClient> client) { | 638 scoped_ptr<UpdateEngineClient> client) { |
| 628 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = | 639 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = |
| 629 client.Pass(); | 640 client.Pass(); |
| 630 } | 641 } |
| 631 | 642 |
| 632 } // namespace chromeos | 643 } // namespace chromeos |
| OLD | NEW |