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

Unified Diff: content/common/device_motion_messages.h

Issue 10698046: Implements part of Device Motion in the Renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resets last_motion_ Created 8 years, 4 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/content_message_generator.h ('k') | content/content_browser.gypi » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..0d3303d4168ce79df95301c72c484e16e315cb19
--- /dev/null
+++ b/content/common/device_motion_messages.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2012 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.
+
+// IPC messages for device motion.
+// Multiply-included message file, hence no include guard.
+
+#include "ipc/ipc_message_macros.h"
+
+#define IPC_MESSAGE_START DeviceMotionMsgStart
+
+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)
+ IPC_STRUCT_MEMBER(double, acceleration_x)
+ IPC_STRUCT_MEMBER(bool, can_provide_acceleration_y)
+ IPC_STRUCT_MEMBER(double, acceleration_y)
+ IPC_STRUCT_MEMBER(bool, can_provide_acceleration_z)
+ IPC_STRUCT_MEMBER(double, acceleration_z)
+ IPC_STRUCT_MEMBER(bool, can_provide_acceleration_including_gravity_x)
+ IPC_STRUCT_MEMBER(double, acceleration_including_gravity_x)
+ IPC_STRUCT_MEMBER(bool, can_provide_acceleration_including_gravity_y)
+ IPC_STRUCT_MEMBER(double, acceleration_including_gravity_y)
+ IPC_STRUCT_MEMBER(bool, can_provide_acceleration_including_gravity_z)
+ IPC_STRUCT_MEMBER(double, acceleration_including_gravity_z)
+ IPC_STRUCT_MEMBER(bool, can_provide_rotation_rate_alpha)
+ IPC_STRUCT_MEMBER(double, rotation_rate_alpha)
+ IPC_STRUCT_MEMBER(bool, can_provide_rotation_rate_beta)
+ IPC_STRUCT_MEMBER(double, rotation_rate_beta)
+ IPC_STRUCT_MEMBER(bool, can_provide_rotation_rate_gamma)
+ IPC_STRUCT_MEMBER(double, rotation_rate_gamma)
+ IPC_STRUCT_MEMBER(bool, can_provide_interval)
+ IPC_STRUCT_MEMBER(double, interval)
+IPC_STRUCT_END()
+
+// Messages sent from the browser to the renderer.
+
+// Notification that the device's motion has changed.
+IPC_MESSAGE_ROUTED1(DeviceMotionMsg_Updated,
+ DeviceMotionMsg_Updated_Params)
+
+// Messages sent from the renderer to the browser.
+
+// A RenderView requests to start receiving device motion updates.
+IPC_MESSAGE_CONTROL1(DeviceMotionHostMsg_StartUpdating,
+ int /* render_view_id */)
+
+// A RenderView requests to stop receiving device motion updates.
+IPC_MESSAGE_CONTROL1(DeviceMotionHostMsg_StopUpdating,
+ int /* render_view_id */)
« no previous file with comments | « content/common/content_message_generator.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698