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

Issue 1404213004: Reland: Add webusb permission bubble mojom (Closed)

Created:
5 years, 2 months ago by juncai
Modified:
4 years, 11 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@webusb_permission_ui_1_refactor_permission_bubble_manager
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: Add webusb permission bubble mojom This patch added webusb permission bubble mojom. It has function GetPermission to get a device after user has granted permission to it. And this function is used by class WebUSBClientImpl. BUG=492204 Committed: https://crrev.com/9e3fbccf392bc87e66424051e94978d7802bba0e Cr-Commit-Position: refs/heads/master@{#354442} Committed: https://crrev.com/09f57e5938da96e39cc0739d78d52019fb686a82 Cr-Commit-Position: refs/heads/master@{#354597}

Patch Set 1 : added webusb permission bubble mojom #

Total comments: 4

Patch Set 2 : updated code according to reillyg@'s nits #

Total comments: 3

Patch Set 3 : set upstream to origin/master and rebase #

Patch Set 4 : updated webusb.gypi dependencies #

Patch Set 5 : updated webusb.gypi dependencies again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -8 lines) Patch
M components/webusb.gypi View 1 2 3 4 2 chunks +24 lines, -0 lines 0 comments Download
M components/webusb/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A + components/webusb/public/interfaces/BUILD.gn View 1 chunk +5 lines, -4 lines 0 comments Download
A components/webusb/public/interfaces/webusb_permission_bubble.mojom View 1 1 chunk +19 lines, -0 lines 0 comments Download
A content/child/mojo/type_converters.h View 1 chunk +20 lines, -0 lines 0 comments Download
M content/content_child.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 2 chunks +4 lines, -1 line 0 comments Download
M content/renderer/usb/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/usb/web_usb_client_impl.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/usb/web_usb_client_impl.cc View 1 3 chunks +33 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
juncai
nick@chromium.org: Please review changes in content/child/mojo/type_converters.h content/content_child.gypi content/content_renderer.gypi content/renderer/BUILD.gn reillyg@chromium.org: Please review changes in the ...
5 years, 2 months ago (2015-10-14 21:03:03 UTC) #2
Reilly Grant (use Gerrit)
lgtm with nits https://codereview.chromium.org/1404213004/diff/1/components/webusb/public/interfaces/webusb_permission_bubble.mojom File components/webusb/public/interfaces/webusb_permission_bubble.mojom (right): https://codereview.chromium.org/1404213004/diff/1/components/webusb/public/interfaces/webusb_permission_bubble.mojom#newcode11 components/webusb/public/interfaces/webusb_permission_bubble.mojom:11: GetPermission(array<device.usb.DeviceFilter> device_filters) Please document what this ...
5 years, 2 months ago (2015-10-14 21:08:48 UTC) #3
juncai
https://codereview.chromium.org/1404213004/diff/1/components/webusb/public/interfaces/webusb_permission_bubble.mojom File components/webusb/public/interfaces/webusb_permission_bubble.mojom (right): https://codereview.chromium.org/1404213004/diff/1/components/webusb/public/interfaces/webusb_permission_bubble.mojom#newcode11 components/webusb/public/interfaces/webusb_permission_bubble.mojom:11: GetPermission(array<device.usb.DeviceFilter> device_filters) On 2015/10/14 21:08:47, Reilly Grant wrote: > ...
5 years, 2 months ago (2015-10-14 22:54:37 UTC) #4
ncarter (slow)
https://codereview.chromium.org/1404213004/diff/20001/content/renderer/usb/web_usb_client_impl.cc File content/renderer/usb/web_usb_client_impl.cc (right): https://codereview.chromium.org/1404213004/diff/20001/content/renderer/usb/web_usb_client_impl.cc#newcode12 content/renderer/usb/web_usb_client_impl.cc:12: #include "content/child/mojo/type_converters.h" I'm not very familiar with mojo, and ...
5 years, 2 months ago (2015-10-15 20:41:15 UTC) #5
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1404213004/diff/20001/content/renderer/usb/web_usb_client_impl.cc File content/renderer/usb/web_usb_client_impl.cc (right): https://codereview.chromium.org/1404213004/diff/20001/content/renderer/usb/web_usb_client_impl.cc#newcode12 content/renderer/usb/web_usb_client_impl.cc:12: #include "content/child/mojo/type_converters.h" On 2015/10/15 20:41:15, ncarter wrote: > I'm ...
5 years, 2 months ago (2015-10-15 20:48:24 UTC) #6
ncarter (slow)
https://codereview.chromium.org/1404213004/diff/20001/content/renderer/usb/web_usb_client_impl.cc File content/renderer/usb/web_usb_client_impl.cc (right): https://codereview.chromium.org/1404213004/diff/20001/content/renderer/usb/web_usb_client_impl.cc#newcode12 content/renderer/usb/web_usb_client_impl.cc:12: #include "content/child/mojo/type_converters.h" On 2015/10/15 20:48:24, Reilly Grant wrote: > ...
5 years, 2 months ago (2015-10-15 21:01:29 UTC) #7
Reilly Grant (use Gerrit)
As Nick pointed out we've been adding Mojo interfaces for WebUSB that cross the renderer/browser ...
5 years, 2 months ago (2015-10-15 22:23:01 UTC) #9
Tom Sepez
On 2015/10/15 22:23:01, Reilly Grant wrote: > As Nick pointed out we've been adding Mojo ...
5 years, 2 months ago (2015-10-15 22:58:18 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1404213004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1404213004/40001
5 years, 2 months ago (2015-10-16 03:54:35 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 2 months ago (2015-10-16 03:59:18 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/9e3fbccf392bc87e66424051e94978d7802bba0e Cr-Commit-Position: refs/heads/master@{#354442}
5 years, 2 months ago (2015-10-16 04:00:26 UTC) #15
Mark P
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/1409023002/ by mpearson@chromium.org. ...
5 years, 2 months ago (2015-10-16 04:26:24 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1404213004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1404213004/80001
5 years, 2 months ago (2015-10-16 21:07:19 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 2 months ago (2015-10-16 21:15:00 UTC) #20
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/09f57e5938da96e39cc0739d78d52019fb686a82 Cr-Commit-Position: refs/heads/master@{#354597}
5 years, 2 months ago (2015-10-16 21:16:42 UTC) #21
jam
content can only depend on components shared with html_viewer, i.e. per this comment https://chromium.googlesource.com/chromium/src/+/master/content/renderer/DEPS#2 DEPS ...
4 years, 11 months ago (2016-01-21 17:32:32 UTC) #22
jam
On 2016/01/21 17:32:32, jam wrote: > content can only depend on components shared with html_viewer, ...
4 years, 11 months ago (2016-01-21 18:12:42 UTC) #23
juncai
4 years, 11 months ago (2016-01-21 18:40:44 UTC) #24
Message was sent while issue was closed.
On 2016/01/21 18:12:42, jam wrote:
> On 2016/01/21 17:32:32, jam wrote:
> > content can only depend on components shared with html_viewer, i.e. per this
> > comment
> >
>
https://chromium.googlesource.com/chromium/src/+/master/content/renderer/DEPS#2
> > 
> > DEPS a few layers underneath top level ones in content can't override this.
> > 
> > This code appears to be just using components/webusb as a directory to get
> > around the fact that content can't include files from chrome. so the mojo
> > interface is put in components so that content can call it and chrome can
> > implement it.
> > 
> > with chrome IPCs, we had a strict rule from the beginning of the
> content/chrome
> > split that IPCs are not an API boundary between the two. for all these
> > permission style requests, content could call its embedder through the
various
> > Request* or Allow* methods on ContentBrowserClient or ContentRendererClient
> > delegate interfaces.
> > 
> > Perhaps we would rethink this as we're switching code to use more mojo in
> > general, but that's beyond the scope of this cl and we still have to figure
it
> > out. Until then, this code needs to quickly fix things by using the existing
> way
> > of doing things for consistency (i.e. go through CBC or CRC interfaces).
> 
> ok i thought about this some more, and ben and i chatted about this as well.
> 
> where we want to get to is reduced layering and busy work. so it follows that
> content/renderer can call chrome through a mojom, and we shouldn't have extra
> layers in between. however it should still be clear where this api boundary
is,
> so this mojom should be in content/public.
> 
> webusb_permission_bubble.mojom should then be moved to content/public. Also,
it
> shouldn't say permission bubble anywhere, since that is a chrome UI concept
and
> other embedders of content can have different or no UI. so it should just be
> something like WebUSBPermissionRequest.

Thanks a lot! I'll make the code change in a new patch.

Powered by Google App Engine
This is Rietveld 408576698