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

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

Issue 2150173002: Added Touched attribute to GamepadButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually remove unnecessary test. Not sure what happened last time. Created 4 years, 3 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
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"
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 ppapi { 15 namespace ppapi {
16 16
17 // TODO(brettw) when we remove the non-IPC-based gamepad implementation, this 17 // TODO(brettw) when we remove the non-IPC-based gamepad implementation, this
18 // code should all move into the GamepadResource. 18 // code should all move into the GamepadResource.
19 19
20 #pragma pack(push, 1) 20 #pragma pack(push, 1)
21 21
22 struct WebKitGamepadButton { 22 struct WebKitGamepadButton {
23 bool pressed; 23 bool pressed;
24 bool touched;
24 double value; 25 double value;
25 }; 26 };
26 27
27 // This must match the definition of blink::Gamepad. The GamepadHost unit test 28 // This must match the definition of blink::Gamepad. The GamepadHost unit test
28 // has some compile asserts to validate this. 29 // has some compile asserts to validate this.
29 struct WebKitGamepad { 30 struct WebKitGamepad {
30 static const size_t kIdLengthCap = 128; 31 static const size_t kIdLengthCap = 128;
31 static const size_t kMappingLengthCap = 16; 32 static const size_t kMappingLengthCap = 16;
32 static const size_t kAxesLengthCap = 16; 33 static const size_t kAxesLengthCap = 16;
33 static const size_t kButtonsLengthCap = 32; 34 static const size_t kButtonsLengthCap = 32;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 #pragma pack(pop) 82 #pragma pack(pop)
82 83
83 PPAPI_SHARED_EXPORT void ConvertWebKitGamepadData( 84 PPAPI_SHARED_EXPORT void ConvertWebKitGamepadData(
84 const WebKitGamepads& webkit_data, 85 const WebKitGamepads& webkit_data,
85 PP_GamepadsSampleData* output_data); 86 PP_GamepadsSampleData* output_data);
86 87
87 } // namespace ppapi 88 } // namespace ppapi
88 89
89 #endif // PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_ 90 #endif // PPAPI_SHARED_IMPL_PPB_GAMEPAD_SHARED_H_
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_standard_mappings.cc ('k') | third_party/WebKit/Source/modules/gamepad/Gamepad.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698