本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
示例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();
}
示例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();
}
示例6: getInfoBarContainer
import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
* @return The infobar container.
*/
public final InfoBarContainer getInfoBarContainer() {
return mInfoBarContainer;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}
示例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);
}
示例13: getInfoBarContainer
import org.chromium.chrome.browser.infobar.InfoBarContainer; //导入依赖的package包/类
/**
*
* @return The infobar container.
*/
public final InfoBarContainer getInfoBarContainer() {
return mInfoBarContainer;
}