| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // IPC messages for device motion. | 5 #ifndef CONTENT_COMMON_DEVICE_LIGHT_DEVICE_LIGHT_MESSAGES_H_ |
| 6 #define CONTENT_COMMON_DEVICE_LIGHT_DEVICE_LIGHT_MESSAGES_H_ |
| 7 |
| 8 // IPC messages for device light. |
| 6 // Multiply-included message file, hence no include guard. | 9 // Multiply-included message file, hence no include guard. |
| 7 | 10 |
| 8 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
| 9 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
| 10 #include "ipc/ipc_param_traits.h" | 13 #include "ipc/ipc_param_traits.h" |
| 11 #include "ipc/ipc_platform_file.h" | 14 #include "ipc/ipc_platform_file.h" |
| 12 | 15 |
| 13 #define IPC_MESSAGE_START DeviceMotionMsgStart | 16 #define IPC_MESSAGE_START DeviceLightMsgStart |
| 14 | 17 |
| 15 // Asks the browser process to activate Device Motion sensors if necessary. | 18 // Asks the browser process to activate Device Light sensors if necessary. |
| 16 IPC_MESSAGE_CONTROL0(DeviceMotionHostMsg_StartPolling) | 19 IPC_MESSAGE_CONTROL0(DeviceLightHostMsg_StartPolling) |
| 17 | 20 |
| 18 // The browser process asynchronously returns the shared memory handle that will | 21 // The browser process asynchronously returns the shared memory handle that will |
| 19 // hold the data from the hardware sensors. | 22 // hold the data from the hardware sensors. |
| 20 // See device_motion_hardware_buffer.h for a description of how | 23 // See device_motion_hardware_buffer.h for a description of how |
| 21 // synchronization is handled. | 24 // synchronization is handled. |
| 22 IPC_MESSAGE_CONTROL1(DeviceMotionMsg_DidStartPolling, | 25 IPC_MESSAGE_CONTROL1(DeviceLightMsg_DidStartPolling, |
| 23 base::SharedMemoryHandle /* handle */) | 26 base::SharedMemoryHandle /* handle */) |
| 24 | 27 |
| 25 // Notifies the browser process that the renderer process is not using the | 28 // Notifies the browser process that the renderer process is not using the |
| 26 // Device Motion data anymore. The number of Starts should match the number | 29 // Device Light data anymore. The number of Starts should match the number |
| 27 // of Stops. | 30 // of Stops. |
| 28 IPC_MESSAGE_CONTROL0(DeviceMotionHostMsg_StopPolling) | 31 IPC_MESSAGE_CONTROL0(DeviceLightHostMsg_StopPolling) |
| 32 |
| 33 #endif // CONTENT_COMMON_DEVICE_LIGHT_DEVICE_LIGHT_MESSAGES_H_ |
| OLD | NEW |