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" |
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 FakeBluetoothProfileManagerClient; | 26 class FakeBluetoothProfileManagerClient; |
26 class MockIBusClient; | 27 class MockIBusClient; |
27 class MockIBusConfigClient; | 28 class MockIBusConfigClient; |
28 class MockIBusEngineFactoryService; | 29 class MockIBusEngineFactoryService; |
29 class MockIBusEngineService; | 30 class MockIBusEngineService; |
30 class MockIBusInputContextClient; | 31 class MockIBusInputContextClient; |
31 class MockIBusPanelService; | 32 class MockIBusPanelService; |
32 | 33 |
33 // This class provides an another mock DBusThreadManager without gmock | 34 // This class provides an another mock DBusThreadManager without gmock |
34 // dependency. This class is used only for places where GMock is not allowed | 35 // dependency. This class is used only for places where GMock is not allowed |
(...skipping 18 matching lines...) Expand all Loading... |
53 virtual CrasAudioClient* GetCrasAudioClient() OVERRIDE; | 54 virtual CrasAudioClient* GetCrasAudioClient() OVERRIDE; |
54 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE; | 55 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE; |
55 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE; | 56 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE; |
56 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE; | 57 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE; |
57 virtual ExperimentalBluetoothAdapterClient* | 58 virtual ExperimentalBluetoothAdapterClient* |
58 GetExperimentalBluetoothAdapterClient() OVERRIDE; | 59 GetExperimentalBluetoothAdapterClient() OVERRIDE; |
59 virtual ExperimentalBluetoothAgentManagerClient* | 60 virtual ExperimentalBluetoothAgentManagerClient* |
60 GetExperimentalBluetoothAgentManagerClient() OVERRIDE; | 61 GetExperimentalBluetoothAgentManagerClient() OVERRIDE; |
61 virtual ExperimentalBluetoothDeviceClient* | 62 virtual ExperimentalBluetoothDeviceClient* |
62 GetExperimentalBluetoothDeviceClient() OVERRIDE; | 63 GetExperimentalBluetoothDeviceClient() OVERRIDE; |
| 64 virtual ExperimentalBluetoothInputClient* |
| 65 GetExperimentalBluetoothInputClient() OVERRIDE; |
63 virtual ExperimentalBluetoothProfileManagerClient* | 66 virtual ExperimentalBluetoothProfileManagerClient* |
64 GetExperimentalBluetoothProfileManagerClient() OVERRIDE; | 67 GetExperimentalBluetoothProfileManagerClient() OVERRIDE; |
65 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE; | 68 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE; |
66 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE; | 69 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE; |
67 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE; | 70 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE; |
68 virtual ShillProfileClient* GetShillProfileClient() OVERRIDE; | 71 virtual ShillProfileClient* GetShillProfileClient() OVERRIDE; |
69 virtual ShillServiceClient* GetShillServiceClient() OVERRIDE; | 72 virtual ShillServiceClient* GetShillServiceClient() OVERRIDE; |
70 virtual GsmSMSClient* GetGsmSMSClient() OVERRIDE; | 73 virtual GsmSMSClient* GetGsmSMSClient() OVERRIDE; |
71 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE; | 74 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE; |
72 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE; | 75 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE; |
(...skipping 21 matching lines...) Expand all Loading... |
94 } | 97 } |
95 | 98 |
96 FakeBluetoothAgentManagerClient* fake_bluetooth_agent_manager_client() { | 99 FakeBluetoothAgentManagerClient* fake_bluetooth_agent_manager_client() { |
97 return fake_bluetooth_agent_manager_client_.get(); | 100 return fake_bluetooth_agent_manager_client_.get(); |
98 } | 101 } |
99 | 102 |
100 FakeBluetoothDeviceClient* fake_bluetooth_device_client() { | 103 FakeBluetoothDeviceClient* fake_bluetooth_device_client() { |
101 return fake_bluetooth_device_client_.get(); | 104 return fake_bluetooth_device_client_.get(); |
102 } | 105 } |
103 | 106 |
| 107 FakeBluetoothInputClient* fake_bluetooth_input_client() { |
| 108 return fake_bluetooth_input_client_.get(); |
| 109 } |
| 110 |
104 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client() { | 111 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client() { |
105 return fake_bluetooth_profile_manager_client_.get(); | 112 return fake_bluetooth_profile_manager_client_.get(); |
106 } | 113 } |
107 | 114 |
108 MockIBusClient* mock_ibus_client() { | 115 MockIBusClient* mock_ibus_client() { |
109 return mock_ibus_client_.get(); | 116 return mock_ibus_client_.get(); |
110 } | 117 } |
111 | 118 |
112 MockIBusConfigClient* mock_ibus_config_client() { | 119 MockIBusConfigClient* mock_ibus_config_client() { |
113 return mock_ibus_config_client_.get(); | 120 return mock_ibus_config_client_.get(); |
(...skipping 17 matching lines...) Expand all Loading... |
131 | 138 |
132 void set_ibus_bus(dbus::Bus* ibus_bus) { | 139 void set_ibus_bus(dbus::Bus* ibus_bus) { |
133 ibus_bus_ = ibus_bus; | 140 ibus_bus_ = ibus_bus; |
134 } | 141 } |
135 | 142 |
136 private: | 143 private: |
137 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; | 144 scoped_ptr<FakeBluetoothAdapterClient> fake_bluetooth_adapter_client_; |
138 scoped_ptr<FakeBluetoothAgentManagerClient> | 145 scoped_ptr<FakeBluetoothAgentManagerClient> |
139 fake_bluetooth_agent_manager_client_; | 146 fake_bluetooth_agent_manager_client_; |
140 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; | 147 scoped_ptr<FakeBluetoothDeviceClient> fake_bluetooth_device_client_; |
| 148 scoped_ptr<FakeBluetoothInputClient> fake_bluetooth_input_client_; |
141 scoped_ptr<FakeBluetoothProfileManagerClient> | 149 scoped_ptr<FakeBluetoothProfileManagerClient> |
142 fake_bluetooth_profile_manager_client_; | 150 fake_bluetooth_profile_manager_client_; |
143 scoped_ptr<MockIBusClient> mock_ibus_client_; | 151 scoped_ptr<MockIBusClient> mock_ibus_client_; |
144 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_; | 152 scoped_ptr<MockIBusConfigClient> mock_ibus_config_client_; |
145 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_; | 153 scoped_ptr<MockIBusInputContextClient> mock_ibus_input_context_client_; |
146 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_; | 154 scoped_ptr<MockIBusEngineService> mock_ibus_engine_service_; |
147 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_; | 155 scoped_ptr<MockIBusEngineFactoryService> mock_ibus_engine_factory_service_; |
148 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_; | 156 scoped_ptr<MockIBusPanelService> mock_ibus_panel_service_; |
149 | 157 |
150 dbus::Bus* ibus_bus_; | 158 dbus::Bus* ibus_bus_; |
151 | 159 |
152 ObserverList<DBusThreadManagerObserver> observers_; | 160 ObserverList<DBusThreadManagerObserver> observers_; |
153 | 161 |
154 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock); | 162 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManagerWithoutGMock); |
155 }; | 163 }; |
156 | 164 |
157 } // namespace chromeos | 165 } // namespace chromeos |
158 | 166 |
159 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ | 167 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_WITHOUT_GMOCK_H_ |
OLD | NEW |