| 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/fake_dbus_thread_manager.h" | 5 #include "chromeos/dbus/fake_dbus_thread_manager.h" |
| 6 | 6 |
| 7 #include "chromeos/dbus/bluetooth_adapter_client.h" |
| 8 #include "chromeos/dbus/bluetooth_agent_manager_client.h" |
| 9 #include "chromeos/dbus/bluetooth_device_client.h" |
| 10 #include "chromeos/dbus/bluetooth_input_client.h" |
| 11 #include "chromeos/dbus/bluetooth_profile_manager_client.h" |
| 12 #include "chromeos/dbus/cras_audio_client.h" |
| 13 #include "chromeos/dbus/cros_disks_client.h" |
| 14 #include "chromeos/dbus/cryptohome_client.h" |
| 15 #include "chromeos/dbus/dbus_client.h" |
| 16 #include "chromeos/dbus/dbus_thread_manager.h" |
| 7 #include "chromeos/dbus/dbus_thread_manager_observer.h" | 17 #include "chromeos/dbus/dbus_thread_manager_observer.h" |
| 8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 18 #include "chromeos/dbus/debug_daemon_client.h" |
| 9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 19 #include "chromeos/dbus/gsm_sms_client.h" |
| 10 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 20 #include "chromeos/dbus/ibus/ibus_client.h" |
| 11 #include "chromeos/dbus/fake_bluetooth_input_client.h" | 21 #include "chromeos/dbus/image_burner_client.h" |
| 12 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" | 22 #include "chromeos/dbus/introspectable_client.h" |
| 13 #include "chromeos/dbus/fake_cros_disks_client.h" | 23 #include "chromeos/dbus/modem_messaging_client.h" |
| 14 #include "chromeos/dbus/fake_cryptohome_client.h" | 24 #include "chromeos/dbus/nfc_adapter_client.h" |
| 15 #include "chromeos/dbus/fake_gsm_sms_client.h" | 25 #include "chromeos/dbus/nfc_device_client.h" |
| 16 #include "chromeos/dbus/fake_image_burner_client.h" | 26 #include "chromeos/dbus/nfc_manager_client.h" |
| 17 #include "chromeos/dbus/fake_nfc_adapter_client.h" | 27 #include "chromeos/dbus/nfc_tag_client.h" |
| 18 #include "chromeos/dbus/fake_nfc_device_client.h" | 28 #include "chromeos/dbus/permission_broker_client.h" |
| 19 #include "chromeos/dbus/fake_nfc_manager_client.h" | 29 #include "chromeos/dbus/power_manager_client.h" |
| 20 #include "chromeos/dbus/fake_nfc_tag_client.h" | |
| 21 #include "chromeos/dbus/fake_power_manager_client.h" | |
| 22 #include "chromeos/dbus/fake_session_manager_client.h" | |
| 23 #include "chromeos/dbus/fake_shill_device_client.h" | |
| 24 #include "chromeos/dbus/fake_shill_manager_client.h" | |
| 25 #include "chromeos/dbus/fake_system_clock_client.h" | |
| 26 #include "chromeos/dbus/fake_update_engine_client.h" | |
| 27 #include "chromeos/dbus/ibus/mock_ibus_client.h" | |
| 28 #include "chromeos/dbus/power_policy_controller.h" | 30 #include "chromeos/dbus/power_policy_controller.h" |
| 31 #include "chromeos/dbus/session_manager_client.h" |
| 32 #include "chromeos/dbus/shill_device_client.h" |
| 33 #include "chromeos/dbus/shill_ipconfig_client.h" |
| 34 #include "chromeos/dbus/shill_manager_client.h" |
| 35 #include "chromeos/dbus/shill_profile_client.h" |
| 36 #include "chromeos/dbus/shill_service_client.h" |
| 37 #include "chromeos/dbus/sms_client.h" |
| 38 #include "chromeos/dbus/system_clock_client.h" |
| 39 #include "chromeos/dbus/update_engine_client.h" |
| 29 | 40 |
| 30 namespace chromeos { | 41 namespace chromeos { |
| 31 | 42 |
| 32 FakeDBusThreadManager::FakeDBusThreadManager() | 43 FakeDBusThreadManager::FakeDBusThreadManager() { |
| 33 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient()), | |
| 34 fake_bluetooth_agent_manager_client_(new FakeBluetoothAgentManagerClient()), | |
| 35 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient()), | |
| 36 fake_bluetooth_input_client_(new FakeBluetoothInputClient()), | |
| 37 fake_bluetooth_profile_manager_client_( | |
| 38 new FakeBluetoothProfileManagerClient()), | |
| 39 fake_cros_disks_client_(new FakeCrosDisksClient), | |
| 40 fake_cryptohome_client_(new FakeCryptohomeClient), | |
| 41 fake_gsm_sms_client_(new FakeGsmSMSClient), | |
| 42 fake_image_burner_client_(new FakeImageBurnerClient), | |
| 43 fake_nfc_adapter_client_(new FakeNfcAdapterClient()), | |
| 44 fake_nfc_device_client_(new FakeNfcDeviceClient()), | |
| 45 fake_nfc_manager_client_(new FakeNfcManagerClient()), | |
| 46 fake_nfc_tag_client_(new FakeNfcTagClient()), | |
| 47 fake_session_manager_client_(new FakeSessionManagerClient), | |
| 48 fake_shill_device_client_(new FakeShillDeviceClient), | |
| 49 fake_shill_manager_client_(new FakeShillManagerClient), | |
| 50 fake_system_clock_client_(new FakeSystemClockClient), | |
| 51 fake_power_manager_client_(new FakePowerManagerClient), | |
| 52 fake_update_engine_client_(new FakeUpdateEngineClient), | |
| 53 ibus_bus_(NULL) { | |
| 54 power_policy_controller_.reset( | |
| 55 new PowerPolicyController(this, fake_power_manager_client_.get())); | |
| 56 } | 44 } |
| 57 | 45 |
| 58 FakeDBusThreadManager::~FakeDBusThreadManager() { | 46 FakeDBusThreadManager::~FakeDBusThreadManager() { |
| 59 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, | 47 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, |
| 60 OnDBusThreadManagerDestroying(this)); | 48 OnDBusThreadManagerDestroying(this)); |
| 61 } | 49 } |
| 62 | 50 |
| 51 void FakeDBusThreadManager::SetFakeClients() { |
| 52 const DBusClientImplementationType client_type = |
| 53 STUB_DBUS_CLIENT_IMPLEMENTATION; |
| 54 SetBluetoothAdapterClient(scoped_ptr<BluetoothAdapterClient>( |
| 55 BluetoothAdapterClient::Create(client_type))); |
| 56 SetBluetoothAgentManagerClient(scoped_ptr<BluetoothAgentManagerClient>( |
| 57 BluetoothAgentManagerClient::Create(client_type))); |
| 58 SetBluetoothDeviceClient(scoped_ptr<BluetoothDeviceClient>( |
| 59 BluetoothDeviceClient::Create(client_type))); |
| 60 SetBluetoothInputClient(scoped_ptr<BluetoothInputClient>( |
| 61 BluetoothInputClient::Create(client_type))); |
| 62 SetBluetoothProfileManagerClient(scoped_ptr<BluetoothProfileManagerClient>( |
| 63 BluetoothProfileManagerClient::Create(client_type))); |
| 64 SetCrasAudioClient( |
| 65 scoped_ptr<CrasAudioClient>(CrasAudioClient::Create(client_type))); |
| 66 SetCrosDisksClient( |
| 67 scoped_ptr<CrosDisksClient>(CrosDisksClient::Create(client_type))); |
| 68 SetCryptohomeClient( |
| 69 scoped_ptr<CryptohomeClient>(CryptohomeClient::Create(client_type))); |
| 70 SetDebugDaemonClient( |
| 71 scoped_ptr<DebugDaemonClient>(DebugDaemonClient::Create(client_type))); |
| 72 SetShillManagerClient( |
| 73 scoped_ptr<ShillManagerClient>(ShillManagerClient::Create(client_type))); |
| 74 SetShillDeviceClient( |
| 75 scoped_ptr<ShillDeviceClient>(ShillDeviceClient::Create(client_type))); |
| 76 SetShillIPConfigClient(scoped_ptr<ShillIPConfigClient>( |
| 77 ShillIPConfigClient::Create(client_type))); |
| 78 SetShillServiceClient( |
| 79 scoped_ptr<ShillServiceClient>(ShillServiceClient::Create(client_type))); |
| 80 SetShillProfileClient( |
| 81 scoped_ptr<ShillProfileClient>(ShillProfileClient::Create(client_type))); |
| 82 SetGsmSMSClient(scoped_ptr<GsmSMSClient>(GsmSMSClient::Create(client_type))); |
| 83 SetImageBurnerClient( |
| 84 scoped_ptr<ImageBurnerClient>(ImageBurnerClient::Create(client_type))); |
| 85 SetIntrospectableClient(scoped_ptr<IntrospectableClient>( |
| 86 IntrospectableClient::Create(client_type))); |
| 87 SetModemMessagingClient(scoped_ptr<ModemMessagingClient>( |
| 88 ModemMessagingClient::Create(client_type))); |
| 89 NfcManagerClient* nfc_manager_client = NfcManagerClient::Create(client_type); |
| 90 SetNfcManagerClient(scoped_ptr<NfcManagerClient>(nfc_manager_client)); |
| 91 SetNfcAdapterClient(scoped_ptr<NfcAdapterClient>( |
| 92 NfcAdapterClient::Create(client_type, nfc_manager_client))); |
| 93 SetPermissionBrokerClient(scoped_ptr<PermissionBrokerClient>( |
| 94 PermissionBrokerClient::Create(client_type))); |
| 95 SetPowerManagerClient( |
| 96 scoped_ptr<PowerManagerClient>(PowerManagerClient::Create(client_type))); |
| 97 SetSessionManagerClient(scoped_ptr<SessionManagerClient>( |
| 98 SessionManagerClient::Create(client_type))); |
| 99 SetSMSClient(scoped_ptr<SMSClient>(SMSClient::Create(client_type))); |
| 100 SetSystemClockClient( |
| 101 scoped_ptr<SystemClockClient>(SystemClockClient::Create(client_type))); |
| 102 SetUpdateEngineClient( |
| 103 scoped_ptr<UpdateEngineClient>(UpdateEngineClient::Create(client_type))); |
| 104 |
| 105 SetPowerPolicyController(make_scoped_ptr(new PowerPolicyController)); |
| 106 } |
| 107 |
| 108 void FakeDBusThreadManager::SetBluetoothAdapterClient( |
| 109 scoped_ptr<BluetoothAdapterClient> client) { |
| 110 bluetooth_adapter_client_ = client.Pass(); |
| 111 } |
| 112 |
| 113 void FakeDBusThreadManager::SetBluetoothAgentManagerClient( |
| 114 scoped_ptr<BluetoothAgentManagerClient> client) { |
| 115 bluetooth_agent_manager_client_ = client.Pass(); |
| 116 } |
| 117 |
| 118 void FakeDBusThreadManager::SetBluetoothDeviceClient( |
| 119 scoped_ptr<BluetoothDeviceClient> client) { |
| 120 bluetooth_device_client_ = client.Pass(); |
| 121 } |
| 122 |
| 123 void FakeDBusThreadManager::SetBluetoothInputClient( |
| 124 scoped_ptr<BluetoothInputClient> client) { |
| 125 bluetooth_input_client_ = client.Pass(); |
| 126 } |
| 127 |
| 128 void FakeDBusThreadManager::SetBluetoothProfileManagerClient( |
| 129 scoped_ptr<BluetoothProfileManagerClient> client) { |
| 130 bluetooth_profile_manager_client_ = client.Pass(); |
| 131 } |
| 132 |
| 133 void FakeDBusThreadManager::SetCrasAudioClient( |
| 134 scoped_ptr<CrasAudioClient> client) { |
| 135 cras_audio_client_ = client.Pass(); |
| 136 } |
| 137 |
| 138 void FakeDBusThreadManager::SetCrosDisksClient( |
| 139 scoped_ptr<CrosDisksClient> client) { |
| 140 cros_disks_client_ = client.Pass(); |
| 141 } |
| 142 |
| 143 void FakeDBusThreadManager::SetCryptohomeClient( |
| 144 scoped_ptr<CryptohomeClient> client) { |
| 145 cryptohome_client_ = client.Pass(); |
| 146 } |
| 147 |
| 148 void FakeDBusThreadManager::SetDebugDaemonClient( |
| 149 scoped_ptr<DebugDaemonClient> client) { |
| 150 debug_daemon_client_ = client.Pass(); |
| 151 } |
| 152 |
| 153 void FakeDBusThreadManager::SetShillDeviceClient( |
| 154 scoped_ptr<ShillDeviceClient> client) { |
| 155 shill_device_client_ = client.Pass(); |
| 156 } |
| 157 |
| 158 void FakeDBusThreadManager::SetShillIPConfigClient( |
| 159 scoped_ptr<ShillIPConfigClient> client) { |
| 160 shill_ipconfig_client_ = client.Pass(); |
| 161 } |
| 162 |
| 163 void FakeDBusThreadManager::SetShillManagerClient( |
| 164 scoped_ptr<ShillManagerClient> client) { |
| 165 shill_manager_client_ = client.Pass(); |
| 166 } |
| 167 |
| 168 void FakeDBusThreadManager::SetShillServiceClient( |
| 169 scoped_ptr<ShillServiceClient> client) { |
| 170 shill_service_client_ = client.Pass(); |
| 171 } |
| 172 |
| 173 void FakeDBusThreadManager::SetShillProfileClient( |
| 174 scoped_ptr<ShillProfileClient> client) { |
| 175 shill_profile_client_ = client.Pass(); |
| 176 } |
| 177 |
| 178 void FakeDBusThreadManager::SetGsmSMSClient( |
| 179 scoped_ptr<GsmSMSClient> client) { |
| 180 gsm_sms_client_ = client.Pass(); |
| 181 } |
| 182 |
| 183 void FakeDBusThreadManager::SetImageBurnerClient( |
| 184 scoped_ptr<ImageBurnerClient> client) { |
| 185 image_burner_client_ = client.Pass(); |
| 186 } |
| 187 |
| 188 void FakeDBusThreadManager::SetIntrospectableClient( |
| 189 scoped_ptr<IntrospectableClient> client) { |
| 190 introspectable_client_ = client.Pass(); |
| 191 } |
| 192 |
| 193 void FakeDBusThreadManager::SetModemMessagingClient( |
| 194 scoped_ptr<ModemMessagingClient> client) { |
| 195 modem_messaging_client_ = client.Pass(); |
| 196 } |
| 197 |
| 198 void FakeDBusThreadManager::SetNfcAdapterClient( |
| 199 scoped_ptr<NfcAdapterClient> client) { |
| 200 nfc_adapter_client_ = client.Pass(); |
| 201 } |
| 202 |
| 203 void FakeDBusThreadManager::SetNfcDeviceClient( |
| 204 scoped_ptr<NfcDeviceClient> client) { |
| 205 nfc_device_client_ = client.Pass(); |
| 206 } |
| 207 |
| 208 void FakeDBusThreadManager::SetNfcManagerClient( |
| 209 scoped_ptr<NfcManagerClient> client) { |
| 210 nfc_manager_client_ = client.Pass(); |
| 211 } |
| 212 |
| 213 void FakeDBusThreadManager::SetNfcTagClient( |
| 214 scoped_ptr<NfcTagClient> client) { |
| 215 nfc_tag_client_ = client.Pass(); |
| 216 } |
| 217 |
| 218 void FakeDBusThreadManager::SetPermissionBrokerClient( |
| 219 scoped_ptr<PermissionBrokerClient> client) { |
| 220 permission_broker_client_ = client.Pass(); |
| 221 } |
| 222 |
| 223 void FakeDBusThreadManager::SetPowerManagerClient( |
| 224 scoped_ptr<PowerManagerClient> client) { |
| 225 power_manager_client_ = client.Pass(); |
| 226 } |
| 227 |
| 228 void FakeDBusThreadManager::SetPowerPolicyController( |
| 229 scoped_ptr<PowerPolicyController> client) { |
| 230 power_policy_controller_ = client.Pass(); |
| 231 } |
| 232 |
| 233 void FakeDBusThreadManager::SetSessionManagerClient( |
| 234 scoped_ptr<SessionManagerClient> client) { |
| 235 session_manager_client_ = client.Pass(); |
| 236 } |
| 237 |
| 238 void FakeDBusThreadManager::SetSMSClient(scoped_ptr<SMSClient> client) { |
| 239 sms_client_ = client.Pass(); |
| 240 } |
| 241 |
| 242 void FakeDBusThreadManager::SetSystemClockClient( |
| 243 scoped_ptr<SystemClockClient> client) { |
| 244 system_clock_client_ = client.Pass(); |
| 245 } |
| 246 |
| 247 void FakeDBusThreadManager::SetUpdateEngineClient( |
| 248 scoped_ptr<UpdateEngineClient> client) { |
| 249 update_engine_client_ = client.Pass(); |
| 250 } |
| 251 |
| 252 void FakeDBusThreadManager::SetIBusClient(scoped_ptr<IBusClient> client) { |
| 253 ibus_client_ = client.Pass(); |
| 254 } |
| 255 |
| 63 void FakeDBusThreadManager::AddObserver( | 256 void FakeDBusThreadManager::AddObserver( |
| 64 DBusThreadManagerObserver* observer) { | 257 DBusThreadManagerObserver* observer) { |
| 65 DCHECK(observer); | 258 DCHECK(observer); |
| 66 observers_.AddObserver(observer); | 259 observers_.AddObserver(observer); |
| 67 } | 260 } |
| 68 | 261 |
| 69 void FakeDBusThreadManager::RemoveObserver( | 262 void FakeDBusThreadManager::RemoveObserver( |
| 70 DBusThreadManagerObserver* observer) { | 263 DBusThreadManagerObserver* observer) { |
| 71 DCHECK(observer); | 264 DCHECK(observer); |
| 72 observers_.RemoveObserver(observer); | 265 observers_.RemoveObserver(observer); |
| 73 } | 266 } |
| 74 | 267 |
| 75 void FakeDBusThreadManager::InitIBusBus( | 268 void FakeDBusThreadManager::InitIBusBus( |
| 76 const std::string& ibus_address, | 269 const std::string& ibus_address, |
| 77 const base::Closure& closure) { | 270 const base::Closure& closure) { |
| 78 // Non-null bus address is used to ensure the connection to ibus-daemon. | |
| 79 ibus_bus_ = reinterpret_cast<dbus::Bus*>(0xdeadbeef); | |
| 80 mock_ibus_client_.reset(new MockIBusClient); | |
| 81 } | 271 } |
| 82 | 272 |
| 83 dbus::Bus* FakeDBusThreadManager::GetSystemBus() { | 273 dbus::Bus* FakeDBusThreadManager::GetSystemBus() { |
| 84 return NULL; | 274 return NULL; |
| 85 } | 275 } |
| 86 | 276 |
| 87 BluetoothAdapterClient* | 277 BluetoothAdapterClient* |
| 88 FakeDBusThreadManager::GetBluetoothAdapterClient() { | 278 FakeDBusThreadManager::GetBluetoothAdapterClient() { |
| 89 return fake_bluetooth_adapter_client_.get(); | 279 return bluetooth_adapter_client_.get(); |
| 90 } | 280 } |
| 91 | 281 |
| 92 BluetoothAgentManagerClient* | 282 BluetoothAgentManagerClient* |
| 93 FakeDBusThreadManager::GetBluetoothAgentManagerClient() { | 283 FakeDBusThreadManager::GetBluetoothAgentManagerClient() { |
| 94 return fake_bluetooth_agent_manager_client_.get(); | 284 return bluetooth_agent_manager_client_.get(); |
| 95 } | 285 } |
| 96 | 286 |
| 97 BluetoothDeviceClient* | 287 BluetoothDeviceClient* |
| 98 FakeDBusThreadManager::GetBluetoothDeviceClient() { | 288 FakeDBusThreadManager::GetBluetoothDeviceClient() { |
| 99 return fake_bluetooth_device_client_.get(); | 289 return bluetooth_device_client_.get(); |
| 100 } | 290 } |
| 101 | 291 |
| 102 BluetoothInputClient* | 292 BluetoothInputClient* |
| 103 FakeDBusThreadManager::GetBluetoothInputClient() { | 293 FakeDBusThreadManager::GetBluetoothInputClient() { |
| 104 return fake_bluetooth_input_client_.get(); | 294 return bluetooth_input_client_.get(); |
| 105 } | 295 } |
| 106 | 296 |
| 107 BluetoothProfileManagerClient* | 297 BluetoothProfileManagerClient* |
| 108 FakeDBusThreadManager::GetBluetoothProfileManagerClient() { | 298 FakeDBusThreadManager::GetBluetoothProfileManagerClient() { |
| 109 return fake_bluetooth_profile_manager_client_.get(); | 299 return bluetooth_profile_manager_client_.get(); |
| 110 } | 300 } |
| 111 | 301 |
| 112 CrasAudioClient* FakeDBusThreadManager::GetCrasAudioClient() { | 302 CrasAudioClient* FakeDBusThreadManager::GetCrasAudioClient() { |
| 113 return NULL; | 303 return cras_audio_client_.get(); |
| 114 } | 304 } |
| 115 | 305 |
| 116 CrosDisksClient* FakeDBusThreadManager::GetCrosDisksClient() { | 306 CrosDisksClient* FakeDBusThreadManager::GetCrosDisksClient() { |
| 117 return fake_cros_disks_client_.get(); | 307 return cros_disks_client_.get(); |
| 118 } | 308 } |
| 119 | 309 |
| 120 CryptohomeClient* FakeDBusThreadManager::GetCryptohomeClient() { | 310 CryptohomeClient* FakeDBusThreadManager::GetCryptohomeClient() { |
| 121 return fake_cryptohome_client_.get(); | 311 return cryptohome_client_.get(); |
| 122 } | 312 } |
| 123 | 313 |
| 124 DebugDaemonClient* FakeDBusThreadManager::GetDebugDaemonClient() { | 314 DebugDaemonClient* FakeDBusThreadManager::GetDebugDaemonClient() { |
| 125 NOTIMPLEMENTED(); | 315 return debug_daemon_client_.get(); |
| 126 return NULL; | |
| 127 } | 316 } |
| 128 | 317 |
| 129 ShillDeviceClient* | 318 ShillDeviceClient* |
| 130 FakeDBusThreadManager::GetShillDeviceClient() { | 319 FakeDBusThreadManager::GetShillDeviceClient() { |
| 131 return fake_shill_device_client_.get(); | 320 return shill_device_client_.get(); |
| 132 } | 321 } |
| 133 | 322 |
| 134 ShillIPConfigClient* | 323 ShillIPConfigClient* |
| 135 FakeDBusThreadManager::GetShillIPConfigClient() { | 324 FakeDBusThreadManager::GetShillIPConfigClient() { |
| 136 NOTIMPLEMENTED(); | 325 return shill_ipconfig_client_.get(); |
| 137 return NULL; | |
| 138 } | 326 } |
| 139 | 327 |
| 140 ShillManagerClient* | 328 ShillManagerClient* |
| 141 FakeDBusThreadManager::GetShillManagerClient() { | 329 FakeDBusThreadManager::GetShillManagerClient() { |
| 142 return fake_shill_manager_client_.get(); | 330 return shill_manager_client_.get(); |
| 143 } | 331 } |
| 144 | 332 |
| 145 ShillProfileClient* | 333 ShillProfileClient* |
| 146 FakeDBusThreadManager::GetShillProfileClient() { | 334 FakeDBusThreadManager::GetShillProfileClient() { |
| 147 NOTIMPLEMENTED(); | 335 return shill_profile_client_.get(); |
| 148 return NULL; | |
| 149 } | 336 } |
| 150 | 337 |
| 151 ShillServiceClient* | 338 ShillServiceClient* |
| 152 FakeDBusThreadManager::GetShillServiceClient() { | 339 FakeDBusThreadManager::GetShillServiceClient() { |
| 153 NOTIMPLEMENTED(); | 340 return shill_service_client_.get(); |
| 154 return NULL; | |
| 155 } | 341 } |
| 156 | 342 |
| 157 GsmSMSClient* FakeDBusThreadManager::GetGsmSMSClient() { | 343 GsmSMSClient* FakeDBusThreadManager::GetGsmSMSClient() { |
| 158 return fake_gsm_sms_client_.get(); | 344 return gsm_sms_client_.get(); |
| 159 } | 345 } |
| 160 | 346 |
| 161 ImageBurnerClient* FakeDBusThreadManager::GetImageBurnerClient() { | 347 ImageBurnerClient* FakeDBusThreadManager::GetImageBurnerClient() { |
| 162 return fake_image_burner_client_.get(); | 348 return image_burner_client_.get(); |
| 163 } | 349 } |
| 164 | 350 |
| 165 IntrospectableClient* | 351 IntrospectableClient* |
| 166 FakeDBusThreadManager::GetIntrospectableClient() { | 352 FakeDBusThreadManager::GetIntrospectableClient() { |
| 167 NOTIMPLEMENTED(); | 353 return introspectable_client_.get(); |
| 168 return NULL; | |
| 169 } | 354 } |
| 170 | 355 |
| 171 ModemMessagingClient* | 356 ModemMessagingClient* |
| 172 FakeDBusThreadManager::GetModemMessagingClient() { | 357 FakeDBusThreadManager::GetModemMessagingClient() { |
| 173 NOTIMPLEMENTED(); | 358 return modem_messaging_client_.get(); |
| 174 return NULL; | |
| 175 } | 359 } |
| 176 | 360 |
| 177 NfcAdapterClient* FakeDBusThreadManager::GetNfcAdapterClient() { | 361 NfcAdapterClient* FakeDBusThreadManager::GetNfcAdapterClient() { |
| 178 return fake_nfc_adapter_client_.get(); | 362 return nfc_adapter_client_.get(); |
| 179 } | 363 } |
| 180 | 364 |
| 181 NfcDeviceClient* FakeDBusThreadManager::GetNfcDeviceClient() { | 365 NfcDeviceClient* FakeDBusThreadManager::GetNfcDeviceClient() { |
| 182 return fake_nfc_device_client_.get(); | 366 return nfc_device_client_.get(); |
| 183 } | 367 } |
| 184 | 368 |
| 185 NfcManagerClient* FakeDBusThreadManager::GetNfcManagerClient() { | 369 NfcManagerClient* FakeDBusThreadManager::GetNfcManagerClient() { |
| 186 return fake_nfc_manager_client_.get(); | 370 return nfc_manager_client_.get(); |
| 187 } | 371 } |
| 188 | 372 |
| 189 NfcTagClient* FakeDBusThreadManager::GetNfcTagClient() { | 373 NfcTagClient* FakeDBusThreadManager::GetNfcTagClient() { |
| 190 return fake_nfc_tag_client_.get(); | 374 return nfc_tag_client_.get(); |
| 191 } | 375 } |
| 192 | 376 |
| 193 PermissionBrokerClient* | 377 PermissionBrokerClient* |
| 194 FakeDBusThreadManager::GetPermissionBrokerClient() { | 378 FakeDBusThreadManager::GetPermissionBrokerClient() { |
| 195 NOTIMPLEMENTED(); | 379 return permission_broker_client_.get(); |
| 196 return NULL; | |
| 197 } | 380 } |
| 198 | 381 |
| 199 PowerManagerClient* FakeDBusThreadManager::GetPowerManagerClient() { | 382 PowerManagerClient* FakeDBusThreadManager::GetPowerManagerClient() { |
| 200 return fake_power_manager_client_.get(); | 383 return power_manager_client_.get(); |
| 201 } | 384 } |
| 202 | 385 |
| 203 PowerPolicyController* | 386 PowerPolicyController* |
| 204 FakeDBusThreadManager::GetPowerPolicyController() { | 387 FakeDBusThreadManager::GetPowerPolicyController() { |
| 205 return power_policy_controller_.get(); | 388 return power_policy_controller_.get(); |
| 206 } | 389 } |
| 207 | 390 |
| 208 SessionManagerClient* | 391 SessionManagerClient* |
| 209 FakeDBusThreadManager::GetSessionManagerClient() { | 392 FakeDBusThreadManager::GetSessionManagerClient() { |
| 210 return fake_session_manager_client_.get(); | 393 return session_manager_client_.get(); |
| 211 } | 394 } |
| 212 | 395 |
| 213 SMSClient* FakeDBusThreadManager::GetSMSClient() { | 396 SMSClient* FakeDBusThreadManager::GetSMSClient() { |
| 214 NOTIMPLEMENTED(); | 397 return sms_client_.get(); |
| 215 return NULL; | |
| 216 } | 398 } |
| 217 | 399 |
| 218 SystemClockClient* FakeDBusThreadManager::GetSystemClockClient() { | 400 SystemClockClient* FakeDBusThreadManager::GetSystemClockClient() { |
| 219 return fake_system_clock_client_.get(); | 401 return system_clock_client_.get(); |
| 220 } | 402 } |
| 221 | 403 |
| 222 UpdateEngineClient* FakeDBusThreadManager::GetUpdateEngineClient() { | 404 UpdateEngineClient* FakeDBusThreadManager::GetUpdateEngineClient() { |
| 223 return fake_update_engine_client_.get(); | 405 return update_engine_client_.get(); |
| 224 } | 406 } |
| 225 | 407 |
| 226 IBusClient* FakeDBusThreadManager::GetIBusClient() { | 408 IBusClient* FakeDBusThreadManager::GetIBusClient() { |
| 227 return mock_ibus_client_.get(); | 409 return ibus_client_.get(); |
| 228 } | 410 } |
| 229 | 411 |
| 230 } // namespace chromeos | 412 } // namespace chromeos |
| OLD | NEW |