PresentationRequest::MediaSources() is the only part in it that depends on Media-Router-specific classes, and it could be moved to media_source.h to avoid a circular dependency between components/ and content/.
Owner: mfo...@chromium.org Status: Assigned (was: Available) Summary: [Media Router] Refactor PresentationRequest and CreatePresentationConnectionRequest (was: Move media_router::PresentationRequest to content/browser/)
Expanding the scope of this to cover two related code cleanups, including the TODO I added here.
https://cs.chromium.org/chromium/src/chrome/browser/media/router/create_presentation_connection_request.h?l=35
After looking through the code, here are the full list of steps that look necessary.
1. Move PresentationRequest to content/browser as suggested in the original post.
2. Refactor PresentationServiceDelegateImpl/MediaRouterDialogController to pass PresentationRequest instead of CPCR. At this point CPCR is only used by MediaRouterUI to track calls to Media Router.
3. Create a simpler nested struct (implementation detail) of MediaRouterUI to keep track of pending callbacks for calls to the Media Router. The existing CPCR can be deleted as part of this change.
I won't have time to start in earnest on this now, but it will be in my fixit queue.
Comment 1 by sko...@chromium.org
, Apr 19 2017