Java Code Examples for org.chromium.chrome.browser.tab.Tab#canGoBack()

The following examples show how to use org.chromium.chrome.browser.tab.Tab#canGoBack() . 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: ToolbarManager.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public boolean back() {
    Tab tab = mToolbarModel.getTab();
    if (tab != null && tab.canGoBack()) {
        tab.goBack();
        updateButtonStatus();
        return true;
    }
    return false;
}
 
Example 2
Source File: ToolbarManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public boolean back() {
    Tab tab = mToolbarModel.getTab();
    if (tab != null && tab.canGoBack()) {
        tab.goBack();
        updateButtonStatus();
        return true;
    }
    return false;
}
 
Example 3
Source File: TabPersistentStore.java    From 365browser with Apache License 2.0 5 votes vote down vote up
private void addTabToSaveQueueIfApplicable(Tab tab) {
    if (tab == null) return;
    if (mTabsToSave.contains(tab) || !tab.isTabStateDirty() || isTabUrlContentScheme(tab)) {
        return;
    }

    if (NewTabPage.isNTPUrl(tab.getUrl()) && !tab.canGoBack() && !tab.canGoForward()) {
        return;
    }
    mTabsToSave.addLast(tab);
}
 
Example 4
Source File: FullScreenActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected boolean handleBackPressed() {
    Tab tab = getActivityTab();
    if (tab == null) return false;

    if (exitFullscreenIfShowing()) return true;

    if (tab.canGoBack()) {
        tab.goBack();
        return true;
    }
    return false;
}
 
Example 5
Source File: ToolbarManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public boolean back() {
    Tab tab = mToolbarModel.getTab();
    if (tab != null && tab.canGoBack()) {
        tab.goBack();
        updateButtonStatus();
        return true;
    }
    return false;
}