Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: chromeos/dbus/fake_power_manager_client.h

Issue 2409983006: Make [S,G]getBacklightsForcedOff dbus API integrated to power_manager_client (Closed)
Patch Set: based on Daniel's comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void IncreaseKeyboardBrightness() override; 56 void IncreaseKeyboardBrightness() override;
57 void RequestStatusUpdate() override; 57 void RequestStatusUpdate() override;
58 void RequestSuspend() override; 58 void RequestSuspend() override;
59 void RequestRestart() override; 59 void RequestRestart() override;
60 void RequestShutdown() override; 60 void RequestShutdown() override;
61 void NotifyUserActivity(power_manager::UserActivityType type) override; 61 void NotifyUserActivity(power_manager::UserActivityType type) override;
62 void NotifyVideoActivity(bool is_fullscreen) override; 62 void NotifyVideoActivity(bool is_fullscreen) override;
63 void SetPolicy(const power_manager::PowerManagementPolicy& policy) override; 63 void SetPolicy(const power_manager::PowerManagementPolicy& policy) override;
64 void SetIsProjecting(bool is_projecting) override; 64 void SetIsProjecting(bool is_projecting) override;
65 void SetPowerSource(const std::string& id) override; 65 void SetPowerSource(const std::string& id) override;
66 void SetBacklightsForcedOff(bool forced_off) override;
67 void GetBacklightsForcedOff(
68 const GetBacklightsForcedOffCallback& callback) override;
66 base::Closure GetSuspendReadinessCallback() override; 69 base::Closure GetSuspendReadinessCallback() override;
67 int GetNumPendingSuspendReadinessCallbacks() override; 70 int GetNumPendingSuspendReadinessCallbacks() override;
68 71
69 // Pops the first report from |video_activity_reports_|, returning whether the 72 // Pops the first report from |video_activity_reports_|, returning whether the
70 // 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.
71 bool PopVideoActivityReport(); 74 bool PopVideoActivityReport();
72 75
73 // Emulates the power manager announcing that the system is starting or 76 // Emulates the power manager announcing that the system is starting or
74 // completing a suspend attempt. 77 // completing a suspend attempt.
75 void SendSuspendImminent(); 78 void SendSuspendImminent();
(...skipping 28 matching lines...) Expand all
104 int num_request_shutdown_calls_; 107 int num_request_shutdown_calls_;
105 int num_set_policy_calls_; 108 int num_set_policy_calls_;
106 int num_set_is_projecting_calls_; 109 int num_set_is_projecting_calls_;
107 110
108 // Number of pending suspend readiness callbacks. 111 // Number of pending suspend readiness callbacks.
109 int num_pending_suspend_readiness_callbacks_; 112 int num_pending_suspend_readiness_callbacks_;
110 113
111 // Last projecting state set in SetIsProjecting(). 114 // Last projecting state set in SetIsProjecting().
112 bool is_projecting_; 115 bool is_projecting_;
113 116
117 // Display and keyboard backlights (if present) forced off state set in
118 // SetBacklightsForcedOff().
119 bool backlights_forced_off_;
120
114 // Video activity reports that we were requested to send, in the order they 121 // Video activity reports that we were requested to send, in the order they
115 // were requested. True if fullscreen. 122 // were requested. True if fullscreen.
116 std::deque<bool> video_activity_reports_; 123 std::deque<bool> video_activity_reports_;
117 124
118 // Delegate for managing power consumption of Chrome's renderer processes. 125 // Delegate for managing power consumption of Chrome's renderer processes.
119 base::WeakPtr<RenderProcessManagerDelegate> render_process_manager_delegate_; 126 base::WeakPtr<RenderProcessManagerDelegate> render_process_manager_delegate_;
120 127
121 // 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
122 // invalidate its weak pointers before any other members are destroyed. 129 // invalidate its weak pointers before any other members are destroyed.
123 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_; 130 base::WeakPtrFactory<FakePowerManagerClient> weak_ptr_factory_;
124 131
125 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient); 132 DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient);
126 }; 133 };
127 134
128 } // namespace chromeos 135 } // namespace chromeos
129 136
130 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_ 137 #endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/fake_power_manager_client.cc » ('j') | chromeos/dbus/power_manager_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698