OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/incoming_endpoint.h" | 5 #include "mojo/edk/system/incoming_endpoint.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/edk/system/channel_endpoint.h" | 10 #include "mojo/edk/system/channel_endpoint.h" |
11 #include "mojo/edk/system/data_pipe.h" | 11 #include "mojo/edk/system/data_pipe.h" |
12 #include "mojo/edk/system/message_in_transit.h" | 12 #include "mojo/edk/system/message_in_transit.h" |
13 #include "mojo/edk/system/message_pipe.h" | 13 #include "mojo/edk/system/message_pipe.h" |
14 #include "mojo/edk/system/remote_producer_data_pipe_impl.h" | 14 #include "mojo/edk/system/remote_producer_data_pipe_impl.h" |
15 | 15 |
16 using mojo::util::MakeRefCounted; | 16 using mojo::util::MakeRefCounted; |
| 17 using mojo::util::MutexLocker; |
17 using mojo::util::RefPtr; | 18 using mojo::util::RefPtr; |
18 | 19 |
19 namespace mojo { | 20 namespace mojo { |
20 namespace system { | 21 namespace system { |
21 | 22 |
22 RefPtr<ChannelEndpoint> IncomingEndpoint::Init() { | 23 RefPtr<ChannelEndpoint> IncomingEndpoint::Init() { |
23 endpoint_ = | 24 endpoint_ = |
24 MakeRefCounted<ChannelEndpoint>(RefPtr<IncomingEndpoint>(this), 0); | 25 MakeRefCounted<ChannelEndpoint>(RefPtr<IncomingEndpoint>(this), 0); |
25 return endpoint_; | 26 return endpoint_; |
26 } | 27 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void IncomingEndpoint::OnDetachFromChannel(unsigned /*port*/) { | 75 void IncomingEndpoint::OnDetachFromChannel(unsigned /*port*/) { |
75 Close(); | 76 Close(); |
76 } | 77 } |
77 | 78 |
78 IncomingEndpoint::IncomingEndpoint() {} | 79 IncomingEndpoint::IncomingEndpoint() {} |
79 | 80 |
80 IncomingEndpoint::~IncomingEndpoint() {} | 81 IncomingEndpoint::~IncomingEndpoint() {} |
81 | 82 |
82 } // namespace system | 83 } // namespace system |
83 } // namespace mojo | 84 } // namespace mojo |
OLD | NEW |