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

Issue 2264153002: [Presentation API] Add support for multiple URLs in PresentationRequest on Media Router UI side (Closed)

Created:
4 years, 4 months ago by takumif
Modified:
4 years, 2 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, media-router+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] Add support for multiple URLs in PresentationRequest on Media Router UI side Relevant CL: https://codereview.chromium.org/2174693004/ This CL: - MediaRouterUI now gets multiple sources from PresentationRequest and passes them onto QueryResultManager - QueryResultManager keeps track of not only which cast modes a sink supports, but also which sources for each cast mode - QueryResultManager::MediaSourceMediaSinksObserver observes changes in sinks compatibility of a source rather than a cast mode - QueryResultManager::SetSourcesForCastMode() takes multiple media sources per cast mode - QueryResultManager::GetSourceForCastModeAndSink() (was GetSourceForCastMode()) requires you to specify the sink, because different sinks may support different sources for the same cast mode - Add/fix unit tests for QueryResultManager and MediaRouterUI - Add a class CastModesWithMediaSources used by QueryResultManager for storing cast modes and sources (and unit tests for it). BUG=627655 Committed: https://crrev.com/4f8671de022b8908686fc5667039c4288a7eeb70 Cr-Commit-Position: refs/heads/master@{#421412}

Patch Set 1 #

Total comments: 17

Patch Set 2 : Create CastModesWithMediaSources #

Total comments: 29

Patch Set 3 : Address Mark's comments, add unit test for CMWMS #

Total comments: 22

Patch Set 4 : Address Mark's comments #

Total comments: 52

Patch Set 5 : Address Mark and Derek's comments #

Total comments: 3

Patch Set 6 : rebase #

Patch Set 7 : move ctor for CastModesWithMediaSources #

Total comments: 4

Patch Set 8 : use base::MakeUnique, name changes #

