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

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: Created 7 years, 8 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 FakeUpdateEngineClient;
28 class MockIBusClient; 30 class MockIBusClient;
29 class MockIBusConfigClient; 31 class MockIBusConfigClient;
30 class MockIBusEngineFactoryService; 32 class MockIBusEngineFactoryService;
31 class MockIBusEngineService; 33 class MockIBusEngineService;
32 class MockIBusInputContextClient; 34 class MockIBusInputContextClient;
33 class MockIBusPanelService; 35 class MockIBusPanelService;
34 36
35 // This class provides an another mock DBusThreadManager without gmock 37 // This class provides an another mock DBusThreadManager without gmock
36 // dependency. This class is used for places where GMock is not allowed 38 // dependency. This class is used for places where GMock is not allowed
37 // (ex. ui/) or is not used. 39 // (ex. ui/) or is not used.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 139
138 MockIBusPanelService* mock_ibus_panel_service() { 140 MockIBusPanelService* mock_ibus_panel_service() {
139 return mock_ibus_panel_service_.get(); 141 return mock_ibus_panel_service_.get();
140 } 142 }
141 143
142 void set_ibus_bus(dbus::Bus* ibus_bus) { 144 void set_ibus_bus(dbus::Bus* ibus_bus) {
143 ibus_bus_ = ibus_bus; 145 ibus_bus_ = ibus_bus;
144 } 146 }
145 147
146 private: 148 private:
149 // These fake_bluetooth_*_client_ are for ExperimentalBluetooth*Client.
147 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; 150 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_;
148 scoped_ptr<FakeBluetoothAgentManagerClient> 151 scoped_ptr<FakeBluetoothAgentManagerClient>
149 fake_bluetooth_agent_manager_client_; 152 fake_bluetooth_agent_manager_client_;
150 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; 153 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_;
151 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_; 154 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_;
152 scoped_ptr<FakeBluetoothProfileManagerClient> 155 scoped_ptr<FakeBluetoothProfileManagerClient>
153 fake_bluetooth_profile_manager_client_; 156 fake_bluetooth_profile_manager_client_;
154 scoped_ptr<FakeCrosDisksClient> fake_cros_disks_client_; 157 scoped_ptr<FakeCrosDisksClient> fake_cros_disks_client_;
158 scoped_ptr<FakePowerManagerClient> fake_power_manager_client_;
159 scoped_ptr<FakeUpdateEngineClient> fake_update_engine_client_;
155 160
156 scoped_ptr<MockIBusClient> mock_ibus_client_; 161 scoped_ptr<MockIBusClient> mock_ibus_client_;
157 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_; 162 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_;
158 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_; 163 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_;
159 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_; 164 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_;
160 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_; 165 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_;
161 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_; 166 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_;
162 167
168 // These stub_bluetooth_*_client_ are for old Bluetooth*Client.
169 // Will be removed once http://crbug.com/221813 is resolved.
170 scoped_ptr<BluetoothManagerClient> stub_bluetooth_manager_client_;
171 scoped_ptr<BluetoothAdapterClient> stub_bluetooth_adapter_client_;
172 scoped_ptr<BluetoothDeviceClient> stub_bluetooth_device_client_;
173
174 scoped_ptr<ImageBurnerClient> stub_image_burner_client_;
175 scoped_ptr<SessionManagerClient> stub_session_manager_client_;
176 scoped_ptr<SystemClockClient> stub_system_clock_client_;
177
178 scoped_ptr<PowerPolicyController> power_policy_controller_;
163 dbus::Bus* ibus_bus_; 179 dbus::Bus* ibus_bus_;
164 180
165 ObserverList<DBusThreadManagerObserver> observers_; 181 ObserverList<DBusThreadManagerObserver> observers_;
166 182
167 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock); 183 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock);
168 }; 184 };
169 185
170 } // namespace chromeos 186 } // namespace chromeos
171 187
172 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ 188 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698