本文整理汇总了Java中org.chromium.content.browser.NavigationEntry类的典型用法代码示例。如果您正苦于以下问题:Java NavigationEntry类的具体用法?Java NavigationEntry怎么用?Java NavigationEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigationEntry类属于org.chromium.content.browser包,在下文中一共展示了NavigationEntry类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeNative
import org.chromium.content.browser.NavigationEntry; //导入依赖的package包/类
private void initializeNative() {
ThreadUtils.assertOnUiThread();
mNativeNavigationPopup = nativeInit();
Set<String> requestedUrls = new HashSet<String>();
for (int i = 0; i < mHistory.getEntryCount(); i++) {
NavigationEntry entry = mHistory.getEntryAtIndex(i);
if (entry.getFavicon() != null) continue;
String url = entry.getUrl();
if (!requestedUrls.contains(url)) {
nativeFetchFaviconForUrl(mNativeNavigationPopup, url);
requestedUrls.add(url);
}
}
nativeFetchFaviconForUrl(mNativeNavigationPopup, nativeGetHistoryUrl());
}
开发者ID:morristech,项目名称:android-chromium,代码行数:17,代码来源:NavigationPopup.java
示例2: getView
import org.chromium.content.browser.NavigationEntry; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView view;
if (convertView != null && convertView instanceof TextView) {
view = (TextView) convertView;
} else {
view = mListItemFactory.createListItem();
}
NavigationEntry entry = (NavigationEntry) getItem(position);
String entryText = entry.getTitle();
if (TextUtils.isEmpty(entryText)) entryText = entry.getVirtualUrl();
if (TextUtils.isEmpty(entryText)) entryText = entry.getUrl();
view.setText(entryText);
updateBitmapForTextView(view, entry.getFavicon());
return view;
}
开发者ID:morristech,项目名称:android-chromium,代码行数:19,代码来源:NavigationPopup.java
示例3: onLoadProgressChanged
import org.chromium.content.browser.NavigationEntry; //导入依赖的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));
}
}
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:23,代码来源:CordovaChromiumView.java
示例4: onFaviconUpdated
import org.chromium.content.browser.NavigationEntry; //导入依赖的package包/类
@CalledByNative
private void onFaviconUpdated(String url, Object favicon) {
for (int i = 0; i < mHistory.getEntryCount(); i++) {
NavigationEntry entry = mHistory.getEntryAtIndex(i);
if (TextUtils.equals(url, entry.getUrl())) entry.updateFavicon((Bitmap) favicon);
}
mAdapter.notifyDataSetChanged();
}
开发者ID:morristech,项目名称:android-chromium,代码行数:9,代码来源:NavigationPopup.java
示例5: onItemClick
import org.chromium.content.browser.NavigationEntry; //导入依赖的package包/类
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
NavigationEntry entry = (NavigationEntry) parent.getItemAtPosition(position);
mNavigationClient.goToNavigationIndex(entry.getIndex());
dismiss();
}
开发者ID:morristech,项目名称:android-chromium,代码行数:7,代码来源:NavigationPopup.java
示例6: getItemId
import org.chromium.content.browser.NavigationEntry; //导入依赖的package包/类
@Override
public long getItemId(int position) {
return ((NavigationEntry) getItem(position)).getIndex();
}
开发者ID:morristech,项目名称:android-chromium,代码行数:5,代码来源:NavigationPopup.java
示例7: WebHistoryItemChromium
import org.chromium.content.browser.NavigationEntry; //导入依赖的package包/类
WebHistoryItemChromium(NavigationEntry entry) {
mUrl = entry.getUrl();
mOriginalUrl = entry.getOriginalUrl();
mTitle = entry.getTitle();
mFavicon = entry.getFavicon();
}
开发者ID:mogoweb,项目名称:chromium_webview,代码行数:7,代码来源:WebHistoryItemChromium.java
注:本文中的org.chromium.content.browser.NavigationEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论