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

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

Issue 12186010: chromeos: Add power management policy prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix observer registration and bool prefs Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/mock_dbus_thread_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_H_ 5 #ifndef CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
6 #define CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 6 #define CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 26 matching lines...) Expand all
37 class MockGsmSMSClient; 37 class MockGsmSMSClient;
38 class MockImageBurnerClient; 38 class MockImageBurnerClient;
39 class MockIntrospectableClient; 39 class MockIntrospectableClient;
40 class MockModemMessagingClient; 40 class MockModemMessagingClient;
41 class MockPermissionBrokerClient; 41 class MockPermissionBrokerClient;
42 class MockPowerManagerClient; 42 class MockPowerManagerClient;
43 class MockSessionManagerClient; 43 class MockSessionManagerClient;
44 class MockSMSClient; 44 class MockSMSClient;
45 class MockSpeechSynthesizerClient; 45 class MockSpeechSynthesizerClient;
46 class MockUpdateEngineClient; 46 class MockUpdateEngineClient;
47 class PowerPolicyController;
47 48
48 // This class provides a mock DBusThreadManager with mock clients 49 // This class provides a mock DBusThreadManager with mock clients
49 // installed. You can customize the behaviors of mock clients with 50 // installed. You can customize the behaviors of mock clients with
50 // mock_foo_client() functions. 51 // mock_foo_client() functions.
51 class MockDBusThreadManager : public DBusThreadManager { 52 class MockDBusThreadManager : public DBusThreadManager {
52 public: 53 public:
53 MockDBusThreadManager(); 54 MockDBusThreadManager();
54 virtual ~MockDBusThreadManager(); 55 virtual ~MockDBusThreadManager();
55 56
56 void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE; 57 void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE;
(...skipping 14 matching lines...) Expand all
71 MOCK_METHOD0(GetShillIPConfigClient, ShillIPConfigClient*(void)); 72 MOCK_METHOD0(GetShillIPConfigClient, ShillIPConfigClient*(void));
72 MOCK_METHOD0(GetShillManagerClient, ShillManagerClient*(void)); 73 MOCK_METHOD0(GetShillManagerClient, ShillManagerClient*(void));
73 MOCK_METHOD0(GetShillProfileClient, ShillProfileClient*(void)); 74 MOCK_METHOD0(GetShillProfileClient, ShillProfileClient*(void));
74 MOCK_METHOD0(GetShillServiceClient, ShillServiceClient*(void)); 75 MOCK_METHOD0(GetShillServiceClient, ShillServiceClient*(void));
75 MOCK_METHOD0(GetGsmSMSClient, GsmSMSClient*(void)); 76 MOCK_METHOD0(GetGsmSMSClient, GsmSMSClient*(void));
76 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void)); 77 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void));
77 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void)); 78 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void));
78 MOCK_METHOD0(GetModemMessagingClient, ModemMessagingClient*(void)); 79 MOCK_METHOD0(GetModemMessagingClient, ModemMessagingClient*(void));
79 MOCK_METHOD0(GetPermissionBrokerClient, PermissionBrokerClient*(void)); 80 MOCK_METHOD0(GetPermissionBrokerClient, PermissionBrokerClient*(void));
80 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void)); 81 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void));
82 MOCK_METHOD0(GetPowerPolicyController, PowerPolicyController*(void));
81 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void)); 83 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void));
82 MOCK_METHOD0(GetSMSClient, SMSClient*(void)); 84 MOCK_METHOD0(GetSMSClient, SMSClient*(void));
83 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void)); 85 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void));
84 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void)); 86 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void));
85 MOCK_METHOD0(GetIBusClient, IBusClient*(void)); 87 MOCK_METHOD0(GetIBusClient, IBusClient*(void));
86 MOCK_METHOD0(GetIBusConfigClient, IBusConfigClient*(void)); 88 MOCK_METHOD0(GetIBusConfigClient, IBusConfigClient*(void));
87 MOCK_METHOD0(GetIBusInputContextClient, IBusInputContextClient*(void)); 89 MOCK_METHOD0(GetIBusInputContextClient, IBusInputContextClient*(void));
88 MOCK_METHOD0(GetIBusEngineFactoryService, IBusEngineFactoryService*(void)); 90 MOCK_METHOD0(GetIBusEngineFactoryService, IBusEngineFactoryService*(void));
89 MOCK_METHOD1(GetIBusEngineService, 91 MOCK_METHOD1(GetIBusEngineService,
90 IBusEngineService*(const dbus::ObjectPath& object_path)); 92 IBusEngineService*(const dbus::ObjectPath& object_path));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 return mock_sms_client_.get(); 161 return mock_sms_client_.get();
160 } 162 }
161 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() { 163 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() {
162 return mock_speech_synthesizer_client_.get(); 164 return mock_speech_synthesizer_client_.get();
163 } 165 }
164 MockUpdateEngineClient* mock_update_engine_client() { 166 MockUpdateEngineClient* mock_update_engine_client() {
165 return mock_update_engine_client_.get(); 167 return mock_update_engine_client_.get();
166 } 168 }
167 169
168 private: 170 private:
171 // Note: Keep this before other members so they can call AddObserver() in
172 // their c'tors.
173 ObserverList<DBusThreadManagerObserver> observers_;
174
169 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_; 175 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_;
170 scoped_ptr<MockBluetoothDeviceClient> mock_bluetooth_device_client_; 176 scoped_ptr<MockBluetoothDeviceClient> mock_bluetooth_device_client_;
171 scoped_ptr<MockBluetoothInputClient> mock_bluetooth_input_client_; 177 scoped_ptr<MockBluetoothInputClient> mock_bluetooth_input_client_;
172 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_; 178 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_;
173 scoped_ptr<MockBluetoothNodeClient> mock_bluetooth_node_client_; 179 scoped_ptr<MockBluetoothNodeClient> mock_bluetooth_node_client_;
174 scoped_ptr<MockBluetoothOutOfBandClient> mock_bluetooth_out_of_band_client_; 180 scoped_ptr<MockBluetoothOutOfBandClient> mock_bluetooth_out_of_band_client_;
175 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_; 181 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_;
176 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_; 182 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_;
177 scoped_ptr<MockDebugDaemonClient> mock_debugdaemon_client_; 183 scoped_ptr<MockDebugDaemonClient> mock_debugdaemon_client_;
178 scoped_ptr<MockShillDeviceClient> mock_shill_device_client_; 184 scoped_ptr<MockShillDeviceClient> mock_shill_device_client_;
179 scoped_ptr<MockShillIPConfigClient> mock_shill_ipconfig_client_; 185 scoped_ptr<MockShillIPConfigClient> mock_shill_ipconfig_client_;
180 scoped_ptr<MockShillManagerClient> mock_shill_manager_client_; 186 scoped_ptr<MockShillManagerClient> mock_shill_manager_client_;
181 scoped_ptr<MockShillProfileClient> mock_shill_profile_client_; 187 scoped_ptr<MockShillProfileClient> mock_shill_profile_client_;
182 scoped_ptr<MockShillServiceClient> mock_shill_service_client_; 188 scoped_ptr<MockShillServiceClient> mock_shill_service_client_;
183 scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_; 189 scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_;
184 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_; 190 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_;
185 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_; 191 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_;
186 scoped_ptr<MockModemMessagingClient> mock_modem_messaging_client_; 192 scoped_ptr<MockModemMessagingClient> mock_modem_messaging_client_;
187 scoped_ptr<MockPermissionBrokerClient> mock_permission_broker_client_; 193 scoped_ptr<MockPermissionBrokerClient> mock_permission_broker_client_;
188 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_; 194 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_;
189 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_; 195 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_;
190 scoped_ptr<MockSMSClient> mock_sms_client_; 196 scoped_ptr<MockSMSClient> mock_sms_client_;
191 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_; 197 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_;
192 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_; 198 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_;
193 199 scoped_ptr<PowerPolicyController> power_policy_controller_;
194 ObserverList<DBusThreadManagerObserver> observers_;
195 200
196 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager); 201 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager);
197 }; 202 };
198 203
199 } // namespace chromeos 204 } // namespace chromeos
200 205
201 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 206 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/mock_dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698