org.chromium.chrome.browser.appmenu.AppMenuPropertiesDelegate Java Examples

The following examples show how to use org.chromium.chrome.browser.appmenu.AppMenuPropertiesDelegate. 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: CustomTabActivity.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new CustomTabAppMenuPropertiesDelegate(this, mIntentDataProvider.getMenuTitles(),
            mIntentDataProvider.shouldShowShareMenuItem(),
            mIntentDataProvider.shouldShowBookmarkMenuItem(),
            mIntentDataProvider.isOpenedByChrome());
}
 
Example #2
Source File: CustomTabActivity.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new CustomTabAppMenuPropertiesDelegate(this, mIntentDataProvider.getMenuTitles(),
            mIntentDataProvider.shouldShowShareMenuItem(),
            mIntentDataProvider.isOpenedByChrome(),
            mIntentDataProvider.isMediaViewer());
}
 
Example #3
Source File: ChromeTabbedActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new AppMenuPropertiesDelegate(this) {
        private boolean showDataSaverFooter() {
            return getBottomSheet() == null
                    && DataReductionProxySettings.getInstance()
                               .shouldUseDataReductionMainMenuItem();
        }

        @Override
        public int getFooterResourceId() {
            if (getBottomSheet() != null) {
                boolean isPageMenu = !isTablet() && !isInOverviewMode();
                return isPageMenu ? R.layout.icon_row_menu_footer : 0;
            }

            return showDataSaverFooter() ? R.layout.data_reduction_main_menu_footer : 0;
        }

        @Override
        public boolean shouldShowFooter(int maxMenuHeight) {
            if (showDataSaverFooter()) {
                return maxMenuHeight >= getResources().getDimension(
                                                R.dimen.data_saver_menu_footer_min_show_height);
            }
            return super.shouldShowFooter(maxMenuHeight);
        }
    };
}
 
Example #4
Source File: CustomTabActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new CustomTabAppMenuPropertiesDelegate(this, mIntentDataProvider.getMenuTitles(),
            mIntentDataProvider.shouldShowShareMenuItem(),
            mIntentDataProvider.isOpenedByChrome(),
            mIntentDataProvider.isMediaViewer(),
            mIntentDataProvider.shouldShowStarButton(),
            mIntentDataProvider.shouldShowDownloadButton());
}
 
Example #5
Source File: ChromeActivity.java    From delion with Apache License 2.0 4 votes vote down vote up
@Override
public AppMenuHandler get(
        Activity activity, AppMenuPropertiesDelegate delegate, int menuResourceId) {
    return new AppMenuHandler(activity, delegate, menuResourceId);
}
 
Example #6
Source File: ChromeActivity.java    From delion with Apache License 2.0 4 votes vote down vote up
/**
 * @return The {@link AppMenuPropertiesDelegate} associated with this activity.
 */
@VisibleForTesting
public AppMenuPropertiesDelegate getAppMenuPropertiesDelegate() {
    return mAppMenuPropertiesDelegate;
}
 
Example #7
Source File: ChromeActivity.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@Override
public AppMenuHandler get(
        Activity activity, AppMenuPropertiesDelegate delegate, int menuResourceId) {
    return new AppMenuHandler(activity, delegate, menuResourceId);
}
 
Example #8
Source File: ChromeActivity.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
/**
 * @return The {@link AppMenuPropertiesDelegate} associated with this activity.
 */
@VisibleForTesting
public AppMenuPropertiesDelegate getAppMenuPropertiesDelegate() {
    return mAppMenuPropertiesDelegate;
}
 
Example #9
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@Override
public AppMenuHandler get(
        Activity activity, AppMenuPropertiesDelegate delegate, int menuResourceId) {
    return new AppMenuHandler(activity, delegate, menuResourceId);
}
 
Example #10
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 4 votes vote down vote up
/**
 * @return The {@link AppMenuPropertiesDelegate} associated with this activity.
 */
@VisibleForTesting
public AppMenuPropertiesDelegate getAppMenuPropertiesDelegate() {
    return mAppMenuPropertiesDelegate;
}
 
Example #11
Source File: ChromeActivity.java    From delion with Apache License 2.0 2 votes vote down vote up
/**
 * @return AppMenuHandler for the given activity and menu resource id.
 */
public AppMenuHandler get(Activity activity, AppMenuPropertiesDelegate delegate,
        int menuResourceId);
 
Example #12
Source File: ChromeActivity.java    From delion with Apache License 2.0 2 votes vote down vote up
/**
 * @return {@link AppMenuPropertiesDelegate} instance that the {@link AppMenuHandler}
 *         should be using in this activity.
 */
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new AppMenuPropertiesDelegate(this);
}
 
Example #13
Source File: ChromeActivity.java    From AndroidChromium with Apache License 2.0 2 votes vote down vote up
/**
 * @return AppMenuHandler for the given activity and menu resource id.
 */
public AppMenuHandler get(Activity activity, AppMenuPropertiesDelegate delegate,
        int menuResourceId);
 
Example #14
Source File: ChromeActivity.java    From AndroidChromium with Apache License 2.0 2 votes vote down vote up
/**
 * @return {@link AppMenuPropertiesDelegate} instance that the {@link AppMenuHandler}
 *         should be using in this activity.
 */
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new AppMenuPropertiesDelegate(this);
}
 
Example #15
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 2 votes vote down vote up
/**
 * @return AppMenuHandler for the given activity and menu resource id.
 */
public AppMenuHandler get(Activity activity, AppMenuPropertiesDelegate delegate,
        int menuResourceId);
 
Example #16
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 2 votes vote down vote up
/**
 * @return {@link AppMenuPropertiesDelegate} instance that the {@link AppMenuHandler}
 *         should be using in this activity.
 */
protected AppMenuPropertiesDelegate createAppMenuPropertiesDelegate() {
    return new AppMenuPropertiesDelegate(this);
}