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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void SendDarkSuspendImminent(); | 65 void SendDarkSuspendImminent(); |
66 | 66 |
67 // Notifies observers that the power button has been pressed or released. | 67 // Notifies observers that the power button has been pressed or released. |
68 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); | 68 void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp); |
69 | 69 |
70 private: | 70 private: |
71 // Callback that will be run by asynchronous suspend delays to report | 71 // Callback that will be run by asynchronous suspend delays to report |
72 // readiness. | 72 // readiness. |
73 void HandleSuspendReadiness(); | 73 void HandleSuspendReadiness(); |
74 | 74 |
75 ObserverList<Observer> observers_; | 75 base::ObserverList<Observer> observers_; |
76 | 76 |
77 // Last policy passed to SetPolicy(). | 77 // Last policy passed to SetPolicy(). |
78 power_manager::PowerManagementPolicy policy_; | 78 power_manager::PowerManagementPolicy policy_; |
79 | 79 |
80 // Number of times that various methods have been called. | 80 // Number of times that various methods have been called. |
81 int num_request_restart_calls_; | 81 int num_request_restart_calls_; |
82 int num_request_shutdown_calls_; | 82 int num_request_shutdown_calls_; |
83 int num_set_policy_calls_; | 83 int num_set_policy_calls_; |
84 int num_set_is_projecting_calls_; | 84 int num_set_is_projecting_calls_; |
85 | 85 |
86 // Number of pending suspend readiness callbacks. | 86 // Number of pending suspend readiness callbacks. |
87 int num_pending_suspend_readiness_callbacks_; | 87 int num_pending_suspend_readiness_callbacks_; |
88 | 88 |
89 // Last projecting state set in SetIsProjecting(). | 89 // Last projecting state set in SetIsProjecting(). |
90 bool is_projecting_; | 90 bool is_projecting_; |
91 | 91 |
92 // Delegate for managing power consumption of Chrome's renderer processes. | 92 // Delegate for managing power consumption of Chrome's renderer processes. |
93 base::WeakPtr<RenderProcessManagerDelegate> render_process_manager_delegate_; | 93 base::WeakPtr<RenderProcessManagerDelegate> render_process_manager_delegate_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); | 95 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace chromeos | 98 } // namespace chromeos |
99 | 99 |
100 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ | 100 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |