| 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/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // Notifies PowerManager that screen lock has been completed. | 135 // Notifies PowerManager that screen lock has been completed. |
| 136 virtual void NotifyScreenLockCompleted() = 0; | 136 virtual void NotifyScreenLockCompleted() = 0; |
| 137 | 137 |
| 138 // Notifies PowerManager that a user unlocked the screen. | 138 // Notifies PowerManager that a user unlocked the screen. |
| 139 virtual void NotifyScreenUnlockRequested() = 0; | 139 virtual void NotifyScreenUnlockRequested() = 0; |
| 140 | 140 |
| 141 // Notifies PowerManager that screen is unlocked. | 141 // Notifies PowerManager that screen is unlocked. |
| 142 virtual void NotifyScreenUnlockCompleted() = 0; | 142 virtual void NotifyScreenUnlockCompleted() = 0; |
| 143 | 143 |
| 144 // Return whether or not the screen is locked. Implementation should cache |
| 145 // this state so that it can return immediately. Useful for observers that |
| 146 // need to know the current screen lock state when they are added. |
| 147 virtual bool GetIsScreenLocked() = 0; |
| 148 |
| 144 // Idle management functions: | 149 // Idle management functions: |
| 145 | 150 |
| 146 // Calculates idle time asynchronously, after the idle time request has | 151 // Calculates idle time asynchronously, after the idle time request has |
| 147 // replied. It passes the idle time in seconds to |callback|. If it | 152 // replied. It passes the idle time in seconds to |callback|. If it |
| 148 // encounters some error, it passes -1 to |callback|. | 153 // encounters some error, it passes -1 to |callback|. |
| 149 virtual void CalculateIdleTime(const CalculateIdleTimeCallback& callback) = 0; | 154 virtual void CalculateIdleTime(const CalculateIdleTimeCallback& callback) = 0; |
| 150 | 155 |
| 151 // Requests notification for Idle at a certain threshold. | 156 // Requests notification for Idle at a certain threshold. |
| 152 // NOTE: This notification is one shot, once the machine has been idle for | 157 // NOTE: This notification is one shot, once the machine has been idle for |
| 153 // threshold time, a notification will be sent and then that request will be | 158 // threshold time, a notification will be sent and then that request will be |
| (...skipping 29 matching lines...) Expand all Loading... |
| 183 // Create() should be used instead. | 188 // Create() should be used instead. |
| 184 PowerManagerClient(); | 189 PowerManagerClient(); |
| 185 | 190 |
| 186 private: | 191 private: |
| 187 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); | 192 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); |
| 188 }; | 193 }; |
| 189 | 194 |
| 190 } // namespace chromeos | 195 } // namespace chromeos |
| 191 | 196 |
| 192 #endif // CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 197 #endif // CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
| OLD | NEW |