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

Issue 2040883002: [Media Router] Assign each route a current cast mode if possible (Closed)

Created:
4 years, 6 months ago by btolsch
Modified:
4 years, 6 months ago
Reviewers:
imcheng, apacible
CC:
chromium-reviews, media-router+watch_chromium.org, arv+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] Assign each route a current cast mode if possible This change gives each media route in the WebUI a current cast mode value if its media source corresponds to one of the currently available cast modes. This is to prevent showing the 'cast' button that allows replacing the route when the new route would effectively be a copy of the original route. BUG=614144 R=apacible@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/a47d5b0506c1183d501767d17ffec02ca419ea76 Cr-Commit-Position: refs/heads/master@{#398687}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Browser tests, move replace route property to route details, and other comment responses #

Patch Set 3 : Use current cast mode for display routes, simplify sink launching for route details #

Total comments: 2

Patch Set 4 : Move route cast mode calculation to MRUI directly, rename sinkCurrentlyLaunching #

Patch Set 5 : Remove duplicate friend declaration #

Total comments: 4

Patch Set 6 : Closure type fix, html readability nit #

Patch Set 7 : Rebase for WebUI::CallJavascriptFunction rename #

Unified diffs Side-by-side diffs Delta from patch set Stats (+512 lines, -98 lines) Patch
M chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js View 1 4 chunks +21 lines, -28 lines 0 comments Download
M chrome/browser/resources/media_router/elements/route_details/route_details.html View 1 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 3 chunks +60 lines, -14 lines 0 comments Download
M chrome/browser/resources/media_router/media_router_data.js View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui.h View 1 2 3 4 5 chunks +13 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui.cc View 1 2 3 4 chunks +26 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc View 1 2 3 4 chunks +106 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h View 1 2 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc View 1 2 3 4 5 6 5 chunks +32 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc View 4 chunks +12 lines, -2 lines 0 comments Download
M chrome/test/data/webui/media_router/media_router_container_route_tests.js View 1 3 chunks +169 lines, -0 lines 0 comments Download
M chrome/test/data/webui/media_router/media_router_container_test_base.js View 1 2 3 4 5 3 chunks +16 lines, -3 lines 0 comments Download
M chrome/test/data/webui/media_router/route_details_tests.js View 1 2 3 5 chunks +36 lines, -21 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
btolsch
I'll add javascript tests soon. PTAL and let me know what you think of the ...
4 years, 6 months ago (2016-06-06 06:39:10 UTC) #2
apacible
On 2016/06/06 06:39:10, btolsch wrote: > I'll add javascript tests soon. PTAL and let me ...
4 years, 6 months ago (2016-06-06 15:43:43 UTC) #3
btolsch
Yes, sorry, I forgot to close that one. I noticed a minor mistake on that ...
4 years, 6 months ago (2016-06-06 17:17:28 UTC) #4
apacible
On 2016/06/06 17:17:28, btolsch wrote: > Yes, sorry, I forgot to close that one. I ...
4 years, 6 months ago (2016-06-06 17:37:18 UTC) #5
apacible
https://codereview.chromium.org/2040883002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html (right): https://codereview.chromium.org/2040883002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html#newcode89 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html:89: replace-route-available="[[computeReplaceRouteAvailable_(currentRoute_, currentLaunchingSinkId_, shownCastModeValue_)]]" nit: Can you split this into ...
4 years, 6 months ago (2016-06-06 20:17:10 UTC) #6
imcheng
https://codereview.chromium.org/2040883002/diff/1/chrome/browser/ui/webui/media_router/media_router_ui.cc File chrome/browser/ui/webui/media_router/media_router_ui.cc (right): https://codereview.chromium.org/2040883002/diff/1/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode163 chrome/browser/ui/webui/media_router/media_router_ui.cc:163: auto available_source_map(source_cast_mode_callback_.Run()); I was wondering if we can move ...
4 years, 6 months ago (2016-06-06 20:48:19 UTC) #8
btolsch
https://codereview.chromium.org/2040883002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html (right): https://codereview.chromium.org/2040883002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html#newcode89 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html:89: replace-route-available="[[computeReplaceRouteAvailable_(currentRoute_, currentLaunchingSinkId_, shownCastModeValue_)]]" On 2016/06/06 20:17:10, apacible wrote: > ...
4 years, 6 months ago (2016-06-06 23:46:53 UTC) #9
btolsch
I was wrong about the create route response not being used for display (I thought ...
4 years, 6 months ago (2016-06-07 01:32:30 UTC) #10
apacible
https://codereview.chromium.org/2040883002/diff/40001/chrome/browser/resources/media_router/elements/route_details/route_details.js File chrome/browser/resources/media_router/elements/route_details/route_details.js (right): https://codereview.chromium.org/2040883002/diff/40001/chrome/browser/resources/media_router/elements/route_details/route_details.js#newcode61 chrome/browser/resources/media_router/elements/route_details/route_details.js:61: sinkCurrentlyLaunching: { nit: Rename as something like, |isAnySinkCurrentlyLaunching|. It ...
4 years, 6 months ago (2016-06-07 12:13:42 UTC) #11
imcheng
https://codereview.chromium.org/2040883002/diff/1/chrome/browser/ui/webui/media_router/media_router_ui.cc File chrome/browser/ui/webui/media_router/media_router_ui.cc (right): https://codereview.chromium.org/2040883002/diff/1/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode163 chrome/browser/ui/webui/media_router/media_router_ui.cc:163: auto available_source_map(source_cast_mode_callback_.Run()); On 2016/06/06 23:46:52, btolsch wrote: > On ...
4 years, 6 months ago (2016-06-07 17:25:42 UTC) #12
btolsch
https://codereview.chromium.org/2040883002/diff/1/chrome/browser/ui/webui/media_router/media_router_ui.cc File chrome/browser/ui/webui/media_router/media_router_ui.cc (right): https://codereview.chromium.org/2040883002/diff/1/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode163 chrome/browser/ui/webui/media_router/media_router_ui.cc:163: auto available_source_map(source_cast_mode_callback_.Run()); On 2016/06/07 17:25:42, imcheng wrote: > On ...
4 years, 6 months ago (2016-06-07 19:45:34 UTC) #13
imcheng
C++ code LGTM. I defer to Jennifer for HTML/JS changes.
4 years, 6 months ago (2016-06-08 20:00:14 UTC) #14
apacible
lgtm https://codereview.chromium.org/2040883002/diff/80001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html (right): https://codereview.chromium.org/2040883002/diff/80001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html#newcode90 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html:90: is-any-sink-currently-launching="[[ nit: does this work if you do: ...
4 years, 6 months ago (2016-06-08 20:00:53 UTC) #15
btolsch
https://codereview.chromium.org/2040883002/diff/80001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html (right): https://codereview.chromium.org/2040883002/diff/80001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html#newcode90 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html:90: is-any-sink-currently-launching="[[ On 2016/06/08 20:00:53, apacible wrote: > nit: does ...
4 years, 6 months ago (2016-06-08 20:11:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2040883002/120001
4 years, 6 months ago (2016-06-08 20:25:03 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 6 months ago (2016-06-08 21:38:47 UTC) #20
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 21:41:48 UTC) #22
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/a47d5b0506c1183d501767d17ffec02ca419ea76
Cr-Commit-Position: refs/heads/master@{#398687}

Powered by Google App Engine
This is Rietveld 408576698