OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_FAKE_POWER_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Pops the first report from |video_activity_reports_|, returning whether the | 72 // Pops the first report from |video_activity_reports_|, returning whether the |
73 // activity was fullscreen or not. There must be at least one report. | 73 // activity was fullscreen or not. There must be at least one report. |
74 bool PopVideoActivityReport(); | 74 bool PopVideoActivityReport(); |
75 | 75 |
76 // Emulates the power manager announcing that the system is starting or | 76 // Emulates the power manager announcing that the system is starting or |
77 // completing a suspend attempt. | 77 // completing a suspend attempt. |
78 void SendSuspendImminent(); | 78 void SendSuspendImminent(); |
79 void SendSuspendDone(); | 79 void SendSuspendDone(); |
80 void SendDarkSuspendImminent(); | 80 void SendDarkSuspendImminent(); |
81 | 81 |
| 82 // Emulates the power manager announcing that the system is changing |
| 83 // brightness to |level|. |
| 84 void SendBrightnessChanged(int level, bool user_initiated); |
| 85 |
82 // Notifies observers that the power button has been pressed or released. | 86 // Notifies observers that the power button has been pressed or released. |
83 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); | 87 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); |
84 | 88 |
85 // Updates |props_| and notifies observers of its changes. | 89 // Updates |props_| and notifies observers of its changes. |
86 void UpdatePowerProperties( | 90 void UpdatePowerProperties( |
87 const power_manager::PowerSupplyProperties& power_props); | 91 const power_manager::PowerSupplyProperties& power_props); |
88 | 92 |
89 private: | 93 private: |
90 // Callback that will be run by asynchronous suspend delays to report | 94 // Callback that will be run by asynchronous suspend delays to report |
91 // readiness. | 95 // readiness. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // Note: This should remain the last member so it'll be destroyed and | 132 // Note: This should remain the last member so it'll be destroyed and |
129 // invalidate its weak pointers before any other members are destroyed. | 133 // invalidate its weak pointers before any other members are destroyed. |
130 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; | 134 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; |
131 | 135 |
132 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); | 136 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); |
133 }; | 137 }; |
134 | 138 |
135 } // namespace chromeos | 139 } // namespace chromeos |
136 | 140 |
137 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ | 141 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |