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

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

Issue 12564007: Hook up system clock update dbus signal to chrome and ash tray ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_tests by adding MockSystemClockClient. Created 7 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 | Annotate | Revision Log
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 24 matching lines...) Expand all
35 class MockShillProfileClient; 35 class MockShillProfileClient;
36 class MockShillServiceClient; 36 class MockShillServiceClient;
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 MockSystemClockClient;
45 class MockUpdateEngineClient; 46 class MockUpdateEngineClient;
46 class PowerPolicyController; 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();
(...skipping 20 matching lines...) Expand all
75 MOCK_METHOD0(GetShillServiceClient, ShillServiceClient*(void)); 76 MOCK_METHOD0(GetShillServiceClient, ShillServiceClient*(void));
76 MOCK_METHOD0(GetGsmSMSClient, GsmSMSClient*(void)); 77 MOCK_METHOD0(GetGsmSMSClient, GsmSMSClient*(void));
77 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void)); 78 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void));
78 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void)); 79 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void));
79 MOCK_METHOD0(GetModemMessagingClient, ModemMessagingClient*(void)); 80 MOCK_METHOD0(GetModemMessagingClient, ModemMessagingClient*(void));
80 MOCK_METHOD0(GetPermissionBrokerClient, PermissionBrokerClient*(void)); 81 MOCK_METHOD0(GetPermissionBrokerClient, PermissionBrokerClient*(void));
81 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void)); 82 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void));
82 MOCK_METHOD0(GetPowerPolicyController, PowerPolicyController*(void)); 83 MOCK_METHOD0(GetPowerPolicyController, PowerPolicyController*(void));
83 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void)); 84 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void));
84 MOCK_METHOD0(GetSMSClient, SMSClient*(void)); 85 MOCK_METHOD0(GetSMSClient, SMSClient*(void));
86 MOCK_METHOD0(GetSystemClockClient, SystemClockClient*(void));
85 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void)); 87 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void));
86 MOCK_METHOD0(GetIBusClient, IBusClient*(void)); 88 MOCK_METHOD0(GetIBusClient, IBusClient*(void));
87 MOCK_METHOD0(GetIBusConfigClient, IBusConfigClient*(void)); 89 MOCK_METHOD0(GetIBusConfigClient, IBusConfigClient*(void));
88 MOCK_METHOD0(GetIBusInputContextClient, IBusInputContextClient*(void)); 90 MOCK_METHOD0(GetIBusInputContextClient, IBusInputContextClient*(void));
89 MOCK_METHOD0(GetIBusEngineFactoryService, IBusEngineFactoryService*(void)); 91 MOCK_METHOD0(GetIBusEngineFactoryService, IBusEngineFactoryService*(void));
90 MOCK_METHOD1(GetIBusEngineService, 92 MOCK_METHOD1(GetIBusEngineService,
91 IBusEngineService*(const dbus::ObjectPath& object_path)); 93 IBusEngineService*(const dbus::ObjectPath& object_path));
92 MOCK_METHOD1(RemoveIBusEngineService, 94 MOCK_METHOD1(RemoveIBusEngineService,
93 void(const dbus::ObjectPath& object_path)); 95 void(const dbus::ObjectPath& object_path));
94 MOCK_METHOD0(GetIBusPanelService, IBusPanelService*(void)); 96 MOCK_METHOD0(GetIBusPanelService, IBusPanelService*(void));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 154 }
153 MockPowerManagerClient* mock_power_manager_client() { 155 MockPowerManagerClient* mock_power_manager_client() {
154 return mock_power_manager_client_.get(); 156 return mock_power_manager_client_.get();
155 } 157 }
156 MockSessionManagerClient* mock_session_manager_client() { 158 MockSessionManagerClient* mock_session_manager_client() {
157 return mock_session_manager_client_.get(); 159 return mock_session_manager_client_.get();
158 } 160 }
159 MockSMSClient* mock_sms_client() { 161 MockSMSClient* mock_sms_client() {
160 return mock_sms_client_.get(); 162 return mock_sms_client_.get();
161 } 163 }
164 MockSystemClockClient* mock_system_clock_client() {
165 return mock_system_clock_client_.get();
166 }
162 MockUpdateEngineClient* mock_update_engine_client() { 167 MockUpdateEngineClient* mock_update_engine_client() {
163 return mock_update_engine_client_.get(); 168 return mock_update_engine_client_.get();
164 } 169 }
165 170
166 private: 171 private:
167 // Note: Keep this before other members so they can call AddObserver() in 172 // Note: Keep this before other members so they can call AddObserver() in
168 // their c'tors. 173 // their c'tors.
169 ObserverList<DBusThreadManagerObserver> observers_; 174 ObserverList<DBusThreadManagerObserver> observers_;
170 175
171 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_; 176 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_;
(...skipping 11 matching lines...) Expand all
183 scoped_ptr<MockShillProfileClient> mock_shill_profile_client_; 188 scoped_ptr<MockShillProfileClient> mock_shill_profile_client_;
184 scoped_ptr<MockShillServiceClient> mock_shill_service_client_; 189 scoped_ptr<MockShillServiceClient> mock_shill_service_client_;
185 scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_; 190 scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_;
186 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_; 191 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_;
187 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_; 192 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_;
188 scoped_ptr<MockModemMessagingClient> mock_modem_messaging_client_; 193 scoped_ptr<MockModemMessagingClient> mock_modem_messaging_client_;
189 scoped_ptr<MockPermissionBrokerClient> mock_permission_broker_client_; 194 scoped_ptr<MockPermissionBrokerClient> mock_permission_broker_client_;
190 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_; 195 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_;
191 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_; 196 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_;
192 scoped_ptr<MockSMSClient> mock_sms_client_; 197 scoped_ptr<MockSMSClient> mock_sms_client_;
198 scoped_ptr<MockSystemClockClient> mock_system_clock_client_;
193 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_; 199 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_;
194 scoped_ptr<PowerPolicyController> power_policy_controller_; 200 scoped_ptr<PowerPolicyController> power_policy_controller_;
195 201
196 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager); 202 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager);
197 }; 203 };
198 204
199 } // namespace chromeos 205 } // namespace chromeos
200 206
201 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ 207 #endif // CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698