| 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/message_pipe_dispatcher.h" | 5 #include "mojo/system/message_pipe_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "mojo/system/limits.h" | 8 #include "mojo/system/limits.h" |
| 9 #include "mojo/system/memory.h" | 9 #include "mojo/system/memory.h" |
| 10 #include "mojo/system/message_pipe.h" | 10 #include "mojo/system/message_pipe.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 void MessagePipeDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { | 95 void MessagePipeDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { |
| 96 lock().AssertAcquired(); | 96 lock().AssertAcquired(); |
| 97 message_pipe_->RemoveWaiter(port_, waiter); | 97 message_pipe_->RemoveWaiter(port_, waiter); |
| 98 } | 98 } |
| 99 | 99 |
| 100 scoped_refptr<Dispatcher> | 100 scoped_refptr<Dispatcher> |
| 101 MessagePipeDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() { | 101 MessagePipeDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() { |
| 102 lock().AssertAcquired(); | 102 lock().AssertAcquired(); |
| 103 | 103 |
| 104 scoped_refptr<MessagePipeDispatcher> rv = new MessagePipeDispatcher; | 104 scoped_refptr<MessagePipeDispatcher> rv = new MessagePipeDispatcher(); |
| 105 rv->Init(message_pipe_, port_); | 105 rv->Init(message_pipe_, port_); |
| 106 message_pipe_ = NULL; | 106 message_pipe_ = NULL; |
| 107 port_ = kInvalidPort; | 107 port_ = kInvalidPort; |
| 108 return scoped_refptr<Dispatcher>(rv.get()); | 108 return scoped_refptr<Dispatcher>(rv.get()); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace system | 111 } // namespace system |
| 112 } // namespace mojo | 112 } // namespace mojo |
| OLD | NEW |