org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager Java Examples

The following examples show how to use org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager. 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: WebappActivity.java    From 365browser with Apache License 2.0 6 votes vote down vote up
@Override
protected ChromeFullscreenManager createFullscreenManager() {
    // Disable HTML5 fullscreen in PWA fullscreen mode.
    return new ChromeFullscreenManager(this, false) {
        @Override
        public void setPersistentFullscreenMode(boolean enabled) {
            if (mWebappInfo.displayMode() == WebDisplayMode.FULLSCREEN) return;
            super.setPersistentFullscreenMode(enabled);
        }

        @Override
        public boolean getPersistentFullscreenMode() {
            if (mWebappInfo.displayMode() == WebDisplayMode.FULLSCREEN) return false;
            return super.getPersistentFullscreenMode();
        }
    };
}
 
Example #2
Source File: StaticTabSceneLayer.java    From 365browser with Apache License 2.0 6 votes vote down vote up
/**
 * Update {@link StaticTabSceneLayer} with the given parameters.
 *
 * @param dpToPx            The ratio of dp to px.
 * @param contentViewport   The viewport of the content.
 * @param layerTitleCache   The LayerTitleCache.
 * @param tabContentManager The TabContentManager.
 * @param fullscreenManager The FullscreenManager.
 * @param layoutTab         The LayoutTab.
 */
public void update(float dpToPx, LayerTitleCache layerTitleCache,
        TabContentManager tabContentManager, ChromeFullscreenManager fullscreenManager,
        LayoutTab layoutTab) {
    if (layoutTab == null) {
        return;
    }

    float contentOffset =
            fullscreenManager != null ? fullscreenManager.getContentOffset() : 0.f;
    float x = layoutTab.getRenderX() * dpToPx;
    float y = contentOffset + layoutTab.getRenderY() * dpToPx;

    nativeUpdateTabLayer(mNativePtr, tabContentManager, layoutTab.getId(),
            mResToolbarControlContainer, layoutTab.canUseLiveTexture(),
            layoutTab.getBackgroundColor(), x, y, layoutTab.getStaticToViewBlend(),
            layoutTab.getSaturation(), layoutTab.getBrightness());
}
 
Example #3
Source File: ToolbarSceneLayer.java    From 365browser with Apache License 2.0 6 votes vote down vote up
@Override
public SceneOverlayLayer getUpdatedSceneOverlayTree(RectF viewport, RectF visibleViewport,
        LayerTitleCache layerTitleCache, ResourceManager resourceManager, float yOffset) {
    boolean forceHideBrowserControlsAndroidView =
            mLayoutProvider.getActiveLayout().forceHideBrowserControlsAndroidView();
    ViewportMode viewportMode = mLayoutProvider.getActiveLayout().getViewportMode();

    // TODO(mdjones): Create a "theme provider" to handle cases like this.
    int color = mRenderHost.getBrowserControlsBackgroundColor();
    float alpha = mRenderHost.getBrowserControlsUrlBarAlpha();
    ChromeFullscreenManager fullscreenManager = mLayoutProvider.getFullscreenManager();
    if (fullscreenManager.areBrowserControlsAtBottom() && fullscreenManager.getTab() != null) {
        color = fullscreenManager.getTab().getDefaultThemeColor();
        if (!fullscreenManager.getTab().isIncognito()) alpha = 1f;
    }

    update(color, alpha, mLayoutProvider.getFullscreenManager(), resourceManager,
            forceHideBrowserControlsAndroidView, viewportMode, DeviceFormFactor.isTablet(),
            viewport.height());

    return this;
}
 
Example #4
Source File: StaticTabSceneLayer.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * Update {@link StaticTabSceneLayer} with the given parameters.
 *
 * @param dpToPx            The ratio of dp to px.
 * @param contentViewport   The viewport of the content.
 * @param layerTitleCache   The LayerTitleCache.
 * @param tabContentManager The TabContentManager.
 * @param fullscreenManager The FullscreenManager.
 * @param layoutTab         The LayoutTab.
 */
