org.chromium.chrome.browser.compositor.bottombar.OverlayPanelManager Java Examples

The following examples show how to use org.chromium.chrome.browser.compositor.bottombar.OverlayPanelManager. 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: StaticLayout.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an instance of the {@link StaticLayout}.
 * @param context             The current Android's context.
 * @param updateHost          The {@link LayoutUpdateHost} view for this layout.
 * @param renderHost          The {@link LayoutRenderHost} view for this layout.
 * @param eventFilter         The {@link EventFilter} that is needed for this view.
 * @param panelManager        The {@link OverlayPanelManager} responsible for showing panels.
 */
public StaticLayout(Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost,
        EventFilter eventFilter, OverlayPanelManager panelManager) {
    super(context, updateHost, renderHost, eventFilter);

    mHandler = new Handler();
    mUnstallRunnable = new UnstallRunnable();
    mUnstalling = false;
    mSceneLayer = new StaticTabSceneLayer(R.id.control_container);
}
 
Example #2
Source File: LayoutManagerDocument.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a {@link LayoutManagerDocument} instance.
 * @param host            A {@link LayoutManagerHost} instance.
 */
public LayoutManagerDocument(LayoutManagerHost host) {
    super(host);
    mContext = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mToolbarOverlay = new ToolbarSceneLayer(mContext, this, renderHost);

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

    // Build Event Filters
    mStaticEdgeEventFilter =
            new EdgeSwipeEventFilter(mContext, this, new StaticEdgeSwipeHandler());

    mOverlayPanelManager = new OverlayPanelManager();

    // Build Layouts
    mStaticLayout = new StaticLayout(
            mContext, this, renderHost, mStaticEdgeEventFilter, mOverlayPanelManager);

    // Contextual Search scene overlay.
    mContextualSearchPanel =
            new ContextualSearchPanel(mContext, this, this, mOverlayPanelManager);

    // Reader Mode scene overlay.
    mReaderModePanel = new ReaderModePanel(mContext, this, this, mOverlayPanelManager, this);

    // Set up layout parameters
    mStaticLayout.setLayoutHandlesTabLifecycles(true);

    setNextLayout(null);
}
 
Example #3
Source File: ReaderModePanel.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * @param context The current Android {@link Context}.
 * @param updateHost The {@link LayoutUpdateHost} used to request updates in the Layout.
 * @param eventHost The {@link EventFilterHost} for propagating events.
 * @param panelManager The {@link OverlayPanelManager} used to control panel show/hide.
 * @param contentViewDelegate Notifies the activity that a ContentViewCore has been created.
 */
public ReaderModePanel(Context context, LayoutUpdateHost updateHost, EventFilterHost eventHost,
            OverlayPanelManager panelManager,
            OverlayPanelContentViewDelegate contentViewDelegate) {
    super(context, updateHost, eventHost, panelManager);
    mSceneLayer = createNewReaderModeSceneLayer();
    mContentViewDelegate = contentViewDelegate;
}
 
Example #4
Source File: ContextualSearchPanel.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * @param context The current Android {@link Context}.
 * @param updateHost The {@link LayoutUpdateHost} used to request updates in the Layout.
 * @param eventHost The {@link EventFilterHost} for propagating events.
 * @param panelManager The object managing the how different panels are shown.
 */
public ContextualSearchPanel(Context context, LayoutUpdateHost updateHost,
            EventFilterHost eventHost, OverlayPanelManager panelManager) {
    super(context, updateHost, eventHost, panelManager);
    mSceneLayer = createNewContextualSearchSceneLayer();
    mPanelMetrics = new ContextualSearchPanelMetrics();

    mBarShadowHeightPx = ApiCompatibilityUtils.getDrawable(mContext.getResources(),
            R.drawable.contextual_search_bar_shadow).getIntrinsicHeight();
}
 
Example #5
Source File: StaticLayout.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an instance of the {@link StaticLayout}.
 * @param context             The current Android's context.
 * @param updateHost          The {@link LayoutUpdateHost} view for this layout.
 * @param renderHost          The {@link LayoutRenderHost} view for this layout.
 * @param eventFilter         The {@link EventFilter} that is needed for this view.
 * @param panelManager        The {@link OverlayPanelManager} responsible for showing panels.
 */
public StaticLayout(Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost,
        EventFilter eventFilter, OverlayPanelManager panelManager) {
    super(context, updateHost, renderHost, eventFilter);

    mHandler = new Handler();
    mUnstallRunnable = new UnstallRunnable();
    mUnstalling = false;
    mSceneLayer = new StaticTabSceneLayer(R.id.control_container);
}
 
Example #6
Source File: LayoutManagerDocument.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a {@link LayoutManagerDocument} instance.
 * @param host            A {@link LayoutManagerHost} instance.
 */
public LayoutManagerDocument(LayoutManagerHost host) {
    super(host);
    mContext = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mToolbarOverlay = new ToolbarSceneLayer(mContext, this, renderHost);

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

    // Build Event Filters
    mStaticEdgeEventFilter =
            new EdgeSwipeEventFilter(mContext, this, new StaticEdgeSwipeHandler());

    mOverlayPanelManager = new OverlayPanelManager();

    // Build Layouts
    mStaticLayout = new StaticLayout(
            mContext, this, renderHost, mStaticEdgeEventFilter, mOverlayPanelManager);

    // Contextual Search scene overlay.
    mContextualSearchPanel =
            new ContextualSearchPanel(mContext, this, this, mOverlayPanelManager);

    // Reader Mode scene overlay.
    mReaderModePanel = new ReaderModePanel(mContext, this, this, mOverlayPanelManager, this);

    // Set up layout parameters
    mStaticLayout.setLayoutHandlesTabLifecycles(true);

    setNextLayout(null);
}
 
Example #7
Source File: ReaderModePanel.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * @param context The current Android {@link Context}.
 * @param updateHost The {@link LayoutUpdateHost} used to request updates in the Layout.
 * @param eventHost The {@link EventFilterHost} for propagating events.
 * @param panelManager The {@link OverlayPanelManager} used to control panel show/hide.
 * @param contentViewDelegate Notifies the activity that a ContentViewCore has been created.
 */
public ReaderModePanel(Context context, LayoutUpdateHost updateHost, EventFilterHost eventHost,
            OverlayPanelManager panelManager,
            OverlayPanelContentViewDelegate contentViewDelegate) {
    super(context, updateHost, eventHost, panelManager);
    mSceneLayer = createNewReaderModeSceneLayer();
    mContentViewDelegate = contentViewDelegate;
}
 
Example #8
Source File: ContextualSearchPanel.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * @param context The current Android {@link Context}.
 * @param updateHost The {@link LayoutUpdateHost} used to request updates in the Layout.
 * @param eventHost The {@link EventFilterHost} for propagating events.
 * @param panelManager The object managing the how different panels are shown.
 */
public ContextualSearchPanel(Context context, LayoutUpdateHost updateHost,
            EventFilterHost eventHost, OverlayPanelManager panelManager) {
    super(context, updateHost, eventHost, panelManager);
    mSceneLayer = createNewContextualSearchSceneLayer();
    mPanelMetrics = new ContextualSearchPanelMetrics();

    mBarShadowHeightPx = ApiCompatibilityUtils.getDrawable(mContext.getResources(),
            R.drawable.contextual_search_bar_shadow).getIntrinsicHeight();
    mEndButtonWidthDp = mPxToDp * (float) mContext.getResources().getDimensionPixelSize(
            R.dimen.contextual_search_end_button_width);
}
 
Example #9
Source File: StaticLayout.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an instance of the {@link StaticLayout}.
 * @param context             The current Android's context.
 * @param updateHost          The {@link LayoutUpdateHost} view for this layout.
 * @param renderHost          The {@link LayoutRenderHost} view for this layout.
 * @param panelManager        The {@link OverlayPanelManager} responsible for showing panels.
 */
public StaticLayout(Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost,
        EventFilter eventFilter, OverlayPanelManager panelManager) {
    super(context, updateHost, renderHost);

    mHandler = new Handler();
    mUnstallRunnable = new UnstallRunnable();
    mUnstalling = false;
    mSceneLayer = new StaticTabSceneLayer(R.id.control_container);
}
 
Example #10
Source File: LayoutManagerDocument.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a {@link LayoutManagerDocument} instance.
 * @param host            A {@link LayoutManagerHost} instance.
 */
public LayoutManagerDocument(LayoutManagerHost host) {
    super(host);
    mContext = host.getContext();
    LayoutRenderHost renderHost = host.getLayoutRenderHost();

    mToolbarOverlay = new ToolbarSceneLayer(mContext, this, renderHost);

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

    mOverlayPanelManager = new OverlayPanelManager();

    // Build Layouts
    mStaticLayout = new StaticLayout(mContext, this, renderHost, null, mOverlayPanelManager);

    // Contextual Search scene overlay.
    mContextualSearchPanel = new ContextualSearchPanel(mContext, this, mOverlayPanelManager);

    // Reader Mode scene overlay.
    mReaderModePanel = new ReaderModePanel(mContext, this, mOverlayPanelManager, this);

    // Set up layout parameters
    mStaticLayout.setLayoutHandlesTabLifecycles(true);

    setNextLayout(null);
}
 
Example #11
Source File: ReaderModePanel.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * @param context The current Android {@link Context}.
 * @param updateHost The {@link LayoutUpdateHost} used to request updates in the Layout.
 * @param panelManager The {@link OverlayPanelManager} used to control panel show/hide.
 * @param contentViewDelegate Notifies the activity that a ContentViewCore has been created.
 */
public ReaderModePanel(Context context, LayoutUpdateHost updateHost,
        OverlayPanelManager panelManager, OverlayPanelContentViewDelegate contentViewDelegate) {
    super(context, updateHost, panelManager);
    mSceneLayer = createNewReaderModeSceneLayer();
    mContentViewDelegate = contentViewDelegate;
}
 
Example #12
Source File: ContextualSearchPanel.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * @param context The current Android {@link Context}.
 * @param updateHost The {@link LayoutUpdateHost} used to request updates in the Layout.
 * @param panelManager The object managing the how different panels are shown.
 */
public ContextualSearchPanel(
        Context context, LayoutUpdateHost updateHost, OverlayPanelManager panelManager) {
    super(context, updateHost, panelManager);
    mSceneLayer = createNewContextualSearchSceneLayer();
    mPanelMetrics = new ContextualSearchPanelMetrics();

    mBarShadowHeightPx = ApiCompatibilityUtils.getDrawable(mContext.getResources(),
            R.drawable.contextual_search_bar_shadow).getIntrinsicHeight();
    mEndButtonWidthDp = mPxToDp * (float) mContext.getResources().getDimensionPixelSize(
            R.dimen.contextual_search_end_button_width);
}