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

Issue 2676633006: media: Add a web preference to enable encrypted media (Closed)

Created:
3 years, 10 months ago by xhwang
Modified:
3 years, 10 months ago
Reviewers:
tommycli, jam, dcheng, jrummell
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, feature-media-reviews_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org, jam, eric.carlson_apple.com, haraken, darin-cc_chromium.org, blink-reviews, Srirama, pastarmovj, ddorwin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

media: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -3 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/media/encrypted_media_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/ui/prefs/prefs_tab_helper.cc View 1 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/web_preferences.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/web_preferences.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Settings.json5 View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebSettings.h View 1 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 70 (53 generated)
xhwang
Just FYI for now. As discussed offline.
3 years, 10 months ago (2017-02-04 06:45:03 UTC) #12
xhwang
tommycli, jrummell: PTAL ddorwin, pastarmovj: FYI
3 years, 10 months ago (2017-02-06 23:59:55 UTC) #22
tommycli
overall looks good. I'd suggest writing either a Webkit-test or browser test also. https://codereview.chromium.org/2676633006/diff/80001/chrome/browser/ui/prefs/prefs_tab_helper.cc File ...
3 years, 10 months ago (2017-02-07 00:14:59 UTC) #25
xhwang
Comments addressed. For the test, do you know any example where we toggle content settings ...
3 years, 10 months ago (2017-02-07 06:18:10 UTC) #30
jrummell
lgtm
3 years, 10 months ago (2017-02-07 18:35:05 UTC) #33
xhwang
Browser test added! tommycli: PTAL again! jrummell: FYI
3 years, 10 months ago (2017-02-07 20:30:15 UTC) #38
tommycli
nice test lgtm
3 years, 10 months ago (2017-02-07 21:25:48 UTC) #43
jrummell
Thanks for adding a test. Still lgtm. https://codereview.chromium.org/2676633006/diff/140001/chrome/browser/media/encrypted_media_browsertest.cc File chrome/browser/media/encrypted_media_browsertest.cc (right): https://codereview.chromium.org/2676633006/diff/140001/chrome/browser/media/encrypted_media_browsertest.cc#newcode552 chrome/browser/media/encrypted_media_browsertest.cc:552: PlayTwice::NO, kEmeNotSupportedError); ...
3 years, 10 months ago (2017-02-07 21:30:48 UTC) #44
xhwang
https://codereview.chromium.org/2676633006/diff/140001/chrome/browser/media/encrypted_media_browsertest.cc File chrome/browser/media/encrypted_media_browsertest.cc (right): https://codereview.chromium.org/2676633006/diff/140001/chrome/browser/media/encrypted_media_browsertest.cc#newcode552 chrome/browser/media/encrypted_media_browsertest.cc:552: PlayTwice::NO, kEmeNotSupportedError); On 2017/02/07 21:30:48, jrummell wrote: > The ...
3 years, 10 months ago (2017-02-07 22:29:59 UTC) #49
xhwang
dcheng@chromium.org: Please OWNERS review changes in third_party/Webkit/ jam@chromium.org: Please OWNERS review changes in content/ and ...
3 years, 10 months ago (2017-02-07 22:34:18 UTC) #51
dcheng
blink + ipc lgtm
3 years, 10 months ago (2017-02-07 23:28:01 UTC) #52
jam
lgtm
3 years, 10 months ago (2017-02-08 01:43:58 UTC) #55
tommycli
On 2017/02/08 01:43:58, jam wrote: > lgtm patchset 10->11 lgtm still
3 years, 10 months ago (2017-02-08 18:21:58 UTC) #62
xhwang
jam: In PS11 I added a new Chrome preference instead of using an existing one ...
3 years, 10 months ago (2017-02-08 18:30:03 UTC) #63
jam
lgtm
3 years, 10 months ago (2017-02-08 18:36:56 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2676633006/220001
3 years, 10 months ago (2017-02-08 18:38:27 UTC) #67
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 18:53:23 UTC) #70
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/d252d7b55af16f3edbb90d1132cf...

Powered by Google App Engine
This is Rietveld 408576698