Index: chrome/browser/ui/webui/media_router/media_router_ui.h |
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h |
index 4c8ef3331691bc64b110af62c1a60814d3fe313e..3d7859f49b6f38cd254d0cb1ab151d15100703db 100644 |
--- a/chrome/browser/ui/webui/media_router/media_router_ui.h |
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.h |
@@ -38,13 +38,13 @@ |
class MediaRoutesObserver; |
class MediaSink; |
class MediaSinksObserver; |
-class CreatePresentationConnectionRequest; |
+class CreatePresentationSessionRequest; |
// Implements the chrome://media-router user interface. |
-class MediaRouterUI : public ConstrainedWebDialogUI, |
- public QueryResultManager::Observer, |
- public PresentationServiceDelegateImpl:: |
- DefaultPresentationRequestObserver { |
+class MediaRouterUI |
+ : public ConstrainedWebDialogUI, |
+ public QueryResultManager::Observer, |
+ public PresentationServiceDelegateImpl::DefaultMediaSourceObserver { |
public: |
// |web_ui| owns this object and is used to initialize the base class. |
explicit MediaRouterUI(content::WebUI* web_ui); |
@@ -79,7 +79,7 @@ |
void InitWithPresentationSessionRequest( |
content::WebContents* initiator, |
const base::WeakPtr<PresentationServiceDelegateImpl>& delegate, |
- scoped_ptr<CreatePresentationConnectionRequest> presentation_request); |
+ scoped_ptr<CreatePresentationSessionRequest> presentation_request); |
// Closes the media router UI. |
void Close(); |
@@ -163,17 +163,20 @@ |
// Creates and sends an issue if route creation times out. |
void RouteCreationTimeout(); |
- // Initializes the dialog with mirroring sources derived from |initiator|. |
- void InitCommon(content::WebContents* initiator); |
- |
- // PresentationServiceDelegateImpl::DefaultPresentationObserver |
- void OnDefaultPresentationChanged( |
- const PresentationRequest& presentation_request) override; |
- void OnDefaultPresentationRemoved() override; |
- |
- // Updates the set of supported cast modes and sends the updated set to |
- // |handler_|. |
- void UpdateCastModes(); |
+ // Sets the source host name to be displayed in the UI. |
+ // Gets cast modes from |query_result_manager_| and forwards it to UI. |
+ // One of the Init* functions must have been called before. |
+ void UpdateSourceHostAndCastModes(const GURL& frame_url); |
+ |
+ // Initializes the dialog with mirroring sources derived from |initiator|, |
+ // and optional |default_source| and |default_frame_url| if any. |
+ void InitCommon(content::WebContents* initiator, |
+ const MediaSource& default_source, |
+ const GURL& default_frame_url); |
+ |
+ // PresentationServiceDelegateImpl::DefaultMediaSourceObserver |
+ void OnDefaultMediaSourceChanged(const MediaSource& source, |
+ const GURL& frame_url) override; |
// Owned by the |web_ui| passed in the ctor, and guaranteed to be deleted |
// only after it has deleted |this|. |
@@ -205,11 +208,7 @@ |
// If set, then the result of the next presentation route request will |
// be handled by this object. |
- scoped_ptr<CreatePresentationConnectionRequest> create_session_request_; |
- |
- // Set to the presentation request corresponding to the presentation cast |
- // mode, if supported. Otherwise set to nullptr. |
- scoped_ptr<PresentationRequest> presentation_request_; |
+ scoped_ptr<CreatePresentationSessionRequest> presentation_request_; |
// It's possible for PresentationServiceDelegateImpl to be destroyed before |
// this class. |