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

Unified Diff: chromeos/dbus/services/display_power_service_provider.h

Issue 886103002: Make SetDisplayPower() take a callback to signal completion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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/services/display_power_service_provider.h
diff --git a/chromeos/dbus/services/display_power_service_provider.h b/chromeos/dbus/services/display_power_service_provider.h
index 132c45d88e9f9c4253c42941e1325e760ab1153d..60664ff1b2815c4897240264e2c9dc983389d8b6 100644
--- a/chromeos/dbus/services/display_power_service_provider.h
+++ b/chromeos/dbus/services/display_power_service_provider.h
@@ -31,10 +31,14 @@ class CHROMEOS_EXPORT DisplayPowerServiceProvider
public:
class Delegate {
public:
+ typedef base::Callback<void(bool)> ResponseCallback;
+
virtual ~Delegate() {}
- // Sets the display power state.
- virtual void SetDisplayPower(DisplayPowerState power_state) = 0;
+ // Sets the display power state. After the display power is set, callback
Daniel Erat 2015/01/30 17:14:07 nit: s/callback/|callback|/
dnicoara 2015/01/30 18:25:28 Done.
+ // is called with the operation status.
+ virtual void SetDisplayPower(DisplayPowerState power_state,
+ const ResponseCallback& callback) = 0;
// Dims or undims the screen.
virtual void SetDimming(bool dimmed) = 0;

Powered by Google App Engine
This is Rietveld 408576698