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/channel.h" | 5 #include "mojo/edk/system/channel.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "mojo/edk/embedder/platform_handle_vector.h" | 13 #include "mojo/edk/embedder/platform_handle_vector.h" |
14 #include "mojo/edk/system/endpoint_relayer.h" | 14 #include "mojo/edk/system/endpoint_relayer.h" |
15 #include "mojo/edk/system/transport_data.h" | 15 #include "mojo/edk/system/transport_data.h" |
16 | 16 |
17 using mojo::util::MakeRefCounted; | 17 using mojo::util::MakeRefCounted; |
| 18 using mojo::util::MutexLocker; |
18 using mojo::util::RefPtr; | 19 using mojo::util::RefPtr; |
19 | 20 |
20 namespace mojo { | 21 namespace mojo { |
21 namespace system { | 22 namespace system { |
22 | 23 |
23 namespace { | 24 namespace { |
24 | 25 |
25 struct SerializedEndpoint { | 26 struct SerializedEndpoint { |
26 // This is the endpoint ID on the receiving side, and should be a "remote ID". | 27 // This is the endpoint ID on the receiving side, and should be a "remote ID". |
27 // (The receiving side should already have had an endpoint attached and been | 28 // (The receiving side should already have had an endpoint attached and been |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 << ", local ID " << local_id << ", remote ID " << remote_id; | 624 << ", local ID " << local_id << ", remote ID " << remote_id; |
624 std::unique_ptr<MessageInTransit> message(new MessageInTransit( | 625 std::unique_ptr<MessageInTransit> message(new MessageInTransit( |
625 MessageInTransit::Type::CHANNEL, subtype, num_bytes, bytes)); | 626 MessageInTransit::Type::CHANNEL, subtype, num_bytes, bytes)); |
626 message->set_source_id(local_id); | 627 message->set_source_id(local_id); |
627 message->set_destination_id(remote_id); | 628 message->set_destination_id(remote_id); |
628 return WriteMessage(std::move(message)); | 629 return WriteMessage(std::move(message)); |
629 } | 630 } |
630 | 631 |
631 } // namespace system | 632 } // namespace system |
632 } // namespace mojo | 633 } // namespace mojo |
OLD | NEW |