Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / ipc / attachment_broker_messages.h
blob066e19c986a9f99547356315b865b4f1ac239c78
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.
5 // IPC messages used by the attachment broker.
6 // Multiply-included message file, hence no include guard.
8 #include "base/process/process_handle.h"
9 #include "ipc/brokerable_attachment.h"
10 #include "ipc/ipc_export.h"
11 #include "ipc/ipc_message_macros.h"
13 #if defined(OS_WIN)
14 #include "ipc/handle_attachment_win.h"
15 #endif // defined(OS_WIN)
17 // ----------------------------------------------------------------------------
18 // Serialization of structs.
19 // ----------------------------------------------------------------------------
21 #if defined(OS_WIN)
22 IPC_STRUCT_TRAITS_BEGIN(IPC::internal::HandleAttachmentWin::WireFormat)
23 IPC_STRUCT_TRAITS_MEMBER(handle)
24 IPC_STRUCT_TRAITS_MEMBER(destination_process)
25 IPC_STRUCT_TRAITS_MEMBER(attachment_id)
26 IPC_STRUCT_TRAITS_END()
27 #endif // defined(OS_WIN)
29 #undef IPC_MESSAGE_EXPORT
30 #define IPC_MESSAGE_EXPORT IPC_EXPORT
31 #define IPC_MESSAGE_START AttachmentBrokerMsgStart
33 // ----------------------------------------------------------------------------
34 // Messages sent from the broker to a non-broker process.
35 // ----------------------------------------------------------------------------
37 #if defined(OS_WIN)
38 // Sent from a broker to a non-broker to indicate that a windows HANDLE has been
39 // brokered. Contains all information necessary for the non-broker to translate
40 // a BrokerAttachment::AttachmentId to a BrokerAttachment.
41 IPC_MESSAGE_CONTROL1(
42 AttachmentBrokerMsg_WinHandleHasBeenDuplicated,
43 IPC::internal::HandleAttachmentWin::WireFormat /* wire_format */)
44 #endif // defined(OS_WIN)
46 // ----------------------------------------------------------------------------
47 // Messages sent from a non-broker process to a broker process.
48 // ----------------------------------------------------------------------------
50 #if defined(OS_WIN)
51 // Sent from a non-broker to a broker to request the duplication of a HANDLE
52 // into a different process (possibly the broker process, or even the original
53 // process).
54 IPC_MESSAGE_CONTROL1(
55 AttachmentBrokerMsg_DuplicateWinHandle,
56 IPC::internal::HandleAttachmentWin::WireFormat /* wire_format */)
57 #endif // defined(OS_WIN)