DescriptionSimplify RecordPermissionAction and Android permission callback
This simplifies RecordPermissionAction and the Android permission
callback in MediaStreamDevicesController. RecordPermissionAction is
changed to pass in whether mic/camera are being requested rather than
passing in the entire request.
The Android OS permission callback is changed in several ways:
1) The callback used to be a standalone function, which then called into
member functions in MediaStreamDevicesController. It now just calls into
a member function directly, removing a layer of indirection.
2) It used to call into PermissionGranted on success which would then call
RunCallback with the appropriate arguments. Instead we just call
RunCallback directly in that case, as no modifying of the content
settings values is needed.
3) It used to call into ForcePermissionDeniedTemporarily in the denial
case. This would call RunCallback with CONTENT_SETTING_BLOCK passed for
both mic/camera. This is actually slightly incorrect, and we only need
to change the settings that were previously CONTENT_SETTING_ALLOW to
BLOCK (as the setting may not have been requested at all). This is done
and then RunCallback is called directly.
4) set_persist() does not need to be called as settings are only
persisted when they are initially set to CONTENT_SETTING_ASK. That
cannot be the case at the point this code is reached.
BUG=596786
Review-Url: https://codereview.chromium.org/2815933003
Cr-Commit-Position: refs/heads/master@{#465440}
Committed: https://chromium.googlesource.com/chromium/src/+/6093fbaf1efb92bfde140f4dbe17e7b38c2fa39f
Patch Set 1 #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 12 (8 generated)
|