| 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 "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 5 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 6 | 6 |
| 7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
| 8 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" | 8 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" |
| 9 #include "chrome/browser/chromeos/dbus/bluetooth_device_client.h" | 9 #include "chrome/browser/chromeos/dbus/bluetooth_device_client.h" |
| 10 #include "chrome/browser/chromeos/dbus/bluetooth_input_client.h" | 10 #include "chrome/browser/chromeos/dbus/bluetooth_input_client.h" |
| 11 #include "chrome/browser/chromeos/dbus/bluetooth_manager_client.h" | 11 #include "chrome/browser/chromeos/dbus/bluetooth_manager_client.h" |
| 12 #include "chrome/browser/chromeos/dbus/bluetooth_node_client.h" | 12 #include "chrome/browser/chromeos/dbus/bluetooth_node_client.h" |
| 13 #include "chrome/browser/chromeos/dbus/cashew_client.h" | 13 #include "chrome/browser/chromeos/dbus/cashew_client.h" |
| 14 #include "chrome/browser/chromeos/dbus/cros_disks_client.h" | 14 #include "chrome/browser/chromeos/dbus/cros_disks_client.h" |
| 15 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" | 15 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" |
| 16 #include "chrome/browser/chromeos/dbus/flimflam_ipconfig_client.h" |
| 16 #include "chrome/browser/chromeos/dbus/flimflam_network_client.h" | 17 #include "chrome/browser/chromeos/dbus/flimflam_network_client.h" |
| 17 #include "chrome/browser/chromeos/dbus/image_burner_client.h" | 18 #include "chrome/browser/chromeos/dbus/image_burner_client.h" |
| 18 #include "chrome/browser/chromeos/dbus/introspectable_client.h" | 19 #include "chrome/browser/chromeos/dbus/introspectable_client.h" |
| 19 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 20 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 20 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 21 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
| 21 #include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h" | 22 #include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h" |
| 22 #include "chrome/browser/chromeos/dbus/update_engine_client.h" | 23 #include "chrome/browser/chromeos/dbus/update_engine_client.h" |
| 23 #include "dbus/bus.h" | 24 #include "dbus/bus.h" |
| 24 | 25 |
| 25 namespace chromeos { | 26 namespace chromeos { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 56 bluetooth_node_client_.reset(BluetoothNodeClient::Create( | 57 bluetooth_node_client_.reset(BluetoothNodeClient::Create( |
| 57 system_bus_.get(), bluetooth_device_client_.get())); | 58 system_bus_.get(), bluetooth_device_client_.get())); |
| 58 // Create the Cashew client. | 59 // Create the Cashew client. |
| 59 cashew_client_.reset(CashewClient::Create(system_bus_.get())); | 60 cashew_client_.reset(CashewClient::Create(system_bus_.get())); |
| 60 // Create the cros-disks client. | 61 // Create the cros-disks client. |
| 61 cros_disks_client_.reset( | 62 cros_disks_client_.reset( |
| 62 CrosDisksClient::Create(system_bus_.get())); | 63 CrosDisksClient::Create(system_bus_.get())); |
| 63 // Create the Cryptohome client. | 64 // Create the Cryptohome client. |
| 64 cryptohome_client_.reset( | 65 cryptohome_client_.reset( |
| 65 CryptohomeClient::Create(system_bus_.get())); | 66 CryptohomeClient::Create(system_bus_.get())); |
| 67 // Create the Flimflam IPConfig client. |
| 68 flimflam_ipconfig_client_.reset( |
| 69 FlimflamIPConfigClient::Create(system_bus_.get())); |
| 66 // Create the Flimflam Network client. | 70 // Create the Flimflam Network client. |
| 67 flimflam_network_client_.reset( | 71 flimflam_network_client_.reset( |
| 68 FlimflamNetworkClient::Create(system_bus_.get())); | 72 FlimflamNetworkClient::Create(system_bus_.get())); |
| 69 // Create the image burner client. | 73 // Create the image burner client. |
| 70 image_burner_client_.reset(ImageBurnerClient::Create(system_bus_.get())); | 74 image_burner_client_.reset(ImageBurnerClient::Create(system_bus_.get())); |
| 71 // Create the introspectable object client. | 75 // Create the introspectable object client. |
| 72 introspectable_client_.reset( | 76 introspectable_client_.reset( |
| 73 IntrospectableClient::Create(system_bus_.get())); | 77 IntrospectableClient::Create(system_bus_.get())); |
| 74 // Create the power manager client. | 78 // Create the power manager client. |
| 75 power_manager_client_.reset(PowerManagerClient::Create(system_bus_.get())); | 79 power_manager_client_.reset(PowerManagerClient::Create(system_bus_.get())); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE { | 136 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE { |
| 133 return cros_disks_client_.get(); | 137 return cros_disks_client_.get(); |
| 134 } | 138 } |
| 135 | 139 |
| 136 // DBusThreadManager override. | 140 // DBusThreadManager override. |
| 137 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE { | 141 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE { |
| 138 return cryptohome_client_.get(); | 142 return cryptohome_client_.get(); |
| 139 } | 143 } |
| 140 | 144 |
| 141 // DBusThreadManager override. | 145 // DBusThreadManager override. |
| 146 virtual FlimflamIPConfigClient* GetFlimflamIPConfigClient() OVERRIDE { |
| 147 return flimflam_ipconfig_client_.get(); |
| 148 } |
| 149 |
| 142 virtual FlimflamNetworkClient* GetFlimflamNetworkClient() OVERRIDE { | 150 virtual FlimflamNetworkClient* GetFlimflamNetworkClient() OVERRIDE { |
| 143 return flimflam_network_client_.get(); | 151 return flimflam_network_client_.get(); |
| 144 } | 152 } |
| 145 | 153 |
| 146 // DBusThreadManager override. | 154 // DBusThreadManager override. |
| 147 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE { | 155 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE { |
| 148 return image_burner_client_.get(); | 156 return image_burner_client_.get(); |
| 149 } | 157 } |
| 150 | 158 |
| 151 // DBusThreadManager override. | 159 // DBusThreadManager override. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 176 scoped_ptr<base::Thread> dbus_thread_; | 184 scoped_ptr<base::Thread> dbus_thread_; |
| 177 scoped_refptr<dbus::Bus> system_bus_; | 185 scoped_refptr<dbus::Bus> system_bus_; |
| 178 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 186 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
| 179 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | 187 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
| 180 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | 188 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |
| 181 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 189 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
| 182 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; | 190 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; |
| 183 scoped_ptr<CashewClient> cashew_client_; | 191 scoped_ptr<CashewClient> cashew_client_; |
| 184 scoped_ptr<CrosDisksClient> cros_disks_client_; | 192 scoped_ptr<CrosDisksClient> cros_disks_client_; |
| 185 scoped_ptr<CryptohomeClient> cryptohome_client_; | 193 scoped_ptr<CryptohomeClient> cryptohome_client_; |
| 194 scoped_ptr<FlimflamIPConfigClient> flimflam_ipconfig_client_; |
| 186 scoped_ptr<FlimflamNetworkClient> flimflam_network_client_; | 195 scoped_ptr<FlimflamNetworkClient> flimflam_network_client_; |
| 187 scoped_ptr<ImageBurnerClient> image_burner_client_; | 196 scoped_ptr<ImageBurnerClient> image_burner_client_; |
| 188 scoped_ptr<IntrospectableClient> introspectable_client_; | 197 scoped_ptr<IntrospectableClient> introspectable_client_; |
| 189 scoped_ptr<PowerManagerClient> power_manager_client_; | 198 scoped_ptr<PowerManagerClient> power_manager_client_; |
| 190 scoped_ptr<SessionManagerClient> session_manager_client_; | 199 scoped_ptr<SessionManagerClient> session_manager_client_; |
| 191 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; | 200 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; |
| 192 scoped_ptr<UpdateEngineClient> update_engine_client_; | 201 scoped_ptr<UpdateEngineClient> update_engine_client_; |
| 193 }; | 202 }; |
| 194 | 203 |
| 195 // static | 204 // static |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 241 } |
| 233 | 242 |
| 234 // static | 243 // static |
| 235 DBusThreadManager* DBusThreadManager::Get() { | 244 DBusThreadManager* DBusThreadManager::Get() { |
| 236 CHECK(g_dbus_thread_manager) | 245 CHECK(g_dbus_thread_manager) |
| 237 << "DBusThreadManager::Get() called before Initialize()"; | 246 << "DBusThreadManager::Get() called before Initialize()"; |
| 238 return g_dbus_thread_manager; | 247 return g_dbus_thread_manager; |
| 239 } | 248 } |
| 240 | 249 |
| 241 } // namespace chromeos | 250 } // namespace chromeos |
| OLD | NEW |