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