Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 11 #include "chrome/browser/media/router/create_presentation_session_request.h" | 13 #include "chrome/browser/media/router/create_presentation_session_request.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 13 | 15 |
| 14 namespace content { | 16 namespace content { |
| 15 class WebContents; | 17 class WebContents; |
| 16 } // namespace content | 18 } // namespace content |
| 17 | 19 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // Use MediaRouterDialogController::GetOrCreateForWebContents() to create an | 55 // Use MediaRouterDialogController::GetOrCreateForWebContents() to create an |
| 54 // instance. | 56 // instance. |
| 55 explicit MediaRouterDialogController(content::WebContents* initiator); | 57 explicit MediaRouterDialogController(content::WebContents* initiator); |
| 56 | 58 |
| 57 void ActivateInitiatorWebContents(); | 59 void ActivateInitiatorWebContents(); |
| 58 | 60 |
| 59 scoped_ptr<CreatePresentationSessionRequest> PassPresentationRequest(); | 61 scoped_ptr<CreatePresentationSessionRequest> PassPresentationRequest(); |
| 60 | 62 |
| 61 content::WebContents* initiator() const { return initiator_; } | 63 content::WebContents* initiator() const { return initiator_; } |
| 62 | 64 |
| 65 std::string GetMediaSourceId() const; | |
|
imcheng
2015/08/18 17:50:34
Please add documentation
whywhat
2015/08/18 19:21:24
Done.
| |
| 66 | |
| 63 // Resets the state of the controller. Must be called from the overrides. | 67 // Resets the state of the controller. Must be called from the overrides. |
| 64 virtual void Reset(); | 68 virtual void Reset(); |
| 65 // Creates a new media router dialog modal to |initiator_|. | 69 // Creates a new media router dialog modal to |initiator_|. |
| 66 virtual void CreateMediaRouterDialog() = 0; | 70 virtual void CreateMediaRouterDialog() = 0; |
| 67 // Closes the media router dialog if it exists. | 71 // Closes the media router dialog if it exists. |
| 68 virtual void CloseMediaRouterDialog() = 0; | 72 virtual void CloseMediaRouterDialog() = 0; |
| 69 // Indicates if the media router dialog already exists. | 73 // Indicates if the media router dialog already exists. |
| 70 virtual bool IsShowingMediaRouterDialog() const = 0; | 74 virtual bool IsShowingMediaRouterDialog() const = 0; |
| 71 | 75 |
| 72 base::ThreadChecker thread_checker_; | 76 base::ThreadChecker thread_checker_; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 83 // Passed from the caller via ShowMediaRouterDialogForPresentation to the | 87 // Passed from the caller via ShowMediaRouterDialogForPresentation to the |
| 84 // dialog when it is initialized. | 88 // dialog when it is initialized. |
| 85 scoped_ptr<CreatePresentationSessionRequest> presentation_request_; | 89 scoped_ptr<CreatePresentationSessionRequest> presentation_request_; |
| 86 | 90 |
| 87 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogController); | 91 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogController); |
| 88 }; | 92 }; |
| 89 | 93 |
| 90 } // namespace media_router | 94 } // namespace media_router |
| 91 | 95 |
| 92 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_ | 96 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_ |
| OLD | NEW |