Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: trunk/src/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc

Issue 14850004: Revert 197865 "dbus: Use fakes for some clients and utils for Mo..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/chromeos/dbus/mock_dbus_thread_manager_without_gmock.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
10 #include "chromeos/dbus/dbus_thread_manager_observer.h" 7 #include "chromeos/dbus/dbus_thread_manager_observer.h"
11 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" 8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h"
12 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" 9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
13 #include "chromeos/dbus/fake_bluetooth_device_client.h" 10 #include "chromeos/dbus/fake_bluetooth_device_client.h"
14 #include "chromeos/dbus/fake_bluetooth_input_client.h" 11 #include "chromeos/dbus/fake_bluetooth_input_client.h"
15 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" 12 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h"
16 #include "chromeos/dbus/fake_cros_disks_client.h" 13 #include "chromeos/dbus/fake_cros_disks_client.h"
17 #include "chromeos/dbus/fake_cryptohome_client.h" 14 #include "chromeos/dbus/fake_cryptohome_client.h"
18 #include "chromeos/dbus/fake_image_burner_client.h" 15 #include "chromeos/dbus/fake_image_burner_client.h"
19 #include "chromeos/dbus/fake_old_bluetooth_adapter_client.h" 16 #include "chromeos/dbus/fake_old_bluetooth_adapter_client.h"
20 #include "chromeos/dbus/fake_old_bluetooth_device_client.h" 17 #include "chromeos/dbus/fake_old_bluetooth_device_client.h"
21 #include "chromeos/dbus/fake_old_bluetooth_manager_client.h" 18 #include "chromeos/dbus/fake_old_bluetooth_manager_client.h"
22 #include "chromeos/dbus/fake_power_manager_client.h"
23 #include "chromeos/dbus/fake_session_manager_client.h"
24 #include "chromeos/dbus/fake_shill_manager_client.h" 19 #include "chromeos/dbus/fake_shill_manager_client.h"
25 #include "chromeos/dbus/fake_system_clock_client.h" 20 #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" 21 #include "chromeos/dbus/ibus/mock_ibus_client.h"
28 #include "chromeos/dbus/ibus/mock_ibus_config_client.h" 22 #include "chromeos/dbus/ibus/mock_ibus_config_client.h"
29 #include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h" 23 #include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h"
30 #include "chromeos/dbus/ibus/mock_ibus_engine_service.h" 24 #include "chromeos/dbus/ibus/mock_ibus_engine_service.h"
31 #include "chromeos/dbus/ibus/mock_ibus_input_context_client.h" 25 #include "chromeos/dbus/ibus/mock_ibus_input_context_client.h"
32 #include "chromeos/dbus/ibus/mock_ibus_panel_service.h" 26 #include "chromeos/dbus/ibus/mock_ibus_panel_service.h"
33 #include "chromeos/dbus/power_policy_controller.h"
34 27
35 namespace chromeos { 28 namespace chromeos {
36 29
37 MockDBusThreadManagerWithoutGMock::MockDBusThreadManagerWithoutGMock() 30 MockDBusThreadManagerWithoutGMock::MockDBusThreadManagerWithoutGMock()
38 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient()), 31 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient()),
39 fake_bluetooth_agent_manager_client_(new FakeBluetoothAgentManagerClient()), 32 fake_bluetooth_agent_manager_client_(new FakeBluetoothAgentManagerClient()),
40 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient()), 33 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient()),
41 fake_bluetooth_input_client_(new FakeBluetoothInputClient()), 34 fake_bluetooth_input_client_(new FakeBluetoothInputClient()),
42 fake_bluetooth_profile_manager_client_( 35 fake_bluetooth_profile_manager_client_(
43 new FakeBluetoothProfileManagerClient()), 36 new FakeBluetoothProfileManagerClient()),
44 fake_cros_disks_client_(new FakeCrosDisksClient), 37 fake_cros_disks_client_(new FakeCrosDisksClient),
45 fake_cryptohome_client_(new FakeCryptohomeClient), 38 fake_cryptohome_client_(new FakeCryptohomeClient),
46 fake_image_burner_client_(new FakeImageBurnerClient), 39 fake_image_burner_client_(new FakeImageBurnerClient),
47 fake_session_manager_client_(new FakeSessionManagerClient),
48 fake_shill_manager_client_(new FakeShillManagerClient), 40 fake_shill_manager_client_(new FakeShillManagerClient),
49 fake_system_clock_client_(new FakeSystemClockClient), 41 fake_system_clock_client_(new FakeSystemClockClient),
50 fake_power_manager_client_(new FakePowerManagerClient),
51 fake_update_engine_client_(new FakeUpdateEngineClient),
52 fake_old_bluetooth_manager_client_(new FakeOldBluetoothManagerClient), 42 fake_old_bluetooth_manager_client_(new FakeOldBluetoothManagerClient),
53 fake_old_bluetooth_adapter_client_(new FakeOldBluetoothAdapterClient), 43 fake_old_bluetooth_adapter_client_(new FakeOldBluetoothAdapterClient),
54 fake_old_bluetooth_device_client_(new FakeOldBluetoothDeviceClient), 44 fake_old_bluetooth_device_client_(new FakeOldBluetoothDeviceClient),
55 mock_ibus_client_(new MockIBusClient), 45 mock_ibus_client_(new MockIBusClient),
56 mock_ibus_config_client_(new MockIBusConfigClient), 46 mock_ibus_config_client_(new MockIBusConfigClient),
57 mock_ibus_input_context_client_(new MockIBusInputContextClient), 47 mock_ibus_input_context_client_(new MockIBusInputContextClient),
58 mock_ibus_engine_service_(new MockIBusEngineService), 48 mock_ibus_engine_service_(new MockIBusEngineService),
59 mock_ibus_engine_factory_service_(new MockIBusEngineFactoryService), 49 mock_ibus_engine_factory_service_(new MockIBusEngineFactoryService),
60 mock_ibus_panel_service_(new MockIBusPanelService), 50 mock_ibus_panel_service_(new MockIBusPanelService),
61 ibus_bus_(NULL) { 51 ibus_bus_(NULL) {
62 power_policy_controller_.reset(
63 new PowerPolicyController(this, fake_power_manager_client_.get()));
64 } 52 }
65 53
66 MockDBusThreadManagerWithoutGMock::~MockDBusThreadManagerWithoutGMock() { 54 MockDBusThreadManagerWithoutGMock::~MockDBusThreadManagerWithoutGMock() {
67 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, 55 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_,
68 OnDBusThreadManagerDestroying(this)); 56 OnDBusThreadManagerDestroying(this));
69 } 57 }
70 58
71 void MockDBusThreadManagerWithoutGMock::AddObserver( 59 void MockDBusThreadManagerWithoutGMock::AddObserver(
72 DBusThreadManagerObserver* observer) { 60 DBusThreadManagerObserver* observer) {
73 DCHECK(observer); 61 DCHECK(observer);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 return NULL; 205 return NULL;
218 } 206 }
219 207
220 PermissionBrokerClient* 208 PermissionBrokerClient*
221 MockDBusThreadManagerWithoutGMock::GetPermissionBrokerClient() { 209 MockDBusThreadManagerWithoutGMock::GetPermissionBrokerClient() {
222 NOTIMPLEMENTED(); 210 NOTIMPLEMENTED();
223 return NULL; 211 return NULL;
224 } 212 }
225 213
226 PowerManagerClient* MockDBusThreadManagerWithoutGMock::GetPowerManagerClient() { 214 PowerManagerClient* MockDBusThreadManagerWithoutGMock::GetPowerManagerClient() {
227 return fake_power_manager_client_.get(); 215 NOTIMPLEMENTED();
216 return NULL;
228 } 217 }
229 218
230 PowerPolicyController* 219 PowerPolicyController*
231 MockDBusThreadManagerWithoutGMock::GetPowerPolicyController() { 220 MockDBusThreadManagerWithoutGMock::GetPowerPolicyController() {
232 return power_policy_controller_.get(); 221 NOTIMPLEMENTED();
222 return NULL;
233 } 223 }
234 224
235 SessionManagerClient* 225 SessionManagerClient*
236 MockDBusThreadManagerWithoutGMock::GetSessionManagerClient() { 226 MockDBusThreadManagerWithoutGMock::GetSessionManagerClient() {
237 return fake_session_manager_client_.get(); 227 NOTIMPLEMENTED();
228 return NULL;
238 } 229 }
239 230
240 SMSClient* MockDBusThreadManagerWithoutGMock::GetSMSClient() { 231 SMSClient* MockDBusThreadManagerWithoutGMock::GetSMSClient() {
241 NOTIMPLEMENTED(); 232 NOTIMPLEMENTED();
242 return NULL; 233 return NULL;
243 } 234 }
244 235
245 SystemClockClient* MockDBusThreadManagerWithoutGMock::GetSystemClockClient() { 236 SystemClockClient* MockDBusThreadManagerWithoutGMock::GetSystemClockClient() {
246 return fake_system_clock_client_.get(); 237 return fake_system_clock_client_.get();
247 } 238 }
248 239
249 UpdateEngineClient* MockDBusThreadManagerWithoutGMock::GetUpdateEngineClient() { 240 UpdateEngineClient* MockDBusThreadManagerWithoutGMock::GetUpdateEngineClient() {
250 return fake_update_engine_client_.get(); 241 NOTIMPLEMENTED();
242 return NULL;
251 } 243 }
252 244
253 BluetoothOutOfBandClient* 245 BluetoothOutOfBandClient*
254 MockDBusThreadManagerWithoutGMock::GetBluetoothOutOfBandClient() { 246 MockDBusThreadManagerWithoutGMock::GetBluetoothOutOfBandClient() {
255 NOTIMPLEMENTED(); 247 NOTIMPLEMENTED();
256 return NULL; 248 return NULL;
257 } 249 }
258 250
259 IBusClient* MockDBusThreadManagerWithoutGMock::GetIBusClient() { 251 IBusClient* MockDBusThreadManagerWithoutGMock::GetIBusClient() {
260 return mock_ibus_client_.get(); 252 return mock_ibus_client_.get();
(...skipping 20 matching lines...) Expand all
281 273
282 void MockDBusThreadManagerWithoutGMock::RemoveIBusEngineService( 274 void MockDBusThreadManagerWithoutGMock::RemoveIBusEngineService(
283 const dbus::ObjectPath& object_path) { 275 const dbus::ObjectPath& object_path) {
284 } 276 }
285 277
286 IBusPanelService* MockDBusThreadManagerWithoutGMock::GetIBusPanelService() { 278 IBusPanelService* MockDBusThreadManagerWithoutGMock::GetIBusPanelService() {
287 return mock_ibus_panel_service_.get(); 279 return mock_ibus_panel_service_.get();
288 } 280 }
289 281
290 } // namespace chromeos 282 } // namespace chromeos
OLDNEW
« no previous file with comments | « trunk/src/chromeos/dbus/mock_dbus_thread_manager_without_gmock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698