OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Common IPC messages used for child processes. | 5 // Common IPC messages used for child processes. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
12 #include "base/tracked_objects.h" | 12 #include "base/tracked_objects.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "cc/resources/shared_bitmap_manager.h" | 14 #include "cc/resources/shared_bitmap_manager.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/common/host_discardable_shared_memory_manager.h" | 16 #include "content/common/host_discardable_shared_memory_manager.h" |
17 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
18 #include "ui/gfx/gpu_memory_buffer.h" | 18 #include "ui/gfx/gpu_memory_buffer.h" |
19 #include "ui/gfx/ipc/gfx_param_traits.h" | 19 #include "ui/gfx/ipc/gfx_param_traits.h" |
20 | 20 |
21 #if defined(OS_MACOSX) | 21 #if defined(OS_MACOSX) |
22 #include "content/common/mac/io_surface_manager_token.h" | 22 #include "content/common/mac/io_surface_manager_token.h" |
23 #endif | 23 #endif |
24 | 24 |
| 25 #if defined(USE_OZONE) |
| 26 #include "base/file_descriptor_posix.h" |
| 27 #endif |
| 28 |
25 IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status, | 29 IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status, |
26 tracked_objects::ThreadData::STATUS_LAST) | 30 tracked_objects::ThreadData::STATUS_LAST) |
27 | 31 |
28 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) | 32 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) |
29 IPC_STRUCT_TRAITS_MEMBER(file_name) | 33 IPC_STRUCT_TRAITS_MEMBER(file_name) |
30 IPC_STRUCT_TRAITS_MEMBER(function_name) | 34 IPC_STRUCT_TRAITS_MEMBER(function_name) |
31 IPC_STRUCT_TRAITS_MEMBER(line_number) | 35 IPC_STRUCT_TRAITS_MEMBER(line_number) |
32 IPC_STRUCT_TRAITS_END() | 36 IPC_STRUCT_TRAITS_END() |
33 | 37 |
34 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot) | 38 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTcmallocStats) | 122 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTcmallocStats) |
119 #endif | 123 #endif |
120 | 124 |
121 #if defined(OS_MACOSX) | 125 #if defined(OS_MACOSX) |
122 // Sent to child processes to tell them what token to use when registering | 126 // Sent to child processes to tell them what token to use when registering |
123 // and/or acquiring IOSurfaces. | 127 // and/or acquiring IOSurfaces. |
124 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIOSurfaceManagerToken, | 128 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIOSurfaceManagerToken, |
125 content::IOSurfaceManagerToken /* token */) | 129 content::IOSurfaceManagerToken /* token */) |
126 #endif | 130 #endif |
127 | 131 |
| 132 #if defined(USE_OZONE) |
| 133 // Sent VGEM file descriptor to child processes to use when importing |
| 134 // ClientNativePixmap. |
| 135 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetVgemFD, |
| 136 base::FileDescriptor /* vgem_fd */) |
| 137 #endif |
128 //////////////////////////////////////////////////////////////////////////////// | 138 //////////////////////////////////////////////////////////////////////////////// |
129 // Messages sent from the child process to the browser. | 139 // Messages sent from the child process to the browser. |
130 | 140 |
131 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) | 141 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) |
132 | 142 |
133 // Send back profiler data (ThreadData in tracked_objects). | 143 // Send back profiler data (ThreadData in tracked_objects). |
134 IPC_MESSAGE_CONTROL2( | 144 IPC_MESSAGE_CONTROL2( |
135 ChildProcessHostMsg_ChildProfilerData, | 145 ChildProcessHostMsg_ChildProfilerData, |
136 int, /* sequence_number */ | 146 int, /* sequence_number */ |
137 tracked_objects::ProcessDataSnapshot /* process_data_snapshot */) | 147 tracked_objects::ProcessDataSnapshot /* process_data_snapshot */) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 IPC_SYNC_MESSAGE_CONTROL2_1( | 215 IPC_SYNC_MESSAGE_CONTROL2_1( |
206 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, | 216 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, |
207 uint32 /* size */, | 217 uint32 /* size */, |
208 content::DiscardableSharedMemoryId, | 218 content::DiscardableSharedMemoryId, |
209 base::SharedMemoryHandle) | 219 base::SharedMemoryHandle) |
210 | 220 |
211 // Informs the browser that the child deleted a block of discardable shared | 221 // Informs the browser that the child deleted a block of discardable shared |
212 // memory. | 222 // memory. |
213 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, | 223 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, |
214 content::DiscardableSharedMemoryId) | 224 content::DiscardableSharedMemoryId) |
OLD | NEW |