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

Unified Diff: dbus/test_service.h

Issue 8728020: chrome: dbus: support asynchronous method replies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 9 years, 1 month 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: dbus/test_service.h
diff --git a/dbus/test_service.h b/dbus/test_service.h
index 3ea40db8b66decf4149fb729c596bfe135b17224..6d2540850e5f087af9c2d00443b7952d4aa4ad45 100644
--- a/dbus/test_service.h
+++ b/dbus/test_service.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/threading/thread.h"
#include "base/synchronization/waitable_event.h"
+#include "dbus/exported_object.h"
namespace base {
class MessageLoopProxy;
@@ -18,7 +19,6 @@ class MessageLoopProxy;
namespace dbus {
class Bus;
-class ExportedObject;
class MethodCall;
class Response;
@@ -89,14 +89,22 @@ class TestService : public base::Thread {
//
// Echos the text message received from the method call.
- Response* Echo(MethodCall* method_call);
+ void Echo(MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
// Echos the text message received from the method call, but sleeps for
// TestTimeouts::tiny_timeout_ms() before returning the response.
- Response* SlowEcho(MethodCall* method_call);
+ void SlowEcho(MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
+
+ // Echos the text message received from the method call, but sends its
+ // response asynchronously after this callback has returned.
+ void AsyncEcho(MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
// Returns NULL, instead of a valid Response.
- Response* BrokenMethod(MethodCall* method_call);
+ void BrokenMethod(MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
scoped_refptr<base::MessageLoopProxy> dbus_thread_message_loop_proxy_;
base::WaitableEvent on_all_methods_exported_;

Powered by Google App Engine
This is Rietveld 408576698