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