| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | |
| 11 #include "testing/gmock/include/gmock/gmock.h" | |
| 12 | |
| 13 namespace dbus { | |
| 14 | |
| 15 class Bus; | |
| 16 | |
| 17 } // namespace dbus | |
| 18 | |
| 19 namespace chromeos { | |
| 20 | |
| 21 class MockBluetoothAdapterClient; | |
| 22 class MockBluetoothDeviceClient; | |
| 23 class MockBluetoothInputClient; | |
| 24 class MockBluetoothManagerClient; | |
| 25 class MockBluetoothNodeClient; | |
| 26 class MockCashewClient; | |
| 27 class MockCrosDisksClient; | |
| 28 class MockCryptohomeClient; | |
| 29 class MockFlimflamIPConfigClient; | |
| 30 class MockFlimflamNetworkClient; | |
| 31 class MockFlimflamProfileClient; | |
| 32 class MockImageBurnerClient; | |
| 33 class MockIntrospectableClient; | |
| 34 class MockPowerManagerClient; | |
| 35 class MockSessionManagerClient; | |
| 36 class MockSpeechSynthesizerClient; | |
| 37 class MockUpdateEngineClient; | |
| 38 | |
| 39 // This class provides a mock DBusThreadManager with mock clients | |
| 40 // installed. You can customize the behaviors of mock clients with | |
| 41 // mock_foo_client() functions. | |
| 42 class MockDBusThreadManager : public DBusThreadManager { | |
| 43 public: | |
| 44 MockDBusThreadManager(); | |
| 45 virtual ~MockDBusThreadManager(); | |
| 46 | |
| 47 MOCK_METHOD0(GetSystemBus, dbus::Bus*(void)); | |
| 48 MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void)); | |
| 49 MOCK_METHOD0(GetBluetoothDeviceClient, BluetoothDeviceClient*(void)); | |
| 50 MOCK_METHOD0(GetBluetoothInputClient, BluetoothInputClient*(void)); | |
| 51 MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void)); | |
| 52 MOCK_METHOD0(GetBluetoothNodeClient, BluetoothNodeClient*(void)); | |
| 53 MOCK_METHOD0(GetCashewClient, CashewClient*(void)); | |
| 54 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void)); | |
| 55 MOCK_METHOD0(GetCryptohomeClient, CryptohomeClient*(void)); | |
| 56 MOCK_METHOD0(GetFlimflamIPConfigClient, FlimflamIPConfigClient*(void)); | |
| 57 MOCK_METHOD0(GetFlimflamNetworkClient, FlimflamNetworkClient*(void)); | |
| 58 MOCK_METHOD0(GetFlimflamProfileClient, FlimflamProfileClient*(void)); | |
| 59 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void)); | |
| 60 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void)); | |
| 61 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void)); | |
| 62 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void)); | |
| 63 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void)); | |
| 64 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void)); | |
| 65 | |
| 66 MockBluetoothAdapterClient* mock_bluetooth_adapter_client() { | |
| 67 return mock_bluetooth_adapter_client_.get(); | |
| 68 } | |
| 69 MockBluetoothDeviceClient* mock_bluetooth_device_client() { | |
| 70 return mock_bluetooth_device_client_.get(); | |
| 71 } | |
| 72 MockBluetoothInputClient* mock_bluetooth_input_client() { | |
| 73 return mock_bluetooth_input_client_.get(); | |
| 74 } | |
| 75 MockBluetoothManagerClient* mock_bluetooth_manager_client() { | |
| 76 return mock_bluetooth_manager_client_.get(); | |
| 77 } | |
| 78 MockBluetoothNodeClient* mock_bluetooth_node_client() { | |
| 79 return mock_bluetooth_node_client_.get(); | |
| 80 } | |
| 81 MockCashewClient* mock_cashew_client() { | |
| 82 return mock_cashew_client_.get(); | |
| 83 } | |
| 84 MockCrosDisksClient* mock_cros_disks_client() { | |
| 85 return mock_cros_disks_client_.get(); | |
| 86 } | |
| 87 MockCryptohomeClient* mock_cryptohome_client() { | |
| 88 return mock_cryptohome_client_.get(); | |
| 89 } | |
| 90 MockFlimflamIPConfigClient* mock_flimflam_ipconfig_client() { | |
| 91 return mock_flimflam_ipconfig_client_.get(); | |
| 92 } | |
| 93 MockFlimflamNetworkClient* mock_flimflam_network_client() { | |
| 94 return mock_flimflam_network_client_.get(); | |
| 95 } | |
| 96 MockFlimflamProfileClient* mock_flimflam_profile_client() { | |
| 97 return mock_flimflam_profile_client_.get(); | |
| 98 } | |
| 99 MockImageBurnerClient* mock_image_burner_client() { | |
| 100 return mock_image_burner_client_.get(); | |
| 101 } | |
| 102 MockIntrospectableClient* mock_introspectable_client() { | |
| 103 return mock_introspectable_client_.get(); | |
| 104 } | |
| 105 MockPowerManagerClient* mock_power_manager_client() { | |
| 106 return mock_power_manager_client_.get(); | |
| 107 } | |
| 108 MockSessionManagerClient* mock_session_manager_client() { | |
| 109 return mock_session_manager_client_.get(); | |
| 110 } | |
| 111 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() { | |
| 112 return mock_speech_synthesizer_client_.get(); | |
| 113 } | |
| 114 MockUpdateEngineClient* mock_update_engine_client() { | |
| 115 return mock_update_engine_client_.get(); | |
| 116 } | |
| 117 | |
| 118 private: | |
| 119 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_; | |
| 120 scoped_ptr<MockBluetoothDeviceClient> mock_bluetooth_device_client_; | |
| 121 scoped_ptr<MockBluetoothInputClient> mock_bluetooth_input_client_; | |
| 122 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_; | |
| 123 scoped_ptr<MockBluetoothNodeClient> mock_bluetooth_node_client_; | |
| 124 scoped_ptr<MockCashewClient> mock_cashew_client_; | |
| 125 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_; | |
| 126 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_; | |
| 127 scoped_ptr<MockFlimflamIPConfigClient> mock_flimflam_ipconfig_client_; | |
| 128 scoped_ptr<MockFlimflamNetworkClient> mock_flimflam_network_client_; | |
| 129 scoped_ptr<MockFlimflamProfileClient> mock_flimflam_profile_client_; | |
| 130 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_; | |
| 131 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_; | |
| 132 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_; | |
| 133 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_; | |
| 134 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_; | |
| 135 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_; | |
| 136 | |
| 137 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager); | |
| 138 }; | |
| 139 | |
| 140 } // namespace chromeos | |
| 141 | |
| 142 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ | |
| OLD | NEW |