Search in sources :

Example 1 with MediaSource

use of org.chromium.chrome.browser.media.router.cast.MediaSource in project AndroidChromium by JackyAndroid.

the class ChromeMediaRouterDialogController method openRouteChooserDialog.

/**
     * Shows the {@link MediaRouteChooserDialogFragment} if it's not shown yet.
     * @param sourceUrn the URN identifying the media source to filter the devices with.
     */
@CalledByNative
public void openRouteChooserDialog(String sourceUrn) {
    if (isShowingDialog())
        return;
    MediaSource source = MediaSource.from(sourceUrn);
    if (source == null)
        return;
    mDialogManager = new MediaRouteChooserDialogManager(source, mApplicationContext, this);
    mDialogManager.openDialog();
}
Also used : MediaSource(org.chromium.chrome.browser.media.router.cast.MediaSource) CalledByNative(org.chromium.base.annotations.CalledByNative)

Example 2 with MediaSource

use of org.chromium.chrome.browser.media.router.cast.MediaSource in project AndroidChromium by JackyAndroid.

the class ChromeMediaRouterDialogController method openRouteControllerDialog.

/**
     * Shows the {@link MediaRouteControllerDialogFragment} if it's not shown yet.
     * @param sourceUrn the URN identifying the media source of the current media route.
     * @param mediaRouteId the identifier of the route to be controlled.
     */
@CalledByNative
public void openRouteControllerDialog(String sourceUrn, String mediaRouteId) {
    if (isShowingDialog())
        return;
    MediaSource source = MediaSource.from(sourceUrn);
    if (source == null)
        return;
    mDialogManager = new MediaRouteControllerDialogManager(source, mediaRouteId, mApplicationContext, this);
    mDialogManager.openDialog();
}
Also used : MediaSource(org.chromium.chrome.browser.media.router.cast.MediaSource) CalledByNative(org.chromium.base.annotations.CalledByNative)

Aggregations

CalledByNative (org.chromium.base.annotations.CalledByNative)2 MediaSource (org.chromium.chrome.browser.media.router.cast.MediaSource)2