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

Unified Diff: content/common/device_orientation_messages.h

Issue 20707002: Implement Device Orientation using shared memory in content/renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/common/device_orientation_messages.h
diff --git a/content/common/device_orientation_messages.h b/content/common/device_orientation_messages.h
index c726c97d7262e097decd4dd7306b98690236d89e..dc8b83b679dd026e5027ab94267d20e112a314c8 100644
--- a/content/common/device_orientation_messages.h
+++ b/content/common/device_orientation_messages.h
@@ -5,10 +5,26 @@
// IPC messages for device orientation.
// Multiply-included message file, hence no include guard.
+#include "base/memory/shared_memory.h"
#include "ipc/ipc_message_macros.h"
#define IPC_MESSAGE_START DeviceOrientationMsgStart
+// 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(DeviceOrientationHostMsg_StartPolling)
+IPC_MESSAGE_CONTROL1(DeviceOrientationMsg_DidStartPolling,
+ base::SharedMemoryHandle /* handle */)
+
+IPC_MESSAGE_CONTROL0(DeviceOrientationHostMsg_StopPolling)
+
+// TODO(timvolodine): remove the methods below once the Device Motion
+// is implemented.
+
IPC_STRUCT_BEGIN(DeviceOrientationMsg_Updated_Params)
// These fields have the same meaning as in content::Orientation.
IPC_STRUCT_MEMBER(bool, can_provide_alpha)

Powered by Google App Engine
This is Rietveld 408576698