OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 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_ |
| 7 |
| 8 #include "base/macros.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" |
| 12 |
| 13 namespace media_router { |
| 14 |
| 15 // Android implementation of the MediaRouterDialogController. |
| 16 class MediaRouterDialogControllerAndroid |
| 17 : public content::WebContentsUserData<MediaRouterDialogControllerAndroid>, |
| 18 public MediaRouterDialogController { |
| 19 public: |
| 20 ~MediaRouterDialogControllerAndroid() override; |
| 21 |
| 22 static MediaRouterDialogControllerAndroid* GetOrCreateForWebContents( |
| 23 content::WebContents* web_contents); |
| 24 |
| 25 // MediaRouterDialogController implementation. |
| 26 bool ShowMediaRouterDialogForPresentation( |
| 27 scoped_ptr<CreatePresentationSessionRequest> request) override; |
| 28 |
| 29 private: |
| 30 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; |
| 31 |
| 32 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an |
| 33 // instance. |
| 34 explicit MediaRouterDialogControllerAndroid( |
| 35 content::WebContents* web_contents); |
| 36 |
| 37 base::ThreadChecker thread_checker_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); |
| 40 }; |
| 41 |
| 42 } // namespace media_router |
| 43 |
| 44 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ |
OLD | NEW |