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

Issue 1850023002: Consume Mojo services directly in Blink's WebUSB implementation. (Closed)

Created:
4 years, 8 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 8 months ago
CC:
abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Consume Mojo services directly in Blink's WebUSB implementation. This patch takes advantage of the ability to consume a Mojo service directly in //third_party/WebKit/Source/modules to remove the //third_party/WebKit/public/platform/modules/webusb, //content/renderer/usb and the rest of that intermediate layer. BUG=None Committed: https://crrev.com/1b995c58c463593dc156931956a3e4ace76b5e52 Cr-Commit-Position: refs/heads/master@{#388571}

Patch Set 1 : #

Total comments: 14

Patch Set 2 : Addressed esprehn@'s feedback. #

Patch Set 3 : Make Run non-const. #

Patch Set 4 : Rebased. #

Patch Set 5 : Move promise adapter pattern into a header that can be shared. #

Total comments: 6

Patch Set 6 : Remove promise adapters, use WTF::bind instead. #

Total comments: 10

Patch Set 7 : Rebased and addressed feedback. #

Patch Set 8 : Don't do assignments in if statements. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+686 lines, -2323 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 7 2 chunks +0 lines, -7 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 3 chunks +0 lines, -12 lines 0 comments Download
D content/renderer/usb/DEPS View 1 chunk +0 lines, -3 lines 0 comments Download
D content/renderer/usb/OWNERS View 1 chunk +0 lines, -2 lines 0 comments Download
D content/renderer/usb/type_converters.h View 1 chunk +0 lines, -105 lines 0 comments Download
D content/renderer/usb/type_converters.cc View 1 chunk +0 lines, -262 lines 0 comments Download
D content/renderer/usb/web_usb_client_impl.h View 1 chunk +0 lines, -45 lines 0 comments Download
D content/renderer/usb/web_usb_client_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -180 lines 0 comments Download
D content/renderer/usb/web_usb_device_impl.h View 1 2 3 4 1 chunk +0 lines, -86 lines 0 comments Download
D content/renderer/usb/web_usb_device_impl.cc View 1 2 3 4 1 chunk +0 lines, -421 lines 0 comments Download
M device/usb/public/interfaces/BUILD.gn View 1 2 3 4 5 6 1 chunk +7 lines, -5 lines 0 comments Download
M device/usb/usb.gyp View 1 2 3 4 5 6 7 2 chunks +17 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/usb/usbDevice.html View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -4 lines 0 comments Download
A third_party/WebKit/Source/modules/webusb/DEPS View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USB.h View 1 2 3 4 5 6 2 chunks +14 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USB.cpp View 1 2 3 4 5 6 7 2 chunks +128 lines, -89 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h View 1 2 3 4 5 6 2 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBAlternateInterface.cpp View 1 2 3 4 5 6 2 chunks +6 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBConfiguration.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBConfiguration.cpp View 1 2 3 4 5 6 3 chunks +6 lines, -23 lines 0 comments Download
D third_party/WebKit/Source/modules/webusb/USBController.h View 1 chunk +0 lines, -45 lines 0 comments Download
D third_party/WebKit/Source/modules/webusb/USBController.cpp View 1 2 3 1 chunk +0 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.h View 1 2 3 4 5 6 3 chunks +43 lines, -32 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.cpp View 1 2 3 4 5 6 24 chunks +397 lines, -347 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBEndpoint.h View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp View 1 2 3 4 5 6 5 chunks +20 lines, -41 lines 0 comments Download
D third_party/WebKit/Source/modules/webusb/USBError.h View 1 chunk +0 lines, -32 lines 0 comments Download
D third_party/WebKit/Source/modules/webusb/USBError.cpp View 1 chunk +0 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBInTransferResult.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBInterface.h View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBInterface.cpp View 1 2 3 4 5 6 4 chunks +5 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBOutTransferResult.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/MojoHelper.h View 1 2 3 4 5 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 2 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -7 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/OWNERS View 1 chunk +0 lines, -2 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBClient.h View 1 2 3 1 chunk +0 lines, -52 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBDevice.h View 1 2 3 1 chunk +0 lines, -109 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceFilter.h View 1 chunk +0 lines, -34 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceInfo.h View 1 chunk +0 lines, -110 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceRequestOptions.h View 1 chunk +0 lines, -20 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBError.h View 1 chunk +0 lines, -34 lines 0 comments Download
D third_party/WebKit/public/platform/modules/webusb/WebUSBTransferInfo.h View 1 chunk +0 lines, -43 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 5 6 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 29 (9 generated)
Reilly Grant (use Gerrit)
Please take a look.
4 years, 8 months ago (2016-04-06 19:53:44 UTC) #4
esprehn
https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode114 third_party/WebKit/Source/modules/webusb/USB.cpp:114: // a mojo::Callback::Runnable's const Run() method. this is really ...
4 years, 8 months ago (2016-04-06 20:10:45 UTC) #5
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode114 third_party/WebKit/Source/modules/webusb/USB.cpp:114: // a mojo::Callback::Runnable's const Run() method. On 2016/04/06 at ...
4 years, 8 months ago (2016-04-06 22:30:08 UTC) #6
esprehn
rockot@ See comments about mojo https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode114 third_party/WebKit/Source/modules/webusb/USB.cpp:114: // a mojo::Callback::Runnable's const ...
4 years, 8 months ago (2016-04-06 22:42:38 UTC) #8
Ken Rockot(use gerrit already)
On 2016/04/06 at 22:42:38, esprehn wrote: > rockot@ See comments about mojo > > https://codereview.chromium.org/1850023002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp ...
4 years, 8 months ago (2016-04-06 23:04:06 UTC) #9
Reilly Grant (use Gerrit)
On 2016/04/06 at 23:04:06, rockot wrote: > On 2016/04/06 at 22:42:38, esprehn wrote: > > ...
4 years, 8 months ago (2016-04-06 23:38:07 UTC) #10
Reilly Grant (use Gerrit)
Please take another look.
4 years, 8 months ago (2016-04-12 17:04:04 UTC) #11
Reilly Grant (use Gerrit)
esprehn@ and rockot@, please review the pattern I've standardized in MojoPromiseAdapter.h. juncai@, please review the ...
4 years, 8 months ago (2016-04-14 21:09:30 UTC) #13
Ken Rockot(use gerrit already)
On 2016/04/14 at 21:09:30, reillyg wrote: > esprehn@ and rockot@, please review the pattern I've ...
4 years, 8 months ago (2016-04-15 05:09:09 UTC) #14
esprehn
I'm fine with whatever is going to result in the least verbose and complicated code. ...
4 years, 8 months ago (2016-04-15 05:49:17 UTC) #15
esprehn
I'm fine with whatever is going to result in the least verbose and complicated code. ...
4 years, 8 months ago (2016-04-15 05:54:30 UTC) #16
juncai
https://codereview.chromium.org/1850023002/diff/100001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1850023002/diff/100001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode33 third_party/WebKit/Source/modules/webusb/USB.cpp:33: if (mojoFilter->has_vendor_id) maybe can use: if (mojoFilter->has_vendor_id = filter.hasVendorId()) ...
4 years, 8 months ago (2016-04-15 16:52:47 UTC) #17
Reilly Grant (use Gerrit)
Please take another look. It looks like I can use WTF::bind and have added a ...
4 years, 8 months ago (2016-04-18 21:31:33 UTC) #19
Ken Rockot(use gerrit already)
LGTM - Perhaps it's worthwhile for our mojom-Blink bindings generator to (in a future patch) ...
4 years, 8 months ago (2016-04-18 21:44:06 UTC) #20
juncai
LGTM with nits. https://codereview.chromium.org/1850023002/diff/140001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp File third_party/WebKit/Source/modules/webusb/USBDevice.cpp (right): https://codereview.chromium.org/1850023002/diff/140001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp#newcode572 third_party/WebKit/Source/modules/webusb/USBDevice.cpp:572: onDeviceOpenedOrClosed(true); nit: add comment for true ...
4 years, 8 months ago (2016-04-18 22:05:38 UTC) #21
Reilly Grant (use Gerrit)
pfeldman@ please take a look. https://codereview.chromium.org/1850023002/diff/140001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp File third_party/WebKit/Source/modules/webusb/USBDevice.cpp (right): https://codereview.chromium.org/1850023002/diff/140001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp#newcode572 third_party/WebKit/Source/modules/webusb/USBDevice.cpp:572: onDeviceOpenedOrClosed(true); On 2016/04/18 at ...
4 years, 8 months ago (2016-04-20 00:03:13 UTC) #22
pfeldman
code removal lgtm
4 years, 8 months ago (2016-04-20 18:22:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1850023002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1850023002/180001
4 years, 8 months ago (2016-04-20 19:32:15 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years, 8 months ago (2016-04-20 20:45:39 UTC) #27
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:26:17 UTC) #29
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/1b995c58c463593dc156931956a3e4ace76b5e52
Cr-Commit-Position: refs/heads/master@{#388571}

Powered by Google App Engine
This is Rietveld 408576698