| Index: chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h
|
| diff --git a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h
|
| index de09d8113d1fe5c15846f6144392658b0e77f17b..5b5d881090d439502885b64c43ebd55f0c1b34e8 100644
|
| --- a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h
|
| +++ b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h
|
| @@ -14,69 +14,48 @@ namespace media_router {
|
|
|
| // A desktop implementation of MediaRouterDialogController.
|
| // This class is not thread safe and must be called on the UI thread.
|
| -class MediaRouterDialogControllerImpl
|
| - : public content::WebContentsUserData<MediaRouterDialogControllerImpl>,
|
| - public MediaRouterDialogController {
|
| +class MediaRouterDialogControllerImpl :
|
| + public content::WebContentsUserData<MediaRouterDialogControllerImpl>,
|
| + public MediaRouterDialogController {
|
| public:
|
| ~MediaRouterDialogControllerImpl() override;
|
|
|
| static MediaRouterDialogControllerImpl* GetOrCreateForWebContents(
|
| content::WebContents* web_contents);
|
|
|
| - // SuperClass:
|
| - bool ShowMediaRouterDialogForPresentation(
|
| - scoped_ptr<CreatePresentationSessionRequest> request) override;
|
| -
|
| - // Shows the media router dialog modal to the initiator WebContents.
|
| - // Creates the dialog if it did not exist prior to this call.
|
| - // If the dialog already exists, brings the dialog to the front.
|
| - // Returns WebContents for the media router dialog.
|
| - content::WebContents* ShowMediaRouterDialog();
|
| + // MediaRouterDialogController:
|
| + bool IsShowingMediaRouterDialog() override;
|
| + // This will destroy the dialog WebContents.
|
| + void CloseMediaRouterDialog() override;
|
|
|
| // Returns the media router dialog WebContents.
|
| // Returns nullptr if there is no dialog.
|
| content::WebContents* GetMediaRouterDialog() const;
|
|
|
| - // Closes the media router dialog. This will destroy the dialog WebContents.
|
| - // It is an error to call this function if there is currently no dialog.
|
| - void CloseMediaRouterDialog();
|
|
|
| private:
|
| class DialogWebContentsObserver;
|
| - class InitiatorWebContentsObserver;
|
| friend class content::WebContentsUserData<MediaRouterDialogControllerImpl>;
|
|
|
| // Use MediaRouterDialogControllerImpl::CreateForWebContents() to create an
|
| // instance.
|
| explicit MediaRouterDialogControllerImpl(content::WebContents* web_contents);
|
|
|
| - // Creates a new media router dialog modal to |initiator_|.
|
| - void CreateMediaRouterDialog();
|
| -
|
| - // Resets this dialog controller to an empty state.
|
| - void Reset();
|
| + // MediaRouterDialogController:
|
| + void Reset() override;
|
| + void CreateMediaRouterDialog() override;
|
|
|
| // Invoked when the dialog WebContents has navigated.
|
| void OnDialogNavigated(const content::LoadCommittedDetails& details);
|
|
|
| void PopulateDialog(content::WebContents* media_router_dialog);
|
|
|
| - scoped_ptr<InitiatorWebContentsObserver> initiator_observer_;
|
| scoped_ptr<DialogWebContentsObserver> dialog_observer_;
|
|
|
| - content::WebContents* const initiator_;
|
| -
|
| // True if the controller is waiting for a new media router dialog to be
|
| // created.
|
| bool media_router_dialog_pending_;
|
|
|
| - // Data for dialogs created under a Presentation API context.
|
| - // Passed from the caller of ShowMediaRouterDialogForPresentation(), and
|
| - // passed to the MediaRouterUI when it is initialized.
|
| - scoped_ptr<CreatePresentationSessionRequest> presentation_request_;
|
| -
|
| - base::ThreadChecker thread_checker_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerImpl);
|
| };
|
|
|
|
|