本文整理汇总了Java中org.chromium.chrome.browser.infobar.InfoBarContainer.setIsObscuredByOtherView方法的典型用法代码示例。如果您正苦于以下问题:Java InfoBarContainer.setIsObscuredByOtherView方法的具体用法?Java InfoBarContainer.setIsObscuredByOtherView怎么用?Java InfoBarContainer.setIsObscuredByOtherView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.chromium.chrome.browser.infobar.InfoBarContainer
的用法示例。
在下文中一共展示了InfoBarContainer.setIsObscuredByOtherView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
示例3: 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();
}