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

Issue 183313003: Added non-prefixed navigator.getGamepads() with updated API (Closed)

Created:
6 years, 9 months ago by bajones
Modified:
6 years, 9 months ago
CC:
blink-reviews, kojih, arv+blink, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, scottmg
Visibility:
Public.

Description

Added non-prefixed navigator.getGamepads() with updated API This CL splits the Gamepad API into prefixed and non-prefixed versions. The prefixed version continues to operate in the same way as before, though the types are now named WebKitGamepad and WebKitGamepadList. The non-prefixed version uses the new GamepadButton type for its button values. The GamepadEvent type has also been added but the events aren't yet wired up. When added they will only apply to the the non-prefixed API. BUG=344556 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169148

Patch Set 1 #

Total comments: 1

Patch Set 2 : Marked prefixed API as deprecated, removed GamepadEvent #

Patch Set 3 : Added LayoutTests #

Total comments: 17

Patch Set 4 : Addressing review feedback #

Total comments: 4

Patch Set 5 : Added Oilpan transition types #

Total comments: 2

Patch Set 6 : Oilpan tweaks #

Total comments: 4

Patch Set 7 : Addressed Nils' style feedback #

Total comments: 7

Patch Set 8 : Removed virtual gamepad destructors #

Total comments: 1

Patch Set 9 : Addressing eseidels' feedback #

Patch Set 10 : Updated UseCounter #

Total comments: 4

Patch Set 11 : Fixed LayoutTests, style nits #

