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

Issue 2712983004: Simplify/Cleanup MediaClient (Closed)

Created:
3 years, 10 months ago by chcunningham
Modified:
3 years, 8 months ago
CC:
mlamouri (slow - plz ping), alokp+watch_chromium.org, chfremer+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, halliwell+watch_chromium.org, jam, lcwu+watch_chromium.org, mcasas+watch+vc_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify/Cleanup MediaClient This CL does a number of things to cleanup MediaClient's implementation and usage. This clears the way for an expanded role in describing MediaCapabilities. Remove CastMediaClient. Merge methods into CastContentRenderClient. ContentRenderClient is now the one-stop-shop for embedder customization. I initially explored giving each embedder its own MediaClient, but this ended up splitting media customization between ContentRenderClient and MediaClient (some customization is too high level to move to MediaClient). The current route is also less code. Remove all Chrome specific logic from RenderMediaClient. RenderMediaClient is now the plumbing for *all* content embedder customizations to be visible in media/. Chrome is just one of many embedders and much of the chrome specific code was stale anyway. Remove KeySystemNameForUMA from MediaClient interface Decentralizing this logic was overly complicated. Now centralized to key_systems.cc. Other little cleanups Centralize all media/ Rappor usage in MediaLog. Move cast key_systems_cast into chromecast/renderer/media. Simplify key_systems_unittest.cc BUG=695264 Review-Url: https://codereview.chromium.org/2712983004 Cr-Commit-Position: refs/heads/master@{#463025} Committed: https://chromium.googlesource.com/chromium/src/+/8aeee0b5c65d2ea16d2c52839cf80bcf99273555

Patch Set 1 #

Total comments: 6

Patch Set 2 : Feedback #

Patch Set 3 : Change everything. #

Patch Set 4 : Little fixes #

Total comments: 6

Patch Set 5 : Feedback #

Patch Set 6 : Add back IsKeySystemsUpdateNeeded for Chrome #

Patch Set 7 : Missed a file #

Patch Set 8 : Fix widevine includes #

Patch Set 9 : Test fix. #

Total comments: 10

Patch Set 10 : Refactor test delegate #

Patch Set 11 : Fix test leak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+534 lines, -871 lines) Patch
M chrome/renderer/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
A chrome/renderer/media/chrome_key_systems_provider.h View 1 2 3 4 5 6 7 8 9 1 chunk +68 lines, -0 lines 0 comments Download
A chrome/renderer/media/chrome_key_systems_provider.cc View 1 2 3 4 5 6 7 8 9 1 chunk +83 lines, -0 lines 0 comments Download
A chrome/renderer/media/chrome_key_systems_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +155 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/common/media/BUILD.gn View 1 1 chunk +5 lines, -15 lines 0 comments Download
D chromecast/common/media/cast_media_client.h View 1 2 1 chunk +0 lines, -52 lines 0 comments Download
D chromecast/common/media/cast_media_client.cc View 1 2 1 chunk +0 lines, -101 lines 0 comments Download
M chromecast/renderer/BUILD.gn View 1 3 chunks +0 lines, -4 lines 0 comments Download
M chromecast/renderer/cast_content_renderer_client.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chromecast/renderer/cast_content_renderer_client.cc View 1 2 3 chunks +49 lines, -7 lines 0 comments Download
D chromecast/renderer/key_systems_cast.h View 1 1 chunk +0 lines, -27 lines 0 comments Download
D chromecast/renderer/key_systems_cast.cc View 1 1 chunk +0 lines, -131 lines 0 comments Download
M chromecast/renderer/media/BUILD.gn View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A + chromecast/renderer/media/key_systems_cast.h View 1 3 chunks +5 lines, -5 lines 0 comments Download
A + chromecast/renderer/media/key_systems_cast.cc View 1 6 chunks +7 lines, -8 lines 0 comments Download
M components/cdm/renderer/android_key_systems.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 2 chunks +14 lines, -2 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
M content/renderer/media/render_media_client.h View 1 2 2 chunks +7 lines, -34 lines 0 comments Download
M content/renderer/media/render_media_client.cc View 1 2 1 chunk +9 lines, -81 lines 0 comments Download
D content/renderer/media/render_media_client_unittest.cc View 1 chunk +0 lines, -184 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +14 lines, -7 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M media/base/key_systems.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +15 lines, -28 lines 0 comments Download
M media/base/key_systems_unittest.cc View 1 2 3 10 chunks +6 lines, -91 lines 0 comments Download
M media/base/media_client.h View 1 2 3 2 chunks +8 lines, -31 lines 0 comments Download
M media/base/media_client.cc View 2 3 1 chunk +0 lines, -9 lines 0 comments Download
M media/base/media_log.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/webencryptedmediaclient_impl.h View 1 4 chunks +5 lines, -1 line 0 comments Download
M media/blink/webencryptedmediaclient_impl.cc View 1 2 3 4 3 chunks +7 lines, -11 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M media/blink/webmediaplayer_util.h View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M media/blink/webmediaplayer_util.cc View 1 2 3 4 3 chunks +18 lines, -30 lines 0 comments Download

