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.
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__
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
;
27 mach_msg_port_descriptor_t io_surface_port
;
28 IOSurfaceManagerToken::Name token_name
;
33 struct IOSurfaceManagerHostMsg_UnregisterIOSurface
{
34 enum { ID
= MACH_MESSAGE_ID() };
35 mach_msg_header_t header
;
37 IOSurfaceManagerToken::Name token_name
;
42 struct IOSurfaceManagerHostMsg_AcquireIOSurface
{
43 enum { ID
= MACH_MESSAGE_ID() };
44 mach_msg_header_t header
;
46 IOSurfaceManagerToken::Name token_name
;
50 // Messages sent from the browser to the child process.
52 struct IOSurfaceManagerMsg_RegisterIOSurfaceReply
{
53 mach_msg_header_t header
;
58 struct IOSurfaceManagerMsg_AcquireIOSurfaceReply
{
59 mach_msg_header_t header
;
61 mach_msg_port_descriptor_t io_surface_port
;
65 } // namespace content
67 #endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_