FileDocCategorySizeDatePackage
WebBackForwardListChromium.javaAPI DocAndroid 5.1 API3256Thu Mar 12 22:22:56 GMT 2015com.android.webview.chromium

WebBackForwardListChromium

public class WebBackForwardListChromium extends android.webkit.WebBackForwardList
WebView Chromium implementation of WebBackForwardList. Simple immutable wrapper around NavigationHistory.

Fields Summary
private final List
mHistroryItemList
private final int
mCurrentIndex
Constructors Summary
WebBackForwardListChromium(org.chromium.content_public.browser.NavigationHistory nav_history)

        mCurrentIndex = nav_history.getCurrentEntryIndex();
        mHistroryItemList = new ArrayList<WebHistoryItemChromium>(nav_history.getEntryCount());
        for (int i = 0; i < nav_history.getEntryCount(); ++i) {
            mHistroryItemList.add(
                    new WebHistoryItemChromium(nav_history.getEntryAtIndex(i)));
        }
    
private WebBackForwardListChromium(List list, int currentIndex)

        mHistroryItemList = list;
        mCurrentIndex = currentIndex;
    
Methods Summary
protected synchronized com.android.webview.chromium.WebBackForwardListChromiumclone()
See {@link android.webkit.WebBackForwardList#clone}.

        List<WebHistoryItemChromium> list =
                new ArrayList<WebHistoryItemChromium>(getSize());
        for (int i = 0; i < getSize(); ++i) {
            list.add(mHistroryItemList.get(i).clone());
        }
        return new WebBackForwardListChromium(list, mCurrentIndex);
    
public synchronized intgetCurrentIndex()
See {@link android.webkit.WebBackForwardList#getCurrentIndex}.

        return mCurrentIndex;
    
public synchronized android.webkit.WebHistoryItemgetCurrentItem()
See {@link android.webkit.WebBackForwardList#getCurrentItem}.

        if (getSize() == 0) {
            return null;
        } else {
            return getItemAtIndex(getCurrentIndex());
        }
    
public synchronized android.webkit.WebHistoryItemgetItemAtIndex(int index)
See {@link android.webkit.WebBackForwardList#getItemAtIndex}.

        if (index < 0 || index >= getSize()) {
            return null;
        } else {
            return mHistroryItemList.get(index);
        }
    
public synchronized intgetSize()
See {@link android.webkit.WebBackForwardList#getSize}.

        return mHistroryItemList.size();