Messages

Total messages: 116 (74 generated)
chcunningham
cc: mlamouri@chromium.org
3 years, 9 months ago (2017-03-02 19:38:34 UTC) #1
chcunningham
Hey Xiaohan, this change incorporates a number of things we've discussed. PTAL Ignore the bots ...
3 years, 9 months ago (2017-03-18 00:17:23 UTC) #35
chcunningham
+servolk for cast
3 years, 9 months ago (2017-03-18 00:18:08 UTC) #37
chcunningham
Friendly ping.
3 years, 9 months ago (2017-03-21 22:24:02 UTC) #38
xhwang
oops, this totally got off my radar. will take a look today or tomorrow. sorry ...
3 years, 9 months ago (2017-03-21 22:30:42 UTC) #39
servolk
On 2017/03/21 22:30:42, xhwang_slow wrote: > oops, this totally got off my radar. will take ...
3 years, 9 months ago (2017-03-22 01:22:51 UTC) #41
chcunningham
Thanks Sergey! > +Luke to ensure that removal of key systems stuff from the media ...
3 years, 9 months ago (2017-03-22 01:33:48 UTC) #42
chcunningham
On 2017/03/22 01:33:48, chcunningham wrote: > Thanks Sergey! > > > +Luke to ensure that ...
3 years, 9 months ago (2017-03-22 01:34:14 UTC) #43
halliwell
On 2017/03/22 01:34:14, chcunningham wrote: > On 2017/03/22 01:33:48, chcunningham wrote: > > Thanks Sergey! ...
3 years, 9 months ago (2017-03-22 02:39:39 UTC) #44
xhwang
Thanks for doing this! I really appreciate the simplification brought by this CL! I have ...
3 years, 9 months ago (2017-03-22 05:58:52 UTC) #45
xhwang
On 2017/03/22 05:58:52, xhwang_slow wrote: > Thanks for doing this! I really appreciate the simplification ...
3 years, 9 months ago (2017-03-22 06:00:18 UTC) #46
chcunningham
Thanks Xiaohan! https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h File content/public/renderer/content_media_client.h (right): https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h#newcode20 content/public/renderer/content_media_client.h:20: class CONTENT_EXPORT ContentMediaClient : public media::MediaClient { ...
3 years, 9 months ago (2017-03-22 18:25:46 UTC) #47
chcunningham
On 2017/03/22 18:25:46, chcunningham wrote: > My thinking now: I can still achieve all this ...
3 years, 9 months ago (2017-03-22 18:29:04 UTC) #48
xhwang
https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h File content/public/renderer/content_media_client.h (right): https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h#newcode20 content/public/renderer/content_media_client.h:20: class CONTENT_EXPORT ContentMediaClient : public media::MediaClient { On 2017/03/22 ...
3 years, 9 months ago (2017-03-22 21:54:53 UTC) #49
chcunningham
https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h File content/public/renderer/content_media_client.h (right): https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h#newcode20 content/public/renderer/content_media_client.h:20: class CONTENT_EXPORT ContentMediaClient : public media::MediaClient { > Do ...
3 years, 9 months ago (2017-03-22 23:22:51 UTC) #50
chcunningham
On 2017/03/22 23:22:51, chcunningham wrote: > https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h > File content/public/renderer/content_media_client.h (right): > > https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h#newcode20 > ...
3 years, 9 months ago (2017-03-22 23:24:59 UTC) #51
xhwang
On 2017/03/22 23:24:59, chcunningham wrote: > On 2017/03/22 23:22:51, chcunningham wrote: > > > https://codereview.chromium.org/2712983004/diff/160001/content/public/renderer/content_media_client.h ...
3 years, 9 months ago (2017-03-23 04:53:25 UTC) #52
xhwang
For IsKeySystemsUpdateNeeded(), is it causing trouble for now? We don't really need this for Chrome. ...
3 years, 9 months ago (2017-03-23 05:41:14 UTC) #53
chcunningham
On 2017/03/23 05:41:14, xhwang_slow wrote: > For IsKeySystemsUpdateNeeded(), is it causing trouble for now? We ...
3 years, 9 months ago (2017-03-23 19:14:02 UTC) #54
chcunningham
Hold off reviewing the latest - still making some edits.
3 years, 8 months ago (2017-03-30 22:26:47 UTC) #59
chcunningham
Okay - ready for another look :)
3 years, 8 months ago (2017-03-31 22:27:57 UTC) #67
xhwang
Looking pretty good! I just have one comment. https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc File content/renderer/media/render_media_client.cc (right): https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc#newcode34 content/renderer/media/render_media_client.cc:34: return ...
3 years, 8 months ago (2017-04-03 17:47:14 UTC) #70
chcunningham
Thanks Xiaohan. Sergey/Luke, you guys might take another look at cast/ - I deleted your ...
3 years, 8 months ago (2017-04-03 18:47:39 UTC) #71
xhwang
https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc File content/renderer/media/render_media_client.cc (right): https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc#newcode34 content/renderer/media/render_media_client.cc:34: return GetContentClient()->renderer()->IsKeySystemsUpdateNeeded(); On 2017/04/03 18:47:38, chcunningham wrote: > On ...
3 years, 8 months ago (2017-04-03 18:55:19 UTC) #72
halliwell
On 2017/04/03 18:55:19, xhwang_slow wrote: > https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc > File content/renderer/media/render_media_client.cc (right): > > https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc#newcode34 > ...
3 years, 8 months ago (2017-04-03 19:33:26 UTC) #73
servolk
On 2017/04/03 19:33:26, halliwell wrote: > On 2017/04/03 18:55:19, xhwang_slow wrote: > > > https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc ...
3 years, 8 months ago (2017-04-03 20:14:12 UTC) #74
halliwell
On 2017/04/03 20:14:12, servolk wrote: > On 2017/04/03 19:33:26, halliwell wrote: > > On 2017/04/03 ...
3 years, 8 months ago (2017-04-03 20:32:47 UTC) #75
chcunningham
Thanks Luke/Sergey. Xiaohan, comments addressed. https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc File content/renderer/media/render_media_client.cc (right): https://codereview.chromium.org/2712983004/diff/220001/content/renderer/media/render_media_client.cc#newcode34 content/renderer/media/render_media_client.cc:34: return GetContentClient()->renderer()->IsKeySystemsUpdateNeeded(); On 2017/04/03 ...
3 years, 8 months ago (2017-04-04 23:44:30 UTC) #81
chcunningham
Xiaohan, Bot failures are due to undefined kWidevineKeySystem on certain builds. I can wrap everything ...
3 years, 8 months ago (2017-04-05 00:26:08 UTC) #84
xhwang
On 2017/04/05 00:26:08, chcunningham wrote: > Xiaohan, > > Bot failures are due to undefined ...
3 years, 8 months ago (2017-04-05 00:39:39 UTC) #85
chcunningham
> In your case, since you are already in chrome/, using the generated widevine > ...
3 years, 8 months ago (2017-04-05 22:23:05 UTC) #90
chcunningham
+jochen@chromium.org for content
3 years, 8 months ago (2017-04-05 22:24:55 UTC) #92
xhwang
I <3 the final solution! LGTM
3 years, 8 months ago (2017-04-06 04:52:11 UTC) #97
jochen (gone - plz use gerrit)
can you please format the CL description to repeat the CL title in the first ...
3 years, 8 months ago (2017-04-06 13:00:05 UTC) #98
jochen (gone - plz use gerrit)
+mlamouri fyi btw, have you considered splitting up the CL into the separate parts you ...
3 years, 8 months ago (2017-04-06 13:01:13 UTC) #100
chcunningham
> can you please format the CL description to repeat the CL title in the ...
3 years, 8 months ago (2017-04-06 20:48:34 UTC) #102
xhwang
https://codereview.chromium.org/2712983004/diff/320001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2712983004/diff/320001/content/renderer/render_frame_impl.cc#newcode2804 content/renderer/render_frame_impl.cc:2804: new RenderMediaLog(url::Origin(frame_->getSecurityOrigin()).GetURL()); On 2017/04/06 20:48:34, chcunningham wrote: > On ...
3 years, 8 months ago (2017-04-06 21:05:15 UTC) #105
jochen (gone - plz use gerrit)
lgtm assuming the answer is yes https://codereview.chromium.org/2712983004/diff/320001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2712983004/diff/320001/content/renderer/render_frame_impl.cc#newcode2804 content/renderer/render_frame_impl.cc:2804: new RenderMediaLog(url::Origin(frame_->getSecurityOrigin()).GetURL()); On ...
3 years, 8 months ago (2017-04-07 07:05:25 UTC) #108
mlamouri (slow - plz ping)
lgtm
3 years, 8 months ago (2017-04-07 15:07:49 UTC) #109
chcunningham
Thanks everyone! > so you're saying RenderMediaLog() can deal with an empty GURL() object as ...
3 years, 8 months ago (2017-04-07 18:47:06 UTC) #110
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/2712983004/360001
3 years, 8 months ago (2017-04-07 20:53:06 UTC) #113
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 22:42:42 UTC) #116
Message was sent while issue was closed.
Committed patchset #11 (id:360001) as
https://chromium.googlesource.com/chromium/src/+/8aeee0b5c65d2ea16d2c52839cf8...

Powered by Google App Engine
This is Rietveld 408576698