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

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

Issue 1482553002: Remove problematic-and-ignored ALIGNAS(4) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying fix to renamed file. Created 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BROKER_MESSAGES_H_ 5 #ifndef MOJO_EDK_SYSTEM_BROKER_MESSAGES_H_
6 #define MOJO_EDK_SYSTEM_BROKER_MESSAGES_H_ 6 #define MOJO_EDK_SYSTEM_BROKER_MESSAGES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace edk { 13 namespace edk {
14 14
15 // This header defines the message format between ChildBroker and 15 // This header defines the message format between ChildBroker and
16 // ChildBrokerHost. 16 // ChildBrokerHost.
17 17
18 enum MessageId { 18 enum MessageId {
19 // The reply is two HANDLEs. 19 // The reply is two HANDLEs.
20 CREATE_PLATFORM_CHANNEL_PAIR = 0, 20 CREATE_PLATFORM_CHANNEL_PAIR = 0,
21 // The reply is tokens of the same count of passed in handles. 21 // The reply is tokens of the same count of passed in handles.
22 HANDLE_TO_TOKEN, 22 HANDLE_TO_TOKEN,
23 // The reply is handles of the same count of passed in tokens. 23 // The reply is handles of the same count of passed in tokens.
24 TOKEN_TO_HANDLE, 24 TOKEN_TO_HANDLE,
25 }; 25 };
26 26
27 // Definitions of the raw bytes sent in messages. 27 // Definitions of the raw bytes sent in messages.
28 28
29 struct ALIGNAS(4) BrokerMessage { 29 struct BrokerMessage {
30 uint32_t size; 30 uint32_t size;
31 MessageId id; 31 MessageId id;
32 // Data, if any, follows. 32 // Data, if any, follows.
33 union { 33 union {
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 HANDLE handles[1]; // If HANDLE_TO_TOKEN. 35 HANDLE handles[1]; // If HANDLE_TO_TOKEN.
36 uint64_t tokens[1]; // If TOKEN_TO_HANDLE. 36 uint64_t tokens[1]; // If TOKEN_TO_HANDLE.
37 #endif 37 #endif
38 }; 38 };
39 }; 39 };
40 40
41 const int kBrokerMessageHeaderSize = sizeof(uint32_t) + sizeof(MessageId); 41 const int kBrokerMessageHeaderSize = sizeof(uint32_t) + sizeof(MessageId);
42 42
43 } // namespace edk 43 } // namespace edk
44 } // namespace mojo 44 } // namespace mojo
45 45
46 #endif // MOJO_EDK_SYSTEM_BROKER_MESSAGES_H_ 46 #endif // MOJO_EDK_SYSTEM_BROKER_MESSAGES_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698