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_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDRO
ID_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDRO
ID_H_ |
6 #define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDRO
ID_H_ | 6 #define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDRO
ID_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/media/router/media_router_dialog_controller.h" | 9 #include "chrome/browser/media/router/media_router_dialog_controller.h" |
10 #include "content/public/browser/web_contents_observer.h" | |
11 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
12 | 11 |
13 namespace media_router { | 12 namespace media_router { |
14 | 13 |
15 // Android implementation of the MediaRouterDialogController. | 14 // Android implementation of the MediaRouterDialogController. |
16 class MediaRouterDialogControllerAndroid | 15 class MediaRouterDialogControllerAndroid |
17 : public content::WebContentsUserData<MediaRouterDialogControllerAndroid>, | 16 : public content::WebContentsUserData<MediaRouterDialogControllerAndroid>, |
18 public MediaRouterDialogController { | 17 public MediaRouterDialogController { |
19 public: | 18 public: |
20 ~MediaRouterDialogControllerAndroid() override; | 19 ~MediaRouterDialogControllerAndroid() override; |
21 | 20 |
22 static MediaRouterDialogControllerAndroid* GetOrCreateForWebContents( | 21 static MediaRouterDialogControllerAndroid* GetOrCreateForWebContents( |
23 content::WebContents* web_contents); | 22 content::WebContents* web_contents); |
24 | 23 |
25 // MediaRouterDialogController implementation. | 24 // MediaRouterDialogController: |
26 bool ShowMediaRouterDialogForPresentation( | 25 bool ShowMediaRouterDialogForPresentation( |
27 scoped_ptr<CreatePresentationSessionRequest> request) override; | 26 scoped_ptr<CreatePresentationSessionRequest> request) override; |
| 27 void CloseMediaRouterDialog() override; |
28 | 28 |
29 private: | 29 private: |
30 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; | 30 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; |
31 | 31 |
32 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an | 32 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an |
33 // instance. | 33 // instance. |
34 explicit MediaRouterDialogControllerAndroid( | 34 explicit MediaRouterDialogControllerAndroid( |
35 content::WebContents* web_contents); | 35 content::WebContents* web_contents); |
36 | 36 |
| 37 // MediaRouterDialogController: |
| 38 void Reset() override; |
| 39 |
37 base::ThreadChecker thread_checker_; | 40 base::ThreadChecker thread_checker_; |
38 | 41 |
39 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); | 42 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); |
40 }; | 43 }; |
41 | 44 |
42 } // namespace media_router | 45 } // namespace media_router |
43 | 46 |
44 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ | 47 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ |
OLD | NEW |