Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / common / mac / io_surface_manager_messages.h
blobd72d2b324ed8381453a0c00e881f7a283728759c
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 #ifndef CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_
6 #define CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_
8 #include <mach/message.h>
10 #include "content/common/mac/io_surface_manager_token.h"
12 // Mach messages used for child processes.
14 // Message IDs.
15 // Note: we currently use __LINE__ to give unique IDs to messages.
16 // They're unique since all messages are defined in this file.
17 #define MACH_MESSAGE_ID() __LINE__
19 namespace content {
21 // Messages sent from the child process to the browser.
23 struct IOSurfaceManagerHostMsg_RegisterIOSurface {
24 enum { ID = MACH_MESSAGE_ID() };
25 mach_msg_header_t header;
26 mach_msg_body_t body;
27 mach_msg_port_descriptor_t io_surface_port;
28 IOSurfaceManagerToken::Name token_name;
29 int io_surface_id;
30 int client_id;
33 struct IOSurfaceManagerHostMsg_UnregisterIOSurface {
34 enum { ID = MACH_MESSAGE_ID() };
35 mach_msg_header_t header;
36 mach_msg_body_t body;
37 IOSurfaceManagerToken::Name token_name;
38 int io_surface_id;
39 int client_id;
42 struct IOSurfaceManagerHostMsg_AcquireIOSurface {
43 enum { ID = MACH_MESSAGE_ID() };
44 mach_msg_header_t header;
45 mach_msg_body_t body;
46 IOSurfaceManagerToken::Name token_name;
47 int io_surface_id;
50 // Messages sent from the browser to the child process.
52 struct IOSurfaceManagerMsg_RegisterIOSurfaceReply {
53 mach_msg_header_t header;
54 mach_msg_body_t body;
55 boolean_t result;
58 struct IOSurfaceManagerMsg_AcquireIOSurfaceReply {
59 mach_msg_header_t header;
60 mach_msg_body_t body;
61 mach_msg_port_descriptor_t io_surface_port;
62 boolean_t result;
65 } // namespace content
67 #endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_