public void update(float dpToPx, Rect contentViewport, LayerTitleCache layerTitleCache,
        TabContentManager tabContentManager, ChromeFullscreenManager fullscreenManager,
        LayoutTab layoutTab) {
    if (layoutTab == null) {
        return;
    }

    float contentOffset =
            fullscreenManager != null ? fullscreenManager.getContentOffset() : 0.f;

    // TODO(dtrainor, clholgat): remove "* dpToPx" once the native part is fully supporting dp.
    nativeUpdateTabLayer(mNativePtr, contentViewport.left, contentViewport.top,
            contentViewport.width(), contentViewport.height(), tabContentManager,
            layoutTab.getId(), mResToolbarControlContainer, layoutTab.canUseLiveTexture(),
            layoutTab.getBackgroundColor(), layoutTab.getRenderX() * dpToPx,
            layoutTab.getRenderY() * dpToPx, layoutTab.getScaledContentWidth() * dpToPx,
            layoutTab.getScaledContentHeight() * dpToPx, contentOffset,
            layoutTab.getStaticToViewBlend(), layoutTab.getSaturation(),
            layoutTab.getBrightness());
}
 
Example #5
Source File: StaticTabSceneLayer.java    From delion with Apache License 2.0 6 votes vote down vote up
/**
 * Update {@link StaticTabSceneLayer} with the given parameters.
 *
 * @param dpToPx            The ratio of dp to px.
 * @param contentViewport   The viewport of the content.
 * @param layerTitleCache   The LayerTitleCache.
 * @param tabContentManager The TabContentManager.
 * @param fullscreenManager The FullscreenManager.
 * @param layoutTab         The LayoutTab.
 */
public void update(float dpToPx, Rect contentViewport, LayerTitleCache layerTitleCache,
        TabContentManager tabContentManager, ChromeFullscreenManager fullscreenManager,
        LayoutTab layoutTab) {
    if (layoutTab == null) {
        return;
    }

    float contentOffset =
            fullscreenManager != null ? fullscreenManager.getContentOffset() : 0.f;

    // TODO(dtrainor, clholgat): remove "* dpToPx" once the native part is fully supporting dp.
    nativeUpdateTabLayer(mNativePtr, contentViewport.left, contentViewport.top,
            contentViewport.width(), contentViewport.height(), tabContentManager,
            layoutTab.getId(), mResToolbarControlContainer, layoutTab.canUseLiveTexture(),
            layoutTab.getBackgroundColor(), layoutTab.getRenderX() * dpToPx,
            layoutTab.getRenderY() * dpToPx, layoutTab.getScaledContentWidth() * dpToPx,
            layoutTab.getScaledContentHeight() * dpToPx, contentOffset,
            layoutTab.getStaticToViewBlend(), layoutTab.getSaturation(),
            layoutTab.getBrightness());
}
 
Example #6
Source File: StaticLayout.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
@Override
protected void updateSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;

    final LayoutTab[] tabs = getLayoutTabsToRender();
    if (tabs == null || tabs.length != 1 || tabs[0].getId() == Tab.INVALID_TAB_ID) {
        return;
    }
    LayoutTab layoutTab = tabs[0];
    final float dpToPx = getContext().getResources().getDisplayMetrics().density;

    mSceneLayer.update(dpToPx, contentViewport, layerTitleCache, tabContentManager,
            fullscreenManager, layoutTab);

    // TODO(dtrainor): Find the best way to properly track this metric for cold starts.
    // We should probably erase the thumbnail when we select a tab that we need to restore.
    if (tabContentManager != null
            && tabContentManager.hasFullCachedThumbnail(layoutTab.getId())) {
        TabModelImpl.logPerceivedTabSwitchLatencyMetric();
    }
}
 
Example #7
Source File: Layout.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * Build a {@link SceneLayer} if it hasn't already been built, and update it and return it.
 *
 * @param viewport          A viewport in which to display content.
 * @param contentViewport   The visible section of the viewport.
 * @param layerTitleCache   A layer title cache.
 * @param tabContentManager A tab content manager.
 * @param resourceManager   A resource manager.
 * @param fullscreenManager A fullscreen manager.
 * @return                  A {@link SceneLayer} that represents the content for this
 *                          {@link Layout}.
 */
public final SceneLayer getUpdatedSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);

    float offsetPx = fullscreenManager != null ? fullscreenManager.getTopControlOffset() : 0.f;
    float dpToPx = getContext().getResources().getDisplayMetrics().density;
    float offsetDp = offsetPx / dpToPx;

    SceneLayer content = getSceneLayer();
    for (int i = 0; i < mSceneOverlays.size(); i++) {
        // If the SceneOverlay is not showing, don't bother adding it to the tree.
        if (!mSceneOverlays.get(i).isSceneOverlayTreeShowing()) continue;

        SceneOverlayLayer overlayLayer = mSceneOverlays.get(i).getUpdatedSceneOverlayTree(
                layerTitleCache, resourceManager, offsetDp);

        overlayLayer.setContentTree(content);
        content = overlayLayer;
    }

    return content;
}
 
Example #8
Source File: StaticLayout.java    From 365browser with Apache License 2.0 6 votes vote down vote up
@Override
protected void updateSceneLayer(RectF viewport, RectF contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;

    final LayoutTab[] tabs = getLayoutTabsToRender();
    if (tabs == null || tabs.length != 1 || tabs[0].getId() == Tab.INVALID_TAB_ID) {
        return;
    }
    LayoutTab layoutTab = tabs[0];
    final float dpToPx = getContext().getResources().getDisplayMetrics().density;

    mSceneLayer.update(
            dpToPx, layerTitleCache, tabContentManager, fullscreenManager, layoutTab);

    // TODO(dtrainor): Find the best way to properly track this metric for cold starts.
    // We should probably erase the thumbnail when we select a tab that we need to restore.
    if (tabContentManager != null
            && tabContentManager.hasFullCachedThumbnail(layoutTab.getId())) {
        TabModelImpl.logPerceivedTabSwitchLatencyMetric();
    }
}
 
Example #9
Source File: Layout.java    From delion with Apache License 2.0 6 votes vote down vote up
/**
 * Build a {@link SceneLayer} if it hasn't already been built, and update it and return it.
 *
 * @param viewport          A viewport in which to display content.
 * @param contentViewport   The visible section of the viewport.
 * @param layerTitleCache   A layer title cache.
 * @param tabContentManager A tab content manager.
 * @param resourceManager   A resource manager.
 * @param fullscreenManager A fullscreen manager.
 * @return                  A {@link SceneLayer} that represents the content for this
 *                          {@link Layout}.
 */
public final SceneLayer getUpdatedSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);

    float offsetPx = fullscreenManager != null ? fullscreenManager.getControlOffset() : 0.f;
    float dpToPx = getContext().getResources().getDisplayMetrics().density;
    float offsetDp = offsetPx / dpToPx;

    SceneLayer content = getSceneLayer();
    for (int i = 0; i < mSceneOverlays.size(); i++) {
        // If the SceneOverlay is not showing, don't bother adding it to the tree.
        if (!mSceneOverlays.get(i).isSceneOverlayTreeShowing()) continue;

        SceneOverlayLayer overlayLayer = mSceneOverlays.get(i).getUpdatedSceneOverlayTree(
                layerTitleCache, resourceManager, offsetDp);

        overlayLayer.setContentTree(content);
        content = overlayLayer;
    }

    return content;
}
 
Example #10
Source File: StaticLayout.java    From delion with Apache License 2.0 6 votes vote down vote up
@Override
protected void updateSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;

    final LayoutTab[] tabs = getLayoutTabsToRender();
    if (tabs == null || tabs.length != 1 || tabs[0].getId() == Tab.INVALID_TAB_ID) {
        return;
    }
    LayoutTab layoutTab = tabs[0];
    final float dpToPx = getContext().getResources().getDisplayMetrics().density;

    mSceneLayer.update(dpToPx, contentViewport, layerTitleCache, tabContentManager,
            fullscreenManager, layoutTab);

    // TODO(dtrainor): Find the best way to properly track this metric for cold starts.
    // We should probably erase the thumbnail when we select a tab that we need to restore.
    if (tabContentManager != null
            && tabContentManager.hasFullCachedThumbnail(layoutTab.getId())) {
        TabModelImpl.logPerceivedTabSwitchLatencyMetric();
    }
}
 
Example #11
Source File: Layout.java    From 365browser with Apache License 2.0 6 votes vote down vote up
/**
 * Build a {@link SceneLayer} if it hasn't already been built, and update it and return it.
 *
 * @param viewport          A viewport in which to display content in px.
 * @param visibleViewport   The visible section of the viewport in px.
 * @param layerTitleCache   A layer title cache.
 * @param tabContentManager A tab content manager.
 * @param resourceManager   A resource manager.
 * @param fullscreenManager A fullscreen manager.
 * @return                  A {@link SceneLayer} that represents the content for this
 *                          {@link Layout}.
 */
public final SceneLayer getUpdatedSceneLayer(RectF viewport, RectF visibleViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    updateSceneLayer(viewport, visibleViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);

    float offsetPx = fullscreenManager != null ? fullscreenManager.getTopControlOffset() : 0.f;
    float dpToPx = getContext().getResources().getDisplayMetrics().density;
    float offsetDp = offsetPx / dpToPx;

    SceneLayer content = getSceneLayer();
    for (int i = 0; i < mSceneOverlays.size(); i++) {
        // If the SceneOverlay is not showing, don't bother adding it to the tree.
        if (!mSceneOverlays.get(i).isSceneOverlayTreeShowing()) continue;

        SceneOverlayLayer overlayLayer = mSceneOverlays.get(i).getUpdatedSceneOverlayTree(
                viewport, visibleViewport, layerTitleCache, resourceManager, offsetDp);

        overlayLayer.setContentTree(content);
        content = overlayLayer;
    }

    return content;
}
 
