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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/chromeos/chromeos_version.h" | 9 #include "base/chromeos/chromeos_version.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.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/bluetooth_adapter_client.h" | 14 #include "chromeos/dbus/bluetooth_adapter_client.h" |
15 #include "chromeos/dbus/bluetooth_device_client.h" | 15 #include "chromeos/dbus/bluetooth_device_client.h" |
16 #include "chromeos/dbus/bluetooth_input_client.h" | 16 #include "chromeos/dbus/bluetooth_input_client.h" |
17 #include "chromeos/dbus/bluetooth_manager_client.h" | 17 #include "chromeos/dbus/bluetooth_manager_client.h" |
18 #include "chromeos/dbus/bluetooth_node_client.h" | 18 #include "chromeos/dbus/bluetooth_node_client.h" |
19 #include "chromeos/dbus/bluetooth_out_of_band_client.h" | 19 #include "chromeos/dbus/bluetooth_out_of_band_client.h" |
20 #include "chromeos/dbus/cros_disks_client.h" | 20 #include "chromeos/dbus/cros_disks_client.h" |
21 #include "chromeos/dbus/cryptohome_client.h" | 21 #include "chromeos/dbus/cryptohome_client.h" |
22 #include "chromeos/dbus/dbus_client_implementation_type.h" | 22 #include "chromeos/dbus/dbus_client_implementation_type.h" |
23 #include "chromeos/dbus/dbus_thread_manager_observer.h" | 23 #include "chromeos/dbus/dbus_thread_manager_observer.h" |
24 #include "chromeos/dbus/debug_daemon_client.h" | 24 #include "chromeos/dbus/debug_daemon_client.h" |
| 25 #include "chromeos/dbus/experimental_bluetooth_adapter_client.h" |
| 26 #include "chromeos/dbus/experimental_bluetooth_agent_manager_client.h" |
| 27 #include "chromeos/dbus/experimental_bluetooth_device_client.h" |
| 28 #include "chromeos/dbus/experimental_bluetooth_profile_manager_client.h" |
25 #include "chromeos/dbus/gsm_sms_client.h" | 29 #include "chromeos/dbus/gsm_sms_client.h" |
26 #include "chromeos/dbus/shill_device_client.h" | 30 #include "chromeos/dbus/shill_device_client.h" |
27 #include "chromeos/dbus/shill_ipconfig_client.h" | 31 #include "chromeos/dbus/shill_ipconfig_client.h" |
28 #include "chromeos/dbus/shill_manager_client.h" | 32 #include "chromeos/dbus/shill_manager_client.h" |
29 #include "chromeos/dbus/shill_profile_client.h" | 33 #include "chromeos/dbus/shill_profile_client.h" |
30 #include "chromeos/dbus/shill_service_client.h" | 34 #include "chromeos/dbus/shill_service_client.h" |
31 #include "chromeos/dbus/system_clock_client.h" | 35 #include "chromeos/dbus/system_clock_client.h" |
32 #include "chromeos/dbus/ibus/ibus_client.h" | 36 #include "chromeos/dbus/ibus/ibus_client.h" |
33 #include "chromeos/dbus/ibus/ibus_config_client.h" | 37 #include "chromeos/dbus/ibus/ibus_config_client.h" |
34 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" | 38 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 client_type_, system_bus_.get(), bluetooth_device_client_.get())); | 99 client_type_, system_bus_.get(), bluetooth_device_client_.get())); |
96 bluetooth_out_of_band_client_.reset(BluetoothOutOfBandClient::Create( | 100 bluetooth_out_of_band_client_.reset(BluetoothOutOfBandClient::Create( |
97 client_type_, system_bus_.get())); | 101 client_type_, system_bus_.get())); |
98 cros_disks_client_.reset( | 102 cros_disks_client_.reset( |
99 CrosDisksClient::Create(client_type_, system_bus_.get())); | 103 CrosDisksClient::Create(client_type_, system_bus_.get())); |
100 cryptohome_client_.reset( | 104 cryptohome_client_.reset( |
101 CryptohomeClient::Create(client_type_, system_bus_.get())); | 105 CryptohomeClient::Create(client_type_, system_bus_.get())); |
102 debug_daemon_client_.reset( | 106 debug_daemon_client_.reset( |
103 DebugDaemonClient::Create(client_type_, system_bus_.get())); | 107 DebugDaemonClient::Create(client_type_, system_bus_.get())); |
104 | 108 |
| 109 experimental_bluetooth_adapter_client_.reset( |
| 110 ExperimentalBluetoothAdapterClient::Create( |
| 111 client_type_, system_bus_.get())); |
| 112 experimental_bluetooth_agent_manager_client_.reset( |
| 113 ExperimentalBluetoothAgentManagerClient::Create( |
| 114 client_type_, system_bus_.get())); |
| 115 experimental_bluetooth_device_client_.reset( |
| 116 ExperimentalBluetoothDeviceClient::Create( |
| 117 client_type_, system_bus_.get())); |
| 118 experimental_bluetooth_profile_manager_client_.reset( |
| 119 ExperimentalBluetoothProfileManagerClient::Create( |
| 120 client_type_, system_bus_.get())); |
| 121 |
105 shill_manager_client_.reset( | 122 shill_manager_client_.reset( |
106 ShillManagerClient::Create(client_type_override_, system_bus_.get())); | 123 ShillManagerClient::Create(client_type_override_, system_bus_.get())); |
107 shill_device_client_.reset( | 124 shill_device_client_.reset( |
108 ShillDeviceClient::Create(client_type_override_, system_bus_.get())); | 125 ShillDeviceClient::Create(client_type_override_, system_bus_.get())); |
109 shill_ipconfig_client_.reset( | 126 shill_ipconfig_client_.reset( |
110 ShillIPConfigClient::Create(client_type_override_, system_bus_.get())); | 127 ShillIPConfigClient::Create(client_type_override_, system_bus_.get())); |
111 shill_profile_client_.reset( | 128 shill_profile_client_.reset( |
112 ShillProfileClient::Create(client_type_override_, system_bus_.get())); | 129 ShillProfileClient::Create(client_type_override_, system_bus_.get())); |
113 shill_service_client_.reset( | 130 shill_service_client_.reset( |
114 ShillServiceClient::Create(client_type_override_, system_bus_.get())); | 131 ShillServiceClient::Create(client_type_override_, system_bus_.get())); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 } | 267 } |
251 | 268 |
252 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE { | 269 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE { |
253 return cryptohome_client_.get(); | 270 return cryptohome_client_.get(); |
254 } | 271 } |
255 | 272 |
256 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE { | 273 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE { |
257 return debug_daemon_client_.get(); | 274 return debug_daemon_client_.get(); |
258 } | 275 } |
259 | 276 |
| 277 virtual ExperimentalBluetoothAdapterClient* |
| 278 GetExperimentalBluetoothAdapterClient() OVERRIDE { |
| 279 return experimental_bluetooth_adapter_client_.get(); |
| 280 } |
| 281 |
| 282 virtual ExperimentalBluetoothAgentManagerClient* |
| 283 GetExperimentalBluetoothAgentManagerClient() OVERRIDE { |
| 284 return experimental_bluetooth_agent_manager_client_.get(); |
| 285 } |
| 286 |
| 287 virtual ExperimentalBluetoothDeviceClient* |
| 288 GetExperimentalBluetoothDeviceClient() OVERRIDE { |
| 289 return experimental_bluetooth_device_client_.get(); |
| 290 } |
| 291 |
| 292 virtual ExperimentalBluetoothProfileManagerClient* |
| 293 GetExperimentalBluetoothProfileManagerClient() OVERRIDE { |
| 294 return experimental_bluetooth_profile_manager_client_.get(); |
| 295 } |
| 296 |
260 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE { | 297 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE { |
261 return shill_device_client_.get(); | 298 return shill_device_client_.get(); |
262 } | 299 } |
263 | 300 |
264 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE { | 301 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE { |
265 return shill_ipconfig_client_.get(); | 302 return shill_ipconfig_client_.get(); |
266 } | 303 } |
267 | 304 |
268 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE { | 305 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE { |
269 return shill_manager_client_.get(); | 306 return shill_manager_client_.get(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 scoped_refptr<dbus::Bus> ibus_bus_; | 415 scoped_refptr<dbus::Bus> ibus_bus_; |
379 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 416 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
380 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | 417 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
381 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | 418 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |
382 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 419 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
383 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; | 420 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; |
384 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_; | 421 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_; |
385 scoped_ptr<CrosDisksClient> cros_disks_client_; | 422 scoped_ptr<CrosDisksClient> cros_disks_client_; |
386 scoped_ptr<CryptohomeClient> cryptohome_client_; | 423 scoped_ptr<CryptohomeClient> cryptohome_client_; |
387 scoped_ptr<DebugDaemonClient> debug_daemon_client_; | 424 scoped_ptr<DebugDaemonClient> debug_daemon_client_; |
| 425 scoped_ptr<ExperimentalBluetoothAdapterClient> |
| 426 experimental_bluetooth_adapter_client_; |
| 427 scoped_ptr<ExperimentalBluetoothAgentManagerClient> |
| 428 experimental_bluetooth_agent_manager_client_; |
| 429 scoped_ptr<ExperimentalBluetoothDeviceClient> |
| 430 experimental_bluetooth_device_client_; |
| 431 scoped_ptr<ExperimentalBluetoothProfileManagerClient> |
| 432 experimental_bluetooth_profile_manager_client_; |
388 scoped_ptr<ShillDeviceClient> shill_device_client_; | 433 scoped_ptr<ShillDeviceClient> shill_device_client_; |
389 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; | 434 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; |
390 scoped_ptr<ShillManagerClient> shill_manager_client_; | 435 scoped_ptr<ShillManagerClient> shill_manager_client_; |
391 scoped_ptr<ShillProfileClient> shill_profile_client_; | 436 scoped_ptr<ShillProfileClient> shill_profile_client_; |
392 scoped_ptr<ShillServiceClient> shill_service_client_; | 437 scoped_ptr<ShillServiceClient> shill_service_client_; |
393 scoped_ptr<GsmSMSClient> gsm_sms_client_; | 438 scoped_ptr<GsmSMSClient> gsm_sms_client_; |
394 scoped_ptr<ImageBurnerClient> image_burner_client_; | 439 scoped_ptr<ImageBurnerClient> image_burner_client_; |
395 scoped_ptr<IntrospectableClient> introspectable_client_; | 440 scoped_ptr<IntrospectableClient> introspectable_client_; |
396 scoped_ptr<ModemMessagingClient> modem_messaging_client_; | 441 scoped_ptr<ModemMessagingClient> modem_messaging_client_; |
397 scoped_ptr<PermissionBrokerClient> permission_broker_client_; | 442 scoped_ptr<PermissionBrokerClient> permission_broker_client_; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 } | 527 } |
483 | 528 |
484 // static | 529 // static |
485 DBusThreadManager* DBusThreadManager::Get() { | 530 DBusThreadManager* DBusThreadManager::Get() { |
486 CHECK(g_dbus_thread_manager) | 531 CHECK(g_dbus_thread_manager) |
487 << "DBusThreadManager::Get() called before Initialize()"; | 532 << "DBusThreadManager::Get() called before Initialize()"; |
488 return g_dbus_thread_manager; | 533 return g_dbus_thread_manager; |
489 } | 534 } |
490 | 535 |
491 } // namespace chromeos | 536 } // namespace chromeos |
OLD | NEW |