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 IsShowingMediaRouterDialog() override; |
27 scoped_ptr<CreatePresentationSessionRequest> request) override; | |
28 | 26 |
29 private: | 27 private: |
30 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; | 28 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; |
31 | 29 |
32 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an | 30 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an |
33 // instance. | 31 // instance. |
34 explicit MediaRouterDialogControllerAndroid( | 32 explicit MediaRouterDialogControllerAndroid( |
35 content::WebContents* web_contents); | 33 content::WebContents* web_contents); |
36 | 34 |
37 base::ThreadChecker thread_checker_; | 35 // MediaRouterDialogController: |
| 36 void CreateMediaRouterDialog() override; |
38 | 37 |
39 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); | 38 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); |
40 }; | 39 }; |
41 | 40 |
42 } // namespace media_router | 41 } // namespace media_router |
43 | 42 |
44 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ | 43 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ |
OLD | NEW |