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

Issue 22914023: Introducing chrome.usb.getDevices/openDevice API (Closed)

Created:
7 years, 4 months ago by Bei Zhang
Modified:
7 years, 3 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@usb-interface
Visibility:
Public.

Description

Introducing chrome.usb.getDevices/openDevice API Currently chrome.usb.findDevices always yields new ids and there is no way to know the consistency among different calls. chrome.usb.getDevices API will be introduced which yields stable ids for each device and remains unchanged until the device is unplugged. API Proposal: https://docs.google.com/a/chromium.org/document/d/16OJQRjW6ZRkIQqA3qIEVFBRY3tFLFnlNXlTGJ5pgPfg/edit BUG=277139 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221328

Patch Set 1 #

Total comments: 19

Patch Set 2 : Fixes #

Total comments: 18

Patch Set 3 : Fixes #

Total comments: 9

Patch Set 4 : Fix IDL #

Total comments: 6

Patch Set 5 : Fix comments #

Total comments: 2

Patch Set 6 : Adding chrome.usb.requestAccess #

Total comments: 4

Patch Set 7 : Fixes #

Total comments: 1

Patch Set 8 : Clean up #

Patch Set 9 : Rebase to origin/master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+759 lines, -420 lines) Patch
M chrome/browser/extensions/api/usb/usb_api.h View 1 2 3 4 5 6 7 5 chunks +65 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/usb/usb_api.cc View 1 2 3 4 5 6 7 37 chunks +385 lines, -191 lines 0 comments Download
M chrome/browser/extensions/api/usb/usb_apitest.cc View 1 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/usb/usb_device.h View 1 2 3 4 5 4 chunks +23 lines, -1 line 0 comments Download
M chrome/browser/usb/usb_device.cc View 1 2 3 4 5 3 chunks +49 lines, -1 line 0 comments Download
M chrome/browser/usb/usb_service.h View 1 2 3 4 5 6 7 4 chunks +11 lines, -30 lines 0 comments Download
M chrome/browser/usb/usb_service.cc View 1 2 3 4 5 6 chunks +15 lines, -96 lines 0 comments Download
M chrome/common/extensions/api/usb.idl View 1 2 3 4 5 6 4 chunks +134 lines, -56 lines 0 comments Download
M chrome/common/extensions/permissions/usb_device_permission_data.h View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M chrome/common/extensions/permissions/usb_device_permission_data.cc View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/usb/device_handling/test.js View 1 2 3 1 chunk +22 lines, -34 lines 0 comments Download
A + chrome/test/data/extensions/api_test/usb/reset_device/manifest.json View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/usb/reset_device/test.js View 1 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Bei Zhang
Hi Antony, Please give an owner's review on these files: chrome/browser/extensions/extension_function_histogram_value.h chrome/common/extensions/api/usb.idl chrome/test/data/extensions/api_test/usb/device_handling/test.js chrome/test/data/extensions/api_test/usb/reset_device/manifest.json chrome/test/data/extensions/api_test/usb/reset_device/test.js ...
7 years, 4 months ago (2013-08-21 22:35:35 UTC) #1
asargent_no_longer_on_chrome
https://codereview.chromium.org/22914023/diff/1/chrome/browser/extensions/api/usb/usb_api.cc File chrome/browser/extensions/api/usb/usb_api.cc (right): https://codereview.chromium.org/22914023/diff/1/chrome/browser/extensions/api/usb/usb_api.cc#newcode34 chrome/browser/extensions/api/usb/usb_api.cc:34: namespace OpenDevice = usb::OpenDevice; nit: can you sort these ...
7 years, 4 months ago (2013-08-22 21:06:13 UTC) #2
Bei Zhang
https://codereview.chromium.org/22914023/diff/1/chrome/browser/extensions/api/usb/usb_api.cc File chrome/browser/extensions/api/usb/usb_api.cc (right): https://codereview.chromium.org/22914023/diff/1/chrome/browser/extensions/api/usb/usb_api.cc#newcode34 chrome/browser/extensions/api/usb/usb_api.cc:34: namespace OpenDevice = usb::OpenDevice; On 2013/08/22 21:06:13, Antony Sargent ...
7 years, 4 months ago (2013-08-23 22:52:00 UTC) #3
asargent_no_longer_on_chrome
lgtm w/ a few final nits https://codereview.chromium.org/22914023/diff/1/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/1/chrome/common/extensions/api/usb.idl#newcode174 chrome/common/extensions/api/usb.idl:174: FindDevicesCallback callback); On ...
7 years, 4 months ago (2013-08-23 23:57:00 UTC) #4
Bei Zhang
https://codereview.chromium.org/22914023/diff/4001/chrome/browser/extensions/api/usb/usb_api.cc File chrome/browser/extensions/api/usb/usb_api.cc (right): https://codereview.chromium.org/22914023/diff/4001/chrome/browser/extensions/api/usb/usb_api.cc#newcode24 chrome/browser/extensions/api/usb/usb_api.cc:24: namespace ListInterfaces = usb::ListInterfaces; To be supportive to Google ...
7 years, 3 months ago (2013-08-26 07:59:58 UTC) #5
scheib
https://codereview.chromium.org/22914023/diff/80001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/80001/chrome/common/extensions/api/usb.idl#newcode25 chrome/common/extensions/api/usb.idl:25: // but they only serve as checksums. You can ...
7 years, 3 months ago (2013-08-26 18:27:56 UTC) #6
Bei Zhang
Thanks for the review! Antony: Please note that I have a question about 'dictionary Device' ...
7 years, 3 months ago (2013-08-26 20:21:31 UTC) #7
asargent_no_longer_on_chrome
https://codereview.chromium.org/22914023/diff/80001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/80001/chrome/common/extensions/api/usb.idl#newcode158 chrome/common/extensions/api/usb.idl:158: dictionary EnumerateDevicesOptions2 { On 2013/08/26 20:21:31, Bei Zhang wrote: ...
7 years, 3 months ago (2013-08-26 22:15:19 UTC) #8
Bei Zhang
Fixed the IDL. Please take another look.
7 years, 3 months ago (2013-08-28 17:43:25 UTC) #9
asargent_no_longer_on_chrome
lgtm https://codereview.chromium.org/22914023/diff/91001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/91001/chrome/common/extensions/api/usb.idl#newcode26 chrome/common/extensions/api/usb.idl:26: long device; For a given device, I assume ...
7 years, 3 months ago (2013-08-28 20:52:42 UTC) #10
scheib
I only looked at .idl; lgtm though I think DeviceHandle should be renamed. https://codereview.chromium.org/22914023/diff/91001/chrome/common/extensions/api/usb.idl File ...
7 years, 3 months ago (2013-08-28 23:23:48 UTC) #11
Bei Zhang
https://codereview.chromium.org/22914023/diff/91001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/91001/chrome/common/extensions/api/usb.idl#newcode26 chrome/common/extensions/api/usb.idl:26: long device; On 2013/08/28 20:52:42, Antony Sargent wrote: > ...
7 years, 3 months ago (2013-08-29 20:26:06 UTC) #12
scheib
https://codereview.chromium.org/22914023/diff/105001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/105001/chrome/common/extensions/api/usb.idl#newcode40 chrome/common/extensions/api/usb.idl:40: // The id of the USB device handle for. ...
7 years, 3 months ago (2013-08-29 20:47:58 UTC) #13
Bei Zhang
https://codereview.chromium.org/22914023/diff/105001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/105001/chrome/common/extensions/api/usb.idl#newcode40 chrome/common/extensions/api/usb.idl:40: // The id of the USB device handle for. ...
7 years, 3 months ago (2013-08-29 21:02:05 UTC) #14
Bei Zhang
Added chrome.usb.requestAccess.
7 years, 3 months ago (2013-08-31 00:14:51 UTC) #15
Bei Zhang
Hi Zelidrag, Please review. Please also take a look a the API proposal. Thanks, Bei
7 years, 3 months ago (2013-09-01 07:25:06 UTC) #16
Bei Zhang
Hi Pavel, Please review. Thanks, Bei
7 years, 3 months ago (2013-09-01 07:25:37 UTC) #17
zel
https://codereview.chromium.org/22914023/diff/140001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/140001/chrome/common/extensions/api/usb.idl#newcode29 chrome/common/extensions/api/usb.idl:29: // ChromeOS only. The id of interface that your ...
7 years, 3 months ago (2013-09-03 17:01:41 UTC) #18
Bei Zhang
https://codereview.chromium.org/22914023/diff/140001/chrome/common/extensions/api/usb.idl File chrome/common/extensions/api/usb.idl (right): https://codereview.chromium.org/22914023/diff/140001/chrome/common/extensions/api/usb.idl#newcode29 chrome/common/extensions/api/usb.idl:29: // ChromeOS only. The id of interface that your ...
7 years, 3 months ago (2013-09-03 21:27:16 UTC) #19
pfeldman
https://codereview.chromium.org/22914023/diff/158001/chrome/browser/usb/usb_service.h File chrome/browser/usb/usb_service.h (right): https://codereview.chromium.org/22914023/diff/158001/chrome/browser/usb/usb_service.h#newcode42 chrome/browser/usb/usb_service.h:42: scoped_refptr<UsbDevice> GetDeviceById(uint32 unique_id); What is this id? How does ...
7 years, 3 months ago (2013-09-04 07:16:54 UTC) #20
Bei Zhang
On 2013/09/04 07:16:54, pfeldman wrote: > https://codereview.chromium.org/22914023/diff/158001/chrome/browser/usb/usb_service.h > File chrome/browser/usb/usb_service.h (right): > > https://codereview.chromium.org/22914023/diff/158001/chrome/browser/usb/usb_service.h#newcode42 > ...
7 years, 3 months ago (2013-09-04 17:53:10 UTC) #21
pfeldman
Please add TODO on id removal. chrome/browser/usb lgtm
7 years, 3 months ago (2013-09-04 18:00:16 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ikarienator@chromium.org/22914023/164001
7 years, 3 months ago (2013-09-04 18:52:33 UTC) #23
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests, chrome_frame_net_tests, chrome_frame_tests, chrome_frame_unittests, content_browsertests, mini_installer_test, ...
7 years, 3 months ago (2013-09-04 21:28:37 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ikarienator@chromium.org/22914023/190001
7 years, 3 months ago (2013-09-04 21:31:06 UTC) #25
commit-bot: I haz the power
7 years, 3 months ago (2013-09-05 01:51:29 UTC) #26
Message was sent while issue was closed.
Change committed as 221328

Powered by Google App Engine
This is Rietveld 408576698