summaryrefslogtreecommitdiffstats
path: root/chrome/common/command_buffer_messages_internal.h
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-12 00:11:25 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-12 00:11:25 +0000
commita7a27ace0760f1ed19016822a45c6ec5300e861c (patch)
treeb7641f10c9fb3130c0ae8f50e7223db2ae722cda /chrome/common/command_buffer_messages_internal.h
parent82017272e7272182443d7054911c4f890346353e (diff)
downloadchromium_src-a7a27ace0760f1ed19016822a45c6ec5300e861c.zip
chromium_src-a7a27ace0760f1ed19016822a45c6ec5300e861c.tar.gz
chromium_src-a7a27ace0760f1ed19016822a45c6ec5300e861c.tar.bz2
Added CommandBufferProxy, CommandBufferStub. Replaced NPAPI with IPC for synchronous messages. WebPluginDelegateImpl can instantiate a command buffer. Removed remaining dependencies on NPAPI.
TEST=none BUG=none Review URL: http://codereview.chromium.org/465040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/command_buffer_messages_internal.h')
-rw-r--r--chrome/common/command_buffer_messages_internal.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/chrome/common/command_buffer_messages_internal.h b/chrome/common/command_buffer_messages_internal.h
new file mode 100644
index 0000000..ae28ecc
--- /dev/null
+++ b/chrome/common/command_buffer_messages_internal.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/shared_memory.h"
+#include "ipc/ipc_message_macros.h"
+
+IPC_BEGIN_MESSAGES(CommandBuffer)
+ // Initialize a command buffer with the given number of command entries.
+ // Returns the shared memory handle for the command buffer mapped to the
+ // calling process.
+ IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_Initialize,
+ int32 /* size */,
+ base::SharedMemoryHandle /* ring_buffer */)
+
+ // Get the number of command entries in the command buffer.
+ IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetSize,
+ int32 /* size */)
+
+ // Synchronize the put and get offsets of both processes. Caller passes its
+ // current put offset. Current get offset is returned.
+ IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_SyncOffsets,
+ int32 /* put_offset */,
+ int32 /* get_offset */)
+
+ // Get the current get offset.
+ IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetGetOffset,
+ int32 /* get_offset */)
+
+ // Get the current put offset.
+ IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetPutOffset,
+ int32 /* put_offset */)
+
+ // Create a shared memory transfer buffer. Returns an id that can be used to
+ // identify the transfer buffer from a comment.
+ IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_CreateTransferBuffer,
+ int32 /* size */,
+ int32 /* id */)
+
+ // Destroy a previously created transfer buffer.
+ IPC_SYNC_MESSAGE_ROUTED1_0(CommandBufferMsg_DestroyTransferBuffer,
+ int32 /* id */)
+
+ // Get the shared memory handle for a transfer buffer mapped to the callers
+ // process.
+ IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_GetTransferBuffer,
+ int32 /* id */,
+ base::SharedMemoryHandle /* transfer_buffer */)
+
+ // Get the most recently processed token. Used for implementing fences.
+ IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetToken,
+ int32 /* token */)
+
+ // Get the current parse error. Calling this resets the parse error if it is
+ // recoverable.
+ // TODO(apatrick): Switch to the parse_error::ParseError enum now that NPAPI
+ // no longer limits to restricted set of datatypes.
+ IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_ResetParseError,
+ int32 /* parse_error */)
+
+ // Get the current error status.
+ IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetErrorStatus,
+ bool /* status */)
+
+IPC_END_MESSAGES(CommandBuffer)