DescriptionForce DEFAULT cast mode when starting presentation from content.
The Presentation API spec recommends that the origin requesting
presentation be shown to the user when PresentationRequest.start() is
called. This patch sets a new flag on a CastMode, isForced, that will
cause the cast mode picker to show it initially when it is rendered.
This flag is set when the Media Router UI is initialized from a
PresentationRequest (e.g., from PresentationRequest.start()).
There are a few cleanups that could be done as followup changes:
- DEFAULT cast mode is more logically PRESENTATION since the request can
come from any PresentationRequest (not just the page-default one).
- CreatePresentationConnectionRequest and PresentationRequest are very
similar and could be combined.
- A default content::PresentationError is initialized with type
NO_AVAILABLE_SCREENS. It would seem more logical to initialize with
type UNKNOWN.
TBR jam@ for a comment only change to presentation_info.h.
BUG=704964
TBR=jam
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2862393002
Cr-Commit-Position: refs/heads/master@{#473330}
Committed: https://chromium.googlesource.com/chromium/src/+/eeb1406b336d5834d9362fad5e16af8ca45e6f0e
Patch Set 1 #Patch Set 2 : Updating unittests. #Patch Set 3 : Adds unit tests where possible. #Patch Set 4 : Update media_router_ui.cc #Patch Set 5 : Update unittests #
Total comments: 4
Patch Set 6 : Respond to takumif@ comments #Patch Set 7 : Fix YouTube bug #Patch Set 8 : Extend CastModeListTests to check sink list #
Total comments: 4
Patch Set 9 : Remove logging #Patch Set 10 : Address apacible@ comment #Patch Set 11 : Rebase #Patch Set 12 : Fix bug found by closure compiler #Messages
Total messages: 34 (14 generated)
|