本文整理汇总了Java中org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab类的典型用法代码示例。如果您正苦于以下问题:Java RecentlyClosedTab类的具体用法?Java RecentlyClosedTab怎么用?Java RecentlyClosedTab使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecentlyClosedTab类属于org.chromium.chrome.browser.ntp.RecentlyClosedBridge包,在下文中一共展示了RecentlyClosedTab类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChild
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
@Override
public RecentlyClosedTab getChild(int childPosition) {
if (isHistoryLink(childPosition)) {
return null;
}
return mRecentTabsManager.getRecentlyClosedTabs().get(childPosition);
}
示例2: configureChildView
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
@Override
public void configureChildView(int childPosition, ViewHolder viewHolder) {
if (isHistoryLink(childPosition)) {
viewHolder.textView.setText(R.string.show_full_history);
ApiCompatibilityUtils.setCompoundDrawablesRelativeWithIntrinsicBounds(
viewHolder.textView, R.drawable.history_favicon, 0, 0, 0);
} else {
RecentlyClosedTab tab = getChild(childPosition);
String title = TitleUtil.getTitleForDisplay(tab.title, tab.url);
viewHolder.textView.setText(title);
loadLocalFavicon(viewHolder, tab.url);
}
}
示例3: openRecentlyClosedTab
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
@Override
public void openRecentlyClosedTab(final RecentlyClosedTab tab, int windowDisposition) {
// Hide the dialog for screenshot. We don't want to dismiss yet because that will destroy
// the NativePage objects we need in the delayed runnable.
if (mDialog != null) mDialog.hide();
ThreadUtils.postOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
DocumentRecentTabsManager.super.openRecentlyClosedTab(
tab, WindowOpenDisposition.NEW_FOREGROUND_TAB);
if (mDialog != null) mDialog.dismiss();
}
}, NEW_TAB_DELAY_MS);
}
示例4: configureChildView
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
@Override
public void configureChildView(int childPosition, ViewHolder viewHolder) {
if (isHistoryLink(childPosition)) {
viewHolder.textView.setText(R.string.show_full_history);
ApiCompatibilityUtils.setCompoundDrawablesRelativeWithIntrinsicBounds(
viewHolder.textView, R.drawable.history_favicon, 0, 0, 0);
} else {
RecentlyClosedTab tab = getChild(childPosition);
String title = NewTabPageView.getTitleForDisplay(tab.title, tab.url);
viewHolder.textView.setText(title);
loadLocalFavicon(viewHolder, tab.url);
}
}
示例5: getRecentlyClosedTabs
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
/**
* @return Most up-to-date list of recently closed tabs.
*/
public List<RecentlyClosedTab> getRecentlyClosedTabs() {
return mRecentlyClosedTabs;
}
示例6: openRecentlyClosedTab
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
/**
* Restores a recently closed tab.
*
* @param tab The tab to open.
* @param windowDisposition The WindowOpenDisposition value specifying whether the tab should
* be restored into the current tab or a new tab.
*/
public void openRecentlyClosedTab(RecentlyClosedTab tab, int windowDisposition) {
if (mIsDestroyed) return;
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_RECENTLY_CLOSED_ENTRY);
mRecentlyClosedBridge.openRecentlyClosedTab(mTab, tab, windowDisposition);
}
示例7: openRecentlyClosedTab
import org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab; //导入依赖的package包/类
/**
* Restores a recently closed tab.
*
* @param tab The tab to open.
* @param windowDisposition The WindowOpenDisposition value specifying whether the tab should
* be restored into the current tab or a new tab.
*/
public void openRecentlyClosedTab(RecentlyClosedTab tab, int windowDisposition) {
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_RECENTLY_CLOSED_ENTRY);
mRecentlyClosedBridge.openRecentlyClosedTab(mTab, tab, windowDisposition);
}