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/transport_data.h" | 5 #include "mojo/edk/system/transport_data.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.h" | 12 #include "mojo/edk/system/channel.h" |
13 #include "mojo/edk/system/configuration.h" | 13 #include "mojo/edk/system/configuration.h" |
14 #include "mojo/edk/system/message_in_transit.h" | 14 #include "mojo/edk/system/message_in_transit.h" |
15 | 15 |
16 using mojo::embedder::ScopedPlatformHandle; | 16 using mojo::platform::ScopedPlatformHandle; |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace system { | 19 namespace system { |
20 | 20 |
21 // The maximum amount of space needed per platform handle. | 21 // The maximum amount of space needed per platform handle. |
22 // (|{Channel,RawChannel}::GetSerializedPlatformHandleSize()| should always | 22 // (|{Channel,RawChannel}::GetSerializedPlatformHandleSize()| should always |
23 // return a value which is at most this. This is only used to calculate | 23 // return a value which is at most this. This is only used to calculate |
24 // |TransportData::kMaxBufferSize|. This value should be a multiple of the | 24 // |TransportData::kMaxBufferSize|. This value should be a multiple of the |
25 // alignment in order to simplify calculations, even though the actual amount of | 25 // alignment in order to simplify calculations, even though the actual amount of |
26 // space needed need not be a multiple of the alignment. | 26 // space needed need not be a multiple of the alignment. |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 const void* source = static_cast<const char*>(buffer) + offset; | 338 const void* source = static_cast<const char*>(buffer) + offset; |
339 (*dispatchers)[i] = Dispatcher::TransportDataAccess::Deserialize( | 339 (*dispatchers)[i] = Dispatcher::TransportDataAccess::Deserialize( |
340 channel, handle_table[i].type, source, size, platform_handles.get()); | 340 channel, handle_table[i].type, source, size, platform_handles.get()); |
341 } | 341 } |
342 | 342 |
343 return dispatchers; | 343 return dispatchers; |
344 } | 344 } |
345 | 345 |
346 } // namespace system | 346 } // namespace system |
347 } // namespace mojo | 347 } // namespace mojo |
OLD | NEW |