1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "mojo/system/message_pipe_endpoint.h"
7 #include "base/logging.h"
8 #include "mojo/system/channel.h"
13 void MessagePipeEndpoint::Close() {
17 void MessagePipeEndpoint::CancelAllWaiters() {
21 MojoResult
MessagePipeEndpoint::ReadMessage(UserPointer
<void> /*bytes*/,
22 UserPointer
<uint32_t> /*num_bytes*/,
23 DispatcherVector
* /*dispatchers*/,
24 uint32_t* /*num_dispatchers*/,
25 MojoReadMessageFlags
/*flags*/) {
27 return MOJO_RESULT_INTERNAL
;
30 HandleSignalsState
MessagePipeEndpoint::GetHandleSignalsState() const {
32 return HandleSignalsState();
35 MojoResult
MessagePipeEndpoint::AddWaiter(Waiter
* /*waiter*/,
36 MojoHandleSignals
/*signals*/,
38 HandleSignalsState
* signals_state
) {
41 *signals_state
= HandleSignalsState();
42 return MOJO_RESULT_INTERNAL
;
45 void MessagePipeEndpoint::RemoveWaiter(Waiter
* /*waiter*/,
46 HandleSignalsState
* signals_state
) {
49 *signals_state
= HandleSignalsState();
52 void MessagePipeEndpoint::Attach(scoped_refptr
<Channel
> /*channel*/,
53 MessageInTransit::EndpointId
/*local_id*/) {
57 bool MessagePipeEndpoint::Run(MessageInTransit::EndpointId
/*remote_id*/) {
62 void MessagePipeEndpoint::OnRemove() {