Currently we allow the user to present to the display on which the controlling window is shown. This causes the controlling window to be hidden behind the full-screen presentation window (except on Linux). We should prevent this from occurring.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2dd298b5fea7ca012b413e9a54712dc7f47dcb59 commit 2dd298b5fea7ca012b413e9a54712dc7f47dcb59 Author: Takumi Fujimoto <takumif@chromium.org> Date: Thu Feb 01 21:18:38 2018 [Local Screen Casting] Hide the sink for the controlling window's display We will observe which display the Media Router dialog's initiator web contents are on, and hide the local screen sink for that display from the sink list. This is to prevent the user from launching a presentation window that covers the controlling window. It would be nicer if the WiredDisplayMRP were responsible for determining which sinks should be disabled. Unfortunately, there is no clean way for MRUI to notify WiredDisplayMRP which display the dialog is on. So it is done in MRUI instead. Also doing some cleanups in MRUI (base::MakeUnique to std::make_unique, base::Callback to base::RepeatingCallback). Bug: 800433 Change-Id: I0ec74758c485b89eee4f4417b7358922aa4f32a1 Reviewed-on: https://chromium-review.googlesource.com/830972 Commit-Queue: Takumi Fujimoto <takumif@chromium.org> Reviewed-by: Derek Cheng <imcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#533814} [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.h [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider_unittest.cc [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/BUILD.gn [add] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/views/media_router/web_contents_display_observer_view.cc [add] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/views/media_router/web_contents_display_observer_view.h [add] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/views/media_router/web_contents_display_observer_view_unittest.cc [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/webui/media_router/media_router_ui.cc [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/webui/media_router/media_router_ui.h [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h [add] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/browser/ui/webui/media_router/web_contents_display_observer.h [modify] https://crrev.com/2dd298b5fea7ca012b413e9a54712dc7f47dcb59/chrome/test/BUILD.gn
Comment 1 by taku...@chromium.org
, Jan 25 2018