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

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

Issue 8585025: chromeos: Change all clients of UpdateLibrary to use UpdateEngineClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 chromeos { 13 namespace chromeos {
14 14
15 class MockBluetoothManagerClient; 15 class MockBluetoothManagerClient;
16 class MockBluetoothAdapterClient; 16 class MockBluetoothAdapterClient;
17 class MockCrosDisksClient; 17 class MockCrosDisksClient;
18 class MockPowerManagerClient; 18 class MockPowerManagerClient;
19 class MockSensorsClient; 19 class MockSensorsClient;
20 class MockSessionManagerClient; 20 class MockSessionManagerClient;
21 class MockSpeechSynthesizerClient; 21 class MockSpeechSynthesizerClient;
22 class MockUpdateEngineClient;
22 23
23 // This class provides a mock DBusThreadManager with mock clients 24 // This class provides a mock DBusThreadManager with mock clients
24 // installed. You can customize the behaviors of mock clients with 25 // installed. You can customize the behaviors of mock clients with
25 // mock_foo_client() functions. 26 // mock_foo_client() functions.
26 class MockDBusThreadManager : public DBusThreadManager { 27 class MockDBusThreadManager : public DBusThreadManager {
27 public: 28 public:
28 MockDBusThreadManager(); 29 MockDBusThreadManager();
29 virtual ~MockDBusThreadManager(); 30 virtual ~MockDBusThreadManager();
30 31
31 MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void)); 32 MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void));
32 MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void)); 33 MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void));
33 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void)); 34 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void));
34 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void)); 35 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void));
35 MOCK_METHOD0(GetSensorsClient, SensorsClient*(void)); 36 MOCK_METHOD0(GetSensorsClient, SensorsClient*(void));
36 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void)); 37 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void));
37 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void)); 38 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void));
39 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void));
38 40
39 MockBluetoothAdapterClient* mock_bluetooth_adapter_client() { 41 MockBluetoothAdapterClient* mock_bluetooth_adapter_client() {
40 return mock_bluetooth_adapter_client_.get(); 42 return mock_bluetooth_adapter_client_.get();
41 } 43 }
42 MockBluetoothManagerClient* mock_bluetooth_manager_client() { 44 MockBluetoothManagerClient* mock_bluetooth_manager_client() {
43 return mock_bluetooth_manager_client_.get(); 45 return mock_bluetooth_manager_client_.get();
44 } 46 }
45 MockCrosDisksClient* mock_cros_disks_client() { 47 MockCrosDisksClient* mock_cros_disks_client() {
46 return mock_cros_disks_client_.get(); 48 return mock_cros_disks_client_.get();
47 } 49 }
48 MockPowerManagerClient* mock_power_manager_client() { 50 MockPowerManagerClient* mock_power_manager_client() {
49 return mock_power_manager_client_.get(); 51 return mock_power_manager_client_.get();
50 } 52 }
51 MockSensorsClient* mock_sensors_client() { 53 MockSensorsClient* mock_sensors_client() {
52 return mock_sensors_client_.get(); 54 return mock_sensors_client_.get();
53 } 55 }
54 MockSessionManagerClient* mock_session_manager_client() { 56 MockSessionManagerClient* mock_session_manager_client() {
55 return mock_session_manager_client_.get(); 57 return mock_session_manager_client_.get();
56 } 58 }
57 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() { 59 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() {
58 return mock_speech_synthesizer_client_.get(); 60 return mock_speech_synthesizer_client_.get();
59 } 61 }
62 MockUpdateEngineClient* mock_update_engine_client() {
63 return mock_update_engine_client_.get();
64 }
60 65
61 private: 66 private:
62 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_; 67 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_;
63 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_; 68 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_;
64 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_; 69 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_;
65 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_; 70 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_;
66 scoped_ptr<MockSensorsClient> mock_sensors_client_; 71 scoped_ptr<MockSensorsClient> mock_sensors_client_;
67 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_; 72 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_;
68 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_; 73 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_;
74 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_;
69 75
70 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager); 76 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager);
71 }; 77 };
72 78
73 } // namespace chromeos 79 } // namespace chromeos
74 80
75 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 81 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/dbus_thread_manager.cc ('k') | chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698