Design doc: http://go/local-screens-design-doc The receiver window will be shown fullscreen when the user chooses a wired display as the sink to Cast to.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7adfa2d52607a71519432fbe05bc1bdb93f7ba75 commit 7adfa2d52607a71519432fbe05bc1bdb93f7ba75 Author: btolsch <btolsch@chromium.org> Date: Sat Dec 16 23:35:44 2017 Add PresentationReceiverWindow for wired screen presentations This change adds a class which shows a Presentation API receiver page in a popup-style window that is started fullscreen on a specific wired display. It also changes the handling of one-off OTR profiles used by presentations, which affects this class and offscreen tabs. Previously, offscreen tabs assumed ownership of their OTR profiles. However, it was possible for this to be violated by opening a DevTools window and Browser would think that it could destroy the profile. Additionally, there was no handling of the original profile being destroyed, which would leave dangling references in the OTR profile. This has been addressed by adding an IndependentOTRProfileManager class, which helps both offscreen tabs and PresentationReceiverWindow manage the lifetime of these one-off OTR profiles. Bug: 777654 , 786158 , 664351 , 727487 Change-Id: I64d032419d341affbdde4ee80b57d45c99648588 Reviewed-on: https://chromium-review.googlesource.com/742122 Commit-Queue: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Derek Cheng <imcheng@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Cr-Commit-Position: refs/heads/master@{#524615} [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/chromeos/profiles/profile_helper.h [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/extensions/api/tab_capture/offscreen_tab.h [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/BUILD.gn [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/independent_otr_profile_manager.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/independent_otr_profile_manager.h [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/independent_otr_profile_manager_browsertest.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/presentation_navigation_policy.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/presentation_navigation_policy.h [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/media/router/receiver_presentation_service_delegate_impl.cc [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/BUILD.gn [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/browser.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/media_router/presentation_receiver_window.h [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/media_router/presentation_receiver_window_controller.h [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/media_router/presentation_receiver_window_controller_browsertest.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/media_router/presentation_receiver_window_delegate.h [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/location_bar/location_bar_view.cc [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/location_bar/location_bar_view.h [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/media_router/presentation_receiver_window_factory.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/media_router/presentation_receiver_window_frame.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/media_router/presentation_receiver_window_frame.h [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/browser/ui/views/media_router/presentation_receiver_window_view.h [modify] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/test/BUILD.gn [add] https://crrev.com/7adfa2d52607a71519432fbe05bc1bdb93f7ba75/chrome/test/data/media/router/presentation_receiver.html
I'm going to reopen this for Mac support.
Brandon, will you be working on the Mac implementation?
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2f8255821094157e28b2b759a11098ff82038733 commit 2f8255821094157e28b2b759a11098ff82038733 Author: btolsch <btolsch@chromium.org> Date: Fri Jan 19 17:10:01 2018 [Presentation API] Add a check to handle local screens for non-Views Mac The existing WiredDisplayPresentationReceiver implementation works on Mac, but only with mac_views_browser=1. This is expected to be enabled by default soon enough that we aren't pursuing a separate Cocoa implementation. This change adds a function to media_router_feature.h so PresentationReceiverWindow::Create can still be linked on Mac, in case mac_views_browser is enabled, but tells WiredDisplayMediaRouteProvider not to call it when running under Cocoa. This also allows more WiredDisplayMediaRouteProvider test paths to be enabled for Mac. Bug: 777654 Change-Id: Ia9a3406c6865165023c10da4588988efe072d9d1 Reviewed-on: https://chromium-review.googlesource.com/864488 Reviewed-by: Trent Apted <tapted@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Commit-Queue: Brandon Tolsch <btolsch@chromium.org> Cr-Commit-Position: refs/heads/master@{#530543} [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/media/router/BUILD.gn [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/media/router/media_router_feature.cc [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/media/router/media_router_feature.h [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider_unittest.cc [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/media/router/providers/wired_display/wired_display_presentation_receiver_factory.cc [modify] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/ui/BUILD.gn [add] https://crrev.com/2f8255821094157e28b2b759a11098ff82038733/chrome/browser/ui/media_router/presentation_receiver_window_factory_mac.cc
Brandon, can we close this now?
Opened crbug.com/809682 for the remaining location bar issue. Closing this.
Hi, can you make design do public? Or describe it in few words? Also, why support for wired display is necessary?
Comment 1 by mfo...@chromium.org
, Oct 26 2017