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 | |
86 // Notifies observers that the power button has been pressed or released. | 82 // Notifies observers that the power button has been pressed or released. |
87 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); | 83 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); |
88 | 84 |
89 // Updates |props_| and notifies observers of its changes. | 85 // Updates |props_| and notifies observers of its changes. |
90 void UpdatePowerProperties( | 86 void UpdatePowerProperties( |
91 const power_manager::PowerSupplyProperties& power_props); | 87 const power_manager::PowerSupplyProperties& power_props); |
92 | 88 |
93 private: | 89 private: |
94 // Callback that will be run by asynchronous suspend delays to report | 90 // Callback that will be run by asynchronous suspend delays to report |
95 // readiness. | 91 // readiness. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Note: This should remain the last member so it'll be destroyed and | 128 // Note: This should remain the last member so it'll be destroyed and |
133 // invalidate its weak pointers before any other members are destroyed. | 129 // invalidate its weak pointers before any other members are destroyed. |
134 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; | 130 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; |
135 | 131 |
136 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); | 132 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); |
137 }; | 133 }; |
138 | 134 |
139 } // namespace chromeos | 135 } // namespace chromeos |
140 | 136 |
141 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ | 137 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |