org.chromium.chrome.browser.widget.OverviewListLayout Java Examples

The following examples show how to use org.chromium.chrome.browser.widget.OverviewListLayout. 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
/**
 * Creates the {@link LayoutManagerChrome} instance.
 * @param host              A {@link LayoutManagerHost} instance.
 * @param overviewLayoutFactoryDelegate A {@link OverviewLayoutFactoryDelegate} instance.
 */
public LayoutManagerChrome(
        LayoutManagerHost host, OverviewLayoutFactoryDelegate overviewLayoutFactoryDelegate) {
    super(host);
    Context context = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mOverviewModeObservers = new ObserverList<OverviewModeObserver>();

    // Build Event Filter Handlers
    mToolbarSwipeHandler = new ToolbarSwipeHandler(this);

    // Build Event Filters
    mBlackHoleEventFilter = new BlackHoleEventFilter(context, this);
    mGestureEventFilter = new GestureEventFilter(context, this, mGestureHandler);

    // Build Layouts
    mOverviewListLayout =
            new OverviewListLayout(context, this, renderHost, mBlackHoleEventFilter);
    mToolbarSwipeLayout =
            new ToolbarSwipeLayout(context, this, renderHost, mBlackHoleEventFilter);
    if (overviewLayoutFactoryDelegate != null) {
        mOverviewLayout = overviewLayoutFactoryDelegate.createOverviewLayout(
                context, this, renderHost, mGestureEventFilter);
    }
}
 
Example #2
Source File: LayoutManagerChrome.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * Creates the {@link LayoutManagerChrome} instance.
 * @param host              A {@link LayoutManagerHost} instance.
 * @param overviewLayoutFactoryDelegate A {@link OverviewLayoutFactoryDelegate} instance.
 */
public LayoutManagerChrome(
        LayoutManagerHost host, OverviewLayoutFactoryDelegate overviewLayoutFactoryDelegate) {
    super(host);
    Context context = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mOverviewModeObservers = new ObserverList<OverviewModeObserver>();

    // Build Event Filter Handlers
    mToolbarSwipeHandler = new ToolbarSwipeHandler(this);

    // Build Event Filters
    mBlackHoleEventFilter = new BlackHoleEventFilter(context, this);
    mGestureEventFilter = new GestureEventFilter(context, this, mGestureHandler);

    // Build Layouts
    mOverviewListLayout =
            new OverviewListLayout(context, this, renderHost, mBlackHoleEventFilter);
    mToolbarSwipeLayout =
            new ToolbarSwipeLayout(context, this, renderHost, mBlackHoleEventFilter);
    if (overviewLayoutFactoryDelegate != null) {
        mOverviewLayout = overviewLayoutFactoryDelegate.createOverviewLayout(
                context, this, renderHost, mGestureEventFilter);
    }
}
 
Example #3
Source File: LayoutManagerChrome.java    From 365browser with Apache License 2.0 6 votes vote down vote up
/**
 * Creates the {@link LayoutManagerChrome} instance.
 * @param host              A {@link LayoutManagerHost} instance.
 */
public LayoutManagerChrome(LayoutManagerHost host, boolean createOverviewLayout) {
    super(host);
    Context context = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mOverviewModeObservers = new ObserverList<OverviewModeObserver>();

    // Build Event Filter Handlers
    mToolbarSwipeHandler = createToolbarSwipeHandler(this);

    // Build Layouts
    mOverviewListLayout = new OverviewListLayout(context, this, renderHost);
    mToolbarSwipeLayout = new ToolbarSwipeLayout(context, this, renderHost);
    if (createOverviewLayout) {
        mOverviewLayout = new StackLayout(context, this, renderHost);
    }
}
 
Example #4
Source File: LayoutManagerDocumentTabSwitcher.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a {@link LayoutManagerDocumentTabSwitcher} instance.
 * @param host            A {@link LayoutManagerHost} instance.
 */
public LayoutManagerDocumentTabSwitcher(LayoutManagerHost host) {
    super(host);
    Context context = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mBlackHoleEventFilter = new BlackHoleEventFilter(context, this);
    mGestureEventFilter = new GestureEventFilter(context, this, mGestureHandler);
    mOverviewListLayout =
            new OverviewListLayout(context, this, renderHost, mBlackHoleEventFilter);
    mOverviewLayout = new StackLayout(context, this, renderHost, mGestureEventFilter);
}