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

Unified Diff: dbus/property.h

Issue 1361503003: libchrome: add support for synchronous PropertySet::Set to dbus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | dbus/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/property.h
diff --git a/dbus/property.h b/dbus/property.h
index b308c8218a4d2cad8447bf7a93d74b336d556761..940ef715d86ba6656a063a99452d1544b58d5668 100644
--- a/dbus/property.h
+++ b/dbus/property.h
@@ -276,6 +276,8 @@ class CHROME_DBUS_EXPORT PropertySet {
// depending on the remote object. This method may be overridden by
// sub-classes if interfaces use different method calls.
virtual void Set(PropertyBase* property, SetCallback callback);
+ // The sychronous version of Set().
+ virtual bool SetAndBlock(PropertyBase* property);
virtual void OnSet(PropertyBase* property, SetCallback callback,
Response* response);
@@ -389,6 +391,12 @@ class CHROME_DBUS_EXPORT Property : public PropertyBase {
property_set()->Set(this, callback);
}
+ // The sychronous version of Set().
+ virtual bool SetAndBlock(const T& value) {
+ set_value_ = value;
+ return property_set()->SetAndBlock(this);
+ }
+
// Method used by PropertySet to retrieve the value from a MessageReader,
// no knowledge of the contained type is required, this method returns
// true if its expected type was found, false if not.
« no previous file with comments | « no previous file | dbus/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698