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

Issue 23513055: Populate canPlayType to renderer (Closed)

Created:
7 years, 3 months ago by qinmin
Modified:
7 years, 3 months ago
Reviewers:
xhwang, jschuh, jam, ddorwin
CC:
chromium-reviews, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, scherkus (not reviewing)
Visibility:
Public.

Description

Populate canPlayType to renderer This CL implements the AddKeySystem() call, and using sync IPC to send the results back to the render process. TBR=jschuh BUG=224793 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224064

Patch Set 1 #

Total comments: 1

Patch Set 2 : moving ipc to chrome/common/ #

Total comments: 55

Patch Set 3 : addressing comments #

Total comments: 30

Patch Set 4 : addressing ddorwin's comments #

Total comments: 14

Patch Set 5 : rebase #

Total comments: 14

Patch Set 6 : nits #

Total comments: 2

Patch Set 7 : add dcheck #

Total comments: 4

Patch Set 8 : add dcheck logs #

Patch Set 9 : adding hrsurface enum #

Total comments: 4

Patch Set 10 : fixing commnets #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -15 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/media/encrypted_media_message_filter_android.h View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/media/encrypted_media_message_filter_android.cc View 1 2 3 4 5 6 7 1 chunk +91 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/common_message_generator.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/common/encrypted_media_messages_android.h View 1 2 3 4 5 6 1 chunk +76 lines, -0 lines 2 comments Download
A chrome/common/encrypted_media_messages_android.cc View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/renderer/media/chrome_key_systems.cc View 1 2 3 4 5 6 7 8 9 6 chunks +52 lines, -14 lines 6 comments Download
M ipc/ipc_message_start.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaDrmBridge.java View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M media/base/android/media_codec_bridge.cc View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 40 (0 generated)
qinmin
PTAL
7 years, 3 months ago (2013-09-13 20:39:33 UTC) #1
jam
Since you have multiple reviewers, please specify which files each reviewer should take a look ...
7 years, 3 months ago (2013-09-13 22:06:43 UTC) #2
qinmin
@jam, Done moving the encrypted_media_message_android.h file to chrome/common. @ddorwin, correct me if I am wrong. ...
7 years, 3 months ago (2013-09-13 23:01:58 UTC) #3
jam
On 2013/09/13 23:01:58, qinmin wrote: > @jam, Done moving the encrypted_media_message_android.h file to chrome/common. > ...
7 years, 3 months ago (2013-09-16 16:39:23 UTC) #4
ddorwin
On 2013/09/16 16:39:23, jam wrote: > On 2013/09/13 23:01:58, qinmin wrote: > > @jam, Done ...
7 years, 3 months ago (2013-09-16 17:58:10 UTC) #5
xhwang
https://codereview.chromium.org/23513055/diff/2001/chrome/common/encrypted_media_messages_android.h File chrome/common/encrypted_media_messages_android.h (right): https://codereview.chromium.org/23513055/diff/2001/chrome/common/encrypted_media_messages_android.h#newcode19 chrome/common/encrypted_media_messages_android.h:19: // Name of the key system. On 2013/09/16 17:58:10, ...
7 years, 3 months ago (2013-09-17 18:56:45 UTC) #6
scherkus (not reviewing)
I notice I'm cc'd on this CL -- anything I should be looking at? otherwise ...
7 years, 3 months ago (2013-09-17 19:04:19 UTC) #7
qinmin
https://codereview.chromium.org/23513055/diff/2001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/2001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode22 chrome/browser/media/encrypted_media_message_filter_android.cc:22: static const uint8 kWidevineUuid[16] = passing UUID from IPC ...
7 years, 3 months ago (2013-09-17 19:21:06 UTC) #8
qinmin
7 years, 3 months ago (2013-09-17 19:22:24 UTC) #9
jam
ok, since the sync IPC is just to the IO thread, lgtm https://codereview.chromium.org/23513055/diff/1/chrome/common/render_messages.h File chrome/common/render_messages.h ...
7 years, 3 months ago (2013-09-17 20:26:02 UTC) #10
jam
On 2013/09/17 20:26:02, jam wrote: > ok, since the sync IPC is just to the ...
7 years, 3 months ago (2013-09-17 20:26:22 UTC) #11
qinmin
PTAL https://codereview.chromium.org/23513055/diff/2001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/2001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode32 chrome/browser/media/encrypted_media_message_filter_android.cc:32: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); On 2013/09/17 20:26:02, jam wrote: > nit: ...
7 years, 3 months ago (2013-09-17 21:26:23 UTC) #12
qinmin
@jam, just checked the call, it takes about 38 ms, should I use IPC_MESSAGE_HANDLER_DELAY_REPLY instead?
7 years, 3 months ago (2013-09-17 21:52:53 UTC) #13
ddorwin
https://codereview.chromium.org/23513055/diff/24001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/24001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode10 chrome/browser/media/encrypted_media_message_filter_android.cc:10: #include "chrome/common/widevine_cdm_constants.h" We shouldn't include a widevine file here. ...
7 years, 3 months ago (2013-09-17 22:29:07 UTC) #14
qinmin
https://codereview.chromium.org/23513055/diff/24001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/24001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode10 chrome/browser/media/encrypted_media_message_filter_android.cc:10: #include "chrome/common/widevine_cdm_constants.h" On 2013/09/17 22:29:08, ddorwin wrote: > We ...
7 years, 3 months ago (2013-09-18 00:45:44 UTC) #15
ddorwin
LGTM % comments. Thanks! https://codereview.chromium.org/23513055/diff/39001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/39001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode25 chrome/browser/media/encrypted_media_message_filter_android.cc:25: DCHECK(!(requested_codecs & android::WEBM_VP8_AND_VORBIS)); This is ...
7 years, 3 months ago (2013-09-18 03:58:30 UTC) #16
qinmin
https://codereview.chromium.org/23513055/diff/39001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/39001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode25 chrome/browser/media/encrypted_media_message_filter_android.cc:25: DCHECK(!(requested_codecs & android::WEBM_VP8_AND_VORBIS)); On 2013/09/18 03:58:31, ddorwin wrote: > ...
7 years, 3 months ago (2013-09-18 05:08:20 UTC) #17
qinmin
+jschuh for ipc_message_start.h OWNER
7 years, 3 months ago (2013-09-18 05:13:01 UTC) #18
ddorwin
It doesn't look like your upload worked correctly. If re-uploading doesn't work, try removing the ...
7 years, 3 months ago (2013-09-18 05:19:54 UTC) #19
xhwang
lgtm % nits https://codereview.chromium.org/23513055/diff/47001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/47001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode25 chrome/browser/media/encrypted_media_message_filter_android.cc:25: DCHECK(!(requested_codecs & android::WEBM_VP8_AND_VORBIS)); why? Add a ...
7 years, 3 months ago (2013-09-18 07:10:57 UTC) #20
jam
On 2013/09/17 21:52:53, qinmin wrote: > @jam, just checked the call, it takes about 38 ...
7 years, 3 months ago (2013-09-18 15:57:32 UTC) #21
qinmin
On 2013/09/18 15:57:32, jam wrote: > On 2013/09/17 21:52:53, qinmin wrote: > > @jam, just ...
7 years, 3 months ago (2013-09-18 17:19:48 UTC) #22
qinmin
https://codereview.chromium.org/23513055/diff/47001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/47001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode25 chrome/browser/media/encrypted_media_message_filter_android.cc:25: DCHECK(!(requested_codecs & android::WEBM_VP8_AND_VORBIS)); already added in PS6 On 2013/09/18 ...
7 years, 3 months ago (2013-09-18 17:19:58 UTC) #23
xhwang
lgtm++
7 years, 3 months ago (2013-09-18 17:22:41 UTC) #24
ddorwin
Diffs are still broken. chrome_key_systems.cc for example. Not sure if you saw this comment in ...
7 years, 3 months ago (2013-09-18 17:40:03 UTC) #25
qinmin
https://codereview.chromium.org/23513055/diff/39001/chrome/renderer/media/chrome_key_systems.cc File chrome/renderer/media/chrome_key_systems.cc (right): https://codereview.chromium.org/23513055/diff/39001/chrome/renderer/media/chrome_key_systems.cc#newcode140 chrome/renderer/media/chrome_key_systems.cc:140: // non-compositing codecs. Need to ignore the extra bit ...
7 years, 3 months ago (2013-09-18 17:51:36 UTC) #26
ddorwin
Thanks. lgtm with the right DCHECK. https://codereview.chromium.org/23513055/diff/27001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://codereview.chromium.org/23513055/diff/27001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode88 chrome/browser/media/encrypted_media_message_filter_android.cc:88: DCHECK_EQ(response.non_compositing_codecs >> 3, ...
7 years, 3 months ago (2013-09-18 18:13:02 UTC) #27
qinmin
https://chromiumcodereview.appspot.com/23513055/diff/27001/chrome/browser/media/encrypted_media_message_filter_android.cc File chrome/browser/media/encrypted_media_message_filter_android.cc (right): https://chromiumcodereview.appspot.com/23513055/diff/27001/chrome/browser/media/encrypted_media_message_filter_android.cc#newcode88 chrome/browser/media/encrypted_media_message_filter_android.cc:88: DCHECK_EQ(response.non_compositing_codecs >> 3, 0); On 2013/09/18 18:13:02, ddorwin wrote: ...
7 years, 3 months ago (2013-09-18 18:52:19 UTC) #28
qinmin
rebased after jrummell's change, added WIDEVINE_HRSURFACE enum for android.
7 years, 3 months ago (2013-09-18 23:04:52 UTC) #29
ddorwin
lgtm % comments. It's all coming together! https://chromiumcodereview.appspot.com/23513055/diff/100001/chrome/renderer/media/chrome_key_systems.cc File chrome/renderer/media/chrome_key_systems.cc (right): https://chromiumcodereview.appspot.com/23513055/diff/100001/chrome/renderer/media/chrome_key_systems.cc#newcode125 chrome/renderer/media/chrome_key_systems.cc:125: #if defined(OS_ANDROID) ...
7 years, 3 months ago (2013-09-18 23:48:06 UTC) #30
qinmin
https://codereview.chromium.org/23513055/diff/100001/chrome/renderer/media/chrome_key_systems.cc File chrome/renderer/media/chrome_key_systems.cc (right): https://codereview.chromium.org/23513055/diff/100001/chrome/renderer/media/chrome_key_systems.cc#newcode125 chrome/renderer/media/chrome_key_systems.cc:125: #if defined(OS_ANDROID) On 2013/09/18 23:48:07, ddorwin wrote: > These ...
7 years, 3 months ago (2013-09-19 00:02:54 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/23513055/105001
7 years, 3 months ago (2013-09-19 00:03:44 UTC) #32
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=26233
7 years, 3 months ago (2013-09-19 00:08:33 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/23513055/105001
7 years, 3 months ago (2013-09-19 00:34:07 UTC) #34
ddorwin
https://codereview.chromium.org/23513055/diff/105001/chrome/renderer/media/chrome_key_systems.cc File chrome/renderer/media/chrome_key_systems.cc (right): https://codereview.chromium.org/23513055/diff/105001/chrome/renderer/media/chrome_key_systems.cc#newcode232 chrome/renderer/media/chrome_key_systems.cc:232: if (response.compositing_codecs > 0) { This should be !=, ...
7 years, 3 months ago (2013-09-19 00:38:16 UTC) #35
ddorwin
A couple more items for a follow-up CL. https://codereview.chromium.org/23513055/diff/105001/chrome/renderer/media/chrome_key_systems.cc File chrome/renderer/media/chrome_key_systems.cc (right): https://codereview.chromium.org/23513055/diff/105001/chrome/renderer/media/chrome_key_systems.cc#newcode153 chrome/renderer/media/chrome_key_systems.cc:153: case ...
7 years, 3 months ago (2013-09-19 06:31:51 UTC) #36
commit-bot: I haz the power
Change committed as 224064
7 years, 3 months ago (2013-09-19 06:53:59 UTC) #37
qinmin
https://codereview.chromium.org/23513055/diff/105001/chrome/renderer/media/chrome_key_systems.cc File chrome/renderer/media/chrome_key_systems.cc (right): https://codereview.chromium.org/23513055/diff/105001/chrome/renderer/media/chrome_key_systems.cc#newcode153 chrome/renderer/media/chrome_key_systems.cc:153: case WIDEVINE_HRSURFACE: hmm... so then we should also ifdef ...
7 years, 3 months ago (2013-09-19 14:37:28 UTC) #38
jam
https://codereview.chromium.org/23513055/diff/105001/chrome/common/encrypted_media_messages_android.h File chrome/common/encrypted_media_messages_android.h (right): https://codereview.chromium.org/23513055/diff/105001/chrome/common/encrypted_media_messages_android.h#newcode27 chrome/common/encrypted_media_messages_android.h:27: struct SupportedKeySystemRequest { sorry I just happened to see ...
7 years, 3 months ago (2013-09-19 15:32:13 UTC) #39
qinmin
7 years, 3 months ago (2013-09-19 16:11:18 UTC) #40
Message was sent while issue was closed.
https://codereview.chromium.org/23513055/diff/105001/chrome/common/encrypted_...
File chrome/common/encrypted_media_messages_android.h (right):

https://codereview.chromium.org/23513055/diff/105001/chrome/common/encrypted_...
chrome/common/encrypted_media_messages_android.h:27: struct
SupportedKeySystemRequest {
Thanks, jam, will follow up on that.

On 2013/09/19 15:32:14, jam wrote:
> sorry I just happened to see this. there's no need to declare a struct here,
you
> can combine line 27-47 with lines 58-67. instead of using the
> IPC_STRUCT_TRAITS_BEGIN, you can use IPC_STRUCT_BEGIN. The former set of
macros
> are used to define the serialization code for structs that are in a layer that
> doesn't know about IPC, say wekbit or media. But if the struct is going to be
> defined in chrome, you might as well use the macros that declare the struct
and
> also its serialization. so this would be:
> 
> IPC_STRUCT_BEGIN(SupportedKeySystemsRequest)
>   IPC_STRUCT_MEMBER(std::vector<uint8>, uuid)
>   IPC_STRUCT_MEMBER(SupportedCodecs, codecs, NO_SUPPORTED_CODECS)
> IPC_STRUCT_END()
> 
> IPC_STRUCT_BEGIN(SupportedKeySystemResponse)
>   IPC_STRUCT_MEMBER(std::vector<uint8>, uuid)
>   IPC_STRUCT_MEMBER(SupportedCodecs, compositing_codecs, NO_SUPPORTED_CODECS)
>   IPC_STRUCT_MEMBER(SupportedCodecs, non_compositing_codecs,
> NO_SUPPORTED_CODECS)
> IPC_STRUCT_END()
> 
> and get rid of the cc file

Powered by Google App Engine
This is Rietveld 408576698