本文整理汇总了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;
}
}
示例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;
}
示例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;
}