org.chromium.content.browser.ContentVideoViewEmbedder Java Examples
The following examples show how to use
org.chromium.content.browser.ContentVideoViewEmbedder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OverlayPanel.java From delion with Apache License 2.0 | 4 votes |
/** * Add any other objects that depend on the OverlayPanelContent having already been created. */ private OverlayPanelContent createNewOverlayPanelContentInternal() { OverlayPanelContent content = mContentFactory.createNewOverlayPanelContent(); content.setContentViewClient(new ContentViewClient() { @Override public int getDesiredWidthMeasureSpec() { if (isFullWidthSizePanel()) { return super.getDesiredWidthMeasureSpec(); } else { return MeasureSpec.makeMeasureSpec( getContentViewWidthPx(), MeasureSpec.EXACTLY); } } @Override public int getDesiredHeightMeasureSpec() { if (isFullWidthSizePanel()) { return super.getDesiredHeightMeasureSpec(); } else { return MeasureSpec.makeMeasureSpec( getContentViewHeightPx(), MeasureSpec.EXACTLY); } } @Override public ContentVideoViewEmbedder getContentVideoViewEmbedder() { // TODO(mdjones): Possibly enable fullscreen video in overlay panels rather than // passing an empty implementation. return new ContentVideoViewEmbedder() { @Override public void enterFullscreenVideo(View view) {} @Override public void exitFullscreenVideo() {} @Override public View getVideoLoadingProgressView() { return null; } @Override public void setSystemUiVisibility(boolean enterFullscreen) {} }; } }); return content; }
Example #2
Source File: OverlayPanelContent.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** * @param contentDelegate An observer for events that occur on this content. If null is passed * for this parameter, the default one will be used. * @param progressObserver An observer for progress related events. * @param activity The ChromeActivity that contains this object. */ public OverlayPanelContent(OverlayContentDelegate contentDelegate, OverlayContentProgressObserver progressObserver, ChromeActivity activity) { mNativeOverlayPanelContentPtr = nativeInit(); mContentDelegate = contentDelegate; mProgressObserver = progressObserver; mActivity = activity; mWebContentsDelegate = new WebContentsDelegateAndroid() { private boolean mIsFullscreen; @Override public void loadingStateChanged(boolean toDifferentDocument) { boolean isLoading = mContentViewCore != null && mContentViewCore.getWebContents() != null && mContentViewCore.getWebContents().isLoading(); if (isLoading) { mProgressObserver.onProgressBarStarted(); } else { mProgressObserver.onProgressBarFinished(); } } @Override public void onLoadProgressChanged(int progress) { mProgressObserver.onProgressBarUpdated(progress); } @Override public void toggleFullscreenModeForTab(boolean enterFullscreen) { mIsFullscreen = enterFullscreen; } @Override public boolean isFullscreenForTabOrPending() { return mIsFullscreen; } @Override public ContentVideoViewEmbedder getContentVideoViewEmbedder() { return null; // Have a no-op embedder be used. } }; }
Example #3
Source File: OverlayPanelContent.java From 365browser with Apache License 2.0 | 4 votes |
/** * @param contentDelegate An observer for events that occur on this content. If null is passed * for this parameter, the default one will be used. * @param progressObserver An observer for progress related events. * @param activity The ChromeActivity that contains this object. */ public OverlayPanelContent(OverlayContentDelegate contentDelegate, OverlayContentProgressObserver progressObserver, ChromeActivity activity) { mNativeOverlayPanelContentPtr = nativeInit(); mContentDelegate = contentDelegate; mProgressObserver = progressObserver; mActivity = activity; mWebContentsDelegate = new WebContentsDelegateAndroid() { private boolean mIsFullscreen; @Override public void loadingStateChanged(boolean toDifferentDocument) { boolean isLoading = mContentViewCore != null && mContentViewCore.getWebContents() != null && mContentViewCore.getWebContents().isLoading(); if (isLoading) { mProgressObserver.onProgressBarStarted(); } else { mProgressObserver.onProgressBarFinished(); } } @Override public void onLoadProgressChanged(int progress) { mProgressObserver.onProgressBarUpdated(progress); } @Override public void toggleFullscreenModeForTab(boolean enterFullscreen) { mIsFullscreen = enterFullscreen; } @Override public boolean isFullscreenForTabOrPending() { return mIsFullscreen; } @Override public ContentVideoViewEmbedder getContentVideoViewEmbedder() { return null; // Have a no-op embedder be used. } }; }
Example #4
Source File: WebContentsDelegateAndroid.java From 365browser with Apache License 2.0 | 4 votes |
@CalledByNative public ContentVideoViewEmbedder getContentVideoViewEmbedder() { return null; }