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

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

Issue 133213012: Mojo: TYPE_CHANNEL -> kTypeChannel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/channel.cc ('k') | mojo/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_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 #include <stdlib.h> // For |free()|. 9 #include <stdlib.h> // For |free()|.
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "mojo/system/system_impl_export.h" 12 #include "mojo/system/system_impl_export.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace system { 15 namespace system {
16 16
17 // This class is used to represent data in transit. It is thread-unsafe. 17 // This class is used to represent data in transit. It is thread-unsafe.
18 // Note: This class is POD. 18 // Note: This class is POD.
19 class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit { 19 class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
20 public: 20 public:
21 typedef uint16_t Type; 21 typedef uint16_t Type;
22 // Messages that are forwarded to |MessagePipeEndpoint|s. 22 // Messages that are forwarded to |MessagePipeEndpoint|s.
23 static const Type kTypeMessagePipeEndpoint = 0; 23 static const Type kTypeMessagePipeEndpoint = 0;
24 // Messages that are forwarded to |MessagePipe|s. 24 // Messages that are forwarded to |MessagePipe|s.
25 static const Type kTypeMessagePipe = 1; 25 static const Type kTypeMessagePipe = 1;
26 // Messages that are consumed by the channel. 26 // Messages that are consumed by the channel.
27 static const Type TYPE_CHANNEL = 2; 27 static const Type kTypeChannel = 2;
28 28
29 typedef uint16_t Subtype; 29 typedef uint16_t Subtype;
30 // Subtypes for type |kTypeMessagePipeEndpoint|: 30 // Subtypes for type |kTypeMessagePipeEndpoint|:
31 static const Subtype kSubtypeMessagePipeEndpointData = 0; 31 static const Subtype kSubtypeMessagePipeEndpointData = 0;
32 // Subtypes for type |kTypeMessagePipe|: 32 // Subtypes for type |kTypeMessagePipe|:
33 static const Subtype kSubtypeMessagePipePeerClosed = 0; 33 static const Subtype kSubtypeMessagePipePeerClosed = 0;
34 34
35 typedef uint32_t EndpointId; 35 typedef uint32_t EndpointId;
36 // Never a valid endpoint ID. 36 // Never a valid endpoint ID.
37 static const EndpointId kInvalidEndpointId = 0; 37 static const EndpointId kInvalidEndpointId = 0;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 }; 105 };
106 106
107 // The size of |MessageInTransit| must be appropriate to maintain alignment of 107 // The size of |MessageInTransit| must be appropriate to maintain alignment of
108 // the following data. 108 // the following data.
109 COMPILE_ASSERT(sizeof(MessageInTransit) == 16, MessageInTransit_has_wrong_size); 109 COMPILE_ASSERT(sizeof(MessageInTransit) == 16, MessageInTransit_has_wrong_size);
110 110
111 } // namespace system 111 } // namespace system
112 } // namespace mojo 112 } // namespace mojo
113 113
114 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ 114 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_
OLDNEW
« no previous file with comments | « mojo/system/channel.cc ('k') | mojo/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698