Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: content/common/device_motion_messages.h

Issue 14678012: Implement the content/renderer and content/browser part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compilation: peer_handle -> PeerHandle() Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/device_motion_hardware_buffer.h ('k') | content/common/gamepad_hardware_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/device_motion_messages.h
diff --git a/content/common/device_motion_messages.h b/content/common/device_motion_messages.h
index 0d3303d4168ce79df95301c72c484e16e315cb19..b4430da8ecad3a831631f854e5d090a51eececcf 100644
--- a/content/common/device_motion_messages.h
+++ b/content/common/device_motion_messages.h
@@ -6,9 +6,27 @@
// Multiply-included message file, hence 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 DeviceMotionMsgStart
+// 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 data from the hardware. See
+// device_motion_hardware_buffer.h for a description of how synchronization is
+// handled. The number of Starts should match the number of Stops.
+IPC_MESSAGE_CONTROL0(DeviceMotionHostMsg_StartPolling)
+IPC_MESSAGE_CONTROL1(DeviceMotionMsg_DidStartPolling,
+ base::SharedMemoryHandle /* handle */)
+
+IPC_MESSAGE_CONTROL0(DeviceMotionHostMsg_StopPolling)
+
+// TODO(timvolodine): remove the methods below once the Device Motion
+// is implemented.
+
IPC_STRUCT_BEGIN(DeviceMotionMsg_Updated_Params)
// These fields have the same meaning as in device_motion::Motion.
IPC_STRUCT_MEMBER(bool, can_provide_acceleration_x)
« no previous file with comments | « content/common/device_motion_hardware_buffer.h ('k') | content/common/gamepad_hardware_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698