summaryrefslogtreecommitdiffstats
path: root/mojo/system/message_pipe_endpoint.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 22:19:58 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 22:19:58 +0000
commit21d97c7299455296b91571683c286b3acfb76fb5 (patch)
tree9d45b83d08238736f31151fad328398ea69262b2 /mojo/system/message_pipe_endpoint.h
parent8a168d0e1f50fc7a4ee6e84f084243f1aacfa80f (diff)
downloadchromium_src-21d97c7299455296b91571683c286b3acfb76fb5.zip
chromium_src-21d97c7299455296b91571683c286b3acfb76fb5.tar.gz
chromium_src-21d97c7299455296b91571683c286b3acfb76fb5.tar.bz2
Mojo: Refactor some message pipe stuff.
Move handling of dispatchers when enqueueing messages into the endpoint code. That handling will need to be very specific to the type of endpoint. R=darin@chromium.org Review URL: https://codereview.chromium.org/147983009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/system/message_pipe_endpoint.h')
-rw-r--r--mojo/system/message_pipe_endpoint.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/mojo/system/message_pipe_endpoint.h b/mojo/system/message_pipe_endpoint.h
index 835b966..4825b37 100644
--- a/mojo/system/message_pipe_endpoint.h
+++ b/mojo/system/message_pipe_endpoint.h
@@ -37,20 +37,11 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipeEndpoint {
// All implementations must implement these.
virtual void Close() = 0;
virtual void OnPeerClose() = 0;
- // Checks if |EnqueueMessage()| will be able to enqueue the given message
- // (with the given set of dispatchers). |dispatchers| should be non-null only
- // if it's nonempty. Returns |MOJO_RESULT_OK| if it will and an appropriate
- // error code if it won't.
- virtual MojoResult CanEnqueueMessage(
- const MessageInTransit* message,
- const std::vector<Dispatcher*>* dispatchers) = 0;
- // Takes ownership of |message| and the contents of |dispatchers| (leaving
- // it empty). This should only be called after |CanEnqueueMessage()| has
- // indicated success. (Unlike |CanEnqueueMessage()|, |dispatchers| may be
- // non-null but empty.)
- virtual void EnqueueMessage(
+ // Implements |MessagePipe::EnqueueMessage()| (see its description for
+ // details).
+ virtual MojoResult EnqueueMessage(
MessageInTransit* message,
- std::vector<scoped_refptr<Dispatcher> >* dispatchers) = 0;
+ const std::vector<Dispatcher*>* dispatchers) = 0;
// Implementations must override these if they represent a local endpoint,
// i.e., one for which there's a |MessagePipeDispatcher| (and thus a handle).