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/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.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_device_client.h" | 12 #include "chromeos/dbus/bluetooth_device_client.h" |
13 #include "chromeos/dbus/bluetooth_input_client.h" | 13 #include "chromeos/dbus/bluetooth_input_client.h" |
14 #include "chromeos/dbus/bluetooth_manager_client.h" | 14 #include "chromeos/dbus/bluetooth_manager_client.h" |
15 #include "chromeos/dbus/bluetooth_node_client.h" | 15 #include "chromeos/dbus/bluetooth_node_client.h" |
| 16 #include "chromeos/dbus/bluetooth_out_of_band_client.h" |
16 #include "chromeos/dbus/cashew_client.h" | 17 #include "chromeos/dbus/cashew_client.h" |
17 #include "chromeos/dbus/cros_disks_client.h" | 18 #include "chromeos/dbus/cros_disks_client.h" |
18 #include "chromeos/dbus/cryptohome_client.h" | 19 #include "chromeos/dbus/cryptohome_client.h" |
19 #include "chromeos/dbus/dbus_client_implementation_type.h" | 20 #include "chromeos/dbus/dbus_client_implementation_type.h" |
20 #include "chromeos/dbus/debug_daemon_client.h" | 21 #include "chromeos/dbus/debug_daemon_client.h" |
21 #include "chromeos/dbus/flimflam_device_client.h" | 22 #include "chromeos/dbus/flimflam_device_client.h" |
22 #include "chromeos/dbus/flimflam_ipconfig_client.h" | 23 #include "chromeos/dbus/flimflam_ipconfig_client.h" |
23 #include "chromeos/dbus/flimflam_manager_client.h" | 24 #include "chromeos/dbus/flimflam_manager_client.h" |
24 #include "chromeos/dbus/flimflam_network_client.h" | 25 #include "chromeos/dbus/flimflam_network_client.h" |
25 #include "chromeos/dbus/flimflam_profile_client.h" | 26 #include "chromeos/dbus/flimflam_profile_client.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bluetooth_manager_client_.reset(BluetoothManagerClient::Create( | 69 bluetooth_manager_client_.reset(BluetoothManagerClient::Create( |
69 client_type, system_bus_.get())); | 70 client_type, system_bus_.get())); |
70 bluetooth_adapter_client_.reset(BluetoothAdapterClient::Create( | 71 bluetooth_adapter_client_.reset(BluetoothAdapterClient::Create( |
71 client_type, system_bus_.get(), bluetooth_manager_client_.get())); | 72 client_type, system_bus_.get(), bluetooth_manager_client_.get())); |
72 bluetooth_device_client_.reset(BluetoothDeviceClient::Create( | 73 bluetooth_device_client_.reset(BluetoothDeviceClient::Create( |
73 client_type, system_bus_.get(), bluetooth_adapter_client_.get())); | 74 client_type, system_bus_.get(), bluetooth_adapter_client_.get())); |
74 bluetooth_input_client_.reset(BluetoothInputClient::Create( | 75 bluetooth_input_client_.reset(BluetoothInputClient::Create( |
75 client_type, system_bus_.get(), bluetooth_adapter_client_.get())); | 76 client_type, system_bus_.get(), bluetooth_adapter_client_.get())); |
76 bluetooth_node_client_.reset(BluetoothNodeClient::Create( | 77 bluetooth_node_client_.reset(BluetoothNodeClient::Create( |
77 client_type, system_bus_.get(), bluetooth_device_client_.get())); | 78 client_type, system_bus_.get(), bluetooth_device_client_.get())); |
| 79 bluetooth_out_of_band_client_.reset(BluetoothOutOfBandClient::Create( |
| 80 client_type, system_bus_.get())); |
78 // Create the Cashew client. | 81 // Create the Cashew client. |
79 cashew_client_.reset(CashewClient::Create(client_type, system_bus_.get())); | 82 cashew_client_.reset(CashewClient::Create(client_type, system_bus_.get())); |
80 // Create the cros-disks client. | 83 // Create the cros-disks client. |
81 cros_disks_client_.reset( | 84 cros_disks_client_.reset( |
82 CrosDisksClient::Create(client_type, system_bus_.get())); | 85 CrosDisksClient::Create(client_type, system_bus_.get())); |
83 // Create the Cryptohome client. | 86 // Create the Cryptohome client. |
84 cryptohome_client_.reset( | 87 cryptohome_client_.reset( |
85 CryptohomeClient::Create(client_type, system_bus_.get())); | 88 CryptohomeClient::Create(client_type, system_bus_.get())); |
86 // Create the debugdaemon client. | 89 // Create the debugdaemon client. |
87 debugdaemon_client_.reset( | 90 debugdaemon_client_.reset( |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 virtual BluetoothManagerClient* GetBluetoothManagerClient() OVERRIDE { | 196 virtual BluetoothManagerClient* GetBluetoothManagerClient() OVERRIDE { |
194 return bluetooth_manager_client_.get(); | 197 return bluetooth_manager_client_.get(); |
195 } | 198 } |
196 | 199 |
197 // DBusThreadManager override. | 200 // DBusThreadManager override. |
198 virtual BluetoothNodeClient* GetBluetoothNodeClient() OVERRIDE { | 201 virtual BluetoothNodeClient* GetBluetoothNodeClient() OVERRIDE { |
199 return bluetooth_node_client_.get(); | 202 return bluetooth_node_client_.get(); |
200 } | 203 } |
201 | 204 |
202 // DBusThreadManager override. | 205 // DBusThreadManager override. |
| 206 virtual BluetoothOutOfBandClient* GetBluetoothOutOfBandClient() OVERRIDE { |
| 207 return bluetooth_out_of_band_client_.get(); |
| 208 } |
| 209 |
| 210 // DBusThreadManager override. |
203 virtual CashewClient* GetCashewClient() OVERRIDE { | 211 virtual CashewClient* GetCashewClient() OVERRIDE { |
204 return cashew_client_.get(); | 212 return cashew_client_.get(); |
205 } | 213 } |
206 | 214 |
207 // DBusThreadManager override. | 215 // DBusThreadManager override. |
208 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE { | 216 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE { |
209 return cros_disks_client_.get(); | 217 return cros_disks_client_.get(); |
210 } | 218 } |
211 | 219 |
212 // DBusThreadManager override. | 220 // DBusThreadManager override. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 303 } |
296 | 304 |
297 scoped_ptr<base::Thread> dbus_thread_; | 305 scoped_ptr<base::Thread> dbus_thread_; |
298 scoped_refptr<dbus::Bus> system_bus_; | 306 scoped_refptr<dbus::Bus> system_bus_; |
299 scoped_refptr<dbus::Bus> ibus_bus_; | 307 scoped_refptr<dbus::Bus> ibus_bus_; |
300 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 308 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
301 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | 309 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
302 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | 310 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |
303 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 311 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
304 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; | 312 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; |
| 313 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_; |
305 scoped_ptr<CashewClient> cashew_client_; | 314 scoped_ptr<CashewClient> cashew_client_; |
306 scoped_ptr<CrosDisksClient> cros_disks_client_; | 315 scoped_ptr<CrosDisksClient> cros_disks_client_; |
307 scoped_ptr<CryptohomeClient> cryptohome_client_; | 316 scoped_ptr<CryptohomeClient> cryptohome_client_; |
308 scoped_ptr<DebugDaemonClient> debugdaemon_client_; | 317 scoped_ptr<DebugDaemonClient> debugdaemon_client_; |
309 scoped_ptr<FlimflamDeviceClient> flimflam_device_client_; | 318 scoped_ptr<FlimflamDeviceClient> flimflam_device_client_; |
310 scoped_ptr<FlimflamIPConfigClient> flimflam_ipconfig_client_; | 319 scoped_ptr<FlimflamIPConfigClient> flimflam_ipconfig_client_; |
311 scoped_ptr<FlimflamManagerClient> flimflam_manager_client_; | 320 scoped_ptr<FlimflamManagerClient> flimflam_manager_client_; |
312 scoped_ptr<FlimflamNetworkClient> flimflam_network_client_; | 321 scoped_ptr<FlimflamNetworkClient> flimflam_network_client_; |
313 scoped_ptr<FlimflamProfileClient> flimflam_profile_client_; | 322 scoped_ptr<FlimflamProfileClient> flimflam_profile_client_; |
314 scoped_ptr<FlimflamServiceClient> flimflam_service_client_; | 323 scoped_ptr<FlimflamServiceClient> flimflam_service_client_; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 } | 390 } |
382 | 391 |
383 // static | 392 // static |
384 DBusThreadManager* DBusThreadManager::Get() { | 393 DBusThreadManager* DBusThreadManager::Get() { |
385 CHECK(g_dbus_thread_manager) | 394 CHECK(g_dbus_thread_manager) |
386 << "DBusThreadManager::Get() called before Initialize()"; | 395 << "DBusThreadManager::Get() called before Initialize()"; |
387 return g_dbus_thread_manager; | 396 return g_dbus_thread_manager; |
388 } | 397 } |
389 | 398 |
390 } // namespace chromeos | 399 } // namespace chromeos |
OLD | NEW |