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_CROS_POWER_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // TODO(sque): Move to chrome/browser/chromeos/system, crosbug.com/16558 | 9 // TODO(sque): Move to chrome/browser/chromeos/system, crosbug.com/16558 |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual ~Observer() {} | 25 virtual ~Observer() {} |
26 }; | 26 }; |
27 | 27 |
28 virtual ~PowerLibrary() {} | 28 virtual ~PowerLibrary() {} |
29 | 29 |
30 virtual void Init() = 0; | 30 virtual void Init() = 0; |
31 | 31 |
32 virtual void AddObserver(Observer* observer) = 0; | 32 virtual void AddObserver(Observer* observer) = 0; |
33 virtual void RemoveObserver(Observer* observer) = 0; | 33 virtual void RemoveObserver(Observer* observer) = 0; |
34 | 34 |
35 // Enable/disable screen lock for current session. | |
36 virtual void EnableScreenLock(bool enable) = 0; | |
37 | |
38 // Factory function, creates a new instance and returns ownership. | 35 // Factory function, creates a new instance and returns ownership. |
39 // For normal usage, access the singleton via CrosLibrary::Get(). | 36 // For normal usage, access the singleton via CrosLibrary::Get(). |
40 static PowerLibrary* GetImpl(bool stub); | 37 static PowerLibrary* GetImpl(bool stub); |
41 }; | 38 }; |
42 | 39 |
43 } // namespace chromeos | 40 } // namespace chromeos |
44 | 41 |
45 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 42 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
OLD | NEW |