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 "gpu/command_buffer/common/sync_token.h" | 17 #include "gpu/command_buffer/common/sync_token.h" |
18 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
19 #include "ipc/ipc_platform_file.h" | 19 #include "ipc/ipc_platform_file.h" |
20 #include "ui/gfx/gpu_memory_buffer.h" | 20 #include "ui/gfx/gpu_memory_buffer.h" |
21 #include "ui/gfx/ipc/gfx_param_traits.h" | 21 #include "ui/gfx/ipc/gfx_param_traits.h" |
22 | 22 |
23 #if defined(OS_MACOSX) | |
24 #include "content/common/mac/io_surface_manager_token.h" | |
25 #endif | |
26 | |
27 IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status, | 23 IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status, |
28 tracked_objects::ThreadData::STATUS_LAST) | 24 tracked_objects::ThreadData::STATUS_LAST) |
29 | 25 |
30 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) | 26 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) |
31 IPC_STRUCT_TRAITS_MEMBER(file_name) | 27 IPC_STRUCT_TRAITS_MEMBER(file_name) |
32 IPC_STRUCT_TRAITS_MEMBER(function_name) | 28 IPC_STRUCT_TRAITS_MEMBER(function_name) |
33 IPC_STRUCT_TRAITS_MEMBER(line_number) | 29 IPC_STRUCT_TRAITS_MEMBER(line_number) |
34 IPC_STRUCT_TRAITS_END() | 30 IPC_STRUCT_TRAITS_END() |
35 | 31 |
36 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot) | 32 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot) |
(...skipping 30 matching lines...) Expand all Loading... |
67 gfx::GPU_MEMORY_BUFFER_TYPE_LAST) | 63 gfx::GPU_MEMORY_BUFFER_TYPE_LAST) |
68 | 64 |
69 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle) | 65 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle) |
70 IPC_STRUCT_TRAITS_MEMBER(id) | 66 IPC_STRUCT_TRAITS_MEMBER(id) |
71 IPC_STRUCT_TRAITS_MEMBER(type) | 67 IPC_STRUCT_TRAITS_MEMBER(type) |
72 IPC_STRUCT_TRAITS_MEMBER(handle) | 68 IPC_STRUCT_TRAITS_MEMBER(handle) |
73 IPC_STRUCT_TRAITS_MEMBER(offset) | 69 IPC_STRUCT_TRAITS_MEMBER(offset) |
74 IPC_STRUCT_TRAITS_MEMBER(stride) | 70 IPC_STRUCT_TRAITS_MEMBER(stride) |
75 #if defined(USE_OZONE) | 71 #if defined(USE_OZONE) |
76 IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle) | 72 IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle) |
| 73 #elif defined(OS_MACOSX) |
| 74 IPC_STRUCT_TRAITS_MEMBER(mach_port) |
77 #endif | 75 #endif |
78 IPC_STRUCT_TRAITS_END() | 76 IPC_STRUCT_TRAITS_END() |
79 | 77 |
80 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId) | 78 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId) |
81 IPC_STRUCT_TRAITS_MEMBER(id) | 79 IPC_STRUCT_TRAITS_MEMBER(id) |
82 IPC_STRUCT_TRAITS_END() | 80 IPC_STRUCT_TRAITS_END() |
83 | 81 |
84 #undef IPC_MESSAGE_EXPORT | 82 #undef IPC_MESSAGE_EXPORT |
85 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 83 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
86 | 84 |
(...skipping 27 matching lines...) Expand all Loading... |
114 int /* profiling_phase */) | 112 int /* profiling_phase */) |
115 | 113 |
116 // Send to all the child processes to send back histogram data. | 114 // Send to all the child processes to send back histogram data. |
117 IPC_MESSAGE_CONTROL1(ChildProcessMsg_GetChildHistogramData, | 115 IPC_MESSAGE_CONTROL1(ChildProcessMsg_GetChildHistogramData, |
118 int /* sequence_number */) | 116 int /* sequence_number */) |
119 | 117 |
120 // Sent to child processes to tell them to enter or leave background mode. | 118 // Sent to child processes to tell them to enter or leave background mode. |
121 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProcessBackgrounded, | 119 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProcessBackgrounded, |
122 bool /* background */) | 120 bool /* background */) |
123 | 121 |
124 #if defined(OS_MACOSX) | |
125 // Sent to child processes to tell them what token to use when registering | |
126 // and/or acquiring IOSurfaces. | |
127 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIOSurfaceManagerToken, | |
128 content::IOSurfaceManagerToken /* token */) | |
129 #endif | |
130 | |
131 // Sends a pipe used by the child process to broker passing of Mojo handles. | 122 // Sends a pipe used by the child process to broker passing of Mojo handles. |
132 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetMojoParentPipeHandle, | 123 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetMojoParentPipeHandle, |
133 IPC::PlatformFileForTransit /* handle */) | 124 IPC::PlatformFileForTransit /* handle */) |
134 | 125 |
135 #if defined(USE_OZONE) | 126 #if defined(USE_OZONE) |
136 // Sent to child processes to initialize ClientNativePixmapFactory using | 127 // Sent to child processes to initialize ClientNativePixmapFactory using |
137 // a device file descriptor. | 128 // a device file descriptor. |
138 IPC_MESSAGE_CONTROL1(ChildProcessMsg_InitializeClientNativePixmapFactory, | 129 IPC_MESSAGE_CONTROL1(ChildProcessMsg_InitializeClientNativePixmapFactory, |
139 base::FileDescriptor /* device_fd */) | 130 base::FileDescriptor /* device_fd */) |
140 #endif | 131 #endif |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 IPC_SYNC_MESSAGE_CONTROL2_1( | 204 IPC_SYNC_MESSAGE_CONTROL2_1( |
214 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, | 205 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, |
215 uint32 /* size */, | 206 uint32 /* size */, |
216 content::DiscardableSharedMemoryId, | 207 content::DiscardableSharedMemoryId, |
217 base::SharedMemoryHandle) | 208 base::SharedMemoryHandle) |
218 | 209 |
219 // Informs the browser that the child deleted a block of discardable shared | 210 // Informs the browser that the child deleted a block of discardable shared |
220 // memory. | 211 // memory. |
221 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, | 212 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, |
222 content::DiscardableSharedMemoryId) | 213 content::DiscardableSharedMemoryId) |
OLD | NEW |