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

Side by Side Diff: mojo/public/cpp/bindings/message.h

Issue 1576603002: Makes bindings work with nested message loops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // 153 //
154 // NOTE: Upon returning true, AcceptWithResponder assumes ownership of 154 // NOTE: Upon returning true, AcceptWithResponder assumes ownership of
155 // |responder| and will delete it after calling |responder->Accept| or upon 155 // |responder| and will delete it after calling |responder->Accept| or upon
156 // its own destruction. 156 // its own destruction.
157 // 157 //
158 virtual bool AcceptWithResponder(Message* message, 158 virtual bool AcceptWithResponder(Message* message,
159 MessageReceiverWithStatus* responder) 159 MessageReceiverWithStatus* responder)
160 MOJO_WARN_UNUSED_RESULT = 0; 160 MOJO_WARN_UNUSED_RESULT = 0;
161 }; 161 };
162 162
163 // Read a single message from the pipe and dispatch to the given receiver. The 163 // Read a single message from the pipe. The caller should have created the
164 // receiver may be null, in which case the message is simply discarded. 164 // Message, but not called Initialize(). Returns MOJO_RESULT_SHOULD_WAIT if
165 // Returns MOJO_RESULT_SHOULD_WAIT if the caller should wait on the handle to 165 // the caller should wait on the handle to become readable. Returns
166 // become readable. Returns MOJO_RESULT_OK if a message was dispatched and 166 // MOJO_RESULT_OK if the message was read successfully and should be
167 // otherwise returns an error code if something went wrong. 167 // dispatched, otherwise returns an error code if something went wrong.
168 // 168 //
169 // NOTE: The message hasn't been validated and may be malformed! 169 // NOTE: The message hasn't been validated and may be malformed!
170 MojoResult ReadAndDispatchMessage(MessagePipeHandle handle, 170 MojoResult ReadMessage(MessagePipeHandle handle, Message* message);
171 MessageReceiver* receiver,
172 bool* receiver_result);
173 171
174 } // namespace mojo 172 } // namespace mojo
175 173
176 #endif // MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ 174 #endif // MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/message.cc ('k') | mojo/public/cpp/bindings/tests/connector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698