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

Issue 2731033002: [Media Router] Custom Controls 3 - add plumbing through MRUI and MRWebUIMessageHandler (Closed)

Created:
3 years, 9 months ago by takumif
Modified:
3 years, 7 months ago
CC:
chromium-reviews, media-router+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media Router] Custom Controls 3 - add plumbing through MRUI and MRWebUIMessageHandler When the route details view is opened, MediaRouterUI will instantiate an observer for the controller obtained via MediaRouter::GetRouteController(). MediaRouterUI will send media commands (e.g. play/pause) to the controller through the reference held by the observer. The observer will be destroyed when the route details view is closed. MediaRouterWebUIMessageHandler will parse media commands from the WebUI and pass them on to MediaRouterUI. It will also forward status updates from the controller observer to the WebUI. The Chromium-side implementation of custom controls will be done in these patches: 1. Mojo/MediaStatus/MediaRouteController: http://crrev/2727123002 2. MediaRouter::GetRouteController(): http://crrev/2728543009 3. MRUI/MRWebUIMessageHandler: this patch 4. Custom controls WebUI: http://crrev/2725503002 Custom controls design doc: https://docs.google.com/document/d/1_8QxdFIiiJX39jR1Wi1Zn9FW-Y66EMvX1GmQZvjN4G0/edit BUG=684638 Review-Url: https://codereview.chromium.org/2731033002 Cr-Commit-Position: refs/heads/master@{#468864} Committed: https://chromium.googlesource.com/chromium/src/+/e91ca334b8194bc324044057aa6b9f8bf898b1a7

Patch Set 1 #

Patch Set 2 : Make MediaRouteController ref-counted #

Patch Set 3 : Add and refactor tests #

Patch Set 4 : Notify WebUI of route controller invalidation #

Patch Set 5 : Sync with CL #2 #

Patch Set 6 : Update with finch switch #

Patch Set 7 : Rebase #

Total comments: 20

Patch Set 8 : Address Derek's comments #

Total comments: 22

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

Total comments: 8

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

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+756 lines, -368 lines) Patch
M chrome/browser/media/router/mojo/media_route_controller.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/media/router/mojo/media_route_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_test.h View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_mojo_test.cc View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui.h View 1 2 3 4 5 6 7 8 9 11 chunks +50 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui.cc View 1 2 3 4 5 6 7 8 9 3 chunks +50 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +65 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h View 1 2 3 4 5 6 7 8 5 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc View 1 2 3 4 5 6 7 8 7 chunks +150 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc View 1 2 3 4 5 6 7 8 11 chunks +368 lines, -345 lines 0 comments Download
M chrome/common/chrome_features.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_features.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (26 generated)
takumif
Please take a look, thanks!
3 years, 9 months ago (2017-03-25 16:20:15 UTC) #7
imcheng
I wanted to see if we can remove some of the boilerplate for the controller ...
3 years, 8 months ago (2017-04-22 00:22:51 UTC) #13
takumif
Thanks for reviewing! https://codereview.chromium.org/2731033002/diff/240001/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/2731033002/diff/240001/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode805 chrome/browser/ui/webui/media_router/media_router_ui.cc:805: void MediaRouterUI::OnUIDetailsViewOpened(MediaRoute::Id route_id) { On 2017/04/22 ...
3 years, 8 months ago (2017-04-24 20:59:24 UTC) #15
mark a. foltz
No major concerns, mostly bike shedding on naming. Sorry that this took writing reams of ...
3 years, 8 months ago (2017-04-26 21:01:19 UTC) #16
imcheng
https://codereview.chromium.org/2731033002/diff/240001/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/2731033002/diff/240001/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode808 chrome/browser/ui/webui/media_router/media_router_ui.cc:808: route_controller_observer_ = base::MakeUnique<UIMediaRouteControllerObserver>( On 2017/04/24 20:59:23, takumif wrote: > ...
3 years, 8 months ago (2017-04-26 21:48:39 UTC) #17
takumif
https://codereview.chromium.org/2731033002/diff/240001/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/2731033002/diff/240001/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode808 chrome/browser/ui/webui/media_router/media_router_ui.cc:808: route_controller_observer_ = base::MakeUnique<UIMediaRouteControllerObserver>( On 2017/04/26 21:48:39, imcheng wrote: > ...
3 years, 8 months ago (2017-04-27 03:04:18 UTC) #19
mark a. foltz
LGTM % a couple of remaining comments Thanks, this looks like a clean design, except ...
3 years, 7 months ago (2017-05-01 21:28:43 UTC) #20
imcheng
lgtm https://codereview.chromium.org/2731033002/diff/320001/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc File chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc (right): https://codereview.chromium.org/2731033002/diff/320001/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc#newcode906 chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc:906: time_delta <= current_media_status_->duration) { Is this validation necessary ...
3 years, 7 months ago (2017-05-02 19:16:10 UTC) #21
takumif
https://codereview.chromium.org/2731033002/diff/320001/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/2731033002/diff/320001/chrome/browser/ui/webui/media_router/media_router_ui.cc#newcode166 chrome/browser/ui/webui/media_router/media_router_ui.cc:166: ui_->handler_->UpdateMediaRouteStatus(status); On 2017/05/01 21:28:42, mark a. foltz wrote: > ...
3 years, 7 months ago (2017-05-02 21:37:37 UTC) #24
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/2731033002/360001
3 years, 7 months ago (2017-05-03 01:21:11 UTC) #33
commit-bot: I haz the power
Committed patchset #11 (id:360001) as https://chromium.googlesource.com/chromium/src/+/e91ca334b8194bc324044057aa6b9f8bf898b1a7
3 years, 7 months ago (2017-05-03 01:54:19 UTC) #36
findit-for-me
Findit (https://goo.gl/kROfz5) identified this CL at revision 468864 as the culprit for failures in the ...
3 years, 7 months ago (2017-05-03 04:00:05 UTC) #37
msramek
Sheriff here, I agree with FindIt. This seems to have broken unit_tests on all OSes. ...
3 years, 7 months ago (2017-05-03 07:11:58 UTC) #39
msramek
3 years, 7 months ago (2017-05-03 07:13:27 UTC) #40

Powered by Google App Engine
This is Rietveld 408576698