Patch Set 12 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -59 lines) Patch
M LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M LayoutTests/gamepad/gamepad-api.html View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/gamepad/gamepad-api-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/gamepad/gamepad-polling-access.html View 1 2 2 chunks +24 lines, -0 lines 0 comments Download
M LayoutTests/gamepad/gamepad-polling-access-expected.txt View 1 2 3 4 5 6 7 8 9 10 3 chunks +23 lines, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/UseCounter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M Source/modules/gamepad/Gamepad.h View 1 2 3 4 5 6 7 4 chunks +11 lines, -14 lines 0 comments Download
M Source/modules/gamepad/Gamepad.cpp View 1 2 3 4 5 1 chunk +14 lines, -16 lines 0 comments Download
M Source/modules/gamepad/Gamepad.idl View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
A Source/modules/gamepad/GamepadButton.h View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
A Source/modules/gamepad/GamepadButton.cpp View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
A + Source/modules/gamepad/GamepadButton.idl View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -4 lines 0 comments Download
M Source/modules/gamepad/GamepadList.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/gamepad/GamepadList.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M Source/modules/gamepad/GamepadList.idl View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/gamepad/NavigatorGamepad.h View 1 2 chunks +6 lines, -1 line 0 comments Download
M Source/modules/gamepad/NavigatorGamepad.cpp View 1 2 3 4 5 6 7 8 3 chunks +33 lines, -14 lines 0 comments Download
M Source/modules/gamepad/NavigatorGamepad.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
A Source/modules/gamepad/WebKitGamepad.h View 1 2 3 4 5 6 7 1 chunk +63 lines, -0 lines 0 comments Download
A Source/modules/gamepad/WebKitGamepad.cpp View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
A Source/modules/gamepad/WebKitGamepad.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -0 lines 0 comments Download
A Source/modules/gamepad/WebKitGamepadList.h View 1 2 3 4 5 6 7 8 1 chunk +40 lines, -0 lines 0 comments Download
A Source/modules/gamepad/WebKitGamepadList.cpp View 1 2 3 4 5 6 7 8 1 chunk +38 lines, -0 lines 0 comments Download
A Source/modules/gamepad/WebKitGamepadList.idl View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (0 generated)
bajones
https://codereview.chromium.org/183313003/diff/1/Source/modules/gamepad/NavigatorGamepad.h File Source/modules/gamepad/NavigatorGamepad.h (right): https://codereview.chromium.org/183313003/diff/1/Source/modules/gamepad/NavigatorGamepad.h#newcode39 Source/modules/gamepad/NavigatorGamepad.h:39: class NavigatorGamepad FINAL : public Supplement<Navigator>, public DOMWindowProperty { ...
6 years, 9 months ago (2014-02-27 18:41:15 UTC) #1
bajones
scottmg@: Please review modules/gamepad/ abarth@ or eseidel@: Please review modules.gypi and core/ Removed GamepadEvent and ...
6 years, 9 months ago (2014-03-06 00:29:48 UTC) #2
abarth-chromium
Source/core and modules.gypi LGTM
6 years, 9 months ago (2014-03-06 01:21:13 UTC) #3
eseidel
https://codereview.chromium.org/183313003/diff/40001/Source/core/frame/UseCounter.cpp File Source/core/frame/UseCounter.cpp (right): https://codereview.chromium.org/183313003/diff/40001/Source/core/frame/UseCounter.cpp#newcode689 Source/core/frame/UseCounter.cpp:689: return "'navigator.webkitGetGamepads' is deprecated. Please use the unprefixed 'navigator.getGamepads' ...
6 years, 9 months ago (2014-03-06 01:56:15 UTC) #4
Nils Barth (inactive)
To concur with Eric: We can share the implementation w/o adding a base IDL interface, ...
6 years, 9 months ago (2014-03-06 02:14:33 UTC) #5
Inactive
On 2014/03/06 02:14:33, Nils Barth wrote: > To concur with Eric: > We can share ...
6 years, 9 months ago (2014-03-06 02:25:12 UTC) #6
Nils Barth (inactive)
On 2014/03/06 02:25:12, Chris Dumez wrote: > Just FYI, you could also use IDL implements ...
6 years, 9 months ago (2014-03-06 02:53:57 UTC) #7
Inactive
https://codereview.chromium.org/183313003/diff/40001/Source/modules/gamepad/Gamepad.h File Source/modules/gamepad/Gamepad.h (right): https://codereview.chromium.org/183313003/diff/40001/Source/modules/gamepad/Gamepad.h#newcode43 Source/modules/gamepad/Gamepad.h:43: virtual void buttons(unsigned count, const blink::WebGamepadButton* data); OVERRIDE https://codereview.chromium.org/183313003/diff/40001/Source/modules/gamepad/GamepadBase.h ...
6 years, 9 months ago (2014-03-06 02:54:00 UTC) #8
scottmg
(moved myself to cc as there's other more qualified reviewers looking already)
6 years, 9 months ago (2014-03-06 18:16:44 UTC) #9
bajones
Thank you for the great feedback! New patch is up that addresses everything but the ...
6 years, 9 months ago (2014-03-06 18:52:24 UTC) #10
Inactive
On 2014/03/06 02:53:57, Nils Barth wrote: > On 2014/03/06 02:25:12, Chris Dumez wrote: > > ...
6 years, 9 months ago (2014-03-06 19:21:27 UTC) #11
sof
https://codereview.chromium.org/183313003/diff/60001/Source/modules/gamepad/Gamepad.h File Source/modules/gamepad/Gamepad.h (right): https://codereview.chromium.org/183313003/diff/60001/Source/modules/gamepad/Gamepad.h#newcode80 Source/modules/gamepad/Gamepad.h:80: GamepadButtonVector m_buttons; If you change this typedef to have ...
6 years, 9 months ago (2014-03-06 22:33:09 UTC) #12
bajones
On 2014/03/06 22:33:09, sof wrote: > Adding Oilpan transition types to this class also wouldn't ...
6 years, 9 months ago (2014-03-07 19:34:35 UTC) #13
sof
Looks close to ready Oilpan-wise, just two details. (If you want to build with Oilpan ...
6 years, 9 months ago (2014-03-07 19:54:57 UTC) #14
bajones
On 2014/03/07 19:54:57, sof wrote: > Looks close to ready Oilpan-wise, just two details. Thanks! ...
6 years, 9 months ago (2014-03-07 21:16:17 UTC) #15
sof
On 2014/03/07 21:16:17, bajones wrote: > On 2014/03/07 19:54:57, sof wrote: > > Looks close ...
6 years, 9 months ago (2014-03-07 21:37:56 UTC) #16
bajones
On 2014/03/07 21:37:56, sof wrote: > On 2014/03/07 21:16:17, bajones wrote: > > On 2014/03/07 ...
6 years, 9 months ago (2014-03-10 19:50:49 UTC) #17
bajones
eseidel@, nbarth@: I would appreciate any further feedback you have on this CL now that ...
6 years, 9 months ago (2014-03-11 23:00:53 UTC) #18
Nils Barth (inactive)
A few style points; currently seeing if we can reuse implementation (needs CG change). https://codereview.chromium.org/183313003/diff/110001/Source/core/frame/UseCounter.h ...
6 years, 9 months ago (2014-03-12 05:13:51 UTC) #19
Nils Barth (inactive)
On 2014/03/11 23:00:53, bajones wrote: > eseidel@, nbarth@: I would appreciate any further feedback you ...
6 years, 9 months ago (2014-03-12 06:58:54 UTC) #20
bajones
Addressed Nils' style feedback. There's unfortunately some issues with the CG changes that prevent me ...
6 years, 9 months ago (2014-03-12 22:15:01 UTC) #21
eseidel
https://codereview.chromium.org/183313003/diff/130001/Source/modules/gamepad/GamepadButton.h File Source/modules/gamepad/GamepadButton.h (right): https://codereview.chromium.org/183313003/diff/130001/Source/modules/gamepad/GamepadButton.h#newcode26 Source/modules/gamepad/GamepadButton.h:26: void trace(Visitor*); Do we need an empty trace method? ...
6 years, 9 months ago (2014-03-12 22:25:25 UTC) #22
eseidel
https://codereview.chromium.org/183313003/diff/150001/Source/modules/gamepad/GamepadList.h File Source/modules/gamepad/GamepadList.h (right): https://codereview.chromium.org/183313003/diff/150001/Source/modules/gamepad/GamepadList.h#newcode38 Source/modules/gamepad/GamepadList.h:38: class GamepadList : public RefCountedWillBeGarbageCollectedFinalized<GamepadList>, public ScriptWrappable { I ...
6 years, 9 months ago (2014-03-12 22:28:19 UTC) #23
bajones
On 2014/03/12 22:25:25, eseidel wrote: > https://codereview.chromium.org/183313003/diff/130001/Source/modules/gamepad/GamepadButton.h > File Source/modules/gamepad/GamepadButton.h (right): > > https://codereview.chromium.org/183313003/diff/130001/Source/modules/gamepad/GamepadButton.h#newcode26 > ...
6 years, 9 months ago (2014-03-12 22:53:22 UTC) #24
eseidel
lgtm. Please file a bug for nils about the generator fixes needed to do this ...
6 years, 9 months ago (2014-03-12 22:58:17 UTC) #25
bajones
The CQ bit was checked by bajones@chromium.org
6 years, 9 months ago (2014-03-12 22:59:19 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/183313003/170001
6 years, 9 months ago (2014-03-12 22:59:22 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-12 22:59:37 UTC) #28
commit-bot: I haz the power
Failed to apply patch for Source/core/frame/UseCounter.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-12 22:59:38 UTC) #29
bajones
On 2014/03/12 22:58:17, eseidel wrote: > lgtm. Please file a bug for nils about the ...
6 years, 9 months ago (2014-03-12 23:04:44 UTC) #30
bajones
The CQ bit was checked by bajones@chromium.org
6 years, 9 months ago (2014-03-12 23:19:49 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/183313003/190001
6 years, 9 months ago (2014-03-12 23:19:56 UTC) #32
eseidel
Not that we need to bikeshed specs here, but it seems like it would have ...
6 years, 9 months ago (2014-03-12 23:27:55 UTC) #33
bajones
On 2014/03/12 23:27:55, eseidel wrote: > Not that we need to bikeshed specs here, but ...
6 years, 9 months ago (2014-03-12 23:40:30 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-12 23:53:13 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_blink_rel
6 years, 9 months ago (2014-03-12 23:53:14 UTC) #36
Nils Barth (inactive)
Quick LGTM from IDL POV; I'll see if we can merge the implementations, but we ...
6 years, 9 months ago (2014-03-13 01:57:40 UTC) #37
Nils Barth (inactive)
Failures are due to test needing resetting (noted below). Also a few minor style issues. ...
6 years, 9 months ago (2014-03-13 02:40:15 UTC) #38
bajones
The CQ bit was checked by bajones@chromium.org
6 years, 9 months ago (2014-03-13 03:53:37 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/183313003/210001
6 years, 9 months ago (2014-03-13 03:53:53 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 04:26:43 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_blink_rel
6 years, 9 months ago (2014-03-13 04:26:44 UTC) #42
bajones
The CQ bit was checked by bajones@chromium.org
6 years, 9 months ago (2014-03-13 05:20:27 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/183313003/210001
6 years, 9 months ago (2014-03-13 05:20:35 UTC) #44
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 06:10:19 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_blink
6 years, 9 months ago (2014-03-13 06:10:20 UTC) #46
bajones
The CQ bit was checked by bajones@chromium.org
6 years, 9 months ago (2014-03-13 16:18:32 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/183313003/210001
6 years, 9 months ago (2014-03-13 16:18:42 UTC) #48
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 16:19:03 UTC) #49
commit-bot: I haz the power
Failed to apply patch for Source/modules/gamepad/GamepadList.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-13 16:19:07 UTC) #50
bajones
The CQ bit was checked by bajones@chromium.org
6 years, 9 months ago (2014-03-13 17:04:49 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bajones@chromium.org/183313003/230001
6 years, 9 months ago (2014-03-13 17:04:59 UTC) #52
commit-bot: I haz the power
6 years, 9 months ago (2014-03-13 21:45:26 UTC) #53
Message was sent while issue was closed.
Change committed as 169148

Powered by Google App Engine
This is Rietveld 408576698