当前位置: 首页>>代码示例>>Java>>正文


Java AsyncTabParamsManager.hasParamsWithTabToReparent方法代码示例

本文整理汇总了Java中org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager.hasParamsWithTabToReparent方法的典型用法代码示例。如果您正苦于以下问题:Java AsyncTabParamsManager.hasParamsWithTabToReparent方法的具体用法?Java AsyncTabParamsManager.hasParamsWithTabToReparent怎么用?Java AsyncTabParamsManager.hasParamsWithTabToReparent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager的用法示例。


在下文中一共展示了AsyncTabParamsManager.hasParamsWithTabToReparent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTabIdFromIntent

import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; //导入方法依赖的package包/类
/**
 * Check whether or not the Intent contains an ID for document mode.
 * @param intent Intent to check.
 * @return ID for the document that has the given intent as base intent, or
 *         {@link Tab.INVALID_TAB_ID} if it couldn't be retrieved.
 */
public static int getTabIdFromIntent(Intent intent) {
    if (intent == null || intent.getData() == null) return Tab.INVALID_TAB_ID;

    // Avoid AsyncTabCreationParams related flows early returning here.
    if (AsyncTabParamsManager.hasParamsWithTabToReparent()) {
        return IntentUtils.safeGetIntExtra(
                intent, IntentHandler.EXTRA_TAB_ID, Tab.INVALID_TAB_ID);
    }

    Uri data = intent.getData();
    if (!TextUtils.equals(data.getScheme(), UrlConstants.DOCUMENT_SCHEME)) {
        return Tab.INVALID_TAB_ID;
    }

    try {
        return Integer.parseInt(data.getHost());
    } catch (NumberFormatException e) {
        return Tab.INVALID_TAB_ID;
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:27,代码来源:ActivityDelegate.java

示例2: onStart

import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; //导入方法依赖的package包/类
@Override
public void onStart() {
    if (AsyncTabParamsManager.hasParamsWithTabToReparent()) {
        mCompositorViewHolder.prepareForTabReparenting();
    }
    super.onStart();
    if (mContextReporter != null) mContextReporter.enable();

    if (mPartnerBrowserRefreshNeeded) {
        mPartnerBrowserRefreshNeeded = false;
        PartnerBrowserCustomizations.initializeAsync(getApplicationContext(),
                PARTNER_BROWSER_CUSTOMIZATIONS_TIMEOUT_MS);
        PartnerBrowserCustomizations.setOnInitializeAsyncFinished(new Runnable() {
            @Override
            public void run() {
                if (PartnerBrowserCustomizations.isIncognitoDisabled()) {
                    terminateIncognitoSession();
                }
            }
        });
    }
    if (mCompositorViewHolder != null) mCompositorViewHolder.onStart();
    mSnackbarManager.onStart();

    // Explicitly call checkAccessibility() so things are initialized correctly when Chrome has
    // been re-started after closing due to the last tab being closed when homepage is enabled.
    // See crbug.com/541546.
    checkAccessibility();

    mScreenWidthDp = getResources().getConfiguration().screenWidthDp;
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:32,代码来源:ChromeActivity.java

示例3: onStart

import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; //导入方法依赖的package包/类
@Override
public void onStart() {
    if (AsyncTabParamsManager.hasParamsWithTabToReparent()) {
        mCompositorViewHolder.prepareForTabReparenting();
    }
    super.onStart();
    if (mContextReporter != null) mContextReporter.enable();

    if (mPartnerBrowserRefreshNeeded) {
        mPartnerBrowserRefreshNeeded = false;
        PartnerBrowserCustomizations.initializeAsync(getApplicationContext(),
                PARTNER_BROWSER_CUSTOMIZATIONS_TIMEOUT_MS);
        PartnerBrowserCustomizations.setOnInitializeAsyncFinished(new Runnable() {
            @Override
            public void run() {
                if (PartnerBrowserCustomizations.isIncognitoDisabled()) {
                    terminateIncognitoSession();
                }
            }
        });
    }
    if (mCompositorViewHolder != null) mCompositorViewHolder.onStart();
    mSnackbarManager.onStart();

    // Explicitly call checkAccessibility() so things are initialized correctly when Chrome has
    // been re-started after closing due to the last tab being closed when homepage is enabled.
    // See crbug.com/541546.
    checkAccessibility();

    mUiMode = getResources().getConfiguration().uiMode;
    mScreenWidthDp = getResources().getConfiguration().screenWidthDp;
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:33,代码来源:ChromeActivity.java


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