本文整理汇总了Java中org.chromium.content.browser.NavigationHistory类的典型用法代码示例。如果您正苦于以下问题:Java NavigationHistory类的具体用法?Java NavigationHistory怎么用?Java NavigationHistory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigationHistory类属于org.chromium.content.browser包,在下文中一共展示了NavigationHistory类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onLoadProgressChanged
import org.chromium.content.browser.NavigationHistory; //导入依赖的package包/类
@SuppressWarnings("unused")
@CalledByNative
protected void onLoadProgressChanged(double progress) {
super.onLoadProgressChanged(progress);
if (mWebViewClient != null) {
if (progress == 0) {
NavigationHistory history = this.getContentView().getContentViewCore().getNavigationHistory();
NavigationEntry entry = null;
int currentIndex = history.getCurrentEntryIndex();
if (currentIndex > -1) {
entry = history.getEntryAtIndex(history.getCurrentEntryIndex());
}
mWebViewClient.onPageStarted(this, getUrl(), entry != null ? entry.getFavicon() : null);
} else if (progress == 1.0 ) {
mWebViewClient.onPageFinished(this, getUrl());
}
}
if (mWebChromeClient != null) {
mWebChromeClient.onProgressChanged(this, (int) (progress * 100));
}
}
示例2: getDirectedNavigationHistory
import org.chromium.content.browser.NavigationHistory; //导入依赖的package包/类
@Override
public NavigationHistory getDirectedNavigationHistory(boolean isForward, int itemLimit) {
if (mContentViewCore != null) {
return mContentViewCore.getDirectedNavigationHistory(isForward, itemLimit);
} else {
return new NavigationHistory();
}
}
示例3: getOriginalUrl
import org.chromium.content.browser.NavigationHistory; //导入依赖的package包/类
public String getOriginalUrl() {
NavigationHistory history = mContentViewCore.getNavigationHistory();
int currentIndex = history.getCurrentEntryIndex();
if (currentIndex >= 0 && currentIndex < history.getEntryCount()) {
return history.getEntryAtIndex(currentIndex).getOriginalUrl();
}
return null;
}
示例4: WebBackForwardListChromium
import org.chromium.content.browser.NavigationHistory; //导入依赖的package包/类
public WebBackForwardListChromium(NavigationHistory nav_history) {
mCurrentIndex = nav_history.getCurrentEntryIndex();
mHistoryItemList = new ArrayList<WebHistoryItemChromium>(nav_history.getEntryCount());
for (int i = 0; i < nav_history.getEntryCount(); ++i) {
mHistoryItemList.add(
new WebHistoryItemChromium(nav_history.getEntryAtIndex(i)));
}
}
示例5: getNavigationHistory
import org.chromium.content.browser.NavigationHistory; //导入依赖的package包/类
/**
* @see ContentViewCore#getNavigationHistory()
*/
public NavigationHistory getNavigationHistory() {
return mContentViewCore.getNavigationHistory();
}