| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Multiply-included message file, no include guard. | 5 // Multiply-included message file, no include guard. |
| 6 | 6 |
| 7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
| 8 #include "content/common/gamepad_connection_event_message_params.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" |
| 12 #include "third_party/WebKit/public/platform/WebGamepad.h" |
| 11 | 13 |
| 12 #define IPC_MESSAGE_START GamepadMsgStart | 14 #define IPC_MESSAGE_START GamepadMsgStart |
| 13 | 15 |
| 16 IPC_STRUCT_TRAITS_BEGIN(blink::WebGamepadButton) |
| 17 IPC_STRUCT_TRAITS_MEMBER(pressed) |
| 18 IPC_STRUCT_TRAITS_MEMBER(value) |
| 19 IPC_STRUCT_TRAITS_END() |
| 20 |
| 21 IPC_STRUCT_TRAITS_BEGIN(content::GamepadConnectionEventMessageParams) |
| 22 IPC_STRUCT_TRAITS_MEMBER(id_characters) |
| 23 IPC_STRUCT_TRAITS_MEMBER(mapping_characters) |
| 24 IPC_STRUCT_TRAITS_MEMBER(index) |
| 25 IPC_STRUCT_TRAITS_MEMBER(timestamp) |
| 26 IPC_STRUCT_TRAITS_MEMBER(axes_length) |
| 27 IPC_STRUCT_TRAITS_MEMBER(buttons_length) |
| 28 IPC_STRUCT_TRAITS_MEMBER(connected) |
| 29 IPC_STRUCT_TRAITS_END() |
| 30 |
| 31 IPC_MESSAGE_CONTROL1(GamepadMsg_GamepadConnected, |
| 32 content::GamepadConnectionEventMessageParams) |
| 33 |
| 34 IPC_MESSAGE_CONTROL1(GamepadMsg_GamepadDisconnected, |
| 35 content::GamepadConnectionEventMessageParams) |
| 36 |
| 14 // Messages sent from the renderer to the browser. | 37 // Messages sent from the renderer to the browser. |
| 15 | 38 |
| 16 // Asks the browser process to start polling, and return a shared memory | 39 // Asks the browser process to start polling, and return a shared memory |
| 17 // handles that will hold the data from the hardware. See | 40 // handles that will hold the data from the hardware. See |
| 18 // gamepad_hardware_buffer.h for a description of how synchronization is | 41 // gamepad_hardware_buffer.h for a description of how synchronization is |
| 19 // handled. The number of Starts should match the number of Stops. | 42 // handled. The number of Starts should match the number of Stops. |
| 20 IPC_SYNC_MESSAGE_CONTROL0_1(GamepadHostMsg_StartPolling, | 43 IPC_SYNC_MESSAGE_CONTROL0_1(GamepadHostMsg_StartPolling, |
| 21 base::SharedMemoryHandle /* handle */) | 44 base::SharedMemoryHandle /* handle */) |
| 22 | 45 |
| 23 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_StopPolling) | 46 IPC_SYNC_MESSAGE_CONTROL0_0(GamepadHostMsg_StopPolling) |
| OLD | NEW |