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

Side by Side Diff: chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h

Issue 9838085: Move files inside chrome/browser/chromeos/dbus to chromeos/dbus (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: _ Created 8 years, 9 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
OLDNEW
(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 MockImageBurnerClient;
30 class MockIntrospectableClient;
31 class MockPowerManagerClient;
32 class MockSessionManagerClient;
33 class MockSpeechSynthesizerClient;
34 class MockUpdateEngineClient;
35
36 // This class provides a mock DBusThreadManager with mock clients
37 // installed. You can customize the behaviors of mock clients with
38 // mock_foo_client() functions.
39 class MockDBusThreadManager : public DBusThreadManager {
40 public:
41 MockDBusThreadManager();
42 virtual ~MockDBusThreadManager();
43
44 MOCK_METHOD0(GetSystemBus, dbus::Bus*(void));
45 MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void));
46 MOCK_METHOD0(GetBluetoothDeviceClient, BluetoothDeviceClient*(void));
47 MOCK_METHOD0(GetBluetoothInputClient, BluetoothInputClient*(void));
48 MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void));
49 MOCK_METHOD0(GetBluetoothNodeClient, BluetoothNodeClient*(void));
50 MOCK_METHOD0(GetCashewClient, CashewClient*(void));
51 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void));
52 MOCK_METHOD0(GetCryptohomeClient, CryptohomeClient*(void));
53 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void));
54 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void));
55 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void));
56 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void));
57 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void));
58 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void));
59
60 MockBluetoothAdapterClient* mock_bluetooth_adapter_client() {
61 return mock_bluetooth_adapter_client_.get();
62 }
63 MockBluetoothDeviceClient* mock_bluetooth_device_client() {
64 return mock_bluetooth_device_client_.get();
65 }
66 MockBluetoothInputClient* mock_bluetooth_input_client() {
67 return mock_bluetooth_input_client_.get();
68 }
69 MockBluetoothManagerClient* mock_bluetooth_manager_client() {
70 return mock_bluetooth_manager_client_.get();
71 }
72 MockBluetoothNodeClient* mock_bluetooth_node_client() {
73 return mock_bluetooth_node_client_.get();
74 }
75 MockCashewClient* mock_cashew_client() {
76 return mock_cashew_client_.get();
77 }
78 MockCrosDisksClient* mock_cros_disks_client() {
79 return mock_cros_disks_client_.get();
80 }
81 MockCryptohomeClient* mock_cryptohome_client() {
82 return mock_cryptohome_client_.get();
83 }
84 MockImageBurnerClient* mock_image_burner_client() {
85 return mock_image_burner_client_.get();
86 }
87 MockIntrospectableClient* mock_introspectable_client() {
88 return mock_introspectable_client_.get();
89 }
90 MockPowerManagerClient* mock_power_manager_client() {
91 return mock_power_manager_client_.get();
92 }
93 MockSessionManagerClient* mock_session_manager_client() {
94 return mock_session_manager_client_.get();
95 }
96 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() {
97 return mock_speech_synthesizer_client_.get();
98 }
99 MockUpdateEngineClient* mock_update_engine_client() {
100 return mock_update_engine_client_.get();
101 }
102
103 private:
104 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_;
105 scoped_ptr<MockBluetoothDeviceClient> mock_bluetooth_device_client_;
106 scoped_ptr<MockBluetoothInputClient> mock_bluetooth_input_client_;
107 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_;
108 scoped_ptr<MockBluetoothNodeClient> mock_bluetooth_node_client_;
109 scoped_ptr<MockCashewClient> mock_cashew_client_;
110 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_;
111 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_;
112 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_;
113 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_;
114 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_;
115 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_;
116 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_;
117 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_;
118
119 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager);
120 };
121
122 } // namespace chromeos
123
124 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698