Define data format and interfaces for sending media commands from WebUI to the browser and media status updates in the opposite direction.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e91ca334b8194bc324044057aa6b9f8bf898b1a7 commit e91ca334b8194bc324044057aa6b9f8bf898b1a7 Author: takumif <takumif@chromium.org> Date: Wed May 03 01:54:03 2017 [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} [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/media/router/mojo/media_route_controller.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/media/router/mojo/media_route_controller.h [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/media/router/mojo/media_router_mojo_test.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/media/router/mojo/media_router_mojo_test.h [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/ui/webui/media_router/media_router_ui.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/ui/webui/media_router/media_router_ui.h [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/common/chrome_features.cc [modify] https://crrev.com/e91ca334b8194bc324044057aa6b9f8bf898b1a7/chrome/common/chrome_features.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/636a9d194006073485edfa89533c1076dc1b0206 commit 636a9d194006073485edfa89533c1076dc1b0206 Author: msramek <msramek@chromium.org> Date: Wed May 03 07:14:05 2017 Revert of [Media Router] Custom Controls 3 - add plumbing through MRUI and MRWebUIMessageHandler (patchset #11 id:360001 of https://codereview.chromium.org/2731033002/ ) Reason for revert: Breaks unit_tests on all OSes: https://build.chromium.org/p/chromium.win/builders/Win10%20Tests%20x64/builds/11182/steps/unit_tests%20on%20Windows-10-10586 https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/38007/steps/unit_tests https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests/builds/40693/steps/unit_tests Original issue's 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 TBR=mfoltz@chromium.org,imcheng@chromium.org,takumif@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 684638 Review-Url: https://codereview.chromium.org/2862513002 Cr-Commit-Position: refs/heads/master@{#468915} [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/media/router/mojo/media_route_controller.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/media/router/mojo/media_route_controller.h [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/media/router/mojo/media_router_mojo_test.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/media/router/mojo/media_router_mojo_test.h [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/ui/webui/media_router/media_router_ui.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/ui/webui/media_router/media_router_ui.h [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/common/chrome_features.cc [modify] https://crrev.com/636a9d194006073485edfa89533c1076dc1b0206/chrome/common/chrome_features.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8d142c1674a4233fc63b367b1bc100ac00eaa4f7 commit 8d142c1674a4233fc63b367b1bc100ac00eaa4f7 Author: takumif <takumif@chromium.org> Date: Thu May 04 22:23:33 2017 Reland [Media Router] Custom Controls 3 - add plumbing through MRUI and MRWebUIMessageHandler This is a reland of http://crrev/2731033002/. There were DCHECKs with side effects that should have been CHECKs. BUG= 684638 Review-Url: https://codereview.chromium.org/2859953002 Cr-Commit-Position: refs/heads/master@{#469492} [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/media/router/mojo/media_route_controller.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/media/router/mojo/media_route_controller.h [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/media/router/mojo/media_router_mojo_test.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/media/router/mojo/media_router_mojo_test.h [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/ui/webui/media_router/media_router_ui.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/ui/webui/media_router/media_router_ui.h [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/common/chrome_features.cc [modify] https://crrev.com/8d142c1674a4233fc63b367b1bc100ac00eaa4f7/chrome/common/chrome_features.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f5128acd5e3d64e615280d77f43d685641a21ee0 commit f5128acd5e3d64e615280d77f43d685641a21ee0 Author: takumif <takumif@chromium.org> Date: Mon May 15 22:07:09 2017 [Media Router] Notify MRUI of a media status update when it starts observing When the browser-side MediaRouteController already existed for a route, new observers weren't getting notified of media status updates until there were further updates. This change makes MRUI get notified when it starts observing. BUG= 684638 Review-Url: https://codereview.chromium.org/2874283002 Cr-Commit-Position: refs/heads/master@{#471917} [modify] https://crrev.com/f5128acd5e3d64e615280d77f43d685641a21ee0/chrome/browser/media/router/mojo/media_route_controller.cc [modify] https://crrev.com/f5128acd5e3d64e615280d77f43d685641a21ee0/chrome/browser/media/router/mojo/media_route_controller.h [modify] https://crrev.com/f5128acd5e3d64e615280d77f43d685641a21ee0/chrome/browser/ui/webui/media_router/media_router_ui.cc [modify] https://crrev.com/f5128acd5e3d64e615280d77f43d685641a21ee0/chrome/browser/ui/webui/media_router/media_router_ui.h [modify] https://crrev.com/f5128acd5e3d64e615280d77f43d685641a21ee0/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
Comment 1 by imch...@chromium.org
, Jan 24 2017