Chromium Code Reviews
DescriptionIntroduce MediaDevicesPermissionChecker.
This class makes it easier to check device permissions.
It is similar to MediaStreamUIProxy, but it has the following advantages:
* Easier to check permissions for multiple device types in a single call.
* Uses MediaDeviceType instead of MediaStreamType to refer to device types.
* Simpler design.
Current users are MediaDevicesDispatcherHost and AudioRendererHost.
This will make it easier to check for permissions in the mojo version of
devicechange notifications.
Once MediaDevice permissions are revamped, maybe this class might substitute
MediaStreamUIProxy.
Originally, the intention was to use PermissionManager, but several tests expect
permissions to be checked via the RenderFrameHostDelegate, so this will have
to wait.
Also, the plan was to place this in content/browser/renderer_host/media since
it is used only by *Host classes, but it is illegal to include
"content/browser/frame_host" from there (MediaStreamUIProxy got a free pass).
BUG=648183
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/df036b3c1846ea332f5196edd6f578f802cb8ef7
Cr-Commit-Position: refs/heads/master@{#428709}
Patch Set 1 #
Total comments: 15
Patch Set 2 : address xhwang's comments #Messages
Total messages: 29 (15 generated)
|