| 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/system/local_message_pipe_endpoint.h" | 5 #include "mojo/system/local_message_pipe_endpoint.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "mojo/system/dispatcher.h" | 10 #include "mojo/system/dispatcher.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 void LocalMessagePipeEndpoint::RemoveWaiter(Waiter* waiter) { | 145 void LocalMessagePipeEndpoint::RemoveWaiter(Waiter* waiter) { |
| 146 DCHECK(is_open_); | 146 DCHECK(is_open_); |
| 147 waiter_list_.RemoveWaiter(waiter); | 147 waiter_list_.RemoveWaiter(waiter); |
| 148 } | 148 } |
| 149 | 149 |
| 150 WaitFlagsState LocalMessagePipeEndpoint::GetWaitFlagsState() { | 150 WaitFlagsState LocalMessagePipeEndpoint::GetWaitFlagsState() { |
| 151 WaitFlagsState rv; | 151 WaitFlagsState rv; |
| 152 if (!message_queue_.IsEmpty()) { | 152 if (!message_queue_.IsEmpty()) { |
| 153 rv.satisfied_signals |= MOJO_WAIT_FLAG_READABLE; | 153 rv.satisfied_signals |= MOJO_HANDLE_SIGNAL_READABLE; |
| 154 rv.satisfiable_signals |= MOJO_WAIT_FLAG_READABLE; | 154 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_READABLE; |
| 155 } | 155 } |
| 156 if (is_peer_open_) { | 156 if (is_peer_open_) { |
| 157 rv.satisfied_signals |= MOJO_WAIT_FLAG_WRITABLE; | 157 rv.satisfied_signals |= MOJO_HANDLE_SIGNAL_WRITABLE; |
| 158 rv.satisfiable_signals |= MOJO_WAIT_FLAG_READABLE | MOJO_WAIT_FLAG_WRITABLE; | 158 rv.satisfiable_signals |= |
| 159 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE; |
| 159 } | 160 } |
| 160 return rv; | 161 return rv; |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace system | 164 } // namespace system |
| 164 } // namespace mojo | 165 } // namespace mojo |
| OLD | NEW |