| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Whether there is a battery present. | 37 // Whether there is a battery present. |
| 38 virtual bool battery_is_present() const = 0; | 38 virtual bool battery_is_present() const = 0; |
| 39 | 39 |
| 40 // The amount of time until battery is empty. | 40 // The amount of time until battery is empty. |
| 41 virtual base::TimeDelta battery_time_to_empty() const = 0; | 41 virtual base::TimeDelta battery_time_to_empty() const = 0; |
| 42 | 42 |
| 43 // The amount of time until battery is full. | 43 // The amount of time until battery is full. |
| 44 virtual base::TimeDelta battery_time_to_full() const = 0; | 44 virtual base::TimeDelta battery_time_to_full() const = 0; |
| 45 | 45 |
| 46 // Enable/disable screen lock for current session. |
| 47 virtual void EnableScreenLock(bool enable) = 0; |
| 48 |
| 46 // Factory function, creates a new instance and returns ownership. | 49 // Factory function, creates a new instance and returns ownership. |
| 47 // For normal usage, access the singleton via CrosLibrary::Get(). | 50 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 48 static PowerLibrary* GetImpl(bool stub); | 51 static PowerLibrary* GetImpl(bool stub); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 } // namespace chromeos | 54 } // namespace chromeos |
| 52 | 55 |
| 53 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
| OLD | NEW |