本文整理汇总了Java中org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter类的典型用法代码示例。如果您正苦于以下问题:Java EdgeSwipeEventFilter类的具体用法?Java EdgeSwipeEventFilter怎么用?Java EdgeSwipeEventFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EdgeSwipeEventFilter类属于org.chromium.chrome.browser.compositor.layouts.eventfilter包,在下文中一共展示了EdgeSwipeEventFilter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LayoutManagerDocument
import org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter; //导入依赖的package包/类
/**
* 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);
}
示例2: LayoutManagerDocument
import org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter; //导入依赖的package包/类
/**
* Creates a {@link LayoutManagerDocument} instance.
* @param host A {@link LayoutManagerHost} instance.
*/
public LayoutManagerDocument(LayoutManagerHost host) {
super(host);
Context context = host.getContext();
LayoutRenderHost renderHost = host.getLayoutRenderHost();
mContextualSearchPanel = new ContextualSearchPanel(context, this);
mReaderModePanelSelector = new ReaderModePanelSelector() {
@Override
public ReaderModePanel getActiveReaderModePanel() {
if (mStaticLayout == null || !mStaticLayout.isActive()) return null;
ReaderModePanel panel = mStaticLayout.getReaderModePanel();
if (panel == null) return null;
if (!panel.isShowing() || !panel.isReaderModeCurrentlyAllowed()) return null;
return panel;
}
};
// Build Event Filter Handlers
mContextualSearchEdgeSwipeHandler = new ContextualSearchEdgeSwipeHandler(this);
mReaderModeEdgeSwipeHandler = new ReaderModeEdgeSwipeHandler(
mReaderModePanelSelector, this);
mGestureHandler = new GestureHandlerLayoutDelegate(this);
mToolbarSwipeHandler = new ToolbarSwipeHandler(this);
// Build Event Filters
mStaticEdgeEventFilter =
new EdgeSwipeEventFilter(context, this, new StaticEdgeSwipeHandler());
mContextualSearchEventFilter = new ContextualSearchEventFilter(
context, this, mGestureHandler, mContextualSearchPanel);
EventFilter contextualSearchStaticEventFilter = new ContextualSearchStaticEventFilter(
context, this, mContextualSearchPanel, mContextualSearchEdgeSwipeHandler, this);
EventFilter readerModeStaticEventFilter = new ReaderModeStaticEventFilter(
context, this, mReaderModePanelSelector, mReaderModeEdgeSwipeHandler, this);
EventFilter staticCascadeEventFilter = new CascadeEventFilter(context, this,
new EventFilter[] {readerModeStaticEventFilter, contextualSearchStaticEventFilter,
mStaticEdgeEventFilter});
// Build Layouts
mStaticLayout = new StaticLayout(
context, this, renderHost, staticCascadeEventFilter, mContextualSearchPanel);
mContextualSearchLayout = new ContextualSearchLayout(
context, this, renderHost, mContextualSearchEventFilter, mContextualSearchPanel);
// Set up layout parameters
mStaticLayout.setLayoutHandlesTabLifecycles(true);
setNextLayout(null);
}