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 #ifndef MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ |
6 #define MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ | 6 #define MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 static const Type kTypeMessagePipeEndpoint = 0; | 47 static const Type kTypeMessagePipeEndpoint = 0; |
48 // Messages that are forwarded to |MessagePipe|s. | 48 // Messages that are forwarded to |MessagePipe|s. |
49 static const Type kTypeMessagePipe = 1; | 49 static const Type kTypeMessagePipe = 1; |
50 // Messages that are consumed by the channel. | 50 // Messages that are consumed by the channel. |
51 static const Type kTypeChannel = 2; | 51 static const Type kTypeChannel = 2; |
52 | 52 |
53 typedef uint16_t Subtype; | 53 typedef uint16_t Subtype; |
54 // Subtypes for type |kTypeMessagePipeEndpoint|: | 54 // Subtypes for type |kTypeMessagePipeEndpoint|: |
55 static const Subtype kSubtypeMessagePipeEndpointData = 0; | 55 static const Subtype kSubtypeMessagePipeEndpointData = 0; |
56 // Subtypes for type |kTypeMessagePipe|: | 56 // Subtypes for type |kTypeMessagePipe|: |
57 static const Subtype kSubtypeMessagePipePeerClosed = 0; | 57 // Nothing currently. |
58 // Subtypes for type |kTypeChannel|: | 58 // Subtypes for type |kTypeChannel|: |
59 static const Subtype kSubtypeChannelRunMessagePipeEndpoint = 0; | 59 static const Subtype kSubtypeChannelRunMessagePipeEndpoint = 0; |
| 60 static const Subtype kSubtypeChannelRemoveMessagePipeEndpoint = 1; |
| 61 static const Subtype kSubtypeChannelRemoveMessagePipeEndpointAck = 2; |
60 | 62 |
61 typedef uint32_t EndpointId; | 63 typedef uint32_t EndpointId; |
62 // Never a valid endpoint ID. | 64 // Never a valid endpoint ID. |
63 static const EndpointId kInvalidEndpointId = 0; | 65 static const EndpointId kInvalidEndpointId = 0; |
64 | 66 |
65 // Messages (the header and data) must always be aligned to a multiple of this | 67 // Messages (the header and data) must always be aligned to a multiple of this |
66 // quantity (which must be a power of 2). | 68 // quantity (which must be a power of 2). |
67 static const size_t kMessageAlignment = 8; | 69 static const size_t kMessageAlignment = 8; |
68 | 70 |
69 // The maximum size of a single serialized dispatcher. This must be a multiple | 71 // The maximum size of a single serialized dispatcher. This must be a multiple |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|. | 305 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|. |
304 scoped_ptr<std::vector<embedder::PlatformHandle> > platform_handles_; | 306 scoped_ptr<std::vector<embedder::PlatformHandle> > platform_handles_; |
305 | 307 |
306 DISALLOW_COPY_AND_ASSIGN(MessageInTransit); | 308 DISALLOW_COPY_AND_ASSIGN(MessageInTransit); |
307 }; | 309 }; |
308 | 310 |
309 } // namespace system | 311 } // namespace system |
310 } // namespace mojo | 312 } // namespace mojo |
311 | 313 |
312 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ | 314 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ |
OLD | NEW |