WebUSB on Android |
|||||||
Issue descriptionTracking bug for WebUSB support on Android.
,
Apr 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fed1de7faf5d91a3282d461fd1c0657f8fe3a533 commit fed1de7faf5d91a3282d461fd1c0657f8fe3a533 Author: reillyg <reillyg@chromium.org> Date: Thu Apr 14 14:55:42 2016 Replace libusb in the Linux/Chrome OS USB I/O path. As a first step in adding support for connecting to USB devices on Android this patch replaces the libusb-based implementation of UsbDeviceHandle used on Linux and Chrome OS with one written directly to the Linux usbdevfs ioctl interface. BUG=422562, 601627 Review URL: https://codereview.chromium.org/1877503003 Cr-Commit-Position: refs/heads/master@{#387315} [modify] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/BUILD.gn [modify] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb.gyp [modify] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb_device_handle.h [modify] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb_device_handle_unittest.cc [add] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb_device_handle_usbfs.cc [add] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb_device_handle_usbfs.h [modify] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb_device_impl.cc [modify] https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533/device/usb/usb_device_impl.h
,
Apr 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3 commit 4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3 Author: wfh <wfh@chromium.org> Date: Fri Apr 15 21:37:29 2016 Revert of Replace libusb in the Linux/Chrome OS USB I/O path. (patchset #3 id:60001 of https://codereview.chromium.org/1877503003/ ) Reason for revert: broke u2f see crbug.com/603962 Original issue's description: > Replace libusb in the Linux/Chrome OS USB I/O path. > > As a first step in adding support for connecting to USB devices on > Android this patch replaces the libusb-based implementation of > UsbDeviceHandle used on Linux and Chrome OS with one written directly to > the Linux usbdevfs ioctl interface. > > BUG=422562, 601627 > > Committed: https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533 > Cr-Commit-Position: refs/heads/master@{#387315} TBR=juncai@chromium.org,reillyg@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=422562, 601627 , 603962 Review URL: https://codereview.chromium.org/1897483003 Cr-Commit-Position: refs/heads/master@{#387704} [modify] https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3/device/usb/BUILD.gn [modify] https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3/device/usb/usb.gyp [modify] https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3/device/usb/usb_device_handle.h [modify] https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3/device/usb/usb_device_handle_unittest.cc [delete] https://crrev.com/1b17dc30c89fc6a7a70a490ac942e853537fc2b9/device/usb/usb_device_handle_usbfs.cc [delete] https://crrev.com/1b17dc30c89fc6a7a70a490ac942e853537fc2b9/device/usb/usb_device_handle_usbfs.h [modify] https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3/device/usb/usb_device_impl.cc [modify] https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3/device/usb/usb_device_impl.h
,
Apr 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2f3b6285b45d43141dfc72131dd81702e4342f85 commit 2f3b6285b45d43141dfc72131dd81702e4342f85 Author: reillyg <reillyg@chromium.org> Date: Wed Apr 20 01:47:27 2016 Reland of Replace libusb in the Linux/Chrome OS USB I/O path. (patchset #1 id:1 of https://codereview.chromium.org/1897483003/ ) Reason for revert: Fixed Windows/OS X issue. Original issue's description: > Revert of Replace libusb in the Linux/Chrome OS USB I/O path. (patchset #3 id:60001 of https://codereview.chromium.org/1877503003/ ) > > Reason for revert: > broke u2f see crbug.com/603962 > > Original issue's description: > > Replace libusb in the Linux/Chrome OS USB I/O path. > > > > As a first step in adding support for connecting to USB devices on > > Android this patch replaces the libusb-based implementation of > > UsbDeviceHandle used on Linux and Chrome OS with one written directly to > > the Linux usbdevfs ioctl interface. > > > > BUG=422562, 601627 > > > > Committed: https://crrev.com/fed1de7faf5d91a3282d461fd1c0657f8fe3a533 > > Cr-Commit-Position: refs/heads/master@{#387315} > > TBR=juncai@chromium.org,reillyg@chromium.org > # Not skipping CQ checks because original CL landed more than 1 days ago. > BUG=422562, 601627 , 603962 > > Committed: https://crrev.com/4ee09b3e7eab98835bc1a47c55f3b3080c2f5fd3 > Cr-Commit-Position: refs/heads/master@{#387704} # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=422562, 601627 , 603962 Review URL: https://codereview.chromium.org/1902313002 Cr-Commit-Position: refs/heads/master@{#388402} [modify] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/BUILD.gn [modify] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb.gyp [modify] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb_device_handle.h [modify] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb_device_handle_unittest.cc [add] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb_device_handle_usbfs.cc [add] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb_device_handle_usbfs.h [modify] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb_device_impl.cc [modify] https://crrev.com/2f3b6285b45d43141dfc72131dd81702e4342f85/device/usb/usb_device_impl.h
,
Jun 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/16001d9033faf76fe53926cc6d4d25f6c9b12aca commit 16001d9033faf76fe53926cc6d4d25f6c9b12aca Author: reillyg <reillyg@chromium.org> Date: Wed Jun 01 00:44:30 2016 Support USB device hotplug on Android. This patch registers a broadcast receiver for the UsbManager's device attach and detach events. BUG= 601627 Review-Url: https://codereview.chromium.org/2017273002 Cr-Commit-Position: refs/heads/master@{#396995} [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/BUILD.gn [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/usb/android/java/src/org/chromium/device/usb/ChromeUsbDevice.java [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/usb/android/java/src/org/chromium/device/usb/ChromeUsbService.java [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/usb/usb_device_android.cc [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/usb/usb_device_android.h [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/usb/usb_service_android.cc [modify] https://crrev.com/16001d9033faf76fe53926cc6d4d25f6c9b12aca/device/usb/usb_service_android.h
,
Jul 1 2016
Implementing permission revocation is blocking a WebUSB experimental launch on Android.
,
Jul 7 2016
rolfe@, I need drawable-*dpi assets for the USB settings.
,
Jul 8 2016
A USB icon specifically in svg? I believe sgabriel@ cut that already and estade@ has access. Or you need different icons? (close button?) Let me know!
,
Jul 8 2016
Sorry, should have been more specific. I am talking about the USB logo icon that will appear before the USB category and each individual USB device. I need them in PNG at the full set of device resolutions.
,
Jul 11 2016
I think the assets you need are posted here: https://bugs.chromium.org/p/chromium/issues/detail?id=424667#c29 Sometimes the older links don't work as we restructured our Drive around the time that was posted. But try those and let me know if you have any trouble.
,
Jul 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4ac11035813e3829bb7eef3a022807b8ffc0b758 commit 4ac11035813e3829bb7eef3a022807b8ffc0b758 Author: reillyg <reillyg@chromium.org> Date: Tue Jul 12 04:08:15 2016 Make Website hashable so it can be deduplicated. This change prevents duplicate entries from appearing in the website list when the by-origin and by-host site lists are merged. BUG= 430999 , 601627 Review-Url: https://codereview.chromium.org/2135133003 Cr-Commit-Position: refs/heads/master@{#404778} [modify] https://crrev.com/4ac11035813e3829bb7eef3a022807b8ffc0b758/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java [modify] https://crrev.com/4ac11035813e3829bb7eef3a022807b8ffc0b758/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java [modify] https://crrev.com/4ac11035813e3829bb7eef3a022807b8ffc0b758/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java
,
Jul 13 2016
Screenshot of the UI from https://codereview.chromium.org/2134463002/. rolfe@ and I discussed this offline and decided to simplify the mocks, arriving at this design.
,
Jul 13 2016
Looks great!
,
Jul 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7280deea31d7794becbc7f86fb0870a129c54439 commit 7280deea31d7794becbc7f86fb0870a129c54439 Author: reillyg <reillyg@chromium.org> Date: Fri Jul 15 22:51:33 2016 Add USB device permissions to individual site settings on Android. This patch makes it possible to view and revoke permission to access a USB device by going to an origin's "site settings" page. BUG= 430999 , 601627 Review-Url: https://codereview.chromium.org/2134463002 Cr-Commit-Position: refs/heads/master@{#405887} [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/res/drawable-hdpi/settings_usb.png [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/res/drawable-mdpi/settings_usb.png [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/res/drawable-xhdpi/settings_usb.png [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/res/drawable-xxhdpi/settings_usb.png [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/res/drawable-xxxhdpi/settings_usb.png [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/res/layout/usb_permission.xml [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java [add] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbInfo.java [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/android/java_sources.gni [modify] https://crrev.com/7280deea31d7794becbc7f86fb0870a129c54439/chrome/browser/android/preferences/website_preference_bridge.cc
,
Jul 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d746e82173895858a05b3b21912f20c24f22eb9c commit d746e82173895858a05b3b21912f20c24f22eb9c Author: reillyg <reillyg@chromium.org> Date: Tue Jul 19 23:58:33 2016 Revert r404778 and r405887. These patches attempted to simplify how website permissions were handled on Android and add new code to display USB device permissions. Unfortunately the first has caused a regression for other permission types so I will revert both until we have a better solution. BUG= 430999 , 601627 ,628986 TBR=twellington@chromium.org,bauerb@chromium.org Review-Url: https://codereview.chromium.org/2155423003 Cr-Commit-Position: refs/heads/master@{#406420} [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/res/drawable-hdpi/settings_usb.png [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/res/drawable-mdpi/settings_usb.png [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/res/drawable-xhdpi/settings_usb.png [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/res/drawable-xxhdpi/settings_usb.png [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/res/drawable-xxxhdpi/settings_usb.png [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/res/layout/usb_permission.xml [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java [delete] https://crrev.com/6b901f8f0d34988b0df126d33cf68cc103d1d9d9/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbInfo.java [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/android/java_sources.gni [modify] https://crrev.com/d746e82173895858a05b3b21912f20c24f22eb9c/chrome/browser/android/preferences/website_preference_bridge.cc
,
Jul 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff commit fc4b6a7702df12a0f1f55122e13231f1c4c7ebff Author: reillyg <reillyg@chromium.org> Date: Thu Jul 21 22:18:37 2016 Reuse Website objects in WebsitePermissionFetcher. This patch is a rewrite of r404778. Instead of creating a new Website instance of each permission they are now reused to collect all permissions associated with an origin/embedder pair. The callback from WebsitePermissionFetcher is now also substantially simpler because it turns out that no callers actually cared about receiving the maps it was generating. All they wanted was a collection of Websites. BUG= 430999 , 601627 Review-Url: https://codereview.chromium.org/2156273003 Cr-Commit-Position: refs/heads/master@{#406966} [modify] https://crrev.com/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ManageSpaceActivity.java [modify] https://crrev.com/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java [modify] https://crrev.com/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java [modify] https://crrev.com/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java [modify] https://crrev.com/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java [modify] https://crrev.com/fc4b6a7702df12a0f1f55122e13231f1c4c7ebff/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferencesTest.java
,
Jul 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef commit dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef Author: reillyg <reillyg@chromium.org> Date: Fri Jul 22 19:09:23 2016 Reland: Add USB device permissions to individual site settings on Android. This patch makes it possible to view and revoke permission to access a USB device by going to an origin's "site settings" page. This is a reland of r405887. BUG= 430999 , 601627 Review-Url: https://codereview.chromium.org/2170123002 Cr-Commit-Position: refs/heads/master@{#407224} [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/res/drawable-hdpi/settings_usb.png [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/res/drawable-mdpi/settings_usb.png [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/res/drawable-xhdpi/settings_usb.png [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/res/drawable-xxhdpi/settings_usb.png [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/res/drawable-xxxhdpi/settings_usb.png [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/res/layout/usb_permission.xml [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java [add] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbInfo.java [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/android/java_sources.gni [modify] https://crrev.com/dab75c76cbefbf6355f6c8e6e013b741bf6ad4ef/chrome/browser/android/preferences/website_preference_bridge.cc
,
Jul 27 2016
Screenshot of the UI added in https://codereview.chromium.org/2185213002. For now I am reusing the text "- Allowed" that is displayed for other types of permissions. The mocks show "- Connected" but that will require more infrastructure to communicate the device connection state into this UI.
,
Jul 28 2016
Thanks for the screenshot! Looks good.
,
Jul 29 2016
Can you post a screenshot of what it looks like with multiple USB devices and some other permissions (e.g. geolocation)?
,
Jul 29 2016
,
Jul 31 2016
Thanks. There is only one USB device there, what does it look like with two or three?
,
Aug 1 2016
The same, just with 2 or 3. After I get these patches landed I'm going to look into what to do when there are two devices with the same name as as you can see from the screenshot displaying the same text multiple times isn't very helpful. In site settings there's room for some text below the device name such as the serial number. Not sure about in this drop-down. Maybe since these screen doesn't have edit controls we should just deduplicate by name and provide the more detailed view when you tap "site settings".
,
Aug 1 2016
I sent this screengrab to maxwalker@, a designer thinking about page info. If we can get the editable options back into page info, distinguishing the titles here will become more important. I think Bluetooth had the same trouble and was going to append the title with some ID number (not sure if all users could distinguish them this way but perhaps this would work here as well.)
,
Aug 2 2016
I think this is fine for experimenting but I'm not sure that we should release this. My main concern is how scalable this is. Does it just show currently connected USB devices, or all the USb devices the page has been granted access to? Some other concerns: - seems inconsistent with how we do other permissions, e.g. all cameras are lumped under one thing currently - the multiple-device-same-name problem
,
Aug 2 2016
rolfe@, what do you think about displaying "$DEVICE_NAME" for a single device and "$DEVICE_NAME and $N other devices" for more than one device? Tapping "SITE SETTINGS" will then display the full list. I don't want to just say "USB - Allowed" because unlike the camera the permission doesn't apply to all USB devices.
,
Aug 3 2016
+maxwalker who has started to revisit the page info dialog in case of a second opinion! What's the likelihood of a user having >1 USB devices attached? Seems low, very power-user. Regardless, it would be hard security-wise to know which one to show. First attached? Most recently attached? Is a camera or mic more sensitive? That's why they are listed individually (like bluetooth devices) as we don't know what they are, which makes them different from cameras (I think I've got that right!) My vote for now would be to keep them listed separately. But it would only be for connected devices, not all the ones that have been granted permission. Would that resolve the concern, benwells@? Probably not 100% but hoping a step in the right direction, and maybe maxwalker@ has alternative ideas to explore for a future page info.
,
Aug 3 2016
It depends on whether all devices the site has access to are shown, or just the ones currently attached. I think it will be unlikely for users to have multiple devices concurrently attached, but quite common for users to grant multiple devices over a period of time. I can imagine use cases for this where users could easily grant access to tens of devices, e.g. some smart but small / cheap device which people buy many of and configure over usb.
,
Aug 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/58f82ab510dc67bbf55c60f99abe8e1339534c19 commit 58f82ab510dc67bbf55c60f99abe8e1339534c19 Author: reillyg <reillyg@chromium.org> Date: Wed Aug 03 01:49:52 2016 Display USB devices in the site settings popup on Android. This patch adds USB devices (and any other type of chosen object that is defined in the future such as Bluetooth devices) to the list of permissions displayed in the site settings popup on Android that is displayed when the site icon is tapped. BUG= 601627 Review-Url: https://codereview.chromium.org/2185213002 Cr-Commit-Position: refs/heads/master@{#409425} [modify] https://crrev.com/58f82ab510dc67bbf55c60f99abe8e1339534c19/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ContentSettingsResources.java [modify] https://crrev.com/58f82ab510dc67bbf55c60f99abe8e1339534c19/chrome/browser/ui/android/website_settings_popup_android.cc [modify] https://crrev.com/58f82ab510dc67bbf55c60f99abe8e1339534c19/chrome/browser/ui/website_settings/website_settings.cc [modify] https://crrev.com/58f82ab510dc67bbf55c60f99abe8e1339534c19/chrome/browser/ui/website_settings/website_settings.h
,
Aug 3 2016
OK awesome. In my mind for USB it would be connected devices only showing up in page info. Probably more an issue for Bluetooth where you could have multiple devices connected (not USB port limit.) But at the moment I'm comfortable showing all of them and seeing if there's a better grouping solution in a future evolution of page info. I like your concept of mapping them somewhat to cameras/mics (wish we could do it more officially if we only knew what the USB and Bluetooth devices were.)
,
Aug 3 2016
Screenshots of the new preference screens in https://codereview.chromium.org/2159533002. Tapping a device in the list (sorry, both of these devices have the same name and I haven't added plumbing for serial numbers next) will bring you to the screen displaying all the sites with permission to access that device.
,
Aug 3 2016
Understood on naming. Looks good so far!
,
Aug 4 2016
Reilly, can you confirm that only the currently connected devices would show up in the page info dialog?
,
Aug 4 2016
Currently all devices show up in the page info dialog.
,
Aug 5 2016
In the current implementation if the user arrives back at the "device detail" screen (the first screenshot above) and there are no longer any sites left with permission to access the device then they are automatically sent back to the "usb settings" screen (the second screenshot above). The reasoning here is that continuing to show the device and simply displaying the device name and a useless 'x' button isn't very intuitive if the user has just cleared a site's permission to access it. The result is clearer if they are sent all the way back to the list of devices which may, if there are no more, simply say "you do not have any website settings" (see new screenshot). The question that came up in the review is that it may take a fraction of a second for the activity to refresh the list of sites and decide to dismiss itself and this itself could be confusing. An opinion from UX would be appreciated. If my explanation is unclear I can do a demo.
,
Aug 5 2016
Good point. Can you use a spinner in the center of the screen until everything is resolved? Might have to prolong it a bit beyond a fraction of a second. But I like that the spinner is an element we already have in the build and it saves you having to add a new string/subsequent translations. Probably the transition will be trickiest to get right. Might have to meet to work out that bit.
,
Aug 5 2016
I should have added, the settings loading taking any time at all is mostly a theory. In practice I've never seen it take a noticeable amount of time and none of the other preference screens have an affordance for loading time. The question was really about the automatic dismissal of the intermediate activity when permissions are cleared.
,
Aug 6 2016
Sync settings used to have a spinner affordance for loading, or least it was pitched but maybe we didn't go in that direction. The affordance I don't know that we have existing actually is automatic dismissal, although I'm sure there's something if we just think about it more... You could do something like "Clear & reset" for a single site's settings. Animate out the screen back to the most useful USB settings page. If there's no USB devices I'd go all the way to the main site settings list. Possibly want an undo toast (like when clearing a bookmark) if this feels too easily done but for now it's not needed. Do we still need to think of an empty state for USB devices? We could use "No USB devices here" It's similar to a recently approved string in UI Review for a different project: https://groups.google.com/a/google.com/forum/#!topic/chrome-ui-review/ERFhr3W3Ogc
,
Aug 11 2016
Screenshot #1, a device after all permissions have been revoked. This is the same empty list (with no text) we see for things like location permission. Screenshot #2, the USB preference screen when no device permissions are stored. I've updated the string to be more specific than the generic message we use other places like the storage preference screen.
,
Aug 11 2016
Strings are always tricky. You could go a couple different directions, and even then everyone has an opinion! Do I have it right that if you were to hit the "x" button you'd get the empty screen with the string? I think because in the non-empty state it lists devices rather than sites with access, you could still go with "No USB devices here" Or you could go with a completely different empty state. Something like the off state for Data Saver that includes more helpful text. "USB devices will appear here as you grant access through browsing." Or something like that.
,
Aug 11 2016
rolfe@ and I discussed this offline and decided to keep the automatic dismissal of UsbDevicePreferences when there are no more sites to display. She will also send the strings for UI review.
,
Aug 11 2016
rolfe@ and I discussed this offline and decided to keep the automatic dismissal of UsbDevicePreferences when there are no more sites to display. She will also send the strings for UI review.
,
Aug 16 2016
Empty state string will be "No Bluetooth devices here" See UI review thread for details: https://groups.google.com/a/google.com/forum/#!topic/chrome-ui-review/-SxR3sKdgvI Separate bug logged for the site settings one in general: https://bugs.chromium.org/p/chromium/issues/detail?id=638291
,
Aug 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e11e868ed72f931b1fc1f72df3475e5698462057 commit e11e868ed72f931b1fc1f72df3475e5698462057 Author: reillyg <reillyg@chromium.org> Date: Thu Aug 18 01:51:41 2016 Add a section to Site Settings listing USB devices. The new section lists USB devices that the user has granted a website permission to access. Tapping on a particular device brings you to the site settings view for that site. BUG= 601627 Review-Url: https://codereview.chromium.org/2159533002 Cr-Commit-Position: refs/heads/master@{#412722} [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/res/xml/site_settings_preferences.xml [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/res/xml/usb_chooser_preferences.xml [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/res/xml/usb_device_preferences.xml [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbChooserPreferences.java [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbDevicePreferences.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbInfo.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java_sources.gni
,
Aug 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e11e868ed72f931b1fc1f72df3475e5698462057 commit e11e868ed72f931b1fc1f72df3475e5698462057 Author: reillyg <reillyg@chromium.org> Date: Thu Aug 18 01:51:41 2016 Add a section to Site Settings listing USB devices. The new section lists USB devices that the user has granted a website permission to access. Tapping on a particular device brings you to the site settings view for that site. BUG= 601627 Review-Url: https://codereview.chromium.org/2159533002 Cr-Commit-Position: refs/heads/master@{#412722} [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/res/xml/site_settings_preferences.xml [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/res/xml/usb_chooser_preferences.xml [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/res/xml/usb_device_preferences.xml [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbChooserPreferences.java [add] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbDevicePreferences.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/UsbInfo.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/e11e868ed72f931b1fc1f72df3475e5698462057/chrome/android/java_sources.gni
,
Aug 23 2016
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by reillyg@chromium.org
, Apr 7 2016