| 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/message_pipe.h" | 5 #include "mojo/edk/system/message_pipe.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "mojo/edk/system/channel.h" | 11 #include "mojo/edk/system/channel.h" |
| 12 #include "mojo/edk/system/channel_endpoint.h" | 12 #include "mojo/edk/system/channel_endpoint.h" |
| 13 #include "mojo/edk/system/channel_endpoint_id.h" | 13 #include "mojo/edk/system/channel_endpoint_id.h" |
| 14 #include "mojo/edk/system/incoming_endpoint.h" | 14 #include "mojo/edk/system/incoming_endpoint.h" |
| 15 #include "mojo/edk/system/local_message_pipe_endpoint.h" | 15 #include "mojo/edk/system/local_message_pipe_endpoint.h" |
| 16 #include "mojo/edk/system/message_in_transit.h" | 16 #include "mojo/edk/system/message_in_transit.h" |
| 17 #include "mojo/edk/system/message_pipe_dispatcher.h" | 17 #include "mojo/edk/system/message_pipe_dispatcher.h" |
| 18 #include "mojo/edk/system/message_pipe_endpoint.h" | 18 #include "mojo/edk/system/message_pipe_endpoint.h" |
| 19 #include "mojo/edk/system/proxy_message_pipe_endpoint.h" | 19 #include "mojo/edk/system/proxy_message_pipe_endpoint.h" |
| 20 #include "mojo/edk/util/make_unique.h" | 20 #include "mojo/edk/util/make_unique.h" |
| 21 | 21 |
| 22 using mojo::util::MakeRefCounted; |
| 23 using mojo::util::RefPtr; |
| 24 |
| 22 namespace mojo { | 25 namespace mojo { |
| 23 namespace system { | 26 namespace system { |
| 24 | 27 |
| 25 // static | 28 // static |
| 26 RefPtr<MessagePipe> MessagePipe::CreateLocalLocal() | 29 RefPtr<MessagePipe> MessagePipe::CreateLocalLocal() |
| 27 MOJO_NO_THREAD_SAFETY_ANALYSIS { | 30 MOJO_NO_THREAD_SAFETY_ANALYSIS { |
| 28 RefPtr<MessagePipe> message_pipe = AdoptRef(new MessagePipe()); | 31 RefPtr<MessagePipe> message_pipe = AdoptRef(new MessagePipe()); |
| 29 message_pipe->endpoints_[0].reset(new LocalMessagePipeEndpoint()); | 32 message_pipe->endpoints_[0].reset(new LocalMessagePipeEndpoint()); |
| 30 message_pipe->endpoints_[1].reset(new LocalMessagePipeEndpoint()); | 33 message_pipe->endpoints_[1].reset(new LocalMessagePipeEndpoint()); |
| 31 return message_pipe; | 34 return message_pipe; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 LOG(WARNING) << "Enqueueing null dispatcher"; | 385 LOG(WARNING) << "Enqueueing null dispatcher"; |
| 383 dispatchers->push_back(nullptr); | 386 dispatchers->push_back(nullptr); |
| 384 } | 387 } |
| 385 } | 388 } |
| 386 message->SetDispatchers(std::move(dispatchers)); | 389 message->SetDispatchers(std::move(dispatchers)); |
| 387 return MOJO_RESULT_OK; | 390 return MOJO_RESULT_OK; |
| 388 } | 391 } |
| 389 | 392 |
| 390 } // namespace system | 393 } // namespace system |
| 391 } // namespace mojo | 394 } // namespace mojo |
| OLD | NEW |