| 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 <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 const base::android::JavaParamRef<jstring>& jsink_id); | 36 const base::android::JavaParamRef<jstring>& jsink_id); |
| 37 // Notifies the controller that user chose to close the route. | 37 // Notifies the controller that user chose to close the route. |
| 38 void OnRouteClosed( | 38 void OnRouteClosed( |
| 39 JNIEnv* env, | 39 JNIEnv* env, |
| 40 const base::android::JavaParamRef<jobject>& obj, | 40 const base::android::JavaParamRef<jobject>& obj, |
| 41 const base::android::JavaParamRef<jstring>& jmedia_route_id); | 41 const base::android::JavaParamRef<jstring>& jmedia_route_id); |
| 42 // Notifies the controller that the dialog has been closed without the user | 42 // Notifies the controller that the dialog has been closed without the user |
| 43 // taking any action (e.g. closing the route or selecting a sink). | 43 // taking any action (e.g. closing the route or selecting a sink). |
| 44 void OnDialogCancelled(JNIEnv* env, | 44 void OnDialogCancelled(JNIEnv* env, |
| 45 const base::android::JavaParamRef<jobject>& obj); | 45 const base::android::JavaParamRef<jobject>& obj); |
| 46 // Notifies the controller the media source URN is not supported so it could |
| 47 // properly reject the request. |
| 48 void OnMediaSourceNotSupported( |
| 49 JNIEnv* env, |
| 50 const base::android::JavaParamRef<jobject>& obj); |
| 46 | 51 |
| 47 private: | 52 private: |
| 48 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; | 53 friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>; |
| 49 | 54 |
| 50 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an | 55 // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an |
| 51 // instance. | 56 // instance. |
| 52 explicit MediaRouterDialogControllerAndroid( | 57 explicit MediaRouterDialogControllerAndroid( |
| 53 content::WebContents* web_contents); | 58 content::WebContents* web_contents); |
| 54 | 59 |
| 55 // MediaRouterDialogController: | 60 // MediaRouterDialogController: |
| 56 void CreateMediaRouterDialog() override; | 61 void CreateMediaRouterDialog() override; |
| 57 void CloseMediaRouterDialog() override; | 62 void CloseMediaRouterDialog() override; |
| 58 bool IsShowingMediaRouterDialog() const override; | 63 bool IsShowingMediaRouterDialog() const override; |
| 59 | 64 |
| 60 void CancelPresentationRequest(); | 65 void CancelPresentationRequest(); |
| 61 | 66 |
| 62 base::android::ScopedJavaGlobalRef<jobject> java_dialog_controller_; | 67 base::android::ScopedJavaGlobalRef<jobject> java_dialog_controller_; |
| 63 | 68 |
| 64 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); | 69 DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); |
| 65 }; | 70 }; |
| 66 | 71 |
| 67 } // namespace media_router | 72 } // namespace media_router |
| 68 | 73 |
| 69 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ | 74 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_AN
DROID_H_ |
| OLD | NEW |