Chromium Code Reviews
Descriptionmedia: Add a web preference to enable encrypted media
Add a WebPreference encrypted_media_enabled. If it's set to false, all requestMediaKeySystemAccess() calls will return a rejected promise with NotSupportedError.
Also connect |encrypted_media_enabled| with a new Chrome preference kWebKitEncryptedMediaEnabled and make sure when user changes that preference, the Web preference in the renderer process will get updated.
Note that the check is only done in requestMediaKeySystemAccess(). So if a user disabled the preference after a protected content playback already started, the playback session will not be affected. However, all newer protected content playback attempt will fail.
BUG=689778
TEST=Manually tested.
Review-Url: https://codereview.chromium.org/2676633006
Cr-Commit-Position: refs/heads/master@{#449048}
Committed: https://chromium.googlesource.com/chromium/src/+/d252d7b55af16f3edbb90d1132cf6ff360f7d11f
Patch Set 1 : renderer preference #Patch Set 2 : web preference #Patch Set 3 : Reuse kEnableDRM #Patch Set 4 : media: Add an option to disable requestMediaKeySystemAccess() #
Total comments: 4
Patch Set 5 : rebase only #Patch Set 6 : comments #Patch Set 7 : add a browser test #
Total comments: 2
Patch Set 8 : rebase #Patch Set 9 : reject promise with NotSupportedError #Patch Set 10 : NotSupportedError #Patch Set 11 : use a new pref #Dependent Patchsets: Messages
Total messages: 70 (53 generated)
|