• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java InvalidationController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.chromium.chrome.browser.invalidation.InvalidationController的典型用法代码示例。如果您正苦于以下问题:Java InvalidationController类的具体用法?Java InvalidationController怎么用?Java InvalidationController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InvalidationController类属于org.chromium.chrome.browser.invalidation包,在下文中一共展示了InvalidationController类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: RecentTabsManager

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Create an RecentTabsManager to be used with RecentTabsPage and RecentTabsRowAdapter.
 *
 * @param tab The Tab that is showing this recent tabs page.
 * @param profile Profile that is associated with the current session.
 * @param context the Android context this manager will work in.
 */
public RecentTabsManager(Tab tab, Profile profile, Context context) {
    mProfile = profile;
    mTab = tab;
    mForeignSessionHelper = buildForeignSessionHelper(mProfile);
    mNewTabPagePrefs = buildNewTabPagePrefs(mProfile);
    mFaviconHelper = buildFaviconHelper();
    mRecentlyClosedBridge = buildRecentlyClosedBridge(mProfile);
    mSignInManager = SigninManager.get(context);
    mContext = context;

    updateRecentlyClosedTabs();
    registerForForeignSessionUpdates();
    updateForeignSessions();
    mForeignSessionHelper.triggerSessionSync();
    registerForSignInAndSyncNotifications();

    InvalidationController.get(mContext).onRecentTabsPageOpened();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:26,代码来源:RecentTabsManager.java


示例2: destroy

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Should be called when this object is no longer needed. Performs necessary listener tear down.
 */
public void destroy() {
    mIsDestroyed = true;
    AndroidSyncSettings.unregisterObserver(mContext, this);

    mSignInManager.removeSignInStateObserver(this);
    mSignInManager = null;

    mFaviconHelper.destroy();
    mFaviconHelper = null;

    mRecentlyClosedBridge.destroy();
    mRecentlyClosedBridge = null;

    mForeignSessionHelper.destroy();
    mForeignSessionHelper = null;

    mUpdatedCallback = null;

    mNewTabPagePrefs.destroy();
    mNewTabPagePrefs = null;

    InvalidationController.get(mContext).onRecentTabsPageClosed();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:27,代码来源:RecentTabsManager.java


示例3: destroy

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Should be called when this object is no longer needed. Performs necessary listener tear down.
 */
public void destroy() {
    mIsDestroyed = true;
    AndroidSyncSettings.unregisterObserver(mContext, this);

    mSignInManager.removeSignInStateObserver(this);
    mSignInManager = null;

    mFaviconHelper.destroy();
    mFaviconHelper = null;

    mRecentlyClosedTabManager.destroy();
    mRecentlyClosedTabManager = null;

    mForeignSessionHelper.destroy();
    mForeignSessionHelper = null;

    mUpdatedCallback = null;

    mPrefs.destroy();
    mPrefs = null;

    InvalidationController.get(mContext).onRecentTabsPageClosed();
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:27,代码来源:RecentTabsManager.java


示例4: configureSyncDataTypes

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
private void configureSyncDataTypes() {
    if (maybeDisableSync()) return;

    boolean syncEverything = mSyncEverything.isChecked();
    mProfileSyncService.setPreferredDataTypes(syncEverything, getSelectedModelTypes());
    // Update the invalidation listener with the set of types we are enabling.
    InvalidationController invController = InvalidationController.get(getActivity());
    invController.ensureStartedAndUpdateRegisteredTypes();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:10,代码来源:SyncCustomizationFragment.java


示例5: destroy

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Should be called when this object is no longer needed. Performs necessary listener tear down.
 */
public void destroy() {
    AndroidSyncSettings.unregisterObserver(mContext, this);

    mSignInManager.removeSignInStateObserver(this);
    mSignInManager = null;

    mFaviconHelper.destroy();
    mFaviconHelper = null;

    mRecentlyClosedBridge.destroy();
    mRecentlyClosedBridge = null;

    mForeignSessionHelper.destroy();
    mForeignSessionHelper = null;

    mUpdatedCallback = null;

    mNewTabPagePrefs.destroy();
    mNewTabPagePrefs = null;

    if (mProfileDataCache != null) {
        mProfileDataCache.destroy();
        mProfileDataCache = null;
    }

    InvalidationController.get(mContext).onRecentTabsPageClosed();
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:31,代码来源:RecentTabsManager.java


示例6: start

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Starts sync if the master sync flag is enabled.
 *
 * Affects native sync, the invalidation controller, and the Android sync settings.
 */
public void start() {
    ThreadUtils.assertOnUiThread();
    if (AndroidSyncSettings.isMasterSyncEnabled(mContext)) {
        Log.d(TAG, "Enabling sync");
        InvalidationController.get(mContext).ensureStartedAndUpdateRegisteredTypes();
        mProfileSyncService.requestStart();
        AndroidSyncSettings.enableChromeSync(mContext);
    }
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:15,代码来源:SyncController.java


示例7: stop

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Stops Sync if a user is currently signed in.
 *
 * Affects native sync, the invalidation controller, and the Android sync settings.
 */
public void stop() {
    ThreadUtils.assertOnUiThread();
    Log.d(TAG, "Disabling sync");
    InvalidationController.get(mContext).stop();
    mProfileSyncService.requestStop();
    if (AndroidSyncSettings.isMasterSyncEnabled(mContext)) {
        // Only disable Android's Chrome sync setting if we weren't disabled
        // by the master sync setting. This way, when master sync is enabled
        // they will both be on and sync will start again.
        AndroidSyncSettings.disableChromeSync(mContext);
    }
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:18,代码来源:SyncController.java


示例8: configureSyncDataTypes

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
private void configureSyncDataTypes() {
    if (maybeDisableSync()) return;

    boolean syncEverything = mSyncEverything.isChecked();
    mProfileSyncService.setPreferredDataTypes(syncEverything, getSelectedModelTypes());
    // Update the invalidation listener with the set of types we are enabling.
    InvalidationController invController =
            InvalidationController.get(getActivity());
    invController.ensureStartedAndUpdateRegisteredTypes();
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:11,代码来源:SyncCustomizationFragment.java


示例9: RecentTabsManager

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
/**
 * Create an RecentTabsManager to be used with RecentTabsPage and RecentTabsRowAdapter.
 *
 * @param tab The Tab that is showing this recent tabs page.
 * @param profile Profile that is associated with the current session.
 * @param context the Android context this manager will work in.
 */
public RecentTabsManager(Tab tab, Profile profile, Context context) {
    mProfile = profile;
    mTab = tab;
    mForeignSessionHelper = new ForeignSessionHelper(profile);
    mPrefs = new RecentTabsPagePrefs(profile);
    mFaviconHelper = new FaviconHelper();
    mRecentlyClosedTabManager = sRecentlyClosedTabManagerForTests != null
            ? sRecentlyClosedTabManagerForTests
            : new RecentlyClosedBridge(profile);
    mSignInManager = SigninManager.get(context);
    mContext = context;

    mRecentlyClosedTabManager.setTabsUpdatedRunnable(new Runnable() {
        @Override
        public void run() {
            updateRecentlyClosedTabs();
            postUpdate();
        }
    });

    updateRecentlyClosedTabs();
    registerForForeignSessionUpdates();
    updateForeignSessions();
    mForeignSessionHelper.triggerSessionSync();
    registerForSignInAndSyncNotifications();

    InvalidationController.get(mContext).onRecentTabsPageOpened();
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:36,代码来源:RecentTabsManager.java


示例10: start

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
private void start() {
    ThreadUtils.assertOnUiThread();
    if (mSyncStatusHelper.isMasterSyncAutomaticallyEnabled()) {
        Log.d(TAG, "Enabling sync");
        Account account = mChromeSigninController.getSignedInUser();
        InvalidationController.get(mContext).start();
        mProfileSyncService.enableSync();
        mSyncStatusHelper.enableAndroidSync(account);
    }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:11,代码来源:SyncController.java


示例11: stop

import org.chromium.chrome.browser.invalidation.InvalidationController; //导入依赖的package包/类
private void stop() {
    ThreadUtils.assertOnUiThread();
    if (mChromeSigninController.isSignedIn()) {
        Log.d(TAG, "Disabling sync");
        Account account = mChromeSigninController.getSignedInUser();
        InvalidationController.get(mContext).stop();
        mProfileSyncService.disableSync();
        mSyncStatusHelper.disableAndroidSync(account);
    }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:11,代码来源:SyncController.java



注:本文中的org.chromium.chrome.browser.invalidation.InvalidationController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Nullable类代码示例发布时间:2022-05-22
下一篇:
Java Int2LongOpenHashMap类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap