Search in sources :

Example 1 with ActivityDelegateImpl

use of org.chromium.chrome.browser.tabmodel.document.ActivityDelegateImpl in project AndroidChromium by JackyAndroid.

the class ChromeApplication method getDocumentTabModelSelector.

/**
     * Returns the Singleton instance of the DocumentTabModelSelector.
     * TODO(dfalcantara): Find a better place for this once we differentiate between activity and
     *                    application-level TabModelSelectors.
     * @return The DocumentTabModelSelector for the application.
     */
@SuppressFBWarnings("LI_LAZY_INIT_STATIC")
public static DocumentTabModelSelector getDocumentTabModelSelector() {
    ThreadUtils.assertOnUiThread();
    if (sDocumentTabModelSelector == null) {
        ActivityDelegateImpl activityDelegate = new ActivityDelegateImpl(DocumentActivity.class, IncognitoDocumentActivity.class);
        sDocumentTabModelSelector = new DocumentTabModelSelector(activityDelegate, new StorageDelegate(), new TabDelegate(false), new TabDelegate(true));
    }
    return sDocumentTabModelSelector;
}
Also used : StorageDelegate(org.chromium.chrome.browser.tabmodel.document.StorageDelegate) DocumentTabModelSelector(org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector) TabDelegate(org.chromium.chrome.browser.tabmodel.document.TabDelegate) ActivityDelegateImpl(org.chromium.chrome.browser.tabmodel.document.ActivityDelegateImpl) SuppressFBWarnings(org.chromium.base.annotations.SuppressFBWarnings)

Aggregations

SuppressFBWarnings (org.chromium.base.annotations.SuppressFBWarnings)1 ActivityDelegateImpl (org.chromium.chrome.browser.tabmodel.document.ActivityDelegateImpl)1 DocumentTabModelSelector (org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector)1 StorageDelegate (org.chromium.chrome.browser.tabmodel.document.StorageDelegate)1 TabDelegate (org.chromium.chrome.browser.tabmodel.document.TabDelegate)1