當前位置: 首頁>>代碼示例>>Java>>正文


Java TabReparentingParams.finalizeTabReparenting方法代碼示例

本文整理匯總了Java中org.chromium.chrome.browser.tabmodel.TabReparentingParams.finalizeTabReparenting方法的典型用法代碼示例。如果您正苦於以下問題:Java TabReparentingParams.finalizeTabReparenting方法的具體用法?Java TabReparentingParams.finalizeTabReparenting怎麽用?Java TabReparentingParams.finalizeTabReparenting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.chromium.chrome.browser.tabmodel.TabReparentingParams的用法示例。


在下文中一共展示了TabReparentingParams.finalizeTabReparenting方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: attachAndFinishReparenting

import org.chromium.chrome.browser.tabmodel.TabReparentingParams; //導入方法依賴的package包/類
/**
 * Finishes the tab reparenting process. Attaches the tab to the new activity, and updates the
 * tab and related objects to reference the new activity. This updates many delegates inside the
 * tab and {@link ContentViewCore} both on java and native sides.
 *
 * @param activity The new activity this tab should be associated with.
 * @param tabDelegateFactory The new delegate factory this tab should be using.
 * @Param reparentingParams The TabReparentingParams associated with this reparenting process.
 */
public void attachAndFinishReparenting(ChromeActivity activity,
        TabDelegateFactory tabDelegateFactory, TabReparentingParams reparentingParams) {
    // TODO(yusufo): Share these calls with the construction related calls.
    // crbug.com/590281

    updateWindowAndroid(activity.getWindowAndroid());

    // Update for the controllers that need the Compositor from the new Activity.
    attachTabContentManager(activity.getTabContentManager());
    mFullscreenManager = activity.getFullscreenManager();
    activity.getCompositorViewHolder().prepareForTabReparenting();

    // Update the delegate factory, then recreate and propagate all delegates.
    mDelegateFactory = tabDelegateFactory;
    mWebContentsDelegate = mDelegateFactory.createWebContentsDelegate(this);
    nativeUpdateDelegates(mNativeTabAndroid,
            mWebContentsDelegate, mDelegateFactory.createContextMenuPopulator(this));
    mBrowserControlsVisibilityDelegate =
            mDelegateFactory.createBrowserControlsVisibilityDelegate(this);
    setInterceptNavigationDelegate(mDelegateFactory.createInterceptNavigationDelegate(this));
    getAppBannerManager().setIsEnabledForTab(mDelegateFactory.canShowAppBanners(this));

    reparentingParams.finalizeTabReparenting();
    mIsDetachedForReparenting = false;

    // Reload the NativePage (if any), since the old NativePage has a reference to the old
    // activity.
    maybeShowNativePage(getUrl(), true);

    mIsTabStateDirty = true;

    for (TabObserver observer : mObservers) {
        observer.onReparentingFinished(this);
    }
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:45,代碼來源:Tab.java

示例2: attachAndFinishReparenting

import org.chromium.chrome.browser.tabmodel.TabReparentingParams; //導入方法依賴的package包/類
/**
 * Finishes the tab reparenting process. Attaches the tab to the new activity, and updates the
 * tab and related objects to reference the new activity. This updates many delegates inside the
 * tab and {@link ContentViewCore} both on java and native sides.
 *
 * @param activity The new activity this tab should be associated with.
 * @param tabDelegateFactory The new delegate factory this tab should be using.
 * @Param reparentingParams The TabReparentingParams associated with this reparenting process.
 */
public void attachAndFinishReparenting(ChromeActivity activity,
        TabDelegateFactory tabDelegateFactory, TabReparentingParams reparentingParams) {
    // TODO(yusufo): Share these calls with the construction related calls.
    // crbug.com/590281

    updateWindowAndroid(activity.getWindowAndroid());

    // Update for the controllers that need the Compositor from the new Activity.
    attachTabContentManager(activity.getTabContentManager());
    mFullscreenManager = activity.getFullscreenManager();
    activity.getCompositorViewHolder().prepareForTabReparenting();
    // Update the delegate factory, then recreate and propagate all delegates.
    mDelegateFactory = tabDelegateFactory;
    mWebContentsDelegate = mDelegateFactory.createWebContentsDelegate(this);
    nativeUpdateDelegates(mNativeTabAndroid,
            mWebContentsDelegate, mDelegateFactory.createContextMenuPopulator(this));
    mBrowserControlsVisibilityDelegate =
            mDelegateFactory.createBrowserControlsVisibilityDelegate(this);
    setInterceptNavigationDelegate(mDelegateFactory.createInterceptNavigationDelegate(this));
    getAppBannerManager().setIsEnabledForTab(mDelegateFactory.canShowAppBanners(this));

    reparentingParams.finalizeTabReparenting();
    mIsDetached = false;
    nativeAttachDetachedTab(mNativeTabAndroid);

    // Reload the NativePage (if any), since the old NativePage has a reference to the old
    // activity.
    maybeShowNativePage(getUrl(), true);

    mIsTabStateDirty = true;

    for (TabObserver observer : mObservers) {
        observer.onReparentingFinished(this);
    }
}
 
開發者ID:mogoweb,項目名稱:365browser,代碼行數:45,代碼來源:Tab.java


注:本文中的org.chromium.chrome.browser.tabmodel.TabReparentingParams.finalizeTabReparenting方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。