| 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/edk/system/proxy_message_pipe_endpoint.h" | 5 #include "mojo/edk/system/proxy_message_pipe_endpoint.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "mojo/edk/system/channel_endpoint.h" | 12 #include "mojo/edk/system/channel_endpoint.h" |
| 13 #include "mojo/edk/system/local_message_pipe_endpoint.h" | 13 #include "mojo/edk/system/local_message_pipe_endpoint.h" |
| 14 #include "mojo/edk/system/message_pipe_dispatcher.h" | 14 #include "mojo/edk/system/message_pipe_dispatcher.h" |
| 15 | 15 |
| 16 using mojo::util::RefPtr; |
| 17 |
| 16 namespace mojo { | 18 namespace mojo { |
| 17 namespace system { | 19 namespace system { |
| 18 | 20 |
| 19 ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint( | 21 ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint( |
| 20 RefPtr<ChannelEndpoint>&& channel_endpoint) | 22 RefPtr<ChannelEndpoint>&& channel_endpoint) |
| 21 : channel_endpoint_(std::move(channel_endpoint)) {} | 23 : channel_endpoint_(std::move(channel_endpoint)) {} |
| 22 | 24 |
| 23 ProxyMessagePipeEndpoint::~ProxyMessagePipeEndpoint() { | 25 ProxyMessagePipeEndpoint::~ProxyMessagePipeEndpoint() { |
| 24 DCHECK(!channel_endpoint_); | 26 DCHECK(!channel_endpoint_); |
| 25 } | 27 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 54 | 56 |
| 55 void ProxyMessagePipeEndpoint::DetachIfNecessary() { | 57 void ProxyMessagePipeEndpoint::DetachIfNecessary() { |
| 56 if (channel_endpoint_) { | 58 if (channel_endpoint_) { |
| 57 channel_endpoint_->DetachFromClient(); | 59 channel_endpoint_->DetachFromClient(); |
| 58 channel_endpoint_ = nullptr; | 60 channel_endpoint_ = nullptr; |
| 59 } | 61 } |
| 60 } | 62 } |
| 61 | 63 |
| 62 } // namespace system | 64 } // namespace system |
| 63 } // namespace mojo | 65 } // namespace mojo |
| OLD | NEW |