New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687365 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocking:
issue 752604



Sign in to add a comment

[Media Router] Support for MediaSink subtypes

Project Member Reported by imch...@chromium.org, Jan 31 2017

Issue description

When we migrate device discovery to the browser process, we may need to push the resulting MediaSinks back to extension for further operations (such as cast channel or activity discovery). Sinks discovered by DIAL and Cast will have specific data.

- Introduce subclasses of MediaSink in C++
- Introduce Mojo struct definitions along the lines of following (latest can be found in design doc):

struct MediaSink {
  ...
  // Used for feedback
  string? model_name;

  MediaSinkExtraData? extra_data;
}

union MediaSinkExtraData {
  DialMediaSink? dial_media_sink;
  CastMediaSink? cast_media_sink;
}

struct DialMediaSink {
  // Used for feedback
  string ip_address;

  // Used for DIAL launch
  url.mojom.url app_url;
}

struct CastMediaSink {
  int capabilities;

  // Used for feedback
  string ip_address;

  // ID of cast channel opened by Media Router. The ID can be
  // used to send call chrome.cast.channel.send.
  int cast_channel_id;
}

interface MediaRouteProvider {
  OnSinksDiscovered(array<MediaSink> sinks);        
}
 
Blocking: 687383
Owner: zhaobin@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88c63227018cd614c0eab270dbc2c6aea43a79ec

commit 88c63227018cd614c0eab270dbc2c6aea43a79ec
Author: zhaobin <zhaobin@chromium.org>
Date: Wed Mar 15 17:39:18 2017

[Media Router] Add MediaSink subtypes

- Introduce subclasses of MediaSink (DialMediaSink and CastMediaSink) in C++
- Introduce Mojo struct definitions
- Add typemap for MediaSink subclasses
- Add unit tests for typemap conversion

MediaSink typemap is based on https://codereview.chromium.org/2666873006/. Will merge when that lands.

BUG= 687365 

Review-Url: https://codereview.chromium.org/2675033002
Cr-Commit-Position: refs/heads/master@{#457123}

[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/BUILD.gn
[add] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/discovery/media_sink_internal.cc
[add] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/discovery/media_sink_internal.h
[add] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/discovery/media_sink_internal_unittest.cc
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/media_sink.cc
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/media_sink.h
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router.mojom
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router.typemap
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_mojo_impl.h
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_struct_traits.cc
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_struct_traits.h
[add] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_struct_traits_unittest.cc
[add] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/browser/media/router/mojo/media_router_traits_test_service.mojom
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/chrome/test/BUILD.gn
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/extensions/BUILD.gn
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/extensions/renderer/dispatcher.cc
[modify] https://crrev.com/88c63227018cd614c0eab270dbc2c6aea43a79ec/extensions/renderer/resources/extensions_renderer_resources.grd

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/532ac77836647714a0ed93c871b4a0b75159fcaa

commit 532ac77836647714a0ed93c871b4a0b75159fcaa
Author: imcheng <imcheng@chromium.org>
Date: Fri Mar 31 20:00:42 2017

[Media Router] Export Mojom definitions in media_router_bindings.js.

In media_router_bindings, instead of just exporting the mediaRouter
instance to the component, also export definitions of generated Mojom
classes that will be needed by the component. This lets the component
work with Mojo objects directly rather than relying on bindings as an
intermediate layer.

BUG= 687365 

Review-Url: https://codereview.chromium.org/2779203003
Cr-Commit-Position: refs/heads/master@{#461194}

[modify] https://crrev.com/532ac77836647714a0ed93c871b4a0b75159fcaa/extensions/renderer/resources/media_router_bindings.js

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16f6f2938e2ac13dd9a20e4a643ac6e90c03d0c9

commit 16f6f2938e2ac13dd9a20e4a643ac6e90c03d0c9
Author: imcheng <imcheng@chromium.org>
Date: Thu Apr 06 01:15:02 2017

[Media Router] Export TimeDelta in media_router_bindings.js

Export the definition for TimeDelta to the component so that it can
be used directly in conjunction with MediaStatusObserver APIs.

BUG= 687365 

Review-Url: https://codereview.chromium.org/2805553002
Cr-Commit-Position: refs/heads/master@{#462307}

[modify] https://crrev.com/16f6f2938e2ac13dd9a20e4a643ac6e90c03d0c9/extensions/renderer/resources/media_router_bindings.js

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b254a456ab6527124ce5aff9acc231eed34605c4

commit b254a456ab6527124ce5aff9acc231eed34605c4
Author: zhaobin <zhaobin@chromium.org>
Date: Thu Apr 06 02:45:12 2017

[Media Router] Add ProvideSinks() Mojo API

- added ProvideSinks() to media_router.mojom
- added ProvideSinks() to media_router.h

cl/146753004 added ProvideSinks() to component extension.

BUG= 687365 

Review-Url: https://codereview.chromium.org/2679893002
Cr-Commit-Position: refs/heads/master@{#462333}

[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/android/router/media_router_android.cc
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/android/router/media_router_android.h
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/media_router.h
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mock_media_router.h
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router.mojom
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router_mojo_impl.h
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router_mojo_metrics.h
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router_mojo_test.h
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/chrome/browser/media/router/mojo/media_router_struct_traits_unittest.cc
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/extensions/renderer/resources/media_router_bindings.js
[modify] https://crrev.com/b254a456ab6527124ce5aff9acc231eed34605c4/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Assigned)

Comment 9 by mfo...@chromium.org, Oct 26 2017

Blocking: -687383
Blocking: 752604

Sign in to add a comment