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 CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Returns the number of callbacks returned by GetSuspendReadinessCallback() | 191 // Returns the number of callbacks returned by GetSuspendReadinessCallback() |
192 // for the current suspend attempt but not yet called. Used by tests. | 192 // for the current suspend attempt but not yet called. Used by tests. |
193 virtual int GetNumPendingSuspendReadinessCallbacks() = 0; | 193 virtual int GetNumPendingSuspendReadinessCallbacks() = 0; |
194 | 194 |
195 // Creates the instance. | 195 // Creates the instance. |
196 static PowerManagerClient* Create(DBusClientImplementationType type); | 196 static PowerManagerClient* Create(DBusClientImplementationType type); |
197 | 197 |
198 ~PowerManagerClient() override; | 198 ~PowerManagerClient() override; |
199 | 199 |
200 protected: | 200 protected: |
| 201 // Needs to call DBusClient::Init(). |
| 202 friend class PowerManagerClientTest; |
| 203 |
201 // Create() should be used instead. | 204 // Create() should be used instead. |
202 PowerManagerClient(); | 205 PowerManagerClient(); |
203 | 206 |
204 private: | 207 private: |
205 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); | 208 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); |
206 }; | 209 }; |
207 | 210 |
208 } // namespace chromeos | 211 } // namespace chromeos |
209 | 212 |
210 #endif // CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 213 #endif // CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |