| OLD | NEW |
| 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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 FakeCryptohomeClient; | 28 class FakeCryptohomeClient; |
| 29 class FakeOldBluetoothAdapterClient; | 29 class FakeOldBluetoothAdapterClient; |
| 30 class FakeOldBluetoothDeviceClient; | 30 class FakeOldBluetoothDeviceClient; |
| 31 class FakeOldBluetoothManagerClient; | 31 class FakeOldBluetoothManagerClient; |
| 32 class FakePowerManagerClient; |
| 33 class FakeImageBurnerClient; |
| 34 class FakeSessionManagerClient; |
| 32 class FakeShillManagerClient; | 35 class FakeShillManagerClient; |
| 33 class FakeImageBurnerClient; | |
| 34 class FakeSystemClockClient; | 36 class FakeSystemClockClient; |
| 37 class FakeUpdateEngineClient; |
| 35 class MockIBusClient; | 38 class MockIBusClient; |
| 36 class MockIBusConfigClient; | 39 class MockIBusConfigClient; |
| 37 class MockIBusEngineFactoryService; | 40 class MockIBusEngineFactoryService; |
| 38 class MockIBusEngineService; | 41 class MockIBusEngineService; |
| 39 class MockIBusInputContextClient; | 42 class MockIBusInputContextClient; |
| 40 class MockIBusPanelService; | 43 class MockIBusPanelService; |
| 41 | 44 |
| 42 // This class provides an another mock DBusThreadManager without gmock | 45 // This class provides an another mock DBusThreadManager without gmock |
| 43 // dependency. This class is used for places where GMock is not allowed | 46 // dependency. This class is used for places where GMock is not allowed |
| 44 // (ex. ui/) or is not used. | 47 // (ex. ui/) or is not used. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 163 |
| 161 MockIBusPanelService* mock_ibus_panel_service() { | 164 MockIBusPanelService* mock_ibus_panel_service() { |
| 162 return mock_ibus_panel_service_.get(); | 165 return mock_ibus_panel_service_.get(); |
| 163 } | 166 } |
| 164 | 167 |
| 165 void set_ibus_bus(dbus::Bus* ibus_bus) { | 168 void set_ibus_bus(dbus::Bus* ibus_bus) { |
| 166 ibus_bus_ = ibus_bus; | 169 ibus_bus_ = ibus_bus; |
| 167 } | 170 } |
| 168 | 171 |
| 169 private: | 172 private: |
| 173 // Note: Keep this before other members so they can call AddObserver() in |
| 174 // their c'tors. |
| 175 ObserverList<DBusThreadManagerObserver> observers_; |
| 176 |
| 170 // These fake_bluetooth_*_client_ are for ExperimentalBluetooth*Client. | 177 // These fake_bluetooth_*_client_ are for ExperimentalBluetooth*Client. |
| 171 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; | 178 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; |
| 172 scoped_ptr<FakeBluetoothAgentManagerClient> | 179 scoped_ptr<FakeBluetoothAgentManagerClient> |
| 173 fake_bluetooth_agent_manager_client_; | 180 fake_bluetooth_agent_manager_client_; |
| 174 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; | 181 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; |
| 175 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_; | 182 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_; |
| 176 scoped_ptr<FakeBluetoothProfileManagerClient> | 183 scoped_ptr<FakeBluetoothProfileManagerClient> |
| 177 fake_bluetooth_profile_manager_client_; | 184 fake_bluetooth_profile_manager_client_; |
| 178 scoped_ptr<FakeCrosDisksClient> fake_cros_disks_client_; | 185 scoped_ptr<FakeCrosDisksClient> fake_cros_disks_client_; |
| 179 scoped_ptr<FakeCryptohomeClient> fake_cryptohome_client_; | 186 scoped_ptr<FakeCryptohomeClient> fake_cryptohome_client_; |
| 180 scoped_ptr<FakeImageBurnerClient> fake_image_burner_client_; | 187 scoped_ptr<FakeImageBurnerClient> fake_image_burner_client_; |
| 188 scoped_ptr<FakeSessionManagerClient> fake_session_manager_client_; |
| 181 scoped_ptr<FakeShillManagerClient> fake_shill_manager_client_; | 189 scoped_ptr<FakeShillManagerClient> fake_shill_manager_client_; |
| 182 scoped_ptr<FakeSystemClockClient> fake_system_clock_client_; | 190 scoped_ptr<FakeSystemClockClient> fake_system_clock_client_; |
| 191 scoped_ptr<FakePowerManagerClient> fake_power_manager_client_; |
| 192 scoped_ptr<FakeUpdateEngineClient> fake_update_engine_client_; |
| 183 | 193 |
| 184 // These fake_old_bluetooth_*_client_ are for old Bluetooth*Client. | 194 // These fake_old_bluetooth_*_client_ are for old Bluetooth*Client. |
| 185 // Will be removed once http://crbug.com/221813 is resolved. | 195 // Will be removed once http://crbug.com/221813 is resolved. |
| 186 scoped_ptr<FakeOldBluetoothManagerClient> fake_old_bluetooth_manager_client_; | 196 scoped_ptr<FakeOldBluetoothManagerClient> fake_old_bluetooth_manager_client_; |
| 187 scoped_ptr<FakeOldBluetoothAdapterClient> fake_old_bluetooth_adapter_client_; | 197 scoped_ptr<FakeOldBluetoothAdapterClient> fake_old_bluetooth_adapter_client_; |
| 188 scoped_ptr<FakeOldBluetoothDeviceClient> fake_old_bluetooth_device_client_; | 198 scoped_ptr<FakeOldBluetoothDeviceClient> fake_old_bluetooth_device_client_; |
| 189 | 199 |
| 190 scoped_ptr<MockIBusClient> mock_ibus_client_; | 200 scoped_ptr<MockIBusClient> mock_ibus_client_; |
| 191 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_; | 201 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_; |
| 192 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_; | 202 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_; |
| 193 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_; | 203 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_; |
| 194 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_; | 204 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_; |
| 195 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_; | 205 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_; |
| 196 | 206 |
| 207 scoped_ptr<PowerPolicyController> power_policy_controller_; |
| 197 dbus::Bus* ibus_bus_; | 208 dbus::Bus* ibus_bus_; |
| 198 | 209 |
| 199 ObserverList<DBusThreadManagerObserver> observers_; | |
| 200 | |
| 201 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock); | 210 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock); |
| 202 }; | 211 }; |
| 203 | 212 |
| 204 } // namespace chromeos | 213 } // namespace chromeos |
| 205 | 214 |
| 206 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ | 215 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ |
| OLD | NEW |