summaryrefslogtreecommitdiffstats
path: root/content/common/child_process_messages.h
diff options
context:
space:
mode:
authorfsamuel <fsamuel@chromium.org>2016-03-17 05:15:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-17 12:17:26 +0000
commit68efb4803bf77935194d31ca1d93e639282cd7b5 (patch)
tree5c60c58395389131750b55bd4f0c9a27c2d40f15 /content/common/child_process_messages.h
parent2ba81b5fd3b9584c8839b0478242ea0b9adb57b8 (diff)
downloadchromium_src-68efb4803bf77935194d31ca1d93e639282cd7b5.zip
chromium_src-68efb4803bf77935194d31ca1d93e639282cd7b5.tar.gz
chromium_src-68efb4803bf77935194d31ca1d93e639282cd7b5.tar.bz2
gpu_host_messages.h => content/gpu
gpu_host_messages consists of host <=> gpu IPC messages and is browser specific. Thus, for the time being, it makes sense to keep this file in content. The rest of content/common/gpu is moving to gpu/ipc. Thus, we are moving gpu_host_messages to content/gpu. GpuHostMsg_EstablishGpuChannel, and GpuHostMsg_HasGpuProcess didn't fit in with the rest of gpu_host_messages because they are renderer => browser messages. Thus this CL also moves those oddball IPCs to child_process_messsages.h. Some traits are used by both child_process_messages and gpu_host_messages. I've moved those traits to content/common/gpu/gpu_param_traits_macros.h. BUG=586365 Review URL: https://codereview.chromium.org/1799713002 Cr-Commit-Position: refs/heads/master@{#381693}
Diffstat (limited to 'content/common/child_process_messages.h')
-rw-r--r--content/common/child_process_messages.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h
index b4ee49f..e46e4af 100644
--- a/content/common/child_process_messages.h
+++ b/content/common/child_process_messages.h
@@ -16,13 +16,20 @@
#include "build/build_config.h"
#include "cc/resources/shared_bitmap_manager.h"
#include "content/common/content_export.h"
+#include "content/common/content_param_traits_macros.h"
+#include "content/common/gpu/gpu_param_traits_macros.h"
+#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/host_discardable_shared_memory_manager.h"
#include "gpu/command_buffer/common/sync_token.h"
+#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
+IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch,
+ content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1)
+
IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status,
tracked_objects::ThreadData::STATUS_LAST)
@@ -62,26 +69,6 @@ IPC_STRUCT_TRAITS_BEGIN(tracked_objects::ProcessDataSnapshot)
IPC_STRUCT_TRAITS_MEMBER(process_id)
IPC_STRUCT_TRAITS_END()
-IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuMemoryBufferType,
- gfx::GPU_MEMORY_BUFFER_TYPE_LAST)
-
-IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle)
- IPC_STRUCT_TRAITS_MEMBER(id)
- IPC_STRUCT_TRAITS_MEMBER(type)
- IPC_STRUCT_TRAITS_MEMBER(handle)
- IPC_STRUCT_TRAITS_MEMBER(offset)
- IPC_STRUCT_TRAITS_MEMBER(stride)
-#if defined(USE_OZONE)
- IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle)
-#elif defined(OS_MACOSX)
- IPC_STRUCT_TRAITS_MEMBER(mach_port)
-#endif
-IPC_STRUCT_TRAITS_END()
-
-IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId)
- IPC_STRUCT_TRAITS_MEMBER(id)
-IPC_STRUCT_TRAITS_END()
-
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -135,6 +122,19 @@ IPC_MESSAGE_CONTROL1(ChildProcessMsg_InitializeClientNativePixmapFactory,
////////////////////////////////////////////////////////////////////////////////
// Messages sent from the child process to the browser.
+// A renderer sends this when it wants to create a connection to the GPU
+// process. The browser will create the GPU process if necessary, and will
+// return a handle to the channel via a GpuChannelEstablished message.
+IPC_SYNC_MESSAGE_CONTROL1_3(ChildProcessHostMsg_EstablishGpuChannel,
+ content::CauseForGpuLaunch,
+ int /* client id */,
+ IPC::ChannelHandle /* handle to channel */,
+ gpu::GPUInfo /* stats about GPU process*/)
+
+// A renderer sends this when it wants to know whether a gpu process exists.
+IPC_SYNC_MESSAGE_CONTROL0_1(ChildProcessHostMsg_HasGpuProcess,
+ bool /* result */)
+
IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest)
// Send back profiler data (ThreadData in tracked_objects).