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

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

Issue 14392007: dbus: Use stubs for some clients and utils for MockDBusThreadManagerWithoutGMock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary include. 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_WITHOUT_GMOCK_H_ 5 #ifndef CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_
6 #define CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ 6 #define CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "chromeos/dbus/dbus_thread_manager.h" 12 #include "chromeos/dbus/dbus_thread_manager.h"
13 13
14 namespace dbus { 14 namespace dbus {
15 class Bus; 15 class Bus;
16 class ObjectPath; 16 class ObjectPath;
17 } // namespace dbus 17 } // namespace dbus
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 class DBusThreadManagerObserver; 21 class DBusThreadManagerObserver;
22 class FakeBluetoothAdapterClient; 22 class FakeBluetoothAdapterClient;
23 class FakeBluetoothAgentManagerClient; 23 class FakeBluetoothAgentManagerClient;
24 class FakeBluetoothDeviceClient; 24 class FakeBluetoothDeviceClient;
25 class FakeBluetoothInputClient; 25 class FakeBluetoothInputClient;
26 class FakeBluetoothProfileManagerClient; 26 class FakeBluetoothProfileManagerClient;
27 class FakeCrosDisksClient; 27 class FakeCrosDisksClient;
28 class FakePowerManagerClient;
29 class FakeSessionManagerClient;
28 class FakeShillManagerClient; 30 class FakeShillManagerClient;
31 class FakeUpdateEngineClient;
29 class MockIBusClient; 32 class MockIBusClient;
30 class MockIBusConfigClient; 33 class MockIBusConfigClient;
31 class MockIBusEngineFactoryService; 34 class MockIBusEngineFactoryService;
32 class MockIBusEngineService; 35 class MockIBusEngineService;
33 class MockIBusInputContextClient; 36 class MockIBusInputContextClient;
34 class MockIBusPanelService; 37 class MockIBusPanelService;
35 38
36 // This class provides an another mock DBusThreadManager without gmock 39 // This class provides an another mock DBusThreadManager without gmock
37 // dependency. This class is used for places where GMock is not allowed 40 // dependency. This class is used for places where GMock is not allowed
38 // (ex. ui/) or is not used. 41 // (ex. ui/) or is not used.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 145
143 MockIBusPanelService* mock_ibus_panel_service() { 146 MockIBusPanelService* mock_ibus_panel_service() {
144 return mock_ibus_panel_service_.get(); 147 return mock_ibus_panel_service_.get();
145 } 148 }
146 149
147 void set_ibus_bus(dbus::Bus* ibus_bus) { 150 void set_ibus_bus(dbus::Bus* ibus_bus) {
148 ibus_bus_ = ibus_bus; 151 ibus_bus_ = ibus_bus;
149 } 152 }
150 153
151 private: 154 private:
155 // These fake_bluetooth_*_client_ are for ExperimentalBluetooth*Client.
152 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; 156 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_;
153 scoped_ptr<FakeBluetoothAgentManagerClient> 157 scoped_ptr<FakeBluetoothAgentManagerClient>
154 fake_bluetooth_agent_manager_client_; 158 fake_bluetooth_agent_manager_client_;
155 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; 159 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_;
156 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_; 160 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_;
157 scoped_ptr<FakeBluetoothProfileManagerClient> 161 scoped_ptr<FakeBluetoothProfileManagerClient>
158 fake_bluetooth_profile_manager_client_; 162 fake_bluetooth_profile_manager_client_;
159 scoped_ptr<FakeCrosDisksClient> fake_cros_disks_client_; 163 scoped_ptr<FakeCrosDisksClient> fake_cros_disks_client_;
164 scoped_ptr<FakePowerManagerClient> fake_power_manager_client_;
165 scoped_ptr<FakeSessionManagerClient> fake_session_manager_client_;
160 scoped_ptr<FakeShillManagerClient> fake_shill_manager_client_; 166 scoped_ptr<FakeShillManagerClient> fake_shill_manager_client_;
167 scoped_ptr<FakeUpdateEngineClient> fake_update_engine_client_;
161 168
162 scoped_ptr<MockIBusClient> mock_ibus_client_; 169 scoped_ptr<MockIBusClient> mock_ibus_client_;
163 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_; 170 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_;
164 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_; 171 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_;
165 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_; 172 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_;
166 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_; 173 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_;
167 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_; 174 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_;
168 175
176 // These stub_bluetooth_*_client_ are for old Bluetooth*Client.
177 // Will be removed once http://crbug.com/221813 is resolved.
178 scoped_ptr<BluetoothManagerClient> stub_bluetooth_manager_client_;
179 scoped_ptr<BluetoothAdapterClient> stub_bluetooth_adapter_client_;
180 scoped_ptr<BluetoothDeviceClient> stub_bluetooth_device_client_;
181
182 scoped_ptr<PowerPolicyController> power_policy_controller_;
169 dbus::Bus* ibus_bus_; 183 dbus::Bus* ibus_bus_;
170 184
171 ObserverList<DBusThreadManagerObserver> observers_; 185 ObserverList<DBusThreadManagerObserver> observers_;
172 186
173 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock); 187 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock);
174 }; 188 };
175 189
176 } // namespace chromeos 190 } // namespace chromeos
177 191
178 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ 192 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698