Issue metadata
Sign in to add a comment
|
MacViews: device permissions dialog ready to go |
||||||||||||||||||||||||||
Issue descriptionThis dialog appears to be summoned when granting access from an extension to a USB or HID device. Need to figure out how to summon it on demand, and see what parts of it, if any, need to be fixed up.
,
May 17 2016
Here's what this dialog looks like on my Macbook with Cocoa.
,
May 17 2016
Here's the Views one.
,
May 17 2016
A simple conversion CL is up: https://codereview.chromium.org/1989543002/
,
May 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b74909cbced955d38dd10db3dbb0252d32a5f91b commit b74909cbced955d38dd10db3dbb0252d32a5f91b Author: ellyjones <ellyjones@chromium.org> Date: Tue May 17 22:43:00 2016 MacViews: support Views device permission prompt This is a straightforward conversion. The Views implementation is moved ontoo Mac, and a shim added for the Cocoa implementation to optionally summon the Views version of the dialog. Screenshots of both dialogs are attached to the bug. BUG= 610430 Review-Url: https://codereview.chromium.org/1989543002 Cr-Commit-Position: refs/heads/master@{#394252} [modify] https://crrev.com/b74909cbced955d38dd10db3dbb0252d32a5f91b/chrome/browser/extensions/api/chrome_device_permissions_prompt.h [modify] https://crrev.com/b74909cbced955d38dd10db3dbb0252d32a5f91b/chrome/browser/ui/cocoa/extensions/device_permissions_dialog_controller.mm [modify] https://crrev.com/b74909cbced955d38dd10db3dbb0252d32a5f91b/chrome/browser/ui/views/browser_dialogs_views.cc [modify] https://crrev.com/b74909cbced955d38dd10db3dbb0252d32a5f91b/chrome/browser/ui/views/extensions/device_permissions_dialog_view.cc [modify] https://crrev.com/b74909cbced955d38dd10db3dbb0252d32a5f91b/chrome/chrome_browser_ui.gypi
,
Aug 4 2016
Attaching current state at r409749 (probably not much different vs #c3)
,
Sep 12 2016
As of r417913 - looking very similar, since we've done no work on tableview.
,
Sep 21 2016
,
Sep 23 2016
,
Sep 27 2016
As of current stable (53.0.2785.116).
,
Oct 8 2016
Spec is here: https://folio.googleplex.com/chrome-ux-specs-and-sources/Chrome%20browser%20(MD)/Secondary%20UI%20Previews%20and%20specs%20(exports)/Spec/Phase%202#%2FSPEC-Phase%202-Device%20permission.png%3Fz=width
,
Oct 11 2016
,
Oct 11 2016
Initial comments: Buttons should be 16pt from bottom of dialog Rightmost button, and scrollview above, should be 16pt from right edge of dialog Not the required space between the dialog title and the sub title Distance between left edge of dialog and controls should be 16pt Distance between buttons should be 8pt Distance between top of buttons and scrollview should be 16pt Distance between subtitle and top of scrollview should be 16pt
,
Oct 11 2016
,
Oct 11 2016
* Dialog should be 450pt x 284pt
,
Oct 11 2016
* Dialog should be 448pt x ~284pt
,
Dec 12 2016
,
Jan 26 2017
After https://codereview.chromium.org/2654323002/ all the things in #13 should be fixed. The title ("Select a USB device") appears to have been removed so that point about spacing is no longer relevant, and the others are included in this CL.
,
Jan 26 2017
Can you attach a screenshot?
,
Jan 30 2017
screenshot attached :)
,
Jan 31 2017
Looking better. Some more changes (from the spec): * Dialog height should be around 556pt * The dialog width should be increased by 34pt so that the scrollview is 416pt wide * Dialog title should be "Select a USB device" (with title case on Mac, other case elsewhere) * The dialog message should be (without a trailing colon) The application "USB Device Info" is requesting access to one of your devices Lastly, in the next screenshot you take can you select one of the items so that I see what that looks like? Should the dialog appear with one of the items (like the first one) already selected?
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/311566f4127c78cc085c99e52833592c673fed01 commit 311566f4127c78cc085c99e52833592c673fed01 Author: ellyjones <ellyjones@chromium.org> Date: Thu Feb 09 17:07:42 2017 harmony: convert device chooser The device chooser now uses Harmony layout constants throughout. BUG= 610430 Review-Url: https://codereview.chromium.org/2654323002 Cr-Commit-Position: refs/heads/master@{#449330} [modify] https://crrev.com/311566f4127c78cc085c99e52833592c673fed01/chrome/browser/ui/views/collected_cookies_views.cc [modify] https://crrev.com/311566f4127c78cc085c99e52833592c673fed01/chrome/browser/ui/views/device_chooser_content_view.cc [modify] https://crrev.com/311566f4127c78cc085c99e52833592c673fed01/chrome/browser/ui/views/device_chooser_content_view.h [modify] https://crrev.com/311566f4127c78cc085c99e52833592c673fed01/chrome/browser/ui/views/extensions/chooser_dialog_view.cc [modify] https://crrev.com/311566f4127c78cc085c99e52833592c673fed01/ui/views/window/dialog_client_view.cc [modify] https://crrev.com/311566f4127c78cc085c99e52833592c673fed01/ui/views/window/dialog_client_view.h
,
Feb 11 2017
Hi, I think the above CL broke the device chooser on Chrome browser. I attached the screenshot. To reproduce the chooser, open Chrome with flag:
--enable-experimental-web-platform-features
go to: More tools -> Developer tools, select the Console tab, and run the following Javascript code:
device = navigator.usb.requestDevice({filters: [{}]})
The above CL removed the GetPreferredSize() function from //chrome/browser/ui/views/device_chooser_content_view.h
which is used by chooser to setup its size on both Chrome browser and Chrome apps/extension.
The CL added code related to the chooser size to:
//chrome/browser/ui/views/extensions/chooser_dialog_view.cc
and this is only for chooser on Chrome apps/extension, so I think similar code needs to be added to:
https://cs.chromium.org/chromium/src/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc?q=ChooserBubbleUiViewDelegate&l=38
which is for chooser on Chrome browser.
,
Feb 13 2017
That dialog is missing a minimum size. I'll add one.
,
Feb 13 2017
Thanks!
,
Feb 27 2017
,
Feb 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b7312b4e50b6e10b9382e6adeddf9441112db608 commit b7312b4e50b6e10b9382e6adeddf9441112db608 Author: ellyjones <ellyjones@chromium.org> Date: Tue Feb 28 19:10:01 2017 harmony: fix sizing on webusb chooser dialog The change in https://codereview.chromium.org/2654323002 removed the minimum size of the content view used in this dialog, but did not replace it with a dialog-level minimum size. This change: 1) Has BubbleDialogDelegateView honor its own GetMinimumSize(); 2) Implements GetMinimumSize on ChooserBubbleUiViewDelegate BUG= 610430 Review-Url: https://codereview.chromium.org/2692113002 Cr-Commit-Position: refs/heads/master@{#453657} [modify] https://crrev.com/b7312b4e50b6e10b9382e6adeddf9441112db608/chrome/browser/ui/views/device_chooser_content_view.cc [modify] https://crrev.com/b7312b4e50b6e10b9382e6adeddf9441112db608/chrome/browser/ui/views/device_chooser_content_view.h
,
May 2 2017
Edit: make sure you use https, or the USB button on permission.site does nothing. (from Issue 711178 ) Note there's an alternate codepath for showing this bubble which doesn't appear to be behind --secondary-ui-md yet (as at 60.0.3086.0). Steps: 1) Enable chrome://flags/#enable-experimental-web-platform-features 2) Navigate to https://permission.site/ 3) Click "USB" (or "Bluetooth") This should be an easy one. The code is mostly shared with the dialog that appears for the apps API. So probably already compiled in, just missing a bit of plumbing.
,
May 2 2017
#29, a draft CL to plumb through the device chooser bubble - https://codereview.chromium.org/2853143003/ .
,
May 4 2017
A few samples from Mac:
,
May 4 2017
Can you also post some screenshots from ChromeOS? I noticed the chooser from the above screenshots doesn't have the arrow points to the omnibox. I uploaded some screenshots from Mac and ChromeOS which have the arrow, and they are built from the current master repo.
,
May 4 2017
https://codereview.chromium.org/2853143003/ isn't changing ChromeOS. To see how the chooser looks there, just flip chrome://flags/#secondary-ui-md to Enabled.
,
May 5 2017
I see. Thanks.
,
May 5 2017
#32, yes, the arrow is gone with chrome://flags/#secondary-ui-md and alignment is changed to line with the location bar.
,
Aug 9 2017
,
Sep 5 2017
,
Sep 5 2017
,
Oct 6 2017
Elly: can this bug be closed or duplicated with bug 654137 ?
,
Oct 9 2017
,
Nov 10 2017
The NextAction date has arrived: 2017-11-10 |
|||||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||||
Comment 1 by ellyjo...@chromium.org
, May 9 2016