OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual void RequestRestart() = 0; | 71 virtual void RequestRestart() = 0; |
72 | 72 |
73 // Requests shutdown of the system. | 73 // Requests shutdown of the system. |
74 virtual void RequestShutdown() = 0; | 74 virtual void RequestShutdown() = 0; |
75 | 75 |
76 // Calculates idle time asynchronously, after the idle time request has | 76 // Calculates idle time asynchronously, after the idle time request has |
77 // replied. It passes the idle time in seconds to |callback|. If it | 77 // replied. It passes the idle time in seconds to |callback|. If it |
78 // encounters some error, it passes -1 to |callback|. | 78 // encounters some error, it passes -1 to |callback|. |
79 virtual void CalculateIdleTime(const CalculateIdleTimeCallback& callback) = 0; | 79 virtual void CalculateIdleTime(const CalculateIdleTimeCallback& callback) = 0; |
80 | 80 |
| 81 // Enable/disable screen lock for current session. |
| 82 virtual void EnableScreenLock(bool enable) = 0; |
| 83 |
81 // Creates the instance. | 84 // Creates the instance. |
82 static PowerManagerClient* Create(dbus::Bus* bus); | 85 static PowerManagerClient* Create(dbus::Bus* bus); |
83 | 86 |
84 virtual ~PowerManagerClient(); | 87 virtual ~PowerManagerClient(); |
85 | 88 |
86 protected: | 89 protected: |
87 // Create() should be used instead. | 90 // Create() should be used instead. |
88 PowerManagerClient(); | 91 PowerManagerClient(); |
89 | 92 |
90 private: | 93 private: |
91 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); | 94 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace chromeos | 97 } // namespace chromeos |
95 | 98 |
96 #endif // CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 99 #endif // CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |