| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ |
| 6 #define PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "ppapi/c/ppb_gamepad.h" | 12 #include "ppapi/c/ppb_gamepad.h" |
| 13 #include "ppapi/shared_impl/ppapi_shared_export.h" | 13 #include "ppapi/shared_impl/ppapi_shared_export.h" |
| 14 | 14 |
| 15 namespace device { |
| 16 class Gamepads; |
| 17 } |
| 18 |
| 15 namespace ppapi { | 19 namespace ppapi { |
| 16 | 20 |
| 17 // TODO(brettw) when we remove the non-IPC-based gamepad implementation, this | 21 // TODO(brettw) when we remove the non-IPC-based gamepad implementation, this |
| 18 // code should all move into the GamepadResource. | 22 // code should all move into the GamepadResource. |
| 19 | 23 |
| 20 #pragma pack(push, 4) | 24 #pragma pack(push, 4) |
| 21 | 25 |
| 22 struct WebKitGamepadButton { | 26 struct WebKitGamepadButton { |
| 23 bool pressed; | 27 bool pressed; |
| 24 bool touched; | 28 bool touched; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 base::subtle::Atomic32 sequence; | 116 base::subtle::Atomic32 sequence; |
| 113 WebKitGamepads buffer; | 117 WebKitGamepads buffer; |
| 114 }; | 118 }; |
| 115 | 119 |
| 116 #pragma pack(pop) | 120 #pragma pack(pop) |
| 117 | 121 |
| 118 PPAPI_SHARED_EXPORT void ConvertWebKitGamepadData( | 122 PPAPI_SHARED_EXPORT void ConvertWebKitGamepadData( |
| 119 const WebKitGamepads& webkit_data, | 123 const WebKitGamepads& webkit_data, |
| 120 PP_GamepadsSampleData* output_data); | 124 PP_GamepadsSampleData* output_data); |
| 121 | 125 |
| 126 PPAPI_SHARED_EXPORT void ConvertDeviceGamepadData( |
| 127 const device::Gamepads& device_data, |
| 128 PP_GamepadsSampleData* output_data); |
| 129 |
| 122 } // namespace ppapi | 130 } // namespace ppapi |
| 123 | 131 |
| 124 #endif // PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ | 132 #endif // PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ |
| OLD | NEW |