OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
4 | 5 |
5 // Multiply-included message file, no include guard. | 6 // Multiply-included message file, no include guard. |
6 | 7 |
7 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
8 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
9 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" |
10 #include "ipc/ipc_platform_file.h" | 11 #include "ipc/ipc_platform_file.h" |
11 | 12 |
12 #define IPC_MESSAGE_START GamepadMsgStart | 13 #define IPC_MESSAGE_START GamepadMsgStart |
13 | 14 |
14 // Messages sent from the renderer to the browser. | 15 // Messages sent from the renderer to the browser. |
15 | 16 |
16 // Asks the browser process to start polling, and return a shared memory | 17 // Asks the browser process to start polling, and return a shared memory |
17 // handles that will hold the data from the hardware. See | 18 // handles that will hold the data from the hardware. See |
18 // gamepad_hardware_buffer.h for a description of how synchronization is | 19 // gamepad_hardware_buffer.h for a description of how synchronization is |
19 // handled. The number of Starts should match the number of Stops. | 20 // handled. The number of Starts should match the number of Stops. |
20 IPC_SYNC_MESSAGE_CONTROL0_1(GamepadHostMsg_StartPolling, | 21 IPC_SYNC_MESSAGE_CONTROL0_1(GamepadHostMsg_StartPolling, |
21 base::SharedMemoryHandle /* handle */) | 22 base::SharedMemoryHandle /* handle */) |
22 | 23 |
23 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_StopPolling) | 24 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_StopPolling) |
25 | |
26 #if defined(OS_ANDROID) | |
27 // Asks the browser process to pause/resume polling .The number of resume | |
Tom Sepez
2014/01/10 22:57:39
Nit: space before period.
Nit: the number of resum
SaurabhK
2014/01/13 12:39:27
On 2014/01/10 22:57:39, Tom Sepez wrote:
> Nit: sp
| |
28 // should match the number of pause. | |
29 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_ResumePolling) | |
30 | |
31 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_PausePolling) | |
32 | |
33 // Sets the last gamepad data access timestamp. It helps identify gamepad | |
Tom Sepez
2014/01/10 22:57:39
nit: sets it to the current time? I'm not sure I u
SaurabhK
2014/01/13 12:39:27
Yes, it sets the current time.
It helps to identif
| |
34 // data access and release using which polling thread can be put to pause or | |
35 // resume state. | |
36 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_UpdateTimestamp) | |
37 #endif | |
OLD | NEW |