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; | 22 using mojo::util::MakeRefCounted; |
| 23 using mojo::util::MutexLocker; |
23 using mojo::util::RefPtr; | 24 using mojo::util::RefPtr; |
24 | 25 |
25 namespace mojo { | 26 namespace mojo { |
26 namespace system { | 27 namespace system { |
27 | 28 |
28 // static | 29 // static |
29 RefPtr<MessagePipe> MessagePipe::CreateLocalLocal() | 30 RefPtr<MessagePipe> MessagePipe::CreateLocalLocal() |
30 MOJO_NO_THREAD_SAFETY_ANALYSIS { | 31 MOJO_NO_THREAD_SAFETY_ANALYSIS { |
31 RefPtr<MessagePipe> message_pipe = AdoptRef(new MessagePipe()); | 32 RefPtr<MessagePipe> message_pipe = AdoptRef(new MessagePipe()); |
32 message_pipe->endpoints_[0].reset(new LocalMessagePipeEndpoint()); | 33 message_pipe->endpoints_[0].reset(new LocalMessagePipeEndpoint()); |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 LOG(WARNING) << "Enqueueing null dispatcher"; | 386 LOG(WARNING) << "Enqueueing null dispatcher"; |
386 dispatchers->push_back(nullptr); | 387 dispatchers->push_back(nullptr); |
387 } | 388 } |
388 } | 389 } |
389 message->SetDispatchers(std::move(dispatchers)); | 390 message->SetDispatchers(std::move(dispatchers)); |
390 return MOJO_RESULT_OK; | 391 return MOJO_RESULT_OK; |
391 } | 392 } |
392 | 393 |
393 } // namespace system | 394 } // namespace system |
394 } // namespace mojo | 395 } // namespace mojo |
OLD | NEW |