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/cras_audio_client.h" | 20 #include "chromeos/dbus/cras_audio_client.h" |
21 #include "chromeos/dbus/cros_disks_client.h" | 21 #include "chromeos/dbus/cros_disks_client.h" |
22 #include "chromeos/dbus/cryptohome_client.h" | 22 #include "chromeos/dbus/cryptohome_client.h" |
23 #include "chromeos/dbus/dbus_client_implementation_type.h" | 23 #include "chromeos/dbus/dbus_client_implementation_type.h" |
24 #include "chromeos/dbus/dbus_thread_manager_observer.h" | 24 #include "chromeos/dbus/dbus_thread_manager_observer.h" |
25 #include "chromeos/dbus/debug_daemon_client.h" | 25 #include "chromeos/dbus/debug_daemon_client.h" |
26 #include "chromeos/dbus/experimental_bluetooth_adapter_client.h" | 26 #include "chromeos/dbus/experimental_bluetooth_adapter_client.h" |
27 #include "chromeos/dbus/experimental_bluetooth_agent_manager_client.h" | 27 #include "chromeos/dbus/experimental_bluetooth_agent_manager_client.h" |
28 #include "chromeos/dbus/experimental_bluetooth_device_client.h" | 28 #include "chromeos/dbus/experimental_bluetooth_device_client.h" |
| 29 #include "chromeos/dbus/experimental_bluetooth_input_client.h" |
29 #include "chromeos/dbus/experimental_bluetooth_profile_manager_client.h" | 30 #include "chromeos/dbus/experimental_bluetooth_profile_manager_client.h" |
30 #include "chromeos/dbus/gsm_sms_client.h" | 31 #include "chromeos/dbus/gsm_sms_client.h" |
31 #include "chromeos/dbus/shill_device_client.h" | 32 #include "chromeos/dbus/shill_device_client.h" |
32 #include "chromeos/dbus/shill_ipconfig_client.h" | 33 #include "chromeos/dbus/shill_ipconfig_client.h" |
33 #include "chromeos/dbus/shill_manager_client.h" | 34 #include "chromeos/dbus/shill_manager_client.h" |
34 #include "chromeos/dbus/shill_profile_client.h" | 35 #include "chromeos/dbus/shill_profile_client.h" |
35 #include "chromeos/dbus/shill_service_client.h" | 36 #include "chromeos/dbus/shill_service_client.h" |
36 #include "chromeos/dbus/system_clock_client.h" | 37 #include "chromeos/dbus/system_clock_client.h" |
37 #include "chromeos/dbus/ibus/ibus_client.h" | 38 #include "chromeos/dbus/ibus/ibus_client.h" |
38 #include "chromeos/dbus/ibus/ibus_config_client.h" | 39 #include "chromeos/dbus/ibus/ibus_config_client.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 112 |
112 experimental_bluetooth_adapter_client_.reset( | 113 experimental_bluetooth_adapter_client_.reset( |
113 ExperimentalBluetoothAdapterClient::Create( | 114 ExperimentalBluetoothAdapterClient::Create( |
114 client_type_, system_bus_.get())); | 115 client_type_, system_bus_.get())); |
115 experimental_bluetooth_agent_manager_client_.reset( | 116 experimental_bluetooth_agent_manager_client_.reset( |
116 ExperimentalBluetoothAgentManagerClient::Create( | 117 ExperimentalBluetoothAgentManagerClient::Create( |
117 client_type_, system_bus_.get())); | 118 client_type_, system_bus_.get())); |
118 experimental_bluetooth_device_client_.reset( | 119 experimental_bluetooth_device_client_.reset( |
119 ExperimentalBluetoothDeviceClient::Create( | 120 ExperimentalBluetoothDeviceClient::Create( |
120 client_type_, system_bus_.get())); | 121 client_type_, system_bus_.get())); |
| 122 experimental_bluetooth_input_client_.reset( |
| 123 ExperimentalBluetoothInputClient::Create( |
| 124 client_type_, system_bus_.get())); |
121 experimental_bluetooth_profile_manager_client_.reset( | 125 experimental_bluetooth_profile_manager_client_.reset( |
122 ExperimentalBluetoothProfileManagerClient::Create( | 126 ExperimentalBluetoothProfileManagerClient::Create( |
123 client_type_, system_bus_.get())); | 127 client_type_, system_bus_.get())); |
124 | 128 |
125 shill_manager_client_.reset( | 129 shill_manager_client_.reset( |
126 ShillManagerClient::Create(client_type_override_, system_bus_.get())); | 130 ShillManagerClient::Create(client_type_override_, system_bus_.get())); |
127 shill_device_client_.reset( | 131 shill_device_client_.reset( |
128 ShillDeviceClient::Create(client_type_override_, system_bus_.get())); | 132 ShillDeviceClient::Create(client_type_override_, system_bus_.get())); |
129 shill_ipconfig_client_.reset( | 133 shill_ipconfig_client_.reset( |
130 ShillIPConfigClient::Create(client_type_override_, system_bus_.get())); | 134 ShillIPConfigClient::Create(client_type_override_, system_bus_.get())); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 virtual ExperimentalBluetoothAgentManagerClient* | 293 virtual ExperimentalBluetoothAgentManagerClient* |
290 GetExperimentalBluetoothAgentManagerClient() OVERRIDE { | 294 GetExperimentalBluetoothAgentManagerClient() OVERRIDE { |
291 return experimental_bluetooth_agent_manager_client_.get(); | 295 return experimental_bluetooth_agent_manager_client_.get(); |
292 } | 296 } |
293 | 297 |
294 virtual ExperimentalBluetoothDeviceClient* | 298 virtual ExperimentalBluetoothDeviceClient* |
295 GetExperimentalBluetoothDeviceClient() OVERRIDE { | 299 GetExperimentalBluetoothDeviceClient() OVERRIDE { |
296 return experimental_bluetooth_device_client_.get(); | 300 return experimental_bluetooth_device_client_.get(); |
297 } | 301 } |
298 | 302 |
| 303 virtual ExperimentalBluetoothInputClient* |
| 304 GetExperimentalBluetoothInputClient() OVERRIDE { |
| 305 return experimental_bluetooth_input_client_.get(); |
| 306 } |
| 307 |
299 virtual ExperimentalBluetoothProfileManagerClient* | 308 virtual ExperimentalBluetoothProfileManagerClient* |
300 GetExperimentalBluetoothProfileManagerClient() OVERRIDE { | 309 GetExperimentalBluetoothProfileManagerClient() OVERRIDE { |
301 return experimental_bluetooth_profile_manager_client_.get(); | 310 return experimental_bluetooth_profile_manager_client_.get(); |
302 } | 311 } |
303 | 312 |
304 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE { | 313 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE { |
305 return shill_device_client_.get(); | 314 return shill_device_client_.get(); |
306 } | 315 } |
307 | 316 |
308 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE { | 317 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 scoped_ptr<CrasAudioClient> cras_audio_client_; | 438 scoped_ptr<CrasAudioClient> cras_audio_client_; |
430 scoped_ptr<CrosDisksClient> cros_disks_client_; | 439 scoped_ptr<CrosDisksClient> cros_disks_client_; |
431 scoped_ptr<CryptohomeClient> cryptohome_client_; | 440 scoped_ptr<CryptohomeClient> cryptohome_client_; |
432 scoped_ptr<DebugDaemonClient> debug_daemon_client_; | 441 scoped_ptr<DebugDaemonClient> debug_daemon_client_; |
433 scoped_ptr<ExperimentalBluetoothAdapterClient> | 442 scoped_ptr<ExperimentalBluetoothAdapterClient> |
434 experimental_bluetooth_adapter_client_; | 443 experimental_bluetooth_adapter_client_; |
435 scoped_ptr<ExperimentalBluetoothAgentManagerClient> | 444 scoped_ptr<ExperimentalBluetoothAgentManagerClient> |
436 experimental_bluetooth_agent_manager_client_; | 445 experimental_bluetooth_agent_manager_client_; |
437 scoped_ptr<ExperimentalBluetoothDeviceClient> | 446 scoped_ptr<ExperimentalBluetoothDeviceClient> |
438 experimental_bluetooth_device_client_; | 447 experimental_bluetooth_device_client_; |
| 448 scoped_ptr<ExperimentalBluetoothInputClient> |
| 449 experimental_bluetooth_input_client_; |
439 scoped_ptr<ExperimentalBluetoothProfileManagerClient> | 450 scoped_ptr<ExperimentalBluetoothProfileManagerClient> |
440 experimental_bluetooth_profile_manager_client_; | 451 experimental_bluetooth_profile_manager_client_; |
441 scoped_ptr<ShillDeviceClient> shill_device_client_; | 452 scoped_ptr<ShillDeviceClient> shill_device_client_; |
442 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; | 453 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; |
443 scoped_ptr<ShillManagerClient> shill_manager_client_; | 454 scoped_ptr<ShillManagerClient> shill_manager_client_; |
444 scoped_ptr<ShillProfileClient> shill_profile_client_; | 455 scoped_ptr<ShillProfileClient> shill_profile_client_; |
445 scoped_ptr<ShillServiceClient> shill_service_client_; | 456 scoped_ptr<ShillServiceClient> shill_service_client_; |
446 scoped_ptr<GsmSMSClient> gsm_sms_client_; | 457 scoped_ptr<GsmSMSClient> gsm_sms_client_; |
447 scoped_ptr<ImageBurnerClient> image_burner_client_; | 458 scoped_ptr<ImageBurnerClient> image_burner_client_; |
448 scoped_ptr<IntrospectableClient> introspectable_client_; | 459 scoped_ptr<IntrospectableClient> introspectable_client_; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 558 } |
548 | 559 |
549 // static | 560 // static |
550 DBusThreadManager* DBusThreadManager::Get() { | 561 DBusThreadManager* DBusThreadManager::Get() { |
551 CHECK(g_dbus_thread_manager) | 562 CHECK(g_dbus_thread_manager) |
552 << "DBusThreadManager::Get() called before Initialize()"; | 563 << "DBusThreadManager::Get() called before Initialize()"; |
553 return g_dbus_thread_manager; | 564 return g_dbus_thread_manager; |
554 } | 565 } |
555 | 566 |
556 } // namespace chromeos | 567 } // namespace chromeos |
OLD | NEW |