本文整理汇总了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;未经允许,请勿转载。 |
请发表评论