Example #12
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the full screen manager.
 * @return The fullscreen manager, possibly null
 */
public ChromeFullscreenManager getFullscreenManager() {
    if (!mCreatedFullscreenManager) {
        throw new IllegalStateException(
                "Attempting to access FullscreenManager before it has been created.");
    }
    return mFullscreenManager;
}
 
Example #13
Source File: ToolbarSwipeLayout.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;
    mSceneLayer.pushLayers(getContext(), viewport, contentViewport, this, layerTitleCache,
            tabContentManager, resourceManager);
}
 
Example #14
Source File: SimpleAnimationLayout.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(RectF viewport, RectF contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;
    // The content viewport is intentionally sent as both params below.
    mSceneLayer.pushLayers(getContext(), contentViewport, contentViewport, this,
            layerTitleCache, tabContentManager, resourceManager, fullscreenManager);
}
 
Example #15
Source File: ChromeActivity.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the full screen manager.
 * @return The fullscreen manager, possibly null
 */
public ChromeFullscreenManager getFullscreenManager() {
    if (!mCreatedFullscreenManager) {
        throw new IllegalStateException(
                "Attempting to access FullscreenManager before it has been created.");
    }
    return mFullscreenManager;
}
 
Example #16
Source File: LayoutManager.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public SceneLayer getUpdatedActiveSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    return mActiveLayout.getUpdatedSceneLayer(viewport, contentViewport, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}
 
Example #17
Source File: CompositorViewHolder.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a fullscreen handler.
 * @param fullscreen A fullscreen handler.
 */
public void setFullscreenHandler(ChromeFullscreenManager fullscreen) {
    mFullscreenManager = fullscreen;
    if (mFullscreenManager != null) {
        mLastContentOffset = mFullscreenManager.getContentOffset();
        mLastVisibleContentOffset = mFullscreenManager.getVisibleContentOffset();
        mFullscreenManager.addListener(this);
    }
    propagateViewportToLayouts(getWidth(), getHeight());
}
 
Example #18
Source File: LayoutManagerChromeTablet.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public SceneLayer getUpdatedActiveSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    return super.getUpdatedActiveSceneLayer(viewport, contentViewport, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}
 
Example #19
Source File: BarOverlapTapSuppression.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * @return The height of the content view area of the base page in pixels, or 0 if the
 *         Height cannot be reliably obtained.
 */
private float getContentHeightPx() {
    Tab currentTab = mActivity.getActivityTab();
    ChromeFullscreenManager fullscreenManager = mActivity.getFullscreenManager();
    if (fullscreenManager == null || currentTab == null) return 0.f;

    float topControlsOffset = fullscreenManager.getTopControlOffset();
    float topControlsHeight = fullscreenManager.getTopControlsHeight();
    float bottomControlsOffset = fullscreenManager.getBottomControlOffset();
    float bottomControlsHeight = fullscreenManager.getBottomControlsHeight();

    float tabHeight = currentTab.getHeight();
    return (tabHeight - (topControlsHeight + topControlsOffset))
            - (bottomControlsHeight - bottomControlsOffset);
}
 
Example #20
Source File: CustomTabBottomBarDelegate.java    From 365browser with Apache License 2.0 5 votes vote down vote up
public CustomTabBottomBarDelegate(ChromeActivity activity,
        CustomTabIntentDataProvider dataProvider, ChromeFullscreenManager fullscreenManager) {
    mActivity = activity;
    mDataProvider = dataProvider;
    mFullscreenManager = fullscreenManager;
    fullscreenManager.addListener(this);
}
 
Example #21
Source File: CompositorViewHolder.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a fullscreen handler.
 * @param fullscreen A fullscreen handler.
 */
public void setFullscreenHandler(ChromeFullscreenManager fullscreen) {
    mFullscreenManager = fullscreen;
    if (mFullscreenManager != null) {
        mFullscreenManager.addListener(this);
    }
    onViewportChanged();
}
 
