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