Java Code Examples for org.chromium.chrome.browser.fullscreen.FullscreenManager#getPersistentFullscreenMode()

The following examples show how to use org.chromium.chrome.browser.fullscreen.FullscreenManager#getPersistentFullscreenMode() . 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: LayoutManagerChrome.java    From delion with Apache License 2.0 6 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager manager = mHost.getFullscreenManager();
    if (getActiveLayout() != mStaticLayout
            || !DeviceClassManager.enableToolbarSwipe(
                       FeatureUtilities.isDocumentMode(mHost.getContext()))
            || (manager != null && manager.getPersistentFullscreenMode())) {
        return false;
    }

    boolean isAccessibility =
            DeviceClassManager.isAccessibilityModeEnabled(mHost.getContext());
    return direction == ScrollDirection.LEFT || direction == ScrollDirection.RIGHT
            || (direction == ScrollDirection.DOWN && mOverviewLayout != null
                       && !isAccessibility);
}
 
Example 2
Source File: LayoutManagerChrome.java    From 365browser with Apache License 2.0 6 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager manager = mHost.getFullscreenManager();
    if (getActiveLayout() != mStaticLayout
            || !DeviceClassManager.enableToolbarSwipe()
            || (manager != null && manager.getPersistentFullscreenMode())) {
        return false;
    }

    if (direction == ScrollDirection.DOWN) {
        boolean isAccessibility = AccessibilityUtil.isAccessibilityEnabled();
        return mOverviewLayout != null && !isAccessibility;
    }

    return direction == ScrollDirection.LEFT || direction == ScrollDirection.RIGHT;
}
 
Example 3
Source File: LayoutManagerDocument.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager manager = mHost.getFullscreenManager();
    if (getActiveLayout() != mStaticLayout
            || !FeatureUtilities.isDocumentModeEligible(mHost.getContext())
            || !DeviceClassManager.enableToolbarSwipe(
                       FeatureUtilities.isDocumentMode(mHost.getContext()))
            || (manager != null && manager.getPersistentFullscreenMode())) {
        return false;
    }

    return direction == ScrollDirection.LEFT || direction == ScrollDirection.RIGHT;
}
 
Example 4
Source File: LayoutManagerChrome.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager manager = mHost.getFullscreenManager();
    if (getActiveLayout() != mStaticLayout
            || !DeviceClassManager.enableToolbarSwipe()
            || (manager != null && manager.getPersistentFullscreenMode())) {
        return false;
    }

    boolean isAccessibility =
            DeviceClassManager.isAccessibilityModeEnabled(mHost.getContext());
    return direction == ScrollDirection.LEFT || direction == ScrollDirection.RIGHT
            || (direction == ScrollDirection.DOWN && mOverviewLayout != null
                       && !isAccessibility);
}
 
Example 5
Source File: LayoutManagerDocument.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager manager = mHost.getFullscreenManager();
    if (getActiveLayout() != mStaticLayout
            || !FeatureUtilities.isDocumentModeEligible(mHost.getContext())
            || !DeviceClassManager.enableToolbarSwipe()
            || (manager != null && manager.getPersistentFullscreenMode())) {
        return false;
    }

    return direction == ScrollDirection.LEFT || direction == ScrollDirection.RIGHT;
}
 
Example 6
Source File: LayoutManagerDocument.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager manager = mHost.getFullscreenManager();
    if (getActiveLayout() != mStaticLayout
            || !FeatureUtilities.isDocumentModeEligible(mHost.getContext())
            || !DeviceClassManager.enableToolbarSwipe()
            || (manager != null && manager.getPersistentFullscreenMode())) {
        return false;
    }

    return direction == ScrollDirection.LEFT || direction == ScrollDirection.RIGHT;
}
 
Example 7
Source File: LayoutManagerDocument.java    From delion with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager fullscreenManager = mHost.getFullscreenManager();
    return direction == ScrollDirection.DOWN && fullscreenManager != null
            && fullscreenManager.getPersistentFullscreenMode();
}
 
Example 8
Source File: LayoutManagerDocument.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager fullscreenManager = mHost.getFullscreenManager();
    return direction == ScrollDirection.DOWN && fullscreenManager != null
            && fullscreenManager.getPersistentFullscreenMode();
}
 
Example 9
Source File: LayoutManagerDocument.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSwipeEnabled(ScrollDirection direction) {
    FullscreenManager fullscreenManager = mHost.getFullscreenManager();
    return direction == ScrollDirection.DOWN && fullscreenManager != null
            && fullscreenManager.getPersistentFullscreenMode();
}