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 #ifndef CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_ | |
6 #define CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_ | |
7 | |
8 #include <mach/message.h> | |
9 | |
10 #include "content/common/mac/io_surface_manager_token.h" | |
11 | |
12 // Mach messages used for child processes. | |
13 | |
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__ | |
18 | |
19 namespace content { | |
20 | |
21 // Messages sent from the child process to the browser. | |
22 | |
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; | |
31 }; | |
32 | |
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; | |
40 }; | |
41 | |
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; | |
48 }; | |
49 | |
50 // Messages sent from the browser to the child process. | |
51 | |
52 struct IOSurfaceManagerMsg_RegisterIOSurfaceReply { | |
53 mach_msg_header_t header; | |
54 mach_msg_body_t body; | |
55 boolean_t result; | |
56 }; | |
57 | |
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; | |
63 }; | |
64 | |
65 } // namespace content | |
66 | |
67 #endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_MESSAGES_H_ | |
OLD | NEW |