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/cups_client.h" |
18 #include "chromeos/dbus/dbus_client.h" | 19 #include "chromeos/dbus/dbus_client.h" |
19 #include "chromeos/dbus/debug_daemon_client.h" | 20 #include "chromeos/dbus/debug_daemon_client.h" |
20 #include "chromeos/dbus/easy_unlock_client.h" | 21 #include "chromeos/dbus/easy_unlock_client.h" |
21 #include "chromeos/dbus/gsm_sms_client.h" | 22 #include "chromeos/dbus/gsm_sms_client.h" |
22 #include "chromeos/dbus/image_burner_client.h" | 23 #include "chromeos/dbus/image_burner_client.h" |
23 #include "chromeos/dbus/lorgnette_manager_client.h" | 24 #include "chromeos/dbus/lorgnette_manager_client.h" |
24 #include "chromeos/dbus/modem_messaging_client.h" | 25 #include "chromeos/dbus/modem_messaging_client.h" |
25 #include "chromeos/dbus/permission_broker_client.h" | 26 #include "chromeos/dbus/permission_broker_client.h" |
26 #include "chromeos/dbus/power_manager_client.h" | 27 #include "chromeos/dbus/power_manager_client.h" |
27 #include "chromeos/dbus/session_manager_client.h" | 28 #include "chromeos/dbus/session_manager_client.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 107 } |
107 | 108 |
108 CrosDisksClient* DBusThreadManager::GetCrosDisksClient() { | 109 CrosDisksClient* DBusThreadManager::GetCrosDisksClient() { |
109 return client_bundle_->cros_disks_client(); | 110 return client_bundle_->cros_disks_client(); |
110 } | 111 } |
111 | 112 |
112 CryptohomeClient* DBusThreadManager::GetCryptohomeClient() { | 113 CryptohomeClient* DBusThreadManager::GetCryptohomeClient() { |
113 return client_bundle_->cryptohome_client(); | 114 return client_bundle_->cryptohome_client(); |
114 } | 115 } |
115 | 116 |
| 117 CupsClient* DBusThreadManager::GetCupsClient() { |
| 118 return client_bundle_->cups_client(); |
| 119 } |
| 120 |
116 DebugDaemonClient* DBusThreadManager::GetDebugDaemonClient() { | 121 DebugDaemonClient* DBusThreadManager::GetDebugDaemonClient() { |
117 return client_bundle_->debug_daemon_client(); | 122 return client_bundle_->debug_daemon_client(); |
118 } | 123 } |
119 | 124 |
120 EasyUnlockClient* DBusThreadManager::GetEasyUnlockClient() { | 125 EasyUnlockClient* DBusThreadManager::GetEasyUnlockClient() { |
121 return client_bundle_->easy_unlock_client(); | 126 return client_bundle_->easy_unlock_client(); |
122 } | 127 } |
123 | 128 |
124 LorgnetteManagerClient* | 129 LorgnetteManagerClient* |
125 DBusThreadManager::GetLorgnetteManagerClient() { | 130 DBusThreadManager::GetLorgnetteManagerClient() { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 195 |
191 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() { | 196 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() { |
192 return client_bundle_->update_engine_client(); | 197 return client_bundle_->update_engine_client(); |
193 } | 198 } |
194 | 199 |
195 void DBusThreadManager::InitializeClients() { | 200 void DBusThreadManager::InitializeClients() { |
196 GetArcObbMounterClient()->Init(GetSystemBus()); | 201 GetArcObbMounterClient()->Init(GetSystemBus()); |
197 GetCrasAudioClient()->Init(GetSystemBus()); | 202 GetCrasAudioClient()->Init(GetSystemBus()); |
198 GetCrosDisksClient()->Init(GetSystemBus()); | 203 GetCrosDisksClient()->Init(GetSystemBus()); |
199 GetCryptohomeClient()->Init(GetSystemBus()); | 204 GetCryptohomeClient()->Init(GetSystemBus()); |
| 205 GetCupsClient()->Init(GetSystemBus()); |
200 GetDebugDaemonClient()->Init(GetSystemBus()); | 206 GetDebugDaemonClient()->Init(GetSystemBus()); |
201 GetEasyUnlockClient()->Init(GetSystemBus()); | 207 GetEasyUnlockClient()->Init(GetSystemBus()); |
202 GetGsmSMSClient()->Init(GetSystemBus()); | 208 GetGsmSMSClient()->Init(GetSystemBus()); |
203 GetImageBurnerClient()->Init(GetSystemBus()); | 209 GetImageBurnerClient()->Init(GetSystemBus()); |
204 GetLorgnetteManagerClient()->Init(GetSystemBus()); | 210 GetLorgnetteManagerClient()->Init(GetSystemBus()); |
205 GetModemMessagingClient()->Init(GetSystemBus()); | 211 GetModemMessagingClient()->Init(GetSystemBus()); |
206 GetPermissionBrokerClient()->Init(GetSystemBus()); | 212 GetPermissionBrokerClient()->Init(GetSystemBus()); |
207 GetPowerManagerClient()->Init(GetSystemBus()); | 213 GetPowerManagerClient()->Init(GetSystemBus()); |
208 GetSessionManagerClient()->Init(GetSystemBus()); | 214 GetSessionManagerClient()->Init(GetSystemBus()); |
209 GetShillDeviceClient()->Init(GetSystemBus()); | 215 GetShillDeviceClient()->Init(GetSystemBus()); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 DBusThreadManager::Get()->client_bundle_->cros_disks_client_ = | 344 DBusThreadManager::Get()->client_bundle_->cros_disks_client_ = |
339 std::move(client); | 345 std::move(client); |
340 } | 346 } |
341 | 347 |
342 void DBusThreadManagerSetter::SetCryptohomeClient( | 348 void DBusThreadManagerSetter::SetCryptohomeClient( |
343 std::unique_ptr<CryptohomeClient> client) { | 349 std::unique_ptr<CryptohomeClient> client) { |
344 DBusThreadManager::Get()->client_bundle_->cryptohome_client_ = | 350 DBusThreadManager::Get()->client_bundle_->cryptohome_client_ = |
345 std::move(client); | 351 std::move(client); |
346 } | 352 } |
347 | 353 |
| 354 void DBusThreadManagerSetter::SetCupsClient( |
| 355 std::unique_ptr<CupsClient> client) { |
| 356 DBusThreadManager::Get()->client_bundle_->cups_client_ = std::move(client); |
| 357 } |
| 358 |
348 void DBusThreadManagerSetter::SetDebugDaemonClient( | 359 void DBusThreadManagerSetter::SetDebugDaemonClient( |
349 std::unique_ptr<DebugDaemonClient> client) { | 360 std::unique_ptr<DebugDaemonClient> client) { |
350 DBusThreadManager::Get()->client_bundle_->debug_daemon_client_ = | 361 DBusThreadManager::Get()->client_bundle_->debug_daemon_client_ = |
351 std::move(client); | 362 std::move(client); |
352 } | 363 } |
353 | 364 |
354 void DBusThreadManagerSetter::SetEasyUnlockClient( | 365 void DBusThreadManagerSetter::SetEasyUnlockClient( |
355 std::unique_ptr<EasyUnlockClient> client) { | 366 std::unique_ptr<EasyUnlockClient> client) { |
356 DBusThreadManager::Get()->client_bundle_->easy_unlock_client_ = | 367 DBusThreadManager::Get()->client_bundle_->easy_unlock_client_ = |
357 std::move(client); | 368 std::move(client); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 std::move(client); | 456 std::move(client); |
446 } | 457 } |
447 | 458 |
448 void DBusThreadManagerSetter::SetUpdateEngineClient( | 459 void DBusThreadManagerSetter::SetUpdateEngineClient( |
449 std::unique_ptr<UpdateEngineClient> client) { | 460 std::unique_ptr<UpdateEngineClient> client) { |
450 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = | 461 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = |
451 std::move(client); | 462 std::move(client); |
452 } | 463 } |
453 | 464 |
454 } // namespace chromeos | 465 } // namespace chromeos |
OLD | NEW |