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

Issue 2492183002: Add struct_traits and typemap for blink::WebGamepad (Closed)

Created:
4 years, 1 month ago by ke.he
Modified:
4 years, 1 month ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add struct_traits and typemap for blink::WebGamepad This is the prepare patch for Mojo-ification of Gamepad. The original GamepadMsg_GamepadConnected/Disconnected messages use the blink::WebGamepad as parameter, so before we convert above messages to mojo interface, we have to add the typemap and struct_traits for struct blink::WebGamepad first. Unittest of this new-added typemap and struct_traits are added into gn target device_unittests. BUG=612330 Committed: https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36 Cr-Commit-Position: refs/heads/master@{#433789}

Patch Set 1 #

Patch Set 2 : fix build err in windows build #

Patch Set 3 : fix compile err in window build #

Patch Set 4 : fixed "unaligned warning" in windows x64 build #

Patch Set 5 : fixed "un-aligned warning" in windows x64 build #

Total comments: 8

Patch Set 6 : use nullable feature #

Total comments: 10

Patch Set 7 : avoid pass unnecessary bytes of webgamepad. #

Total comments: 15

Patch Set 8 : remove unnecessary memset #

Patch Set 9 : code rebase #

Patch Set 10 : code rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+688 lines, -0 lines) Patch
M device/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/BUILD.gn View 1 2 3 4 5 6 1 chunk +21 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/OWNERS View 1 chunk +6 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/gamepad.mojom View 1 2 3 4 5 6 1 chunk +51 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/gamepad.typemap View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/gamepad_struct_traits.h View 1 2 3 4 5 6 1 chunk +119 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/gamepad_struct_traits.cc View 1 2 3 4 5 6 7 1 chunk +212 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/gamepad_struct_traits_test.mojom View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/gamepad_struct_traits_unittest.cc View 1 2 3 4 5 6 1 chunk +234 lines, -0 lines 0 comments Download
A device/gamepad/public/interfaces/typemaps.gni View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/chromium_bindings_configuration.gni View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 72 (47 generated)
ke.he
blundell@, PTAL, thanks! Based on this preparation patch, I'll continue the mojo-ification work of gamepad ...
4 years, 1 month ago (2016-11-11 07:26:08 UTC) #2
ke.he
Currently this patch only breaks the win_chromium_x64_rel_ng build, and I'm blocked. I think it is ...
4 years, 1 month ago (2016-11-14 03:55:26 UTC) #20
ke.he
Problem solved. Big thanks to leonhsl's suggestion. Apologize for the long and useless mail I ...
4 years, 1 month ago (2016-11-14 08:54:47 UTC) #24
blundell
Yuzhu, can you do the initial review here? I'm still not that familiar with how ...
4 years, 1 month ago (2016-11-14 12:33:16 UTC) #27
blundell
On 2016/11/14 12:33:16, blundell wrote: > Yuzhu, can you do the initial review here? I'm ...
4 years, 1 month ago (2016-11-14 12:34:19 UTC) #28
yzshen1
https://codereview.chromium.org/2492183002/diff/130001/device/gamepad/public/interfaces/gamepad.mojom File device/gamepad/public/interfaces/gamepad.mojom (right): https://codereview.chromium.org/2492183002/diff/130001/device/gamepad/public/interfaces/gamepad.mojom#newcode1 device/gamepad/public/interfaces/gamepad.mojom:1: module device.mojom; Please add the copyright boilerplate. https://codereview.chromium.org/2492183002/diff/130001/device/gamepad/public/interfaces/gamepad.mojom#newcode4 device/gamepad/public/interfaces/gamepad.mojom:4: ...
4 years, 1 month ago (2016-11-14 21:13:17 UTC) #29
ke.he
blundell@, yzshen1@ CL updated, PTAL, thanks! https://codereview.chromium.org/2492183002/diff/130001/device/gamepad/public/interfaces/gamepad.mojom File device/gamepad/public/interfaces/gamepad.mojom (right): https://codereview.chromium.org/2492183002/diff/130001/device/gamepad/public/interfaces/gamepad.mojom#newcode1 device/gamepad/public/interfaces/gamepad.mojom:1: module device.mojom; On ...
4 years, 1 month ago (2016-11-15 10:55:18 UTC) #30
ke.he
On 2016/11/14 12:34:19, blundell wrote: > On 2016/11/14 12:33:16, blundell wrote: > > Yuzhu, can ...
4 years, 1 month ago (2016-11-15 11:09:32 UTC) #31
yzshen1
https://codereview.chromium.org/2492183002/diff/150001/device/gamepad/public/interfaces/gamepad.mojom File device/gamepad/public/interfaces/gamepad.mojom (right): https://codereview.chromium.org/2492183002/diff/150001/device/gamepad/public/interfaces/gamepad.mojom#newcode45 device/gamepad/public/interfaces/gamepad.mojom:45: uint32 axes_length; If axes length is variable, how about ...
4 years, 1 month ago (2016-11-15 19:17:33 UTC) #36
ke.he
yzshen1@, CL updated, PTAL. Thanks! https://codereview.chromium.org/2492183002/diff/150001/device/gamepad/public/interfaces/gamepad.mojom File device/gamepad/public/interfaces/gamepad.mojom (right): https://codereview.chromium.org/2492183002/diff/150001/device/gamepad/public/interfaces/gamepad.mojom#newcode45 device/gamepad/public/interfaces/gamepad.mojom:45: uint32 axes_length; On 2016/11/15 ...
4 years, 1 month ago (2016-11-16 09:51:41 UTC) #37
yzshen1
Mostly looks good. Thanks! https://codereview.chromium.org/2492183002/diff/170001/device/gamepad/public/interfaces/gamepad_struct_traits.cc File device/gamepad/public/interfaces/gamepad_struct_traits.cc (right): https://codereview.chromium.org/2492183002/diff/170001/device/gamepad/public/interfaces/gamepad_struct_traits.cc#newcode22 device/gamepad/public/interfaces/gamepad_struct_traits.cc:22: memset(out, 0, sizeof(blink::WebGamepadQuaternion)); why is ...
4 years, 1 month ago (2016-11-16 19:20:18 UTC) #42
ke.he
yzshen1@, Thanks very much for your comments. PTAL. blundell@, Could you PTAL at https://codereview.chromium.org/2492183002/diff/170001/device/gamepad/public/interfaces/gamepad_struct_traits.cc#newcode144 ? ...
4 years, 1 month ago (2016-11-17 05:51:49 UTC) #47
blundell
https://codereview.chromium.org/2492183002/diff/170001/device/gamepad/public/interfaces/gamepad_struct_traits.cc File device/gamepad/public/interfaces/gamepad_struct_traits.cc (right): https://codereview.chromium.org/2492183002/diff/170001/device/gamepad/public/interfaces/gamepad_struct_traits.cc#newcode144 device/gamepad/public/interfaces/gamepad_struct_traits.cc:144: while (r.id[id_length] != 0 && id_length < blink::WebGamepad::idLengthCap) { ...
4 years, 1 month ago (2016-11-17 14:55:41 UTC) #50
yzshen1
LGTM (please also wait for other reviewer's LGs.) Thanks!
4 years, 1 month ago (2016-11-17 17:37:07 UTC) #51
ke.he
bajones@, Could you PTAL on this patch, thanks!
4 years, 1 month ago (2016-11-18 01:51:40 UTC) #53
bajones
On 2016/11/18 01:51:40, ke.he wrote: > bajones@, Could you PTAL on this patch, thanks! device/gamepad/ ...
4 years, 1 month ago (2016-11-18 18:38:23 UTC) #54
leonhsl(Using Gerrit)
Hi, Tom, would you please help to take security review? Thanks.
4 years, 1 month ago (2016-11-19 11:28:29 UTC) #56
Tom Sepez
lgtm
4 years, 1 month ago (2016-11-21 17:55:50 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2492183002/190001
4 years, 1 month ago (2016-11-22 01:38:37 UTC) #59
commit-bot: I haz the power
Failed to apply patch for device/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-22 02:53:24 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2492183002/190001
4 years, 1 month ago (2016-11-22 03:05:03 UTC) #63
commit-bot: I haz the power
Failed to apply patch for device/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-22 03:09:22 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2492183002/230001
4 years, 1 month ago (2016-11-22 03:33:55 UTC) #68
commit-bot: I haz the power
Committed patchset #10 (id:230001)
4 years, 1 month ago (2016-11-22 04:38:43 UTC) #70
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 04:41:17 UTC) #72
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36
Cr-Commit-Position: refs/heads/master@{#433789}

Powered by Google App Engine
This is Rietveld 408576698