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

Issue 9405033: Revise gamepad interface (Closed)

Created:
8 years, 10 months ago by scottmg
Modified:
8 years, 9 months ago
CC:
chromium-reviews, jam, yzshen+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org
Visibility:
Public.

Description

Revise gamepad interface Per API review, revision to gamepad interface. Still in _dev for now, will move to stable as separate change once we're happy with the interface. Change summary: - renames of various fields, and main function in idl per discussion - timestamp to double, connected to PP_Bool - remove #pragma pack in header, now copied member-by-member - update examples One complication was in removing the #pragma pack. Copying by member in webkit/plugins/ppapi/ppapi_plugin_instance.cc avoids the need to keep webkit and pepper in sync and exactly the same layout (a good thing). However, when the native_client ppapi proxy is going between 32 and 64 the data structure ends up being a different size due to padding (all the fields are teh same sizes though). To workaround this, I added padding fields, and assert_sizes to confirm the sizes are the same on both "sides". This is similar to how PP_Point, input events, etc. get rpc'd, but perhaps there's a better way. BUG=112879 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=124375

Patch Set 1 #

Patch Set 2 : remove local hacks due to webkit.org being down #

Patch Set 3 : check connected in example #

Patch Set 4 : add explicit include of gamepad header #

Patch Set 5 : #

Patch Set 6 : pad for 32<->64 proxy #

Patch Set 7 : update comment #

Total comments: 4

Patch Set 8 : bump version, move some code to event_conversion #

Patch Set 9 : rebase #

Total comments: 3

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -145 lines) Patch
M native_client_sdk/src/examples/gamepad/gamepad.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M ppapi/api/dev/ppb_gamepad_dev.idl View 1 2 3 4 5 6 7 1 chunk +33 lines, -33 lines 0 comments Download
M ppapi/c/dev/ppb_gamepad_dev.h View 1 2 3 4 5 6 7 5 chunks +32 lines, -30 lines 0 comments Download
M ppapi/examples/gamepad/gamepad.cc View 1 2 2 chunks +23 lines, -24 lines 0 comments Download
M ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_gamepad_rpc_server.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_gamepad.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ppapi/thunk/ppb_gamepad_thunk.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_instance_api.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/event_conversion.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/event_conversion.cc View 1 2 3 4 5 6 7 8 9 2 chunks +27 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -42 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
scottmg
8 years, 10 months ago (2012-02-22 21:40:50 UTC) #1
brettw
lgtm https://chromiumcodereview.appspot.com/9405033/diff/12001/ppapi/api/dev/ppb_gamepad_dev.idl File ppapi/api/dev/ppb_gamepad_dev.idl (right): https://chromiumcodereview.appspot.com/9405033/diff/12001/ppapi/api/dev/ppb_gamepad_dev.idl#newcode86 ppapi/api/dev/ppb_gamepad_dev.idl:86: [version=0.1, macro="PPB_GAMEPAD_DEV_INTERFACE"] Can you bump the version? (Also ...
8 years, 10 months ago (2012-02-27 17:44:20 UTC) #2
scottmg
Thanks Brett. https://chromiumcodereview.appspot.com/9405033/diff/12001/ppapi/api/dev/ppb_gamepad_dev.idl File ppapi/api/dev/ppb_gamepad_dev.idl (right): https://chromiumcodereview.appspot.com/9405033/diff/12001/ppapi/api/dev/ppb_gamepad_dev.idl#newcode86 ppapi/api/dev/ppb_gamepad_dev.idl:86: [version=0.1, macro="PPB_GAMEPAD_DEV_INTERFACE"] On 2012/02/27 17:44:20, brettw wrote: ...
8 years, 10 months ago (2012-02-27 21:29:48 UTC) #3
scottmg
+noelallen for OWNERS on native_client_sdk/src/examples/gamepad/gamepad.cc
8 years, 9 months ago (2012-02-28 18:09:18 UTC) #4
scottmg
+erikkay, looks like noel's out, could I get you to stamp for OWNERS, just for ...
8 years, 9 months ago (2012-02-29 23:02:49 UTC) #5
noelallen_use_chromium
https://chromiumcodereview.appspot.com/9405033/diff/20001/ppapi/api/dev/ppb_gamepad_dev.idl File ppapi/api/dev/ppb_gamepad_dev.idl (left): https://chromiumcodereview.appspot.com/9405033/diff/20001/ppapi/api/dev/ppb_gamepad_dev.idl#oldcode91 ppapi/api/dev/ppb_gamepad_dev.idl:91: void SampleGamepads( Keep this but add: [deprecate=0.2] void SampleGamepads()... ...
8 years, 9 months ago (2012-02-29 23:09:16 UTC) #6
scottmg
On 2012/02/29 23:09:16, noelallen wrote: > https://chromiumcodereview.appspot.com/9405033/diff/20001/ppapi/api/dev/ppb_gamepad_dev.idl > File ppapi/api/dev/ppb_gamepad_dev.idl (left): > > https://chromiumcodereview.appspot.com/9405033/diff/20001/ppapi/api/dev/ppb_gamepad_dev.idl#oldcode91 > ...
8 years, 9 months ago (2012-02-29 23:15:47 UTC) #7
noelallen1
Since this change is really pre-move cleanup, and since the M18 version is going away ...
8 years, 9 months ago (2012-02-29 23:24:21 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/9405033/25002
8 years, 9 months ago (2012-02-29 23:41:07 UTC) #9
commit-bot: I haz the power
8 years, 9 months ago (2012-03-01 06:44:53 UTC) #10
Change committed as 124375

Powered by Google App Engine
This is Rietveld 408576698