Example #22
Source File: StackLayout.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(RectF viewport, RectF contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    // If the browser controls are at the bottom make sure to use theme colors for this layout
    // specifically.
    if (fullscreenManager.areBrowserControlsAtBottom() && mLayoutTabs != null) {
        for (LayoutTab t : mLayoutTabs) t.setForceDefaultThemeColor(false);
    }
    assert mSceneLayer != null;
    mSceneLayer.pushLayers(getContext(), viewport, contentViewport, this, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}
 
Example #23
Source File: BarOverlapTapSuppression.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * @return The height of the content view area of the base page in pixels, or 0 if the
 *         Height cannot be reliably obtained.
 */
private float getContentHeightPx() {
    Tab currentTab = mActivity.getActivityTab();
    ChromeFullscreenManager fullscreenManager = mActivity.getFullscreenManager();
    if (fullscreenManager == null || currentTab == null) return 0.f;

    float topControlsOffset = fullscreenManager.getTopControlOffset();
    float topControlsHeight = fullscreenManager.getTopControlsHeight();
    float bottomControlsOffset = fullscreenManager.getBottomControlOffset();
    float bottomControlsHeight = fullscreenManager.getBottomControlsHeight();

    float tabHeight = currentTab.getHeight();
    return (tabHeight - (topControlsHeight + topControlsOffset))
            - (bottomControlsHeight - bottomControlsOffset);
}
 
Example #24
Source File: CompositorViewHolder.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a fullscreen handler.
 * @param fullscreen A fullscreen handler.
 */
public void setFullscreenHandler(ChromeFullscreenManager fullscreen) {
    mFullscreenManager = fullscreen;
    if (mFullscreenManager != null) {
        mLastContentOffset = mFullscreenManager.getContentOffset();
        mLastVisibleContentOffset = mFullscreenManager.getTopVisibleContentOffset();
        mFullscreenManager.addListener(this);
    }
    propagateViewportToLayouts(getWidth(), getHeight());
}
 
Example #25
Source File: ToolbarSwipeLayout.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;
    mSceneLayer.pushLayers(getContext(), viewport, contentViewport, this, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}
 
Example #26
Source File: LayoutManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public SceneLayer getUpdatedActiveSceneLayer(LayerTitleCache layerTitleCache,
        TabContentManager tabContentManager, ResourceManager resourceManager,
        ChromeFullscreenManager fullscreenManager) {
    // Update the android browser controls state.
    if (fullscreenManager != null) {
        fullscreenManager.setHideBrowserControlsAndroidView(
                mActiveLayout.forceHideBrowserControlsAndroidView());
    }

    getViewportPixel(mCachedVisibleViewport);
    mHost.getWindowViewport(mCachedWindowViewport);
    return mActiveLayout.getUpdatedSceneLayer(mCachedWindowViewport, mCachedVisibleViewport,
            layerTitleCache, tabContentManager, resourceManager, fullscreenManager);
}
 
Example #27
Source File: ToolbarSwipeLayout.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(RectF viewport, RectF contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    // Use the default theme colors if the browser controls are at the bottom.
    if (fullscreenManager.areBrowserControlsAtBottom()) {
        for (LayoutTab t : mLayoutTabs) t.setForceDefaultThemeColor(true);
    }
    assert mSceneLayer != null;
    // contentViewport is intentionally passed for both parameters below.
    mSceneLayer.pushLayers(getContext(), contentViewport, contentViewport, this,
            layerTitleCache, tabContentManager, resourceManager, fullscreenManager);
}
 
Example #28
Source File: StackLayout.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;
    mSceneLayer.pushLayers(getContext(), viewport, contentViewport, this, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}
 
Example #29
Source File: LayoutManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public SceneLayer getUpdatedActiveSceneLayer(Rect viewport, LayerTitleCache layerTitleCache,
        TabContentManager tabContentManager, ResourceManager resourceManager,
        ChromeFullscreenManager fullscreenManager) {
    getViewportPixel(mCachedVisibleViewport);
    // TODO(mdjones): The concept of visible viewport is pretty confising since |viewport| can
    // also take the browser controls into consideration; this should be made more clear.
    // Furthermore, the below adjustments should not be necessary.
    mCachedVisibleViewport.right = mCachedVisibleViewport.left + mHost.getWidth();
    mCachedVisibleViewport.bottom = mCachedVisibleViewport.top + mHost.getHeight();
    return mActiveLayout.getUpdatedSceneLayer(viewport, mCachedVisibleViewport, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}
 
Example #30
Source File: SimpleAnimationLayout.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
protected void updateSceneLayer(Rect viewport, Rect contentViewport,
        LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
        ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
    super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabContentManager,
            resourceManager, fullscreenManager);
    assert mSceneLayer != null;
    mSceneLayer.pushLayers(getContext(), viewport, contentViewport, this, layerTitleCache,
            tabContentManager, resourceManager, fullscreenManager);
}