Patch Set 9 : Modify MediaRouterDialogControllerAndroid, format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+667 lines, -219 lines) Patch
M chrome/browser/media/android/router/media_router_dialog_controller_android.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/media/router/create_presentation_connection_request.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/router/create_presentation_connection_request.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/media/router/create_presentation_connection_request_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/router/media_sink.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/media/router/media_source.h View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/media/router/media_source.cc View 1 2 1 chunk +1 line, -8 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_type_converters_unittest.cc View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/media/router/presentation_media_sinks_observer.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/router/presentation_media_sinks_observer.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/media/router/presentation_request.h View 1 2 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/media/router/presentation_request.cc View 1 2 3 4 2 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/media/router/presentation_request_unittest.cc View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.h View 1 2 3 4 5 6 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc View 1 2 3 4 5 6 7 8 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/media_router/cast_modes_with_media_sources_unittest.cc View 1 2 3 1 chunk +75 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui.cc View 1 2 3 4 5 6 7 8 7 chunks +24 lines, -17 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc View 1 2 3 4 9 chunks +21 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/media_router/query_result_manager.h View 1 2 3 4 5 6 7 8 5 chunks +78 lines, -46 lines 0 comments Download
M chrome/browser/ui/webui/media_router/query_result_manager.cc View 1 2 3 4 5 6 7 8 5 chunks +128 lines, -69 lines 0 comments Download
M chrome/browser/ui/webui/media_router/query_result_manager_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +184 lines, -34 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 71 (35 generated)
takumif
Hey Mark, could you take a look? Thanks!
4 years, 4 months ago (2016-08-22 18:11:44 UTC) #5
mark a. foltz
This is a really tricky change with lots of refactoring, thanks for taking it on. ...
4 years, 4 months ago (2016-08-23 20:46:47 UTC) #6
takumif
On 2016/08/23 20:46:47, mark a. foltz wrote: > This is a really tricky change with ...
4 years, 4 months ago (2016-08-23 22:12:56 UTC) #7
takumif
https://codereview.chromium.org/2264153002/diff/1/chrome/browser/ui/webui/media_router/query_result_manager.cc File chrome/browser/ui/webui/media_router/query_result_manager.cc (right): https://codereview.chromium.org/2264153002/diff/1/chrome/browser/ui/webui/media_router/query_result_manager.cc#newcode93 chrome/browser/ui/webui/media_router/query_result_manager.cc:93: RemoveObserversForCastMode(cast_mode); On 2016/08/23 20:46:46, mark a. foltz wrote: > ...
4 years, 4 months ago (2016-08-23 22:13:09 UTC) #8
chromium-reviews
Hey Mark, when you have time could you take a look at my comments above ...
4 years, 3 months ago (2016-08-24 21:56:57 UTC) #9
mark a. foltz
On 2016/08/24 at 21:56:57, chromium-reviews wrote: > Hey Mark, when you have time could you ...
4 years, 3 months ago (2016-08-25 21:07:33 UTC) #10
mark a. foltz
On 2016/08/23 at 22:12:56, takumif wrote: > On 2016/08/23 20:46:47, mark a. foltz wrote: > ...
4 years, 3 months ago (2016-08-26 05:03:19 UTC) #11
takumif
On 2016/08/26 05:03:19, mark a. foltz wrote: > I'm not sure of the exact scenario ...
4 years, 3 months ago (2016-08-26 18:06:08 UTC) #12
mark a. foltz
On 2016/08/26 at 18:06:08, takumif wrote: > On 2016/08/26 05:03:19, mark a. foltz wrote: > ...
4 years, 3 months ago (2016-08-26 18:52:14 UTC) #13
mark a. foltz
Sorry, forgot to publish a draft. https://codereview.chromium.org/2264153002/diff/1/chrome/browser/ui/webui/media_router/query_result_manager.cc File chrome/browser/ui/webui/media_router/query_result_manager.cc (right): https://codereview.chromium.org/2264153002/diff/1/chrome/browser/ui/webui/media_router/query_result_manager.cc#newcode101 chrome/browser/ui/webui/media_router/query_result_manager.cc:101: sinks_observers_[cast_mode].push_back(std::move(observer)); On 2016/08/23 ...
4 years, 3 months ago (2016-08-29 23:00:29 UTC) #14
takumif
I decided to create a new class, CastModesWithMediaSources, rather than making MediaSinkWithCastModes contain sources as ...
4 years, 3 months ago (2016-08-29 23:05:15 UTC) #15
mark a. foltz
Thanks, overall I feel this is easier to follow, and most of my comments are ...
4 years, 3 months ago (2016-08-31 05:18:55 UTC) #16
takumif
Hi Mark, thanks for the comments. I've made changes accordingly. Please take a look, thanks! ...
4 years, 3 months ago (2016-09-01 21:09:26 UTC) #19
mark a. foltz
Overall design looks good. Mostly minor comments and naming suggestions https://codereview.chromium.org/2264153002/diff/80001/chrome/browser/media/router/create_presentation_connection_request.cc File chrome/browser/media/router/create_presentation_connection_request.cc (right): https://codereview.chromium.org/2264153002/diff/80001/chrome/browser/media/router/create_presentation_connection_request.cc#newcode7 ...
4 years, 3 months ago (2016-09-02 23:00:37 UTC) #20
takumif
Please take a look, thanks! https://codereview.chromium.org/2264153002/diff/80001/chrome/browser/media/router/create_presentation_connection_request.cc File chrome/browser/media/router/create_presentation_connection_request.cc (right): https://codereview.chromium.org/2264153002/diff/80001/chrome/browser/media/router/create_presentation_connection_request.cc#newcode7 chrome/browser/media/router/create_presentation_connection_request.cc:7: #include <memory> On 2016/09/02 ...
4 years, 3 months ago (2016-09-06 21:53:20 UTC) #23
mark a. foltz
Pretty close. Most of my comments are nit-picky. One substantial comment on query_result_manager. https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/media/router/presentation_request.cc File ...
4 years, 3 months ago (2016-09-09 22:22:28 UTC) #25
imcheng
Drive-by comments. This design is a little different from what I had in mind. In ...
4 years, 3 months ago (2016-09-12 19:26:29 UTC) #27
mark a. foltz
On 2016/09/12 at 19:26:29, imcheng wrote: > Drive-by comments. This design is a little different ...
4 years, 3 months ago (2016-09-12 20:54:39 UTC) #28
mark a. foltz
On 2016/09/12 at 20:54:39, mark a. foltz wrote: > On 2016/09/12 at 19:26:29, imcheng wrote: ...
4 years, 3 months ago (2016-09-12 20:55:50 UTC) #29
takumif
Thanks for the comments. Please take a look. https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/media/router/presentation_request.cc File chrome/browser/media/router/presentation_request.cc (right): https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/media/router/presentation_request.cc#newcode34 chrome/browser/media/router/presentation_request.cc:34: for ...
4 years, 3 months ago (2016-09-13 03:48:22 UTC) #31
mark a. foltz
https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc File chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc (right): https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc#newcode29 chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc:29: return base::ContainsKey(cast_modes_, cast_mode) On 2016/09/13 at 03:48:21, takumif wrote: ...
4 years, 3 months ago (2016-09-13 17:30:15 UTC) #32
takumif
https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc File chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc (right): https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc#newcode29 chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.cc:29: return base::ContainsKey(cast_modes_, cast_mode) On 2016/09/13 17:30:15, mark a. foltz ...
4 years, 3 months ago (2016-09-13 19:20:34 UTC) #34
mark a. foltz
LGTM % one more suggestion. This looks pretty good, a fresh pair of eyes might ...
4 years, 3 months ago (2016-09-13 20:38:18 UTC) #35
imcheng
lgtm https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/ui/webui/media_router/query_result_manager.h File chrome/browser/ui/webui/media_router/query_result_manager.h (right): https://codereview.chromium.org/2264153002/diff/140001/chrome/browser/ui/webui/media_router/query_result_manager.h#newcode155 chrome/browser/ui/webui/media_router/query_result_manager.h:155: std::map<MediaSink, CastModesWithMediaSources, MediaSink::Compare> all_sinks_; On 2016/09/13 03:48:22, takumif ...
4 years, 3 months ago (2016-09-14 01:51:23 UTC) #36
takumif
+wfh@, please take a look at media_router_type_converters_unittest.cc (security owner). +msw@, please take a look at ...
4 years, 3 months ago (2016-09-14 18:49:22 UTC) #40
msw
chrome/browser/ui/BUILD.gn lgtm
4 years, 3 months ago (2016-09-14 18:54:11 UTC) #41
takumif
A friendly ping -- wfh@, please take a look at chrome/browser/media/router/mojo/media_router_type_converters_unittest.cc. Thank you!
4 years, 3 months ago (2016-09-20 16:41:36 UTC) #42
takumif
tsepez/wfh, please take a look at chrome/browser/media/router/mojo/media_router_type_converters_unittest.cc imcheng/mfoltz, please take a look at chrome/browser/media/android/router/media_router_dialog_controller_android.cc Thank ...
4 years, 2 months ago (2016-09-27 22:29:27 UTC) #57
imcheng
chrome/browser/media/android/router/media_router_dialog_controller_android.cc lgtm
4 years, 2 months ago (2016-09-27 22:36:27 UTC) #58
Will Harris
chrome/browser/media/router/mojo/media_router_type_converters_unittest.cc lgtm
4 years, 2 months ago (2016-09-27 22:37:59 UTC) #59
Tom Sepez
On 2016/09/27 22:37:59, Will Harris wrote: > chrome/browser/media/router/mojo/media_router_type_converters_unittest.cc lgtm Deferring to WFH.
4 years, 2 months ago (2016-09-27 22:44:49 UTC) #60
mark a. foltz
lgtm Please check and update any unittests for media_route_dialog_controller_android.cc. Will need to sync with avayvod@ ...
4 years, 2 months ago (2016-09-27 22:52:38 UTC) #61
takumif
On 2016/09/27 22:52:38, mfoltz_ooo_until_9_27 wrote: > lgtm > > Please check and update any unittests ...
4 years, 2 months ago (2016-09-28 01:07:52 UTC) #64
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/2264153002/330001
4 years, 2 months ago (2016-09-28 01:10:03 UTC) #67
commit-bot: I haz the power
Committed patchset #9 (id:330001)
4 years, 2 months ago (2016-09-28 01:16:34 UTC) #69
commit-bot: I haz the power
4 years, 2 months ago (2016-09-28 01:18:33 UTC) #71
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/4f8671de022b8908686fc5667039c4288a7eeb70
Cr-Commit-Position: refs/heads/master@{#421412}

Powered by Google App Engine
This is Rietveld 408576698