• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java InfoBarContainer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.chromium.chrome.browser.infobar.InfoBarContainer的典型用法代码示例。如果您正苦于以下问题:Java InfoBarContainer类的具体用法?Java InfoBarContainer怎么用?Java InfoBarContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InfoBarContainer类属于org.chromium.chrome.browser.infobar包,在下文中一共展示了InfoBarContainer类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onAddInfoBar

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
@Override
public void onAddInfoBar(InfoBarContainer container, InfoBar infoBar, boolean isFirst) {
    mIsInfoBarContainerShown = true;
    // If the panel is opened past the peeking state, obscure the infobar.
    if (mReaderModePanel != null && mReaderModePanel.isPanelOpened() && container != null) {
        container.setIsObscuredByOtherView(true);
    } else if (isFirst) {
        // Temporarily hides the reader mode button while the infobars are shown.
        closeReaderPanel(StateChangeReason.INFOBAR_SHOWN, false);
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:12,代码来源:ReaderModeManager.java


示例2: onRemoveInfoBar

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
@Override
public void onRemoveInfoBar(InfoBarContainer container, InfoBar infoBar, boolean isLast) {
    // Re-shows the reader mode button if necessary once the infobars are dismissed.
    if (isLast) {
        mIsInfoBarContainerShown = false;
        requestReaderPanelShow(StateChangeReason.INFOBAR_HIDDEN);
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:9,代码来源:ReaderModeManager.java


示例3: restoreInfobars

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
 * Restore any infobars that may have been hidden by Reader Mode.
 */
private void restoreInfobars() {
    if (!mIsInfoBarContainerShown) return;

    Tab curTab = mTabModelSelector.getCurrentTab();
    if (curTab == null) return;

    InfoBarContainer container = curTab.getInfoBarContainer();
    if (container == null) return;

    container.setIsObscuredByOtherView(false);

    // Temporarily hides the reader mode button while the infobars are shown.
    closeReaderPanel(StateChangeReason.INFOBAR_SHOWN, false);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:18,代码来源:ReaderModeManager.java


示例4: onCloseContextualSearch

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
@Override
public void onCloseContextualSearch(StateChangeReason reason) {
    if (mSearchPanel == null) return;

    mSelectionController.onSearchEnded(reason);

    // Show the infobar container if it was visible before Contextual Search was shown.
    if (mWereInfoBarsHidden) {
        mWereInfoBarsHidden = false;
        InfoBarContainer container = getInfoBarContainer();
        if (container != null) {
            container.setIsObscuredByOtherView(false);
        }
    }

    if (!mWereSearchResultsSeen && mLoadedSearchUrlTimeMs != 0L) {
        removeLastSearchVisit();
    }

    // Clear the timestamp. This is to avoid future calls to hideContextualSearch clearing
    // the current URL.
    mLoadedSearchUrlTimeMs = 0L;
    mWereSearchResultsSeen = false;

    mSearchRequest = null;

    if (mIsShowingPeekPromo || mWouldShowPeekPromo) {
        mPolicy.logPeekPromoMetrics(mIsShowingPeekPromo, mWouldShowPeekPromo);
    }

    if (mIsShowingPromo && !mDidLogPromoOutcome && mSearchPanel.wasPromoInteractive()) {
        ContextualSearchUma.logPromoOutcome(mWasActivatedByTap, mIsMandatoryPromo);
        mDidLogPromoOutcome = true;
    }

    mIsShowingPromo = false;
    mSearchPanel.setIsPromoActive(false, false);
    notifyHideContextualSearch();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:40,代码来源:ContextualSearchManager.java


示例5: getInfoBarContainer

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
 * Accessor for the {@code InfoBarContainer} currently attached to the {@code Tab}.
 */
private InfoBarContainer getInfoBarContainer() {
    Tab tab = mActivity.getActivityTab();
    return tab == null ? null : tab.getInfoBarContainer();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:8,代码来源:ContextualSearchManager.java


示例6: getInfoBarContainer

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
 * @return The infobar container.
 */
public final InfoBarContainer getInfoBarContainer() {
    return mInfoBarContainer;
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:7,代码来源:Tab.java


示例7: onAddInfoBar

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
@Override
public void onAddInfoBar(InfoBarContainer container, InfoBar infoBar, boolean isFirst) {
    if (isFirst && mReaderModePanel != null) mReaderModePanel.onShowInfobarContainer();
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:5,代码来源:ReaderModeManager.java


示例8: onRemoveInfoBar

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
@Override
public void onRemoveInfoBar(InfoBarContainer container, InfoBar infoBar, boolean isLast) {
    if (isLast && mReaderModePanel != null) mReaderModePanel.onHideInfobarContainer();
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:5,代码来源:ReaderModeManager.java


示例9: onCloseContextualSearch

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
@Override
public void onCloseContextualSearch(StateChangeReason reason) {
    // If the user explicitly closes the panel after establishing a selection with long press,
    // it should not reappear until a new selection is made. This prevents the panel from
    // reappearing when a long press selection is modified after the user has taken action to
    // get rid of the panel. See crbug.com/489461.
    if (shouldPreventHandlingCurrentSelectionModification(reason)) {
        mSelectionController.preventHandlingCurrentSelectionModification();
    }

    if (mSearchPanelDelegate == null) return;

    // NOTE(pedrosimonetti): hideContextualSearch() will also be called after swiping the
    // Panel down in order to dismiss it. In this case, hideContextualSearch() will be called
    // after completing the hide animation, and at that moment the Panel will not be showing
    // anymore. Therefore, we need to always clear selection, regardless of when the Panel
    // was still visible, in order to make sure the selection will be cleared appropriately.
    if (mSelectionController.getSelectionType() == SelectionType.TAP) {
        mSelectionController.clearSelection();
    }

    // Show the infobar container if it was visible before Contextual Search was shown.
    if (mWereInfoBarsHidden) {
        mWereInfoBarsHidden = false;
        InfoBarContainer container = getInfoBarContainer();
        if (container != null) {
            container.setVisibility(View.VISIBLE);
            container.setDoStayInvisible(false);
        }
    }

    if (!mWereSearchResultsSeen && mLoadedSearchUrlTimeMs != 0L) {
        removeLastSearchVisit();
    }

    // Clear the timestamp. This is to avoid future calls to hideContextualSearch clearing
    // the current URL.
    mLoadedSearchUrlTimeMs = 0L;
    mWereSearchResultsSeen = false;

    mNetworkCommunicator.destroySearchContentView();
    mSearchRequest = null;

    if (mIsShowingPromo && !mDidLogPromoOutcome) {
        logPromoOutcome();
    }

    mIsShowingPromo = false;
    mSearchPanelDelegate.setIsPromoActive(false);
    notifyHideContextualSearch();
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:52,代码来源:ContextualSearchManager.java


示例10: getInfoBarContainer

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/** Accessor for the {@code InfoBarContainer} currently attached to the {@code Tab}. */
private InfoBarContainer getInfoBarContainer() {
    Tab tab = mActivity.getActivityTab();
    return tab == null ? null : tab.getInfoBarContainer();
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:6,代码来源:ContextualSearchManager.java


示例11: onAccessibilityModeChanged

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
 * Called when the accessibility status of this device changes.  This might be triggered by
 * touch exploration or general accessibility status updates.  It is an aggregate of two other
 * accessibility update methods.
 * @see #onAccessibilityModeChanged(boolean)
 * @see #onTouchExplorationStateChanged(boolean)
 * @param enabled Whether or not accessibility and touch exploration are currently enabled.
 */
protected void onAccessibilityModeChanged(boolean enabled) {
    InfoBarContainer.setIsAllowedToAutoHide(!enabled);
    if (mToolbarManager != null) mToolbarManager.onAccessibilityStatusChanged(enabled);
    if (mContextualSearchManager != null) {
        mContextualSearchManager.onAccessibilityModeChanged(enabled);
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:16,代码来源:ChromeActivity.java


示例12: onAccessibilityModeChanged

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
 * Called when the accessibility status of this device changes.  This might be triggered by
 * touch exploration or general accessibility status updates.  It is an aggregate of two other
 * accessibility update methods.
 * @see #onAccessibilityModeChanged(boolean)
 * @see #onTouchExplorationStateChanged(boolean)
 * @param enabled Whether or not accessibility and touch exploration are currently enabled.
 */
protected void onAccessibilityModeChanged(boolean enabled) {
    InfoBarContainer.setIsAllowedToAutoHide(!enabled);
    if (mToolbarManager != null) mToolbarManager.onAccessibilityStatusChanged(enabled);
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:13,代码来源:ChromeActivity.java


示例13: getInfoBarContainer

import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
 *
 * @return The infobar container.
 */
public final InfoBarContainer getInfoBarContainer() {
    return mInfoBarContainer;
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:8,代码来源:TabBase.java



注:本文中的org.chromium.chrome.browser.infobar.InfoBarContainer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EvAction类代码示例发布时间:2022-05-22
下一篇:
Java CalendarDataProvider类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap