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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class Observer { | 44 class Observer { |
45 public: | 45 public: |
46 // Called when the brightness is changed. | 46 // Called when the brightness is changed. |
47 // |level| is of the range [0, 100]. | 47 // |level| is of the range [0, 100]. |
48 // |user_initiated| is true if the action is initiated by the user. | 48 // |user_initiated| is true if the action is initiated by the user. |
49 virtual void BrightnessChanged(int level, bool user_initiated) {} | 49 virtual void BrightnessChanged(int level, bool user_initiated) {} |
50 | 50 |
51 // Called when power supply polling takes place. |status| is a data | 51 // Called when power supply polling takes place. |status| is a data |
52 // structure that contains the current state of the power supply. | 52 // structure that contains the current state of the power supply. |
53 virtual void PowerChanged(const PowerSupplyStatus& status) {} | 53 virtual void PowerChanged(const PowerSupplyStatus& status) {} |
| 54 |
| 55 // Called when the system resumes from suspend. |
| 56 virtual void SystemResumed() {} |
54 }; | 57 }; |
55 | 58 |
56 // Adds and removes the observer. | 59 // Adds and removes the observer. |
57 virtual void AddObserver(Observer* observer) = 0; | 60 virtual void AddObserver(Observer* observer) = 0; |
58 virtual void RemoveObserver(Observer* observer) = 0; | 61 virtual void RemoveObserver(Observer* observer) = 0; |
59 | 62 |
60 // Decreases the screen brightness. |allow_off| controls whether or not | 63 // Decreases the screen brightness. |allow_off| controls whether or not |
61 // it's allowed to turn off the back light. | 64 // it's allowed to turn off the back light. |
62 virtual void DecreaseScreenBrightness(bool allow_off) = 0; | 65 virtual void DecreaseScreenBrightness(bool allow_off) = 0; |
63 | 66 |
(...skipping 23 matching lines...) Expand all Loading... |
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 |