OLD | NEW |
---|---|
(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 // IPC messages used by the attachment broker. | |
6 // Multiply-included message file, hence no include guard. | |
7 | |
8 #include "ipc/brokerable_attachment.h" | |
9 #include "ipc/ipc_message_macros.h" | |
10 | |
11 #if defined(OS_WIN) | |
12 #include "ipc/handle_attachment_win.h" | |
13 #endif // defined(OS_WIN) | |
14 | |
15 // ---------------------------------------------------------------------------- | |
16 // Serialization of structs. | |
17 // ---------------------------------------------------------------------------- | |
18 | |
19 #if defined(OS_WIN) | |
20 IPC_STRUCT_TRAITS_BEGIN(IPC::internal::HandleAttachmentWin::WireFormat) | |
21 IPC_STRUCT_TRAITS_MEMBER(handle) | |
22 IPC_STRUCT_TRAITS_MEMBER(destination_process) | |
23 IPC_STRUCT_TRAITS_MEMBER(attachment_id) | |
24 IPC_STRUCT_TRAITS_END() | |
25 #endif // defined(OS_WIN) | |
26 | |
27 #define IPC_MESSAGE_START AttachmentBrokerMsgStart | |
28 | |
29 // ---------------------------------------------------------------------------- | |
30 // Messages sent from the broker to a non-broker process. | |
31 // ---------------------------------------------------------------------------- | |
32 | |
33 #if defined(OS_WIN) | |
34 // Sent from a broker to a non-broker to indicate that a windows HANDLE has been | |
35 // brokered. Contains all information necessary for the non-broker to translate | |
36 // a BrokerAttachment::AttachmentId to a BrokerAttachment. | |
37 // Warning: This IPC message assumes that the sending and receiving processes | |
Tom Sepez
2015/06/19 18:04:10
nit: the warning is true for all types in IPC -- h
erikchen
2015/06/23 22:36:59
Chrome 32-bit Windows sometimes communicates with
| |
38 // have the same type for HANDLE. | |
39 IPC_MESSAGE_CONTROL1( | |
40 AttachmentBrokerMsg_WinHandleHasBeenBrokered, | |
41 IPC::internal::HandleAttachmentWin::WireFormat /* wire_format */) | |
42 #endif // defined(OS_WIN) | |
43 | |
44 // ---------------------------------------------------------------------------- | |
45 // Messages sent from a non-broker process to a broker process. | |
46 // ---------------------------------------------------------------------------- | |
47 | |
48 #if defined(OS_WIN) | |
49 // Sent from a non-broker to a broker to request the duplication of a HANDLE | |
50 // into a different process (possibly the broker process, or even the original | |
51 // process). | |
52 // Warning: This IPC message assumes that the sending and receiving processes | |
53 // have the same type for HANDLE. | |
54 IPC_MESSAGE_CONTROL1( | |
55 AttachmentBrokerMsg_RequestBrokerageOfWinHandle, | |
Tom Sepez
2015/06/19 18:04:10
nit: I think you want |brokering|, the gerund form
erikchen
2015/06/23 22:36:59
I went with your suggestion of DuplicateWinHandle
| |
56 IPC::internal::HandleAttachmentWin::WireFormat /* wire_format */) | |
57 #endif // defined(OS_WIN) | |
OLD | NEW |