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

Unified Diff: chromeos/dbus/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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/power_manager_client.h
diff --git a/chromeos/dbus/power_manager_client.h b/chromeos/dbus/power_manager_client.h
index f4d9ada08d8b5fb6714813ed77dd2727f973716c..9f341deb67370d0e6b51d309357591d960abb5e2 100644
--- a/chromeos/dbus/power_manager_client.h
+++ b/chromeos/dbus/power_manager_client.h
@@ -27,6 +27,9 @@ namespace chromeos {
// range [0.0, 100.0].
typedef base::Callback<void(double)> GetScreenBrightnessPercentCallback;
+// Callback used for getting the current backlights forced off state.
+typedef base::Callback<void(bool)> GetBacklightsForcedOffCallback;
+
// PowerManagerClient is used to communicate with the power manager.
class CHROMEOS_EXPORT PowerManagerClient : public DBusClient {
public:
@@ -184,6 +187,13 @@ class CHROMEOS_EXPORT PowerManagerClient : public DBusClient {
// causes powerd to switch to using the battery on devices with type-C ports.
virtual void SetPowerSource(const std::string& id) = 0;
+ // Forces the display and keyboard backlights (if present) to |forced_off|.
+ virtual void SetBacklightsForcedOff(bool forced_off) = 0;
+
+ // Gets the display and keyboard backlights (if present) forced off state.
+ virtual void GetBacklightsForcedOff(
+ const GetBacklightsForcedOffCallback& callback) = 0;
+
// Returns a callback that can be called by an observer to report
// readiness for suspend. See Observer::SuspendImminent().
virtual base::Closure GetSuspendReadinessCallback() = 0;

Powered by Google App Engine
This is Rietveld 408576698