| 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/mock_dbus_thread_manager_without_gmock.h" | 5 #include "chromeos/dbus/mock_dbus_thread_manager_without_gmock.h" |
| 6 | 6 |
| 7 #include "chromeos/dbus/bluetooth_adapter_client.h" |
| 8 #include "chromeos/dbus/bluetooth_device_client.h" |
| 9 #include "chromeos/dbus/bluetooth_manager_client.h" |
| 7 #include "chromeos/dbus/dbus_thread_manager_observer.h" | 10 #include "chromeos/dbus/dbus_thread_manager_observer.h" |
| 8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 11 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
| 9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 12 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
| 10 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 13 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
| 11 #include "chromeos/dbus/fake_bluetooth_input_client.h" | 14 #include "chromeos/dbus/fake_bluetooth_input_client.h" |
| 12 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" | 15 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
| 13 #include "chromeos/dbus/fake_cros_disks_client.h" | 16 #include "chromeos/dbus/fake_cros_disks_client.h" |
| 14 #include "chromeos/dbus/fake_cryptohome_client.h" | 17 #include "chromeos/dbus/fake_cryptohome_client.h" |
| 15 #include "chromeos/dbus/fake_old_bluetooth_adapter_client.h" | 18 #include "chromeos/dbus/fake_old_bluetooth_adapter_client.h" |
| 16 #include "chromeos/dbus/fake_old_bluetooth_device_client.h" | 19 #include "chromeos/dbus/fake_old_bluetooth_device_client.h" |
| 17 #include "chromeos/dbus/fake_old_bluetooth_manager_client.h" | 20 #include "chromeos/dbus/fake_old_bluetooth_manager_client.h" |
| 21 #include "chromeos/dbus/fake_power_manager_client.h" |
| 22 #include "chromeos/dbus/fake_session_manager_client.h" |
| 18 #include "chromeos/dbus/fake_shill_manager_client.h" | 23 #include "chromeos/dbus/fake_shill_manager_client.h" |
| 24 #include "chromeos/dbus/fake_update_engine_client.h" |
| 19 #include "chromeos/dbus/ibus/mock_ibus_client.h" | 25 #include "chromeos/dbus/ibus/mock_ibus_client.h" |
| 20 #include "chromeos/dbus/ibus/mock_ibus_config_client.h" | 26 #include "chromeos/dbus/ibus/mock_ibus_config_client.h" |
| 21 #include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h" | 27 #include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h" |
| 22 #include "chromeos/dbus/ibus/mock_ibus_engine_service.h" | 28 #include "chromeos/dbus/ibus/mock_ibus_engine_service.h" |
| 23 #include "chromeos/dbus/ibus/mock_ibus_input_context_client.h" | 29 #include "chromeos/dbus/ibus/mock_ibus_input_context_client.h" |
| 24 #include "chromeos/dbus/ibus/mock_ibus_panel_service.h" | 30 #include "chromeos/dbus/ibus/mock_ibus_panel_service.h" |
| 31 #include "chromeos/dbus/power_policy_controller.h" |
| 25 | 32 |
| 26 namespace chromeos { | 33 namespace chromeos { |
| 27 | 34 |
| 28 MockDBusThreadManagerWithoutGMock::MockDBusThreadManagerWithoutGMock() | 35 MockDBusThreadManagerWithoutGMock::MockDBusThreadManagerWithoutGMock() |
| 29 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient()), | 36 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient()), |
| 30 fake_bluetooth_agent_manager_client_(new FakeBluetoothAgentManagerClient()), | 37 fake_bluetooth_agent_manager_client_(new FakeBluetoothAgentManagerClient()), |
| 31 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient()), | 38 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient()), |
| 32 fake_bluetooth_input_client_(new FakeBluetoothInputClient()), | 39 fake_bluetooth_input_client_(new FakeBluetoothInputClient()), |
| 33 fake_bluetooth_profile_manager_client_( | 40 fake_bluetooth_profile_manager_client_( |
| 34 new FakeBluetoothProfileManagerClient()), | 41 new FakeBluetoothProfileManagerClient()), |
| 35 fake_cros_disks_client_(new FakeCrosDisksClient), | 42 fake_cros_disks_client_(new FakeCrosDisksClient), |
| 36 fake_cryptohome_client_(new FakeCryptohomeClient), | 43 fake_cryptohome_client_(new FakeCryptohomeClient), |
| 44 fake_power_manager_client_(new FakePowerManagerClient), |
| 45 fake_session_manager_client_(new FakeSessionManagerClient), |
| 37 fake_shill_manager_client_(new FakeShillManagerClient), | 46 fake_shill_manager_client_(new FakeShillManagerClient), |
| 47 fake_update_engine_client_(new FakeUpdateEngineClient), |
| 38 fake_old_bluetooth_manager_client_(new FakeOldBluetoothManagerClient), | 48 fake_old_bluetooth_manager_client_(new FakeOldBluetoothManagerClient), |
| 39 fake_old_bluetooth_adapter_client_(new FakeOldBluetoothAdapterClient), | 49 fake_old_bluetooth_adapter_client_(new FakeOldBluetoothAdapterClient), |
| 40 fake_old_bluetooth_device_client_(new FakeOldBluetoothDeviceClient), | 50 fake_old_bluetooth_device_client_(new FakeOldBluetoothDeviceClient), |
| 41 mock_ibus_client_(new MockIBusClient), | 51 mock_ibus_client_(new MockIBusClient), |
| 42 mock_ibus_config_client_(new MockIBusConfigClient), | 52 mock_ibus_config_client_(new MockIBusConfigClient), |
| 43 mock_ibus_input_context_client_(new MockIBusInputContextClient), | 53 mock_ibus_input_context_client_(new MockIBusInputContextClient), |
| 44 mock_ibus_engine_service_(new MockIBusEngineService), | 54 mock_ibus_engine_service_(new MockIBusEngineService), |
| 45 mock_ibus_engine_factory_service_(new MockIBusEngineFactoryService), | 55 mock_ibus_engine_factory_service_(new MockIBusEngineFactoryService), |
| 46 mock_ibus_panel_service_(new MockIBusPanelService), | 56 mock_ibus_panel_service_(new MockIBusPanelService), |
| 47 ibus_bus_(NULL) { | 57 ibus_bus_(NULL) { |
| 58 power_policy_controller_.reset( |
| 59 new PowerPolicyController(this, fake_power_manager_client_.get())); |
| 48 } | 60 } |
| 49 | 61 |
| 50 MockDBusThreadManagerWithoutGMock::~MockDBusThreadManagerWithoutGMock() { | 62 MockDBusThreadManagerWithoutGMock::~MockDBusThreadManagerWithoutGMock() { |
| 51 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, | 63 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, |
| 52 OnDBusThreadManagerDestroying(this)); | 64 OnDBusThreadManagerDestroying(this)); |
| 53 } | 65 } |
| 54 | 66 |
| 55 void MockDBusThreadManagerWithoutGMock::AddObserver( | 67 void MockDBusThreadManagerWithoutGMock::AddObserver( |
| 56 DBusThreadManagerObserver* observer) { | 68 DBusThreadManagerObserver* observer) { |
| 57 DCHECK(observer); | 69 DCHECK(observer); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 return NULL; | 214 return NULL; |
| 203 } | 215 } |
| 204 | 216 |
| 205 PermissionBrokerClient* | 217 PermissionBrokerClient* |
| 206 MockDBusThreadManagerWithoutGMock::GetPermissionBrokerClient() { | 218 MockDBusThreadManagerWithoutGMock::GetPermissionBrokerClient() { |
| 207 NOTIMPLEMENTED(); | 219 NOTIMPLEMENTED(); |
| 208 return NULL; | 220 return NULL; |
| 209 } | 221 } |
| 210 | 222 |
| 211 PowerManagerClient* MockDBusThreadManagerWithoutGMock::GetPowerManagerClient() { | 223 PowerManagerClient* MockDBusThreadManagerWithoutGMock::GetPowerManagerClient() { |
| 212 NOTIMPLEMENTED(); | 224 return fake_power_manager_client_.get(); |
| 213 return NULL; | |
| 214 } | 225 } |
| 215 | 226 |
| 216 PowerPolicyController* | 227 PowerPolicyController* |
| 217 MockDBusThreadManagerWithoutGMock::GetPowerPolicyController() { | 228 MockDBusThreadManagerWithoutGMock::GetPowerPolicyController() { |
| 218 NOTIMPLEMENTED(); | 229 return power_policy_controller_.get(); |
| 219 return NULL; | |
| 220 } | 230 } |
| 221 | 231 |
| 222 SessionManagerClient* | 232 SessionManagerClient* |
| 223 MockDBusThreadManagerWithoutGMock::GetSessionManagerClient() { | 233 MockDBusThreadManagerWithoutGMock::GetSessionManagerClient() { |
| 224 NOTIMPLEMENTED(); | 234 return fake_session_manager_client_.get(); |
| 225 return NULL; | |
| 226 } | 235 } |
| 227 | 236 |
| 228 SMSClient* MockDBusThreadManagerWithoutGMock::GetSMSClient() { | 237 SMSClient* MockDBusThreadManagerWithoutGMock::GetSMSClient() { |
| 229 NOTIMPLEMENTED(); | 238 NOTIMPLEMENTED(); |
| 230 return NULL; | 239 return NULL; |
| 231 } | 240 } |
| 232 | 241 |
| 233 SystemClockClient* MockDBusThreadManagerWithoutGMock::GetSystemClockClient() { | 242 SystemClockClient* MockDBusThreadManagerWithoutGMock::GetSystemClockClient() { |
| 234 NOTIMPLEMENTED(); | 243 NOTIMPLEMENTED(); |
| 235 return NULL; | 244 return NULL; |
| 236 } | 245 } |
| 237 | 246 |
| 238 UpdateEngineClient* MockDBusThreadManagerWithoutGMock::GetUpdateEngineClient() { | 247 UpdateEngineClient* MockDBusThreadManagerWithoutGMock::GetUpdateEngineClient() { |
| 239 NOTIMPLEMENTED(); | 248 return fake_update_engine_client_.get(); |
| 240 return NULL; | |
| 241 } | 249 } |
| 242 | 250 |
| 243 BluetoothOutOfBandClient* | 251 BluetoothOutOfBandClient* |
| 244 MockDBusThreadManagerWithoutGMock::GetBluetoothOutOfBandClient() { | 252 MockDBusThreadManagerWithoutGMock::GetBluetoothOutOfBandClient() { |
| 245 NOTIMPLEMENTED(); | 253 NOTIMPLEMENTED(); |
| 246 return NULL; | 254 return NULL; |
| 247 } | 255 } |
| 248 | 256 |
| 249 IBusClient* MockDBusThreadManagerWithoutGMock::GetIBusClient() { | 257 IBusClient* MockDBusThreadManagerWithoutGMock::GetIBusClient() { |
| 250 return mock_ibus_client_.get(); | 258 return mock_ibus_client_.get(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 271 | 279 |
| 272 void MockDBusThreadManagerWithoutGMock::RemoveIBusEngineService( | 280 void MockDBusThreadManagerWithoutGMock::RemoveIBusEngineService( |
| 273 const dbus::ObjectPath& object_path) { | 281 const dbus::ObjectPath& object_path) { |
| 274 } | 282 } |
| 275 | 283 |
| 276 IBusPanelService* MockDBusThreadManagerWithoutGMock::GetIBusPanelService() { | 284 IBusPanelService* MockDBusThreadManagerWithoutGMock::GetIBusPanelService() { |
| 277 return mock_ibus_panel_service_.get(); | 285 return mock_ibus_panel_service_.get(); |
| 278 } | 286 } |
| 279 | 287 |
| 280 } // namespace chromeos | 288 } // namespace chromeos |
| OLD | NEW |