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

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

Issue 1154903003: "typedef Foo Bar" -> "using Bar = Foo" in //mojo/edk/.... (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
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 25 matching lines...) Expand all
36 // The main buffer consists of the header (of type |Header|, which is an 36 // The main buffer consists of the header (of type |Header|, which is an
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 using Type = uint16_t;
47 // Messages that are forwarded to endpoint clients. 47 // Messages that are forwarded to endpoint clients.
48 static const Type kTypeEndpointClient = 0; 48 static const Type kTypeEndpointClient = 0;
49 // Messages that are consumed by the |ChannelEndpoint|. 49 // Messages that are consumed by the |ChannelEndpoint|.
50 static const Type kTypeEndpoint = 1; 50 static const Type kTypeEndpoint = 1;
51 // Messages that are consumed by the |Channel|. 51 // Messages that are consumed by the |Channel|.
52 static const Type kTypeChannel = 2; 52 static const Type kTypeChannel = 2;
53 // Messages that are consumed by the |RawChannel| (implementation). 53 // Messages that are consumed by the |RawChannel| (implementation).
54 static const Type kTypeRawChannel = 3; 54 static const Type kTypeRawChannel = 3;
55 // |ConnectionManager| implementations also use |RawChannel|s. 55 // |ConnectionManager| implementations also use |RawChannel|s.
56 // Messages sent to a |MasterConnectionManager|. 56 // Messages sent to a |MasterConnectionManager|.
57 static const Type kTypeConnectionManager = 4; 57 static const Type kTypeConnectionManager = 4;
58 // Messages sent by a |MasterConnectionManager| (all responses). 58 // Messages sent by a |MasterConnectionManager| (all responses).
59 static const Type kTypeConnectionManagerAck = 5; 59 static const Type kTypeConnectionManagerAck = 5;
60 60
61 typedef uint16_t Subtype; 61 using Subtype = uint16_t;
62 // Subtypes for type |kTypeEndpointClient|: 62 // Subtypes for type |kTypeEndpointClient|:
63 // Message pipe or data pipe data (etc.). 63 // Message pipe or data pipe data (etc.).
64 static const Subtype kSubtypeEndpointClientData = 0; 64 static const Subtype kSubtypeEndpointClientData = 0;
65 // Data pipe: consumer -> producer message that data was consumed. Payload is 65 // Data pipe: consumer -> producer message that data was consumed. Payload is
66 // |RemoteDataPipeAck|. 66 // |RemoteDataPipeAck|.
67 static const Subtype kSubtypeEndpointClientDataPipeAck = 1; 67 static const Subtype kSubtypeEndpointClientDataPipeAck = 1;
68 // Subtypes for type |kTypeEndpoint|: 68 // Subtypes for type |kTypeEndpoint|:
69 // TODO(vtl): Nothing yet. 69 // TODO(vtl): Nothing yet.
70 // Subtypes for type |kTypeChannel|: 70 // Subtypes for type |kTypeChannel|:
71 static const Subtype kSubtypeChannelAttachAndRunEndpoint = 0; 71 static const Subtype kSubtypeChannelAttachAndRunEndpoint = 0;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // some reason.) 278 // some reason.)
279 scoped_ptr<DispatcherVector> dispatchers_; 279 scoped_ptr<DispatcherVector> dispatchers_;
280 280
281 DISALLOW_COPY_AND_ASSIGN(MessageInTransit); 281 DISALLOW_COPY_AND_ASSIGN(MessageInTransit);
282 }; 282 };
283 283
284 } // namespace system 284 } // namespace system
285 } // namespace mojo 285 } // namespace mojo
286 286
287 #endif // MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_ 287 #endif // MOJO_EDK_SYSTEM_MESSAGE_IN_TRANSIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698