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

Issue 2189533002: Add media Remoter mojo interface and RendererWMPDelegate accessor. (Closed)

Created:
4 years, 4 months ago by miu
Modified:
4 years, 3 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add media Remoter mojo interface and RendererWMPDelegate accessor. This change introduces the media remoting mojo interface, which handles control messages and bitstream data flow between a media element in the render process and the Media Router in the browser process. The "RemoterFactory" client/service is instantiated lazily when the first media element is created in a render frame. Note that, while new code has been added by this change, there are no new active code paths yet. Later changes will fill in the surrounding implementation.

Patch Set 1 #

Patch Set 2 : Add GYP target/deps. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -0 lines) Patch
M content/content_renderer.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate.cc View 2 chunks +7 lines, -0 lines 2 comments Download
M content/renderer/media/webmediaplayer_ms_unittest.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M media/blink/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/media_blink.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/webmediaplayer_delegate.h View 2 chunks +5 lines, -0 lines 0 comments Download
M media/mojo/interfaces/BUILD.gn View 1 chunk +6 lines, -0 lines 0 comments Download
M media/mojo/interfaces/mojo_bindings.gyp View 1 1 chunk +11 lines, -0 lines 0 comments Download
A media/mojo/interfaces/remoter.mojom View 1 chunk +78 lines, -0 lines 5 comments Download

Messages

Total messages: 25 (17 generated)
miu
Eric/Dale: PTAL.
4 years, 4 months ago (2016-07-27 02:15:47 UTC) #2
DaleCurtis
Can you give an example of how the remoter will be used by WMPI?
4 years, 4 months ago (2016-07-27 18:01:14 UTC) #17
miu
On 2016/07/27 18:01:14, DaleCurtis wrote: > Can you give an example of how the remoter ...
4 years, 4 months ago (2016-07-27 20:51:29 UTC) #18
DaleCurtis
+rockot from mojo/OWNERS for general mojo advice on interface design. I think the way this ...
4 years, 4 months ago (2016-07-27 21:09:59 UTC) #20
miu
On 2016/07/27 21:09:59, DaleCurtis wrote: > +rockot from mojo/OWNERS for general mojo advice on interface ...
4 years, 4 months ago (2016-07-27 22:25:54 UTC) #21
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2189533002/diff/40001/content/renderer/media/renderer_webmediaplayer_delegate.cc File content/renderer/media/renderer_webmediaplayer_delegate.cc (right): https://codereview.chromium.org/2189533002/diff/40001/content/renderer/media/renderer_webmediaplayer_delegate.cc#newcode71 content/renderer/media/renderer_webmediaplayer_delegate.cc:71: render_frame()->GetRemoteInterfaces()->GetInterface(GetProxy(&remoter_)); nit: for convenience you can also just GetInterface(&remoter_) ...
4 years, 4 months ago (2016-07-27 22:31:15 UTC) #22
miu
On 2016/07/27 22:31:15, Ken Rockot wrote: > https://codereview.chromium.org/2189533002/diff/40001/media/mojo/interfaces/remoter.mojom#newcode7 > media/mojo/interfaces/remoter.mojom:7: interface Remoter { > Rather ...
4 years, 4 months ago (2016-08-03 00:38:34 UTC) #23
miu
4 years, 3 months ago (2016-09-02 22:13:29 UTC) #25
Hi all. Back again! :)

I've taken the Mojo interface comments into account, among other things. Also,
there were concerns that those reviewing the Mojo interfaces wanted to also see
the surrounding code using those interfaces.

Therefore, I'm going to re-open a new code review shortly that widens the scope
of the change, and that more clearly shows how these interfaces will be used to
connect things end-to-end.

Replies on prior outstanding comments:

https://codereview.chromium.org/2189533002/diff/40001/content/renderer/media/...
File content/renderer/media/renderer_webmediaplayer_delegate.cc (right):

https://codereview.chromium.org/2189533002/diff/40001/content/renderer/media/...
content/renderer/media/renderer_webmediaplayer_delegate.cc:71:
render_frame()->GetRemoteInterfaces()->GetInterface(GetProxy(&remoter_));
On 2016/07/27 22:31:15, Ken Rockot wrote:
> nit: for convenience you can also just GetInterface(&remoter_)

Acknowledged. (Not making changes to WMPIDelegate in current code.)

https://codereview.chromium.org/2189533002/diff/40001/media/mojo/interfaces/r...
File media/mojo/interfaces/remoter.mojom (right):

https://codereview.chromium.org/2189533002/diff/40001/media/mojo/interfaces/r...
media/mojo/interfaces/remoter.mojom:7: interface Remoter {
On 2016/07/27 22:31:15, Ken Rockot wrote:
> Rather than use a client ID, an idiomatic design would have a unique Remoter
> pipe per client. In this model, your interfaces could look more like:
> 
> ...

Great ideas. I reworked the Mojo interfaces here pretty much as you suggested
(and there were some other name/interface changes made in the meantime too).
Suffice it to say, I've eliminated all the use of IDs.

https://codereview.chromium.org/2189533002/diff/40001/media/mojo/interfaces/r...
media/mojo/interfaces/remoter.mojom:11: RegisterClient(uint32 client_id,
RemoterClient client);
On 2016/07/27 21:09:59, DaleCurtis wrote:
> Mojo is typically a way to avoid needing id's like this. RemoterClient can
> already be uniquely identified implicitly via |client| without the id I
thought?

Done. (See reply to rockot's comment above.)

Powered by Google App Engine
This is Rietveld 408576698