Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: ppapi/shared_impl/ppb_gamepad_shared.h

Issue 2572323002: Delete WebGamepads::length. (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/gamepad/gamepad_provider_unittest.cc ('k') | ppapi/shared_impl/ppb_gamepad_shared.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // ID of the VRDisplay this gamepad is associated with, if any. 95 // ID of the VRDisplay this gamepad is associated with, if any.
96 unsigned display_id; 96 unsigned display_id;
97 }; 97 };
98 98
99 // This must match the definition of blink::Gamepads. The GamepadHost unit 99 // This must match the definition of blink::Gamepads. The GamepadHost unit
100 // test has some compile asserts to validate this. 100 // test has some compile asserts to validate this.
101 struct WebKitGamepads { 101 struct WebKitGamepads {
102 static const size_t kItemsLengthCap = 4; 102 static const size_t kItemsLengthCap = 4;
103 103
104 // Number of valid entries in the items array.
105 unsigned length;
106
107 // Gamepad data for N separate gamepad devices. 104 // Gamepad data for N separate gamepad devices.
108 WebKitGamepad items[kItemsLengthCap]; 105 WebKitGamepad items[kItemsLengthCap];
109 }; 106 };
110 107
111 // This is the structure store in shared memory. It must match 108 // This is the structure store in shared memory. It must match
112 // device::GamepadHardwareBuffer. The GamepadHost unit test has 109 // device::GamepadHardwareBuffer. The GamepadHost unit test has
113 // some compile asserts to validate this. 110 // some compile asserts to validate this.
114 struct ContentGamepadHardwareBuffer { 111 struct ContentGamepadHardwareBuffer {
115 base::subtle::Atomic32 sequence; 112 base::subtle::Atomic32 sequence;
116 WebKitGamepads buffer; 113 WebKitGamepads buffer;
117 }; 114 };
118 115
119 #pragma pack(pop) 116 #pragma pack(pop)
120 117
121 PPAPI_SHARED_EXPORT void ConvertWebKitGamepadData( 118 PPAPI_SHARED_EXPORT void ConvertWebKitGamepadData(
122 const WebKitGamepads& webkit_data, 119 const WebKitGamepads& webkit_data,
123 PP_GamepadsSampleData* output_data); 120 PP_GamepadsSampleData* output_data);
124 121
125 } // namespace ppapi 122 } // namespace ppapi
126 123
127 #endif // PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ 124 #endif // PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_provider_unittest.cc ('k') | ppapi/shared_impl/ppb_gamepad_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698