Search in sources :

Example 1 with IncognitoNewTabPage

use of org.chromium.chrome.browser.ntp.IncognitoNewTabPage in project AndroidChromium by JackyAndroid.

the class ToolbarManager method shouldShowCusrsorInLocationBar.

private boolean shouldShowCusrsorInLocationBar() {
    Tab tab = mToolbarModel.getTab();
    if (tab == null)
        return false;
    NativePage nativePage = tab.getNativePage();
    if (!(nativePage instanceof NewTabPage) && !(nativePage instanceof IncognitoNewTabPage)) {
        return false;
    }
    Context context = mToolbar.getContext();
    return DeviceFormFactor.isTablet(context) && context.getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY;
}
Also used : NativePage(org.chromium.chrome.browser.NativePage) Context(android.content.Context) Tab(org.chromium.chrome.browser.tab.Tab) IncognitoNewTabPage(org.chromium.chrome.browser.ntp.IncognitoNewTabPage) IncognitoNewTabPage(org.chromium.chrome.browser.ntp.IncognitoNewTabPage) NewTabPage(org.chromium.chrome.browser.ntp.NewTabPage)

Aggregations

Context (android.content.Context)1 NativePage (org.chromium.chrome.browser.NativePage)1 IncognitoNewTabPage (org.chromium.chrome.browser.ntp.IncognitoNewTabPage)1 NewTabPage (org.chromium.chrome.browser.ntp.NewTabPage)1 Tab (org.chromium.chrome.browser.tab.Tab)1