org.chromium.chrome.browser.firstrun.ForcedSigninProcessor Java Examples

The following examples show how to use org.chromium.chrome.browser.firstrun.ForcedSigninProcessor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SupervisedUserContentProvider.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
void startForcedSigninProcessor(Context appContext, Runnable onComplete) {
    ForcedSigninProcessor.start(appContext, onComplete);
}
 
Example #2
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 4 votes vote down vote up
/**
 * All deferred startup tasks that require the activity rather than the app should go here.
 */
private void initDeferredStartupForActivity() {
    DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
        @Override
        public void run() {
            if (isActivityDestroyed()) return;
            BeamController.registerForBeam(ChromeActivity.this, new BeamProvider() {
                @Override
                public String getTabUrlForBeam() {
                    if (isOverlayVisible()) return null;
                    if (getActivityTab() == null) return null;
                    return getActivityTab().getUrl();
                }
            });

            UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThread(
                    ChromeActivity.this);
        }
    });

    final String simpleName = getClass().getSimpleName();
    DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
        @Override
        public void run() {
            if (isActivityDestroyed()) return;
            if (mToolbarManager != null) {
                RecordHistogram.recordTimesHistogram(
                        "MobileStartup.ToolbarInflationTime." + simpleName,
                        mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS);
                mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName);
            }

            if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeActivity.this)) {
                onDeferredStartupForMultiWindowMode();
            }

            long intentTimestamp = IntentHandler.getTimestampFromIntent(getIntent());
            if (intentTimestamp != -1) {
                recordIntentToCreationTime(getOnCreateTimestampMs() - intentTimestamp);
            }
        }
    });

    DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
        @Override
        public void run() {
            if (isActivityDestroyed()) return;
            ForcedSigninProcessor.checkCanSignIn(ChromeActivity.this);
        }
    });
    DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
        @Override
        public void run() {
            if (isActivityDestroyed() || mBottomSheetContentController == null) return;
            mBottomSheetContentController.initializeDefaultContent();
        }
    });
}