Java Code Examples for org.chromium.chrome.browser.banners.AppBannerManager#setAppDetailsDelegate()

The following examples show how to use org.chromium.chrome.browser.banners.AppBannerManager#setAppDetailsDelegate() . 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: ProcessInitializationHandler.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Performs the post native initialization.
 */
protected void handlePostNativeInitialization() {
    final ChromeApplication application =
            (ChromeApplication) ContextUtils.getApplicationContext();

    DataReductionProxySettings.reconcileDataReductionProxyEnabledState(application);
    ChromeActivitySessionTracker.getInstance().initializeWithNative();
    ChromeApplication.removeSessionCookies();
    AppBannerManager.setAppDetailsDelegate(application.createAppDetailsDelegate());
    ChromeLifetimeController.initialize();

    PrefServiceBridge.getInstance().migratePreferences(application);
}
 
Example 2
Source File: ProcessInitializationHandler.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Performs the post native initialization.
 */
protected void handlePostNativeInitialization() {
    final ChromeApplication application =
            (ChromeApplication) ContextUtils.getApplicationContext();

    DataReductionProxySettings.reconcileDataReductionProxyEnabledState(application);
    ChromeActivitySessionTracker.getInstance().initializeWithNative();
    ChromeApplication.removeSessionCookies();
    AppBannerManager.setAppDetailsDelegate(AppHooks.get().createAppDetailsDelegate());
    ChromeLifetimeController.initialize();

    PrefServiceBridge.getInstance().migratePreferences(application);

    if (ChromeFeatureList.isEnabled(ChromeFeatureList.NEW_PHOTO_PICKER)) {
        UiUtils.setPhotoPickerDelegate(new UiUtils.PhotoPickerDelegate() {
            private PhotoPickerDialog mDialog;

            @Override
            public void showPhotoPicker(
                    Context context, PhotoPickerListener listener, boolean allowMultiple) {
                mDialog = new PhotoPickerDialog(context, listener, allowMultiple);
                mDialog.getWindow().getAttributes().windowAnimations =
                        R.style.PhotoPickerDialogAnimation;
                mDialog.show();
            }

            @Override
            public void dismissPhotoPicker() {
                mDialog.dismiss();
                mDialog = null;
            }
        });
    }

    SearchWidgetProvider.initialize();
}