summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 18:42:42 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 18:42:42 +0000
commit7f5969dda833a858bc946ca59ba0a9afbee2bc89 (patch)
tree238d2ced0f101cfdc3784f010292a9b77e5404e9
parentf6e6d2e326ff72940cea341d53c958d50e03e645 (diff)
downloadchromium_src-7f5969dda833a858bc946ca59ba0a9afbee2bc89.zip
chromium_src-7f5969dda833a858bc946ca59ba0a9afbee2bc89.tar.gz
chromium_src-7f5969dda833a858bc946ca59ba0a9afbee2bc89.tar.bz2
Add gamepad IPC message definitions, not in-use yet.
Part of larger patch here http://codereview.chromium.org/8345027/ which is updated with remaining pieces. BUG=79050 TEST= Review URL: http://codereview.chromium.org/8417034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107765 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/common/content_message_generator.h1
-rw-r--r--content/common/gamepad_messages.h28
-rw-r--r--ipc/ipc_message_utils.h1
3 files changed, 30 insertions, 0 deletions
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index 37a6f7d..3f7a55a 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -16,6 +16,7 @@
#include "content/common/drag_messages.h"
#include "content/common/file_system_messages.h"
#include "content/common/file_utilities_messages.h"
+#include "content/common/gamepad_messages.h"
#include "content/common/geolocation_messages.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/indexed_db_messages.h"
diff --git a/content/common/gamepad_messages.h b/content/common/gamepad_messages.h
new file mode 100644
index 0000000..a93a140
--- /dev/null
+++ b/content/common/gamepad_messages.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2011 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.
+
+// Multiply-included message file, no include guard.
+
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_param_traits.h"
+#include "ipc/ipc_platform_file.h"
+#include "base/shared_memory.h"
+
+#define IPC_MESSAGE_START GamepadMsgStart
+
+// Messages sent from the renderer to the browser.
+
+// Asks the browser process to start polling, and return a shared memory
+// handles that will hold the (triple-buffered) data from the hardware.
+// The number of Starts should match the number of Stops (below).
+IPC_SYNC_MESSAGE_CONTROL0_1(GamepadHostMsg_StartPolling,
+ base::SharedMemoryHandle /* handle */)
+
+IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_StopPolling)
+
+
+// Messages sent from browser to renderer.
+
+IPC_MESSAGE_CONTROL1(GamepadMsg_Updated,
+ int /* read_buffer_index */)
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 5ab768c..5176847 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -97,6 +97,7 @@ enum IPCMessageStart {
ChromeBenchmarkingMsgStart,
IntentsMsgStart,
JavaBridgeMsgStart,
+ GamepadMsgStart,
LastIPCMsgStart // Must come last.
};