當前位置: 首頁>>代碼示例>>Java>>正文


Java RecentlyClosedTab類代碼示例

本文整理匯總了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);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:8,代碼來源:RecentTabsRowAdapter.java

示例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);
    }
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:14,代碼來源:RecentTabsRowAdapter.java

示例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);
}
 
開發者ID:Smalinuxer,項目名稱:Vafrinn,代碼行數:15,代碼來源:DocumentRecentTabsManager.java

示例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);
    }
}
 
開發者ID:Smalinuxer,項目名稱:Vafrinn,代碼行數:14,代碼來源:RecentTabsRowAdapter.java

示例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;
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:7,代碼來源:RecentTabsManager.java

示例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);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:13,代碼來源:RecentTabsManager.java

示例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);
}
 
開發者ID:Smalinuxer,項目名稱:Vafrinn,代碼行數:12,代碼來源:RecentTabsManager.java


注:本文中的org.chromium.chrome.browser.ntp.RecentlyClosedBridge.RecentlyClosedTab類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。