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..4770b60e987f0f1a885c513815ac6f4f3b56b6a6 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,18 +14,20 @@ 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: |
+ // MediaRouterDialogController: |
bool ShowMediaRouterDialogForPresentation( |
scoped_ptr<CreatePresentationSessionRequest> request) override; |
+ // This will destroy the dialog WebContents. |
+ void CloseMediaRouterDialog() override; |
// Shows the media router dialog modal to the initiator WebContents. |
// Creates the dialog if it did not exist prior to this call. |
@@ -37,13 +39,9 @@ class MediaRouterDialogControllerImpl |
// 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 |
@@ -53,28 +51,20 @@ class MediaRouterDialogControllerImpl |
// 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; |
// 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); |