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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 // PowerManagerClient::GetSuspendReadinessCallback() may be called from | 64 // PowerManagerClient::GetSuspendReadinessCallback() may be called from |
65 // within SuspendImminent(). The returned callback must be called once | 65 // within SuspendImminent(). The returned callback must be called once |
66 // the observer is ready for suspend. | 66 // the observer is ready for suspend. |
67 virtual void SuspendImminent() {} | 67 virtual void SuspendImminent() {} |
68 | 68 |
69 // Called when a suspend attempt (previously announced via | 69 // Called when a suspend attempt (previously announced via |
70 // SuspendImminent()) has completed. The system may not have actually | 70 // SuspendImminent()) has completed. The system may not have actually |
71 // suspended (if e.g. the user canceled the suspend attempt). | 71 // suspended (if e.g. the user canceled the suspend attempt). |
72 virtual void SuspendDone(const base::TimeDelta& sleep_duration) {} | 72 virtual void SuspendDone(const base::TimeDelta& sleep_duration) {} |
73 | 73 |
74 // Called when the system is about to resuspend from a dark resume. Like | |
75 // SuspendImminent(), the suspend will be deferred until all observers have | |
76 // finished running and those observers that wish to asynchromously delay | |
Daniel Erat
2014/08/15 23:49:31
nit: s/asynchromously/asynchronously/
| |
77 // the suspend should call PowerManagerClient::GetSuspendReadinessCallback() | |
Daniel Erat
2014/08/15 23:49:31
sharing GetSuspendReadinessCallback() for this pro
Chirantan Ekbote
2014/08/18 17:49:08
I have no problem with adding a new GetDarkSuspend
| |
78 // from within this method. The returned callback should be run once the | |
79 // observer is ready for suspend. | |
80 virtual void DarkSuspendImminent() {} | |
81 | |
74 // Called when the power button is pressed or released. | 82 // Called when the power button is pressed or released. |
75 virtual void PowerButtonEventReceived(bool down, | 83 virtual void PowerButtonEventReceived(bool down, |
76 const base::TimeTicks& timestamp) {} | 84 const base::TimeTicks& timestamp) {} |
77 | 85 |
78 // Called when the device's lid is opened or closed. | 86 // Called when the device's lid is opened or closed. |
79 virtual void LidEventReceived(bool open, | 87 virtual void LidEventReceived(bool open, |
80 const base::TimeTicks& timestamp) {} | 88 const base::TimeTicks& timestamp) {} |
81 | 89 |
82 // Called when the idle action will be performed after | 90 // Called when the idle action will be performed after |
83 // |time_until_idle_action|. | 91 // |time_until_idle_action|. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 // Create() should be used instead. | 168 // Create() should be used instead. |
161 PowerManagerClient(); | 169 PowerManagerClient(); |
162 | 170 |
163 private: | 171 private: |
164 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); | 172 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); |
165 }; | 173 }; |
166 | 174 |
167 } // namespace chromeos | 175 } // namespace chromeos |
168 | 176 |
169 #endif // CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 177 #endif // CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |