use of org.chromium.chrome.browser.tabmodel.SingleTabModelSelector in project AndroidChromium by JackyAndroid.
the class Tab method initContentViewCore.
/**
* 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, PRODUCT_VERSION);
ContentView cv = ContentView.createContentView(mThemedApplicationContext, cvc);
cv.setContentDescription(mThemedApplicationContext.getResources().getString(R.string.accessibility_content_view));
cvc.initialize(ViewAndroidDelegate.createBasicDelegate(cv), cv, webContents, getWindowAndroid());
setContentViewCore(cvc);
if (getTabModelSelector() instanceof SingleTabModelSelector) {
getContentViewCore().setFullscreenRequiredForOrientationLock(false);
}
}
use of org.chromium.chrome.browser.tabmodel.SingleTabModelSelector in project AndroidChromium by JackyAndroid.
the class FullScreenActivity method preInflationStartup.
@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;
}
});
}
Aggregations