org.chromium.chrome.browser.tabmodel.SingleTabModelSelector Java Examples

The following examples show how to use org.chromium.chrome.browser.tabmodel.SingleTabModelSelector. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Tab.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Creates and initializes the {@link ContentViewCore}.
 *
 * @param webContents The WebContents object that will be used to build the
 *                    {@link ContentViewCore}.
 */
protected void initContentViewCore(WebContents webContents) {
    ContentViewCore cvc = new ContentViewCore(mThemedApplicationContext);
    ContentView cv = ContentView.createContentView(mThemedApplicationContext, cvc);
    cv.setContentDescription(mThemedApplicationContext.getResources().getString(
            R.string.accessibility_content_view));
    cvc.initialize(cv, cv, webContents, getWindowAndroid());
    setContentViewCore(cvc);
    if (getTabModelSelector() instanceof SingleTabModelSelector) {
        getContentViewCore().setFullscreenRequiredForOrientationLock(false);
    }
}
 
Example #2
Source File: FullScreenActivity.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public void preInflationStartup() {
    super.preInflationStartup();

    setTabCreators(createTabDelegate(false), createTabDelegate(true));
    setTabModelSelector(new SingleTabModelSelector(this, false, false) {
        @Override
        public Tab openNewTab(LoadUrlParams loadUrlParams, TabLaunchType type, Tab parent,
                boolean incognito) {
            getTabCreator(incognito).createNewTab(loadUrlParams, type, parent);
            return null;
        }
    });
}
 
Example #3
Source File: FullScreenActivity.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
protected TabModelSelector createTabModelSelector() {
    return new SingleTabModelSelector(this, false, false) {
        @Override
        public Tab openNewTab(LoadUrlParams loadUrlParams, TabLaunchType type, Tab parent,
                boolean incognito) {
            getTabCreator(incognito).createNewTab(loadUrlParams, type, parent);
            return null;
        }
    };
}
 
Example #4
Source File: FullScreenActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected TabModelSelector createTabModelSelector() {
    return new SingleTabModelSelector(this, false, false) {
        @Override
        public Tab openNewTab(LoadUrlParams loadUrlParams, TabLaunchType type, Tab parent,
                boolean incognito) {
            getTabCreator(incognito).createNewTab(loadUrlParams, type, parent);
            return null;
        }
    };
}
 
Example #5
Source File: FullScreenActivity.java    From delion with Apache License 2.0 4 votes vote down vote up
@Override
public SingleTabModelSelector getTabModelSelector() {
    return (SingleTabModelSelector) super.getTabModelSelector();
}
 
Example #6
Source File: FullScreenActivity.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@Override
public SingleTabModelSelector getTabModelSelector() {
    return (SingleTabModelSelector) super.getTabModelSelector();
}
 
Example #7
Source File: FullScreenActivity.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@Override
public SingleTabModelSelector getTabModelSelector() {
    return (SingleTabModelSelector) super.getTabModelSelector();
}