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

Side by Side Diff: chromeos/dbus/fake_dbus_thread_manager.h

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
6 #define CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
7
8 #include "base/logging.h"
9 #include "chromeos/chromeos_export.h"
10 #include "chromeos/dbus/dbus_thread_manager.h"
11
12 namespace dbus {
13 class Bus;
14 class ObjectPath;
15 } // namespace dbus
16
17 namespace chromeos {
18
19 // This class provides a fake implementation of DBusThreadManager, which
20 // hosts fake D-Bus clients.
21 class CHROMEOS_EXPORT FakeDBusThreadManager : public DBusThreadManager {
22 public:
23 FakeDBusThreadManager();
24 virtual ~FakeDBusThreadManager();
25
26 // Creates and sets all fake DBusClients and the PowerPolicyController.
27 void SetFakeClients();
28
29 // Creates and sets all fake Shill DBusClients.
30 void SetFakeShillClients();
31
32 // Sets up any default environment for fake clients, e.g. for UI testing.
33 void SetupDefaultEnvironment();
34
35 void SetBluetoothAdapterClient(scoped_ptr<BluetoothAdapterClient> client);
36 void SetBluetoothAgentManagerClient(
37 scoped_ptr<BluetoothAgentManagerClient> client);
38 void SetBluetoothDeviceClient(scoped_ptr<BluetoothDeviceClient> client);
39 void SetBluetoothGattCharacteristicClient(
40 scoped_ptr<BluetoothGattCharacteristicClient> client);
41 void SetBluetoothGattDescriptorClient(
42 scoped_ptr<BluetoothGattDescriptorClient> client);
43 void SetBluetoothGattManagerClient(
44 scoped_ptr<BluetoothGattManagerClient> client);
45 void SetBluetoothGattServiceClient(
46 scoped_ptr<BluetoothGattServiceClient> client);
47 void SetBluetoothInputClient(scoped_ptr<BluetoothInputClient> client);
48 void SetBluetoothProfileManagerClient(
49 scoped_ptr<BluetoothProfileManagerClient> client);
50 void SetCrasAudioClient(scoped_ptr<CrasAudioClient> client);
51 void SetCrosDisksClient(scoped_ptr<CrosDisksClient> client);
52 void SetCryptohomeClient(scoped_ptr<CryptohomeClient> client);
53 void SetDebugDaemonClient(scoped_ptr<DebugDaemonClient> client);
54 void SetEasyUnlockClient(scoped_ptr<EasyUnlockClient> client);
55 void SetLorgnetteManagerClient(scoped_ptr<LorgnetteManagerClient> client);
56 void SetShillDeviceClient(scoped_ptr<ShillDeviceClient> client);
57 void SetShillIPConfigClient(scoped_ptr<ShillIPConfigClient> client);
58 void SetShillManagerClient(scoped_ptr<ShillManagerClient> client);
59 void SetShillServiceClient(scoped_ptr<ShillServiceClient> client);
60 void SetShillProfileClient(scoped_ptr<ShillProfileClient> client);
61 void SetGsmSMSClient(scoped_ptr<GsmSMSClient> client);
62 void SetImageBurnerClient(scoped_ptr<ImageBurnerClient> client);
63 void SetIntrospectableClient(scoped_ptr<IntrospectableClient> client);
64 void SetModemMessagingClient(scoped_ptr<ModemMessagingClient> client);
65 void SetNfcAdapterClient(scoped_ptr<NfcAdapterClient> client);
66 void SetNfcDeviceClient(scoped_ptr<NfcDeviceClient> client);
67 void SetNfcManagerClient(scoped_ptr<NfcManagerClient> client);
68 void SetNfcRecordClient(scoped_ptr<NfcRecordClient> client);
69 void SetNfcTagClient(scoped_ptr<NfcTagClient> client);
70 void SetPermissionBrokerClient(scoped_ptr<PermissionBrokerClient> client);
71 void SetPowerManagerClient(scoped_ptr<PowerManagerClient> client);
72 void SetPowerPolicyController(scoped_ptr<PowerPolicyController> client);
73 void SetSessionManagerClient(scoped_ptr<SessionManagerClient> client);
74 void SetSMSClient(scoped_ptr<SMSClient> client);
75 void SetSystemClockClient(scoped_ptr<SystemClockClient> client);
76 void SetUpdateEngineClient(scoped_ptr<UpdateEngineClient> client);
77
78 virtual dbus::Bus* GetSystemBus() OVERRIDE;
79
80 virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE;
81 virtual BluetoothAgentManagerClient*
82 GetBluetoothAgentManagerClient() OVERRIDE;
83 virtual BluetoothDeviceClient* GetBluetoothDeviceClient() OVERRIDE;
84 virtual BluetoothGattCharacteristicClient*
85 GetBluetoothGattCharacteristicClient() OVERRIDE;
86 virtual BluetoothGattDescriptorClient*
87 GetBluetoothGattDescriptorClient() OVERRIDE;
88 virtual BluetoothGattManagerClient* GetBluetoothGattManagerClient() OVERRIDE;
89 virtual BluetoothGattServiceClient* GetBluetoothGattServiceClient() OVERRIDE;
90 virtual BluetoothInputClient* GetBluetoothInputClient() OVERRIDE;
91 virtual BluetoothProfileManagerClient*
92 GetBluetoothProfileManagerClient() OVERRIDE;
93 virtual CrasAudioClient* GetCrasAudioClient() OVERRIDE;
94 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE;
95 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE;
96 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE;
97 virtual EasyUnlockClient* GetEasyUnlockClient() OVERRIDE;
98 virtual LorgnetteManagerClient* GetLorgnetteManagerClient() OVERRIDE;
99 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE;
100 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE;
101 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE;
102 virtual ShillProfileClient* GetShillProfileClient() OVERRIDE;
103 virtual ShillServiceClient* GetShillServiceClient() OVERRIDE;
104 virtual GsmSMSClient* GetGsmSMSClient() OVERRIDE;
105 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE;
106 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE;
107 virtual ModemMessagingClient* GetModemMessagingClient() OVERRIDE;
108 virtual NfcAdapterClient* GetNfcAdapterClient() OVERRIDE;
109 virtual NfcDeviceClient* GetNfcDeviceClient() OVERRIDE;
110 virtual NfcManagerClient* GetNfcManagerClient() OVERRIDE;
111 virtual NfcRecordClient* GetNfcRecordClient() OVERRIDE;
112 virtual NfcTagClient* GetNfcTagClient() OVERRIDE;
113 virtual PermissionBrokerClient* GetPermissionBrokerClient() OVERRIDE;
114 virtual PowerManagerClient* GetPowerManagerClient() OVERRIDE;
115 virtual PowerPolicyController* GetPowerPolicyController() OVERRIDE;
116 virtual SessionManagerClient* GetSessionManagerClient() OVERRIDE;
117 virtual SMSClient* GetSMSClient() OVERRIDE;
118 virtual SystemClockClient* GetSystemClockClient() OVERRIDE;
119 virtual UpdateEngineClient* GetUpdateEngineClient() OVERRIDE;
120
121 private:
122 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_;
123 scoped_ptr<BluetoothAgentManagerClient> bluetooth_agent_manager_client_;
124 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_;
125 scoped_ptr<BluetoothGattCharacteristicClient>
126 bluetooth_gatt_characteristic_client_;
127 scoped_ptr<BluetoothGattDescriptorClient>
128 bluetooth_gatt_descriptor_client_;
129 scoped_ptr<BluetoothGattManagerClient> bluetooth_gatt_manager_client_;
130 scoped_ptr<BluetoothGattServiceClient> bluetooth_gatt_service_client_;
131 scoped_ptr<BluetoothInputClient> bluetooth_input_client_;
132 scoped_ptr<BluetoothProfileManagerClient> bluetooth_profile_manager_client_;
133 scoped_ptr<CrasAudioClient> cras_audio_client_;
134 scoped_ptr<CrosDisksClient> cros_disks_client_;
135 scoped_ptr<CryptohomeClient> cryptohome_client_;
136 scoped_ptr<DebugDaemonClient> debug_daemon_client_;
137 scoped_ptr<EasyUnlockClient> easy_unlock_client_;
138 scoped_ptr<LorgnetteManagerClient> lorgnette_manager_client_;
139 scoped_ptr<ShillDeviceClient> shill_device_client_;
140 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_;
141 scoped_ptr<ShillManagerClient> shill_manager_client_;
142 scoped_ptr<ShillServiceClient> shill_service_client_;
143 scoped_ptr<ShillProfileClient> shill_profile_client_;
144 scoped_ptr<GsmSMSClient> gsm_sms_client_;
145 scoped_ptr<ImageBurnerClient> image_burner_client_;
146 scoped_ptr<IntrospectableClient> introspectable_client_;
147 scoped_ptr<ModemMessagingClient> modem_messaging_client_;
148 scoped_ptr<NfcAdapterClient> nfc_adapter_client_;
149 scoped_ptr<NfcDeviceClient> nfc_device_client_;
150 scoped_ptr<NfcManagerClient> nfc_manager_client_;
151 scoped_ptr<NfcRecordClient> nfc_record_client_;
152 scoped_ptr<NfcTagClient> nfc_tag_client_;
153 scoped_ptr<PermissionBrokerClient> permission_broker_client_;
154 scoped_ptr<SystemClockClient> system_clock_client_;
155 scoped_ptr<PowerManagerClient> power_manager_client_;
156 scoped_ptr<SessionManagerClient> session_manager_client_;
157 scoped_ptr<SMSClient> sms_client_;
158 scoped_ptr<UpdateEngineClient> update_engine_client_;
159
160 scoped_ptr<PowerPolicyController> power_policy_controller_;
161
162 DISALLOW_COPY_AND_ASSIGN(FakeDBusThreadManager);
163 };
164
165 } // namespace chromeos
166
167 #endif // CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698