summaryrefslogtreecommitdiffstats
path: root/dbus/object_proxy.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 08:36:22 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 08:36:22 +0000
commit65e8e25eee8e389374532e483b46e53ad66ee5c8 (patch)
treebcd2687ea46778ec751a26e537910a0dd8aece36 /dbus/object_proxy.h
parent442d0ba82dec256585282a85c15ff78e9e2d4f59 (diff)
downloadchromium_src-65e8e25eee8e389374532e483b46e53ad66ee5c8.zip
chromium_src-65e8e25eee8e389374532e483b46e53ad66ee5c8.tar.gz
chromium_src-65e8e25eee8e389374532e483b46e53ad66ee5c8.tar.bz2
dbus: Add ObjectProxy::EmptyResponseCallback().
This can be used when the caller is not interested in the response from the D-bus method. BUG=none TEST=added a unit test Review URL: http://codereview.chromium.org/8536007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/object_proxy.h')
-rw-r--r--dbus/object_proxy.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h
index 5fc4197..484f107 100644
--- a/dbus/object_proxy.h
+++ b/dbus/object_proxy.h
@@ -73,7 +73,9 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
// |callback| will be called in the origin thread, once the method call
// is complete. As it's called in the origin thread, |callback| can
// safely reference objects in the origin thread (i.e. UI thread in most
- // cases).
+ // cases). If the caller is not interested in the response from the
+ // method (i.e. calling a method that does not return a value),
+ // EmptyResponseCallback() can be passed to the |callback| parameter.
//
// If the method call is successful, a pointer to Response object will
// be passed to the callback. If unsuccessful, NULL will be passed to
@@ -106,6 +108,10 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
// BLOCKING CALL.
virtual void Detach();
+ // Returns an empty callback that does nothing. Can be used for
+ // CallMethod().
+ static ResponseCallback EmptyResponseCallback();
+
protected:
// This is protected, so we can define sub classes.
virtual ~ObjectProxy();