OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "mojo/public/cpp/bindings/lib/connector.h" | 5 #include "mojo/public/cpp/bindings/lib/connector.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include "mojo/public/cpp/bindings/error_handler.h" | 10 #include "mojo/public/cpp/bindings/error_handler.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 Connector::~Connector() { | 32 Connector::~Connector() { |
33 if (async_wait_id_) | 33 if (async_wait_id_) |
34 waiter_->CancelWait(waiter_, async_wait_id_); | 34 waiter_->CancelWait(waiter_, async_wait_id_); |
35 } | 35 } |
36 | 36 |
37 void Connector::CloseMessagePipe() { | 37 void Connector::CloseMessagePipe() { |
38 Close(message_pipe_.Pass()); | 38 Close(message_pipe_.Pass()); |
39 } | 39 } |
40 | 40 |
41 ScopedMessagePipeHandle Connector::ReleaseMessagePipe() { | 41 ScopedMessagePipeHandle Connector::PassMessagePipe() { |
42 if (async_wait_id_) { | 42 if (async_wait_id_) { |
43 waiter_->CancelWait(waiter_, async_wait_id_); | 43 waiter_->CancelWait(waiter_, async_wait_id_); |
44 async_wait_id_ = 0; | 44 async_wait_id_ = 0; |
45 } | 45 } |
46 return message_pipe_.Pass(); | 46 return message_pipe_.Pass(); |
47 } | 47 } |
48 | 48 |
49 bool Connector::Accept(Message* message) { | 49 bool Connector::Accept(Message* message) { |
50 assert(message_pipe_.is_valid()); | 50 assert(message_pipe_.is_valid()); |
51 | 51 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 if (rv != MOJO_RESULT_OK || | 126 if (rv != MOJO_RESULT_OK || |
127 (enforce_errors_from_incoming_receiver_ && !receiver_result)) { | 127 (enforce_errors_from_incoming_receiver_ && !receiver_result)) { |
128 error_ = true; | 128 error_ = true; |
129 break; | 129 break; |
130 } | 130 } |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 } // namespace internal | 134 } // namespace internal |
135 } // namespace mojo | 135 } // namespace mojo |
OLD | NEW |