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

Unified Diff: mojo/public/bindings/message.h

Issue 198343002: Mojo: request/response bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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 | « mojo/public/bindings/lib/shared_ptr.h ('k') | mojo/public/bindings/mojom_bindings_generator.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/message.h
diff --git a/mojo/public/bindings/message.h b/mojo/public/bindings/message.h
index 8dfab343aa45b9cb3849f78ef1c7b84d8cc40046..435ba5d33e3aca6ba90152f82b766274005b9cae 100644
--- a/mojo/public/bindings/message.h
+++ b/mojo/public/bindings/message.h
@@ -78,15 +78,22 @@ class Message {
class MessageReceiver {
public:
+ virtual ~MessageReceiver() {}
+
// The receiver may mutate the given message. Returns true if the message
// was accepted and false otherwise, indicating that the message was invalid
// or malformed.
virtual bool Accept(Message* message) = 0;
- // A variant on Accept that registers a receiver to handle the response
- // message generated from the given message. The responder's Accept method
- // will be called some time after AcceptWithResponder returns. The responder
- // will be unregistered once its Accept method has been called.
+ // A variant on Accept that registers a MessageReceiver (known as the
+ // responder) to handle the response message generated from the given
+ // message. The responder's Accept method may be called during
+ // AcceptWithResponder or some time after its return.
+ //
+ // NOTE: Upon returning true, AcceptWithResponder assumes ownership of
+ // |responder| and will delete it after calling |responder->Accept| or upon
+ // its own destruction.
+ //
virtual bool AcceptWithResponder(Message* message,
MessageReceiver* responder) = 0;
};
« no previous file with comments | « mojo/public/bindings/lib/shared_ptr.h ('k') | mojo/public/bindings/mojom_bindings_generator.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698