Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: mojo/edk/system/message_in_transit.h

Issue 737663003: Remove MessageInTransit::kTypeMessagePipe; rename kTypeMessagePipeEndpoint to kTypeEndpoint; etc. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/message_in_transit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_ 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_
6 #define MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_ 6 #define MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 26 matching lines...) Expand all
37 // internal detail of this class) followed immediately by the message data 37 // internal detail of this class) followed immediately by the message data
38 // (accessed by |bytes()| and of size |num_bytes()|, and also 38 // (accessed by |bytes()| and of size |num_bytes()|, and also
39 // |kMessageAlignment|-byte aligned), and then any padding needed to make the 39 // |kMessageAlignment|-byte aligned), and then any padding needed to make the
40 // main buffer a multiple of |kMessageAlignment| bytes in size. 40 // main buffer a multiple of |kMessageAlignment| bytes in size.
41 // 41 //
42 // See |TransportData| for a description of the (serialized) transport data 42 // See |TransportData| for a description of the (serialized) transport data
43 // buffer. 43 // buffer.
44 class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit { 44 class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
45 public: 45 public:
46 typedef uint16_t Type; 46 typedef uint16_t Type;
47 // Messages that are forwarded to |MessagePipeEndpoint|s. 47 // Messages that are forwarded to endpoints.
48 static const Type kTypeMessagePipeEndpoint = 0; 48 static const Type kTypeEndpoint = 0;
49 // Messages that are forwarded to |MessagePipe|s.
50 static const Type kTypeMessagePipe = 1;
51 // Messages that are consumed by the |Channel|. 49 // Messages that are consumed by the |Channel|.
52 static const Type kTypeChannel = 2; 50 static const Type kTypeChannel = 1;
53 // Messages that are consumed by the |RawChannel| (implementation). 51 // Messages that are consumed by the |RawChannel| (implementation).
54 static const Type kTypeRawChannel = 3; 52 static const Type kTypeRawChannel = 2;
55 53
56 typedef uint16_t Subtype; 54 typedef uint16_t Subtype;
57 // Subtypes for type |kTypeMessagePipeEndpoint|: 55 // Subtypes for type |kTypeEndpoint|:
58 static const Subtype kSubtypeMessagePipeEndpointData = 0; 56 static const Subtype kSubtypeEndpointData = 0;
59 // Subtypes for type |kTypeMessagePipe|:
60 // Nothing currently.
61 // Subtypes for type |kTypeChannel|: 57 // Subtypes for type |kTypeChannel|:
62 static const Subtype kSubtypeChannelAttachAndRunEndpoint = 0; 58 static const Subtype kSubtypeChannelAttachAndRunEndpoint = 0;
63 static const Subtype kSubtypeChannelRemoveMessagePipeEndpoint = 1; 59 static const Subtype kSubtypeChannelRemoveMessagePipeEndpoint = 1;
64 static const Subtype kSubtypeChannelRemoveMessagePipeEndpointAck = 2; 60 static const Subtype kSubtypeChannelRemoveMessagePipeEndpointAck = 2;
65 61
66 // Subtypes for type |kTypeRawChannel|: 62 // Subtypes for type |kTypeRawChannel|:
67 static const Subtype kSubtypeRawChannelPosixExtraPlatformHandles = 0; 63 static const Subtype kSubtypeRawChannelPosixExtraPlatformHandles = 0;
68 64
69 // Messages (the header and data) must always be aligned to a multiple of this 65 // Messages (the header and data) must always be aligned to a multiple of this
70 // quantity (which must be a power of 2). 66 // quantity (which must be a power of 2).
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // some reason.) 256 // some reason.)
261 scoped_ptr<DispatcherVector> dispatchers_; 257 scoped_ptr<DispatcherVector> dispatchers_;
262 258
263 DISALLOW_COPY_AND_ASSIGN(MessageInTransit); 259 DISALLOW_COPY_AND_ASSIGN(MessageInTransit);
264 }; 260 };
265 261
266 } // namespace system 262 } // namespace system
267 } // namespace mojo 263 } // namespace mojo
268 264
269 #endif // MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_ 265 #endif // MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698