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

Issue 1814603002: Track USB device interface claim state in Blink. (Closed)

Created:
4 years, 9 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 9 months ago
Reviewers:
juncai
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track USB device interface claim state in Blink. This patch updates the WebUSB IDL to include a 'claimed' attribute on USBInterface and the necessary renderer-side logic to keep track of this state. The most interesting part of this is continuing to work out what operations on the device should block other operations because they change the device state in a way that effects argument validation. BUG=593164 Committed: https://crrev.com/8953a7b9ffec800ce8a36e44a7c27a5f7725e33d Cr-Commit-Position: refs/heads/master@{#382407}

Patch Set 1 #

Patch Set 2 : Fix webexposed test. #

Total comments: 17

Patch Set 3 : Addressed juncai@'s comments. #

Total comments: 26

Patch Set 4 : Address more comments. #

Patch Set 5 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -77 lines) Patch
M third_party/WebKit/LayoutTests/usb/usbDevice.html View 1 2 5 chunks +24 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBConfiguration.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBConfiguration.cpp View 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.h View 1 2 4 chunks +12 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.cpp View 1 2 3 22 chunks +192 lines, -58 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBInterface.h View 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBInterface.cpp View 1 2 3 2 chunks +18 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBInterface.idl View 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (6 generated)
Reilly Grant (use Gerrit)
Please take a look.
4 years, 9 months ago (2016-03-16 23:32:40 UTC) #2
juncai
https://codereview.chromium.org/1814603002/diff/20001/third_party/WebKit/LayoutTests/usb/usbDevice.html File third_party/WebKit/LayoutTests/usb/usbDevice.html (right): https://codereview.chromium.org/1814603002/diff/20001/third_party/WebKit/LayoutTests/usb/usbDevice.html#newcode255 third_party/WebKit/LayoutTests/usb/usbDevice.html:255: }, 'a non-existant interface cannot be claimed or released'); ...
4 years, 9 months ago (2016-03-17 01:21:12 UTC) #3
juncai
https://codereview.chromium.org/1814603002/diff/20001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp File third_party/WebKit/Source/modules/webusb/USBDevice.cpp (right): https://codereview.chromium.org/1814603002/diff/20001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp#newcode146 third_party/WebKit/Source/modules/webusb/USBDevice.cpp:146: class ClaimInterfacePromiseAdapter : public WebCallbacks<void, const WebUSBError&> { On ...
4 years, 9 months ago (2016-03-17 05:59:35 UTC) #4
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1814603002/diff/20001/third_party/WebKit/LayoutTests/usb/usbDevice.html File third_party/WebKit/LayoutTests/usb/usbDevice.html (right): https://codereview.chromium.org/1814603002/diff/20001/third_party/WebKit/LayoutTests/usb/usbDevice.html#newcode255 third_party/WebKit/LayoutTests/usb/usbDevice.html:255: }, 'a non-existant interface cannot be claimed or released'); ...
4 years, 9 months ago (2016-03-17 17:07:01 UTC) #5
juncai
https://codereview.chromium.org/1814603002/diff/40001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp File third_party/WebKit/Source/modules/webusb/USBDevice.cpp (right): https://codereview.chromium.org/1814603002/diff/40001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp#newcode401 third_party/WebKit/Source/modules/webusb/USBDevice.cpp:401: } else if (m_interfaceStateChangeInProgress.get(interfaceIndex)) { nit: may need to ...
4 years, 9 months ago (2016-03-17 18:20:38 UTC) #6
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1814603002/diff/40001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp File third_party/WebKit/Source/modules/webusb/USBDevice.cpp (right): https://codereview.chromium.org/1814603002/diff/40001/third_party/WebKit/Source/modules/webusb/USBDevice.cpp#newcode401 third_party/WebKit/Source/modules/webusb/USBDevice.cpp:401: } else if (m_interfaceStateChangeInProgress.get(interfaceIndex)) { On 2016/03/17 at 18:20:37, ...
4 years, 9 months ago (2016-03-18 00:10:22 UTC) #7
juncai
LGTM.
4 years, 9 months ago (2016-03-18 00:18:28 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814603002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814603002/60001
4 years, 9 months ago (2016-03-18 01:12:41 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/37401) android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, ...
4 years, 9 months ago (2016-03-18 01:16:33 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814603002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814603002/80001
4 years, 9 months ago (2016-03-21 20:50:46 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-21 22:02:46 UTC) #16
commit-bot: I haz the power
4 years, 9 months ago (2016-03-21 22:04:23 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8953a7b9ffec800ce8a36e44a7c27a5f7725e33d
Cr-Commit-Position: refs/heads/master@{#382407}

Powered by Google App Engine
This is Rietveld 408576698