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

Issue 2002293003: [Media Router] Allow casting new media to sink with existing route. (Closed)

Created:
4 years, 7 months ago by btolsch
Modified:
4 years, 6 months ago
CC:
arv+watch_chromium.org, chromium-reviews, media-router+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media Router] Allow casting new media to sink with existing route. This change allows for one button push to stop casting to a sink and then immediately create a new route to the same sink with the selected source. The makes the user experience smoother by not making them stop the current cast and then start a new one manually in two stops. Some shortcomings of this change that will be addressed in the future: - At least for mirroring, it's possible to avoid stopping the route and just switch the stream sources. This probably requires adding a new API to the extension. - The button will currently allow users to re-cast the current source, stopping the current route and starting a new one, even though this isn't necessary. When both the old and new sources are tabs, the tab IDs could be checked, but other cases would have to be handled in MR or the extension. BUG=614144 R=apacible@chromium.org, amp@chromium.org, mfoltz@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/4680358215ff217eb6b0073c4be2243738369957 Cr-Commit-Position: refs/heads/master@{#397457}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Disable cast-to-route when sink has no available cast modes #

Patch Set 3 : Alphabetize renamed method #

Total comments: 11

Patch Set 4 : Responding to apacible's comments #

Total comments: 9

Patch Set 5 : Combine close-route events, new first-action enum, changed comment #

Total comments: 2

Patch Set 6 : Add missing C++ metric value #

Patch Set 7 : Rebase for imcheng@'s off-the-record change #

Total comments: 12

Patch Set 8 : Responding to mfoltz's comments #

Patch Set 9 : Enable route details cast button only when no currently launching sink #

Patch Set 10 : Add route creation TODO and factor out logical NOT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -24 lines) Patch
M chrome/browser/media/router/media_router_metrics.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js View 1 2 3 4 5 6 7 8 9 9 chunks +70 lines, -6 lines 0 comments Download
M chrome/browser/resources/media_router/elements/route_details/route_details.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/media_router/elements/route_details/route_details.js View 1 2 3 4 5 6 7 8 9 2 chunks +43 lines, -5 lines 0 comments Download
M chrome/browser/resources/media_router/media_router.js View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/resources/media_router/media_router_data.js View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js View 1 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/test/data/webui/media_router/route_details_tests.js View 1 2 3 4 5 6 7 8 3 chunks +50 lines, -4 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (7 generated)
btolsch
This is a quick, UI-only solution to casting to sinks that already have routes. I ...
4 years, 7 months ago (2016-05-23 21:17:09 UTC) #2
amp
https://codereview.chromium.org/2002293003/diff/1/chrome/browser/resources/media_router/elements/route_details/route_details.html File chrome/browser/resources/media_router/elements/route_details/route_details.html (left): https://codereview.chromium.org/2002293003/diff/1/chrome/browser/resources/media_router/elements/route_details/route_details.html#oldcode17 chrome/browser/resources/media_router/elements/route_details/route_details.html:17: hidden$="[[!route.canJoin]]" It would be nice to update this logic ...
4 years, 7 months ago (2016-05-23 21:42:35 UTC) #3
btolsch
https://codereview.chromium.org/2002293003/diff/1/chrome/browser/resources/media_router/elements/route_details/route_details.html File chrome/browser/resources/media_router/elements/route_details/route_details.html (left): https://codereview.chromium.org/2002293003/diff/1/chrome/browser/resources/media_router/elements/route_details/route_details.html#oldcode17 chrome/browser/resources/media_router/elements/route_details/route_details.html:17: hidden$="[[!route.canJoin]]" On 2016/05/23 21:42:35, amp wrote: > It would ...
4 years, 7 months ago (2016-05-23 22:41:10 UTC) #4
mark a. foltz
This is cool but I find the design a bit hard to follow: I don't ...
4 years, 7 months ago (2016-05-23 23:53:38 UTC) #5
btolsch
There was indeed a problem with handling DIAL TVs and having undefined cast modes. PTAL, ...
4 years, 7 months ago (2016-05-24 20:20:18 UTC) #6
apacible
https://codereview.chromium.org/2002293003/diff/1/chrome/browser/resources/media_router/media_router.js File chrome/browser/resources/media_router/media_router.js (right): https://codereview.chromium.org/2002293003/diff/1/chrome/browser/resources/media_router/media_router.js#newcode41 chrome/browser/resources/media_router/media_router.js:41: onCloseRouteForNewMedia); On 2016/05/23 22:41:10, btolsch wrote: > On 2016/05/23 ...
4 years, 7 months ago (2016-05-25 00:56:35 UTC) #7
btolsch
https://codereview.chromium.org/2002293003/diff/40001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2002293003/diff/40001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode367 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:367: sinkIdAwaitingNewRoute_: { On 2016/05/25 00:56:34, apacible wrote: > Could ...
4 years, 7 months ago (2016-05-25 20:53:44 UTC) #8
apacible
https://codereview.chromium.org/2002293003/diff/40001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2002293003/diff/40001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode1612 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:1612: onCastNewMediaClick_: function(event) { On 2016/05/25 20:53:44, btolsch wrote: > ...
4 years, 7 months ago (2016-05-25 22:37:01 UTC) #9
btolsch
+isherman for histograms.xml https://codereview.chromium.org/2002293003/diff/40001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2002293003/diff/40001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode1612 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:1612: onCastNewMediaClick_: function(event) { On 2016/05/25 22:37:01, ...
4 years, 7 months ago (2016-05-26 00:31:13 UTC) #11
Ilya Sherman
histograms.xml lgtm
4 years, 7 months ago (2016-05-26 06:54:45 UTC) #12
apacible
https://codereview.chromium.org/2002293003/diff/60001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2002293003/diff/60001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode743 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:743: return this.currentRoute_ && this.sinkMap_[this.currentRoute_.sinkId] ? On 2016/05/26 00:31:12, btolsch ...
4 years, 7 months ago (2016-05-26 17:20:46 UTC) #13
btolsch
https://codereview.chromium.org/2002293003/diff/80001/chrome/browser/resources/media_router/media_router_data.js File chrome/browser/resources/media_router/media_router_data.js (right): https://codereview.chromium.org/2002293003/diff/80001/chrome/browser/resources/media_router/media_router_data.js#newcode53 chrome/browser/resources/media_router/media_router_data.js:53: CAST_TO_ROUTE: 5, On 2016/05/26 17:20:46, apacible wrote: > Add ...
4 years, 7 months ago (2016-05-26 17:43:06 UTC) #14
apacible
lgtm
4 years, 7 months ago (2016-05-26 18:38:27 UTC) #15
btolsch
Friendly ping. Any other issues with getting this in?
4 years, 6 months ago (2016-05-31 17:54:29 UTC) #16
amp
lgtm
4 years, 6 months ago (2016-05-31 18:22:30 UTC) #17
mark a. foltz
Mostly some naming suggestions, nothing major. I'm a little concerned that the data model driving ...
4 years, 6 months ago (2016-05-31 22:30:06 UTC) #18
btolsch
I agree with your long term refactor suggestion, but for now I made the route ...
4 years, 6 months ago (2016-06-01 01:58:16 UTC) #19
mark a. foltz
LGTM On 2016/06/01 at 01:58:16, btolsch wrote: > I agree with your long term refactor ...
4 years, 6 months ago (2016-06-01 21:06:42 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2002293003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2002293003/180001
4 years, 6 months ago (2016-06-01 21:50:16 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/239056)
4 years, 6 months ago (2016-06-02 01:51:03 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2002293003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2002293003/180001
4 years, 6 months ago (2016-06-02 16:50:19 UTC) #27
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 6 months ago (2016-06-02 17:33:33 UTC) #28
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 17:35:34 UTC) #30
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/4680358215ff217eb6b0073c4be2243738369957
Cr-Commit-Position: refs/heads/master@{#397457}

Powered by Google App Engine
This is Rietveld 408576698