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

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

Issue 15020009: Bluetooth: remove legacy backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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 #ifndef CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 5 #ifndef CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
6 #define CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 6 #define CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "chromeos/dbus/dbus_thread_manager.h" 11 #include "chromeos/dbus/dbus_thread_manager.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 13
14 namespace dbus { 14 namespace dbus {
15 15
16 class Bus; 16 class Bus;
17 17
18 } // namespace dbus 18 } // namespace dbus
19 19
20 namespace chromeos { 20 namespace chromeos {
21 21
22 class DBusThreadManagerObserver; 22 class DBusThreadManagerObserver;
23 class FakeBluetoothAdapterClient; 23 class FakeBluetoothAdapterClient;
24 class FakeBluetoothAgentManagerClient; 24 class FakeBluetoothAgentManagerClient;
25 class FakeBluetoothDeviceClient; 25 class FakeBluetoothDeviceClient;
26 class FakeBluetoothInputClient; 26 class FakeBluetoothInputClient;
27 class FakeBluetoothProfileManagerClient; 27 class FakeBluetoothProfileManagerClient;
28 class MockBluetoothAdapterClient;
29 class MockBluetoothDeviceClient;
30 class MockBluetoothInputClient;
31 class MockBluetoothManagerClient;
32 class MockBluetoothNodeClient;
33 class MockBluetoothOutOfBandClient;
34 class MockCryptohomeClient; 28 class MockCryptohomeClient;
35 class MockShillDeviceClient; 29 class MockShillDeviceClient;
36 class MockShillIPConfigClient; 30 class MockShillIPConfigClient;
37 class MockShillManagerClient; 31 class MockShillManagerClient;
38 class MockShillProfileClient; 32 class MockShillProfileClient;
39 class MockShillServiceClient; 33 class MockShillServiceClient;
40 class MockGsmSMSClient; 34 class MockGsmSMSClient;
41 class MockPowerManagerClient; 35 class MockPowerManagerClient;
42 class MockSessionManagerClient; 36 class MockSessionManagerClient;
43 37
44 // This class provides a mock DBusThreadManager with mock clients 38 // This class provides a mock DBusThreadManager with mock clients
45 // installed. You can customize the behaviors of mock clients with 39 // installed. You can customize the behaviors of mock clients with
46 // mock_foo_client() functions. 40 // mock_foo_client() functions.
47 // Please avoid adding more GMock in this class. We have an ongoing effort to 41 // Please avoid adding more GMock in this class. We have an ongoing effort to
48 // remove GMock dependency. TODO(haruki): crbug.com/223061. 42 // remove GMock dependency. TODO(haruki): crbug.com/223061.
49 class MockDBusThreadManager : public DBusThreadManager { 43 class MockDBusThreadManager : public DBusThreadManager {
50 public: 44 public:
51 MockDBusThreadManager(); 45 MockDBusThreadManager();
52 virtual ~MockDBusThreadManager(); 46 virtual ~MockDBusThreadManager();
53 47
54 void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE; 48 void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE;
55 void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE; 49 void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE;
56 MOCK_METHOD2(InitIBusBus, void(const std::string& ibus_address, 50 MOCK_METHOD2(InitIBusBus, void(const std::string& ibus_address,
57 const base::Closure& closure)); 51 const base::Closure& closure));
58 MOCK_METHOD0(GetSystemBus, dbus::Bus*(void)); 52 MOCK_METHOD0(GetSystemBus, dbus::Bus*(void));
59 MOCK_METHOD0(GetIBusBus, dbus::Bus*(void)); 53 MOCK_METHOD0(GetIBusBus, dbus::Bus*(void));
60 MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void));
61 MOCK_METHOD0(GetBluetoothDeviceClient, BluetoothDeviceClient*(void));
62 MOCK_METHOD0(GetBluetoothInputClient, BluetoothInputClient*(void));
63 MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void));
64 MOCK_METHOD0(GetBluetoothNodeClient, BluetoothNodeClient*(void));
65 MOCK_METHOD0(GetBluetoothOutOfBandClient, BluetoothOutOfBandClient*(void));
66 MOCK_METHOD0(GetCrasAudioClient, CrasAudioClient*(void)); 54 MOCK_METHOD0(GetCrasAudioClient, CrasAudioClient*(void));
67 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void)); 55 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void));
68 MOCK_METHOD0(GetCryptohomeClient, CryptohomeClient*(void)); 56 MOCK_METHOD0(GetCryptohomeClient, CryptohomeClient*(void));
69 MOCK_METHOD0(GetDebugDaemonClient, DebugDaemonClient*(void)); 57 MOCK_METHOD0(GetDebugDaemonClient, DebugDaemonClient*(void));
70 MOCK_METHOD0(GetExperimentalBluetoothAdapterClient, 58 MOCK_METHOD0(GetExperimentalBluetoothAdapterClient,
71 ExperimentalBluetoothAdapterClient*(void)); 59 ExperimentalBluetoothAdapterClient*(void));
72 MOCK_METHOD0(GetExperimentalBluetoothAgentManagerClient, 60 MOCK_METHOD0(GetExperimentalBluetoothAgentManagerClient,
73 ExperimentalBluetoothAgentManagerClient*(void)); 61 ExperimentalBluetoothAgentManagerClient*(void));
74 MOCK_METHOD0(GetExperimentalBluetoothDeviceClient, 62 MOCK_METHOD0(GetExperimentalBluetoothDeviceClient,
75 ExperimentalBluetoothDeviceClient*(void)); 63 ExperimentalBluetoothDeviceClient*(void));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 99 }
112 FakeBluetoothDeviceClient* fake_bluetooth_device_client() { 100 FakeBluetoothDeviceClient* fake_bluetooth_device_client() {
113 return fake_bluetooth_device_client_.get(); 101 return fake_bluetooth_device_client_.get();
114 } 102 }
115 FakeBluetoothInputClient* fake_bluetooth_input_client() { 103 FakeBluetoothInputClient* fake_bluetooth_input_client() {
116 return fake_bluetooth_input_client_.get(); 104 return fake_bluetooth_input_client_.get();
117 } 105 }
118 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client() { 106 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client() {
119 return fake_bluetooth_profile_manager_client_.get(); 107 return fake_bluetooth_profile_manager_client_.get();
120 } 108 }
121 MockBluetoothAdapterClient* mock_bluetooth_adapter_client() {
122 return mock_bluetooth_adapter_client_.get();
123 }
124 MockBluetoothDeviceClient* mock_bluetooth_device_client() {
125 return mock_bluetooth_device_client_.get();
126 }
127 MockBluetoothInputClient* mock_bluetooth_input_client() {
128 return mock_bluetooth_input_client_.get();
129 }
130 MockBluetoothManagerClient* mock_bluetooth_manager_client() {
131 return mock_bluetooth_manager_client_.get();
132 }
133 MockBluetoothNodeClient* mock_bluetooth_node_client() {
134 return mock_bluetooth_node_client_.get();
135 }
136 MockBluetoothOutOfBandClient* mock_bluetooth_out_of_band_client() {
137 return mock_bluetooth_out_of_band_client_.get();
138 }
139 MockCryptohomeClient* mock_cryptohome_client() { 109 MockCryptohomeClient* mock_cryptohome_client() {
140 return mock_cryptohome_client_.get(); 110 return mock_cryptohome_client_.get();
141 } 111 }
142 MockShillDeviceClient* mock_shill_device_client() { 112 MockShillDeviceClient* mock_shill_device_client() {
143 return mock_shill_device_client_.get(); 113 return mock_shill_device_client_.get();
144 } 114 }
145 MockShillIPConfigClient* mock_shill_ipconfig_client() { 115 MockShillIPConfigClient* mock_shill_ipconfig_client() {
146 return mock_shill_ipconfig_client_.get(); 116 return mock_shill_ipconfig_client_.get();
147 } 117 }
148 MockShillManagerClient* mock_shill_manager_client() { 118 MockShillManagerClient* mock_shill_manager_client() {
(...skipping 17 matching lines...) Expand all
166 // their c'tors. 136 // their c'tors.
167 ObserverList<DBusThreadManagerObserver> observers_; 137 ObserverList<DBusThreadManagerObserver> observers_;
168 138
169 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; 139 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_;
170 scoped_ptr<FakeBluetoothAgentManagerClient> 140 scoped_ptr<FakeBluetoothAgentManagerClient>
171 fake_bluetooth_agent_manager_client_; 141 fake_bluetooth_agent_manager_client_;
172 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; 142 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_;
173 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_; 143 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_;
174 scoped_ptr<FakeBluetoothProfileManagerClient> 144 scoped_ptr<FakeBluetoothProfileManagerClient>
175 fake_bluetooth_profile_manager_client_; 145 fake_bluetooth_profile_manager_client_;
176 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_;
177 scoped_ptr<MockBluetoothDeviceClient> mock_bluetooth_device_client_;
178 scoped_ptr<MockBluetoothInputClient> mock_bluetooth_input_client_;
179 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_;
180 scoped_ptr<MockBluetoothNodeClient> mock_bluetooth_node_client_;
181 scoped_ptr<MockBluetoothOutOfBandClient> mock_bluetooth_out_of_band_client_;
182 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_; 146 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_;
183 scoped_ptr<MockShillDeviceClient> mock_shill_device_client_; 147 scoped_ptr<MockShillDeviceClient> mock_shill_device_client_;
184 scoped_ptr<MockShillIPConfigClient> mock_shill_ipconfig_client_; 148 scoped_ptr<MockShillIPConfigClient> mock_shill_ipconfig_client_;
185 scoped_ptr<MockShillManagerClient> mock_shill_manager_client_; 149 scoped_ptr<MockShillManagerClient> mock_shill_manager_client_;
186 scoped_ptr<MockShillProfileClient> mock_shill_profile_client_; 150 scoped_ptr<MockShillProfileClient> mock_shill_profile_client_;
187 scoped_ptr<MockShillServiceClient> mock_shill_service_client_; 151 scoped_ptr<MockShillServiceClient> mock_shill_service_client_;
188 scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_; 152 scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_;
189 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_; 153 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_;
190 154
191 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager); 155 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager);
192 }; 156 };
193 157
194 } // namespace chromeos 158 } // namespace chromeos
195 159
196 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 160 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/mock_bluetooth_out_of_band_client.cc ('k') | chromeos/dbus/mock_dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698