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

Unified Diff: chromeos/dbus/power_manager_client.h

Issue 2409983006: Make [S,G]getBacklightsForcedOff dbus API integrated to power_manager_client (Closed)
Patch Set: 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..716ff61c6a4d8f22caffc1cbeaecac97ea2c6519 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)> GetBacklightsForcedOffStateCallback;
+
// 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 |is_off|.
+ virtual void SetBacklightsForcedOff(bool is_off) = 0;
Daniel Erat 2016/10/13 17:25:19 nit: "forced_off" might be a tiny bit clearer than
Qiang(Joe) Xu 2016/10/13 21:19:41 Done.
+
+ // Gets the display and keyboard backlights (if present) forced off state.
+ virtual void GetBacklightsForcedOffState(
Daniel Erat 2016/10/13 17:25:19 any reason not to call this (and its callback) jus
Qiang(Joe) Xu 2016/10/13 21:19:41 Changed to match dbus method.
+ const GetBacklightsForcedOffStateCallback& 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