OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // IPC messages for device orientation. |
| 6 // Multiply-included message file, hence no include guard. |
| 7 |
| 8 #include "base/memory/shared_memory.h" |
| 9 #include "ipc/ipc_message_macros.h" |
| 10 |
| 11 #define IPC_MESSAGE_START DeviceOrientationMsgStart |
| 12 |
| 13 // Messages sent from the renderer to the browser. |
| 14 |
| 15 // Asks the browser process to start polling, and return a shared memory |
| 16 // handle that will hold the data from the hardware. See |
| 17 // device_orientation_hardware_buffer.h for a description of how synchronization |
| 18 // is handled. The number of Starts should match the number of Stops. |
| 19 IPC_MESSAGE_CONTROL0(DeviceOrientationHostMsg_StartPolling) |
| 20 IPC_MESSAGE_CONTROL1(DeviceOrientationMsg_DidStartPolling, |
| 21 base::SharedMemoryHandle /* handle */) |
| 22 |
| 23 IPC_MESSAGE_CONTROL0(DeviceOrientationHostMsg_StopPolling) |
| 24 |
| 25 // TODO(timvolodine): remove the methods below once the shared memory |
| 26 // Device Orientation is implemented. |
| 27 |
| 28 IPC_STRUCT_BEGIN(DeviceOrientationMsg_Updated_Params) |
| 29 // These fields have the same meaning as in content::Orientation. |
| 30 IPC_STRUCT_MEMBER(bool, can_provide_alpha) |
| 31 IPC_STRUCT_MEMBER(double, alpha) |
| 32 IPC_STRUCT_MEMBER(bool, can_provide_beta) |
| 33 IPC_STRUCT_MEMBER(double, beta) |
| 34 IPC_STRUCT_MEMBER(bool, can_provide_gamma) |
| 35 IPC_STRUCT_MEMBER(double, gamma) |
| 36 IPC_STRUCT_MEMBER(bool, can_provide_absolute) |
| 37 IPC_STRUCT_MEMBER(bool, absolute) |
| 38 IPC_STRUCT_END() |
| 39 |
| 40 // Messages sent from the browser to the renderer. |
| 41 |
| 42 // Notification that the device's orientation has changed. |
| 43 IPC_MESSAGE_ROUTED1(DeviceOrientationMsg_Updated, |
| 44 DeviceOrientationMsg_Updated_Params) |
| 45 |
| 46 // Messages sent from the renderer to the browser. |
| 47 |
| 48 // A RenderView requests to start receiving device orientation updates. |
| 49 IPC_MESSAGE_CONTROL1(DeviceOrientationHostMsg_StartUpdating, |
| 50 int /* render_view_id */) |
| 51 |
| 52 // A RenderView requests to stop receiving device orientation updates. |
| 53 IPC_MESSAGE_CONTROL1(DeviceOrientationHostMsg_StopUpdating, |
| 54 int /* render_view_id */) |
OLD | NEW |