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

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

Issue 1465183005: Rename mojo::TokenSerializer to mojo::Broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win component 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_SYSTEM_TOKEN_SERIALIZER_MESSAGES_WIN_H_
6 #define MOJO_EDK_SYSTEM_TOKEN_SERIALIZER_MESSAGES_WIN_H_
7
8 #include <stdint.h>
9
10 #include "base/compiler_specific.h"
11
12 namespace mojo {
13 namespace edk {
14
15 // This header defines the message format between ChildTokenSerializer and
16 // ParentTokenSerializer.
17
18 enum MessageId {
19 // The reply is two HANDLEs.
20 CREATE_PLATFORM_CHANNEL_PAIR = 0,
21 // The reply is tokens of the same count of passed in handles.
22 HANDLE_TO_TOKEN,
23 // The reply is handles of the same count of passed in tokens.
24 TOKEN_TO_HANDLE,
25 };
26
27 // Definitions of the raw bytes sent between ChildTokenSerializer and
28 // ParentTokenSerializer.
29
30 struct ALIGNAS(4) TokenSerializerMessage {
31 uint32_t size;
32 MessageId id;
33 // Data, if any, follows.
34 union {
35 HANDLE handles[1]; // If HANDLE_TO_TOKEN.
36 uint64_t tokens[1]; // If TOKEN_TO_HANDLE.
37 };
38 };
39
40 const int kTokenSerializerMessageHeaderSize =
41 sizeof(uint32_t) + sizeof(MessageId);
42
43 } // namespace edk
44 } // namespace mojo
45
46 #endif // MOJO_EDK_SYSTEM_TOKEN_SERIALIZER_MESSAGES_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698