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

Issue 265993002: Add Promises for EME (Chromium side) (Closed)

Created:
6 years, 7 months ago by jrummell
Modified:
6 years, 6 months ago
CC:
chromium-reviews, noelallen1, binji+watch_chromium.org, yusukes+watch_chromium.org, tzik, fischman+watch_chromium.org, avayvod+watch_chromium.org, jam, mcasas+watch_chromium.org, raymes+watch_chromium.org, asvitkine+watch_chromium.org, feature-media-reviews_chromium.org, teravest+watch_chromium.org, darin-cc_chromium.org, nfullagar1, piman+watch_chromium.org, wjia+watch_chromium.org, jar (doing other things), ihf+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add Promises for EME (Chromium side) Now that the EME-WD spec has changed to specify promises, implement them on the Chromium side. They currently get converted back to events before passing them to blink:: until the blink interface gets changed. Additional changes in this CL: 1. Pass a reference to the promise though PPAPI. 2. Roll DEPS for CDM.h to include CDM_5. 3. Update cdm_adapter to use CDM_5 (in addition to existing CDM_4). 4. Change External Clear Key to use CDM_5. 5. Since CDM_5 references sessions by the actual session id (a string, web_session_id), switch to using it rather than the previously used session_id (which is an integer, and used as a reference). BUG=358271 TEST=all existing encrypted media layout and browser tests pass Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275656

Patch Set 1 #

Total comments: 95

Patch Set 2 : cdm_promise template #

Total comments: 8

Patch Set 3 : Android compile #

Patch Set 4 : rebase #

Patch Set 5 : latest CDM_5 #

Total comments: 76

Patch Set 6 : updates #

Total comments: 10

Patch Set 7 : rebase #

Patch Set 8 : Remove syntaxError #

Patch Set 9 : rebase #

Total comments: 80

Patch Set 10 : rebase #

Patch Set 11 : comments + fewer error codes #

Total comments: 29

Patch Set 12 : Android changes #

Total comments: 7

Patch Set 13 : rebase + comments #

Total comments: 4

Patch Set 14 : Remove PASS_REF #

Total comments: 4

Patch Set 15 : rebase #

Patch Set 16 : renames #

Patch Set 17 : Fix trybot compile problems #

Patch Set 18 : More trybot issues #

Patch Set 19 : One more win trybot issue #

Patch Set 20 : One more trybot issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3079 lines, -1419 lines) Patch
M DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/encrypted_media_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/cdm_session_adapter.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +39 lines, -25 lines 0 comments Download
M content/renderer/media/cdm_session_adapter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +55 lines, -58 lines 0 comments Download
M content/renderer/media/crypto/content_decryption_module_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/media/crypto/content_decryption_module_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +1 line, -8 lines 0 comments Download
M content/renderer/media/crypto/ppapi_decryptor.h View 1 2 3 4 5 6 7 8 9 4 chunks +27 lines, -22 lines 0 comments Download
M content/renderer/media/crypto/ppapi_decryptor.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +98 lines, -64 lines 0 comments Download
M content/renderer/media/crypto/proxy_decryptor.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +12 lines, -34 lines 0 comments Download
M content/renderer/media/crypto/proxy_decryptor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +99 lines, -96 lines 0 comments Download
M content/renderer/media/crypto/proxy_media_keys.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +58 lines, -13 lines 0 comments Download
M content/renderer/media/crypto/proxy_media_keys.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +163 lines, -29 lines 0 comments Download
M content/renderer/media/webcontentdecryptionmodulesession_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +13 lines, -9 lines 0 comments Download
M content/renderer/media/webcontentdecryptionmodulesession_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +66 lines, -29 lines 0 comments Download
M content/renderer/pepper/content_decryptor_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +44 lines, -17 lines 0 comments Download
M content/renderer/pepper/content_decryptor_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10 chunks +167 lines, -54 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +20 lines, -11 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +33 lines, -15 lines 0 comments Download
M media/base/android/browser_cdm_factory_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -5 lines 0 comments Download
M media/base/android/media_player_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M media/base/browser_cdm.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +20 lines, -2 lines 0 comments Download
M media/base/browser_cdm_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -8 lines 0 comments Download
A media/base/cdm_promise.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +87 lines, -0 lines 0 comments Download
A media/base/cdm_promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +74 lines, -0 lines 0 comments Download
M media/base/media_keys.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +51 lines, -26 lines 0 comments Download
M media/cdm/aes_decryptor.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +17 lines, -22 lines 0 comments Download
M media/cdm/aes_decryptor.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +75 lines, -65 lines 0 comments Download
M media/cdm/aes_decryptor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 27 chunks +148 lines, -129 lines 0 comments Download
M media/cdm/ppapi/cdm_adapter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +88 lines, -20 lines 0 comments Download
M media/cdm/ppapi/cdm_adapter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 8 chunks +284 lines, -61 lines 0 comments Download
M media/cdm/ppapi/cdm_wrapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +173 lines, -25 lines 0 comments Download
M media/cdm/ppapi/external_clear_key/clear_key_cdm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +39 lines, -20 lines 0 comments Download
M media/cdm/ppapi/external_clear_key/clear_key_cdm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10 chunks +190 lines, -69 lines 0 comments Download
M media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h View 1 chunk +1 line, -1 line 0 comments Download
M media/cdm/ppapi/supported_cdm_versions.h View 2 chunks +4 lines, -2 lines 0 comments Download
M media/filters/pipeline_integration_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +92 lines, -70 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/examples/pepper_container_app/plugin_instance.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +20 lines, -11 lines 0 comments Download
M mojo/examples/pepper_container_app/plugin_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +26 lines, -11 lines 0 comments Download
M ppapi/api/private/pp_content_decryptor.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +23 lines, -0 lines 0 comments Download
M ppapi/api/private/ppb_content_decryptor_private.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +60 lines, -23 lines 0 comments Download
M ppapi/api/private/ppp_content_decryptor_private.idl View 7 chunks +32 lines, -16 lines 0 comments Download
M ppapi/c/private/pp_content_decryptor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +24 lines, -1 line 0 comments Download
M ppapi/c/private/ppb_content_decryptor_private.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +60 lines, -28 lines 0 comments Download
M ppapi/c/private/ppp_content_decryptor_private.h View 8 chunks +38 lines, -21 lines 0 comments Download
M ppapi/cpp/private/content_decryptor_private.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +25 lines, -13 lines 0 comments Download
M ppapi/cpp/private/content_decryptor_private.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +78 lines, -31 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +111 lines, -99 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +33 lines, -18 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +41 lines, -20 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +110 lines, -40 lines 0 comments Download
M ppapi/proxy/ppp_content_decryptor_private_proxy.h View 1 chunk +10 lines, -6 lines 0 comments Download
M ppapi/proxy/ppp_content_decryptor_private_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +51 lines, -31 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_private.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_content_decryptor_private_thunk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +54 lines, -24 lines 0 comments Download
M ppapi/thunk/ppb_instance_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +20 lines, -11 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
jrummell
PTAL. This is targeted for M36, but might as well get some initial comments now.
6 years, 7 months ago (2014-05-02 18:26:38 UTC) #1
prabhur
https://codereview.chromium.org/265993002/diff/1/content/renderer/media/android/proxy_media_keys.cc File content/renderer/media/android/proxy_media_keys.cc (right): https://codereview.chromium.org/265993002/diff/1/content/renderer/media/android/proxy_media_keys.cc#newcode42 content/renderer/media/android/proxy_media_keys.cc:42: void ProxyMediaKeys::CreateSession( Do we need a bool return value ...
6 years, 7 months ago (2014-05-05 17:57:29 UTC) #2
ddorwin
Feedback on a sampling of files. https://codereview.chromium.org/265993002/diff/1/content/renderer/media/cdm_session_adapter.cc File content/renderer/media/cdm_session_adapter.cc (right): https://codereview.chromium.org/265993002/diff/1/content/renderer/media/cdm_session_adapter.cc#newcode52 content/renderer/media/cdm_session_adapter.cc:52: WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::CreateSession( This ...
6 years, 7 months ago (2014-05-05 18:35:41 UTC) #3
ddorwin
Let's discuss error_name and using an enum. https://codereview.chromium.org/265993002/diff/1/media/cdm/ppapi/cdm_adapter.cc File media/cdm/ppapi/cdm_adapter.cc (right): https://codereview.chromium.org/265993002/diff/1/media/cdm/ppapi/cdm_adapter.cc#newcode1103 media/cdm/ppapi/cdm_adapter.cc:1103: : error_name(error_name), ...
6 years, 7 months ago (2014-05-05 18:37:48 UTC) #4
ddorwin
https://codereview.chromium.org/265993002/diff/1/media/base/media_keys_session_promise.h File media/base/media_keys_session_promise.h (right): https://codereview.chromium.org/265993002/diff/1/media/base/media_keys_session_promise.h#newcode30 media/base/media_keys_session_promise.h:30: class MEDIA_EXPORT MediaKeysSessionPromise { On 2014/05/05 18:35:42, ddorwin wrote: ...
6 years, 7 months ago (2014-05-05 18:44:45 UTC) #5
xhwang
I only reviewed a subset of the files. Let's get the new Promise class sorted ...
6 years, 7 months ago (2014-05-05 20:46:41 UTC) #6
jrummell
I think I've addressed most comments. Major changes is this PS: - cdm_promise is now ...
6 years, 7 months ago (2014-05-08 23:37:44 UTC) #7
jrummell
Fixing the things I noticed. https://codereview.chromium.org/265993002/diff/20001/content/renderer/media/android/proxy_media_keys.cc File content/renderer/media/android/proxy_media_keys.cc (right): https://codereview.chromium.org/265993002/diff/20001/content/renderer/media/android/proxy_media_keys.cc#newcode46 content/renderer/media/android/proxy_media_keys.cc:46: } On 2014/05/08 23:37:46, ...
6 years, 7 months ago (2014-05-09 00:55:23 UTC) #8
jrummell
Updated. Changes to line up with the latest version of CDM.h, plus typedef'ing the promise ...
6 years, 7 months ago (2014-05-13 00:47:53 UTC) #9
ddorwin
Feedback on roughly the same set of files. One comment in PS1. https://codereview.chromium.org/265993002/diff/1/content/renderer/media/cdm_session_adapter.cc File content/renderer/media/cdm_session_adapter.cc ...
6 years, 7 months ago (2014-05-13 22:43:57 UTC) #10
jrummell
Updated. Few renames generated a lot of churn. https://codereview.chromium.org/265993002/diff/80001/content/renderer/media/android/proxy_media_keys.h File content/renderer/media/android/proxy_media_keys.h (right): https://codereview.chromium.org/265993002/diff/80001/content/renderer/media/android/proxy_media_keys.h#newcode71 content/renderer/media/android/proxy_media_keys.h:71: typedef ...
6 years, 7 months ago (2014-05-15 22:38:08 UTC) #11
ddorwin
The files I've been reviewing look good overall. Thanks. I defer to xhwang for a ...
6 years, 7 months ago (2014-05-15 23:15:31 UTC) #12
jrummell
Removing syntax error. PTAL. https://codereview.chromium.org/265993002/diff/100001/content/renderer/media/android/proxy_media_keys.h File content/renderer/media/android/proxy_media_keys.h (right): https://codereview.chromium.org/265993002/diff/100001/content/renderer/media/android/proxy_media_keys.h#newcode125 content/renderer/media/android/proxy_media_keys.h:125: SimplePromiseMap session_id_to_change_session_promise_map_; On 2014/05/15 23:15:32, ...
6 years, 7 months ago (2014-05-16 00:49:53 UTC) #13
xhwang
I only looked at cdm_promise.* and have some comments there. These comments are all CdmPromise ...
6 years, 7 months ago (2014-05-22 16:44:13 UTC) #14
xhwang
This is a huge CL :) I stopped at aes_decryptor.* Let's address the existing comments ...
6 years, 7 months ago (2014-05-23 06:01:22 UTC) #15
ddorwin
https://codereview.chromium.org/265993002/diff/160001/media/base/media_keys.h File media/base/media_keys.h (right): https://codereview.chromium.org/265993002/diff/160001/media/base/media_keys.h#newcode35 media/base/media_keys.h:35: enum KeyError { This is no longer used in ...
6 years, 7 months ago (2014-05-23 16:41:08 UTC) #16
xhwang
https://codereview.chromium.org/265993002/diff/160001/media/base/media_keys.h File media/base/media_keys.h (right): https://codereview.chromium.org/265993002/diff/160001/media/base/media_keys.h#newcode64 media/base/media_keys.h:64: EXCEPTION_OUTPUT_ERROR On 2014/05/23 16:41:09, ddorwin wrote: > On 2014/05/23 ...
6 years, 7 months ago (2014-05-23 16:47:35 UTC) #17
jrummell
Updated. Still need to get Android to work with all the recent changes to that ...
6 years, 6 months ago (2014-05-29 00:54:39 UTC) #18
xhwang
This is the first time I read the whole CL. But I confess, for some ...
6 years, 6 months ago (2014-05-29 23:44:37 UTC) #19
jrummell
Updated. Due to recent changes in the Android specific code, I had to change MediaDrmBridge ...
6 years, 6 months ago (2014-05-30 18:04:23 UTC) #20
ddorwin
https://codereview.chromium.org/265993002/diff/220001/content/browser/media/android/browser_media_player_manager.h File content/browser/media/android/browser_media_player_manager.h (right): https://codereview.chromium.org/265993002/diff/220001/content/browser/media/android/browser_media_player_manager.h#newcode31 content/browser/media/android/browser_media_player_manager.h:31: class MediaDrmBridge; This basically reverts a previous CL. :( ...
6 years, 6 months ago (2014-05-30 18:43:54 UTC) #21
xhwang
Just a few more comments. https://codereview.chromium.org/265993002/diff/200001/content/renderer/media/crypto/ppapi_decryptor.cc File content/renderer/media/crypto/ppapi_decryptor.cc (right): https://codereview.chromium.org/265993002/diff/200001/content/renderer/media/crypto/ppapi_decryptor.cc#newcode48 content/renderer/media/crypto/ppapi_decryptor.cc:48: base::Bind(&DoNothingOnError)), On 2014/05/30 18:04:25, ...
6 years, 6 months ago (2014-06-02 21:59:20 UTC) #22
xhwang
lgtm % comments! Thanks! https://codereview.chromium.org/265993002/diff/220001/media/base/cdm_promise.h File media/base/cdm_promise.h (right): https://codereview.chromium.org/265993002/diff/220001/media/base/cdm_promise.h#newcode76 media/base/cdm_promise.h:76: CdmPromiseTemplate(); On 2014/06/02 21:59:21, xhwang ...
6 years, 6 months ago (2014-06-02 23:48:00 UTC) #23
jrummell
This is mostly a rebase on the latest Android changes. https://codereview.chromium.org/265993002/diff/220001/media/base/android/cdm_factory_android.cc File media/base/android/cdm_factory_android.cc (right): https://codereview.chromium.org/265993002/diff/220001/media/base/android/cdm_factory_android.cc#newcode21 ...
6 years, 6 months ago (2014-06-03 18:55:23 UTC) #24
jrummell
+palmer@ for security review of ppapi/proxy/ppapi_messages.h +dmichael@ for ppapi stuff in ppapi/* and content/renderer/pepper/*
6 years, 6 months ago (2014-06-03 20:12:13 UTC) #25
jrummell
+jar@ for histograms.xml
6 years, 6 months ago (2014-06-03 20:14:29 UTC) #26
jar (doing other things)
For histograms.xml.... leaving data intact allows folks to read old histograms etc.. At most, for ...
6 years, 6 months ago (2014-06-03 22:43:16 UTC) #27
dmichael (off chromium)
I haven't gotten too far yet in the pepper & ppapi stuff. Can you explain ...
6 years, 6 months ago (2014-06-03 23:15:18 UTC) #28
jrummell
Updated. As to the changes to Pepper, previously the EME used events to indicate the ...
6 years, 6 months ago (2014-06-04 00:26:31 UTC) #29
Alexei Svitkine (slow)
histograms lgtm
6 years, 6 months ago (2014-06-04 16:57:40 UTC) #30
dmichael (off chromium)
pepper stuff lgtm. In the future, please try to make smaller, incremental CLs. This is ...
6 years, 6 months ago (2014-06-05 18:55:30 UTC) #31
jrummell
Updated. +dcheng@ for security review of ppapi/proxy/ppapi_messages.h https://codereview.chromium.org/265993002/diff/260001/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc File media/cdm/ppapi/external_clear_key/clear_key_cdm.cc (right): https://codereview.chromium.org/265993002/diff/260001/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc#newcode732 media/cdm/ppapi/external_clear_key/clear_key_cdm.cc:732: } On ...
6 years, 6 months ago (2014-06-05 20:59:54 UTC) #32
dcheng
Blink gardening. I will attempt to get to this review on a best effort basis ...
6 years, 6 months ago (2014-06-05 21:18:08 UTC) #33
jrummell
+inferno@ for security review of ppapi/proxy/ppapi_messages.h
6 years, 6 months ago (2014-06-06 22:49:20 UTC) #34
Tom Sepez
Messages LGTM.
6 years, 6 months ago (2014-06-06 23:20:01 UTC) #35
jrummell
Thanks for the reviews.
6 years, 6 months ago (2014-06-07 00:22:24 UTC) #36
jrummell
The CQ bit was checked by jrummell@chromium.org
6 years, 6 months ago (2014-06-07 00:22:33 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jrummell@chromium.org/265993002/380001
6 years, 6 months ago (2014-06-07 00:24:30 UTC) #38
commit-bot: I haz the power
6 years, 6 months ago (2014-06-07 08:54:33 UTC) #39
Message was sent while issue was closed.
Change committed as 275656

Powered by Google App Engine
This is Rietveld 408576698