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

The following examples show how to use org.chromium.chrome.browser.tab.Tab#isTabStateDirty() . 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: TabPersistentStore.java    From delion with Apache License 2.0 5 votes vote down vote up
public void addTabToSaveQueue(Tab tab) {
    // TODO(ianwen): remove this check once we figure out a better plan to disable tab saving.
    if (tab.getDelegateFactory() instanceof CustomTabDelegateFactory) {
        return;
    }
    if (!mTabsToSave.contains(tab) && tab.isTabStateDirty() && !isTabUrlContentScheme(tab)) {
        mTabsToSave.addLast(tab);
    }
    saveNextTab();
}
 
Example 2
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 3
Source File: TabPersistentStore.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
public void addTabToSaveQueue(Tab tab) {
    if (!mTabsToSave.contains(tab) && tab.isTabStateDirty() && !isTabUrlContentScheme(tab)) {
        mTabsToSave.addLast(tab);
    }
    saveNextTab();
}