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

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

Issue 54743003: Mojo: bindings connector (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove errant line from mojo.gyp Created 7 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
« no previous file with comments | « mojo/public/bindings/lib/connector.cc ('k') | mojo/public/bindings/lib/message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/lib/message.h
diff --git a/mojo/public/bindings/lib/message.h b/mojo/public/bindings/lib/message.h
index 38fdafc507608e3c088d4b20eeb35dbb4b39e196..4837cd3f175f8f41a9fb5a401a34bf68a0621c7c 100644
--- a/mojo/public/bindings/lib/message.h
+++ b/mojo/public/bindings/lib/message.h
@@ -27,18 +27,26 @@ MOJO_COMPILE_ASSERT(sizeof(MessageData) == 9, bad_sizeof_MessageData);
#pragma pack(pop)
-struct Message {
+class Message {
+ public:
Message();
~Message();
+ void Swap(Message* other);
+
MessageData* data; // Heap-allocated.
std::vector<Handle> handles;
+
+ private:
+ MOJO_DISALLOW_COPY_AND_ASSIGN(Message);
};
class MessageReceiver {
public:
// The receiver may mutate the given message or take ownership of its
- // |message->data| member by setting it to NULL.
+ // |message->data| member by setting it to NULL. Returns true if the message
+ // was accepted and false otherwise, indicating that the message was invalid
+ // or malformed.
virtual bool Accept(Message* message) = 0;
};
« no previous file with comments | « mojo/public/bindings/lib/connector.cc ('k') | mojo/public/bindings/lib/message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698