org.chromium.chrome.browser.preferences.TextMessageWithLinkAndIconPreference Java Examples

The following examples show how to use org.chromium.chrome.browser.preferences.TextMessageWithLinkAndIconPreference. 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: ClearBrowsingDataPreferences.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public void showNoticeAboutOtherFormsOfBrowsingHistory() {
    if (getActivity() == null) return;

    TextMessageWithLinkAndIconPreference google_summary =
            (TextMessageWithLinkAndIconPreference) findPreference(PREF_GOOGLE_SUMMARY);
    if (google_summary == null) return;
    google_summary.setSummary(
            R.string.clear_browsing_data_footnote_signed_and_other_forms_of_history);
}
 
Example #2
Source File: ClearBrowsingDataPreferences.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public void showNoticeAboutOtherFormsOfBrowsingHistory() {
    if (getActivity() == null) return;

    TextMessageWithLinkAndIconPreference google_summary =
            (TextMessageWithLinkAndIconPreference) findPreference(PREF_GOOGLE_SUMMARY);
    if (google_summary == null) return;
    google_summary.setSummary(
            R.string.clear_browsing_data_footnote_signed_and_other_forms_of_history);
}
 
Example #3
Source File: ClearBrowsingDataPreferences.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Set the texts that notify the user about data in their google account and that deleting
 * cookies doesn't sign you out of chrome.
 */
protected void initFootnote() {
    // The general information footnote informs users about data that will not be deleted.
    // If the user is signed in, it also informs users about the behavior of synced deletions.
    // and we show an additional Google-specific footnote. This footnote informs users that they
    // will not be signed out of their Google account, and if the web history service indicates
    // that they have other forms of browsing history, then also about that.
    TextMessageWithLinkAndIconPreference google_summary =
            (TextMessageWithLinkAndIconPreference) findPreference(PREF_GOOGLE_SUMMARY);
    TextMessageWithLinkAndIconPreference general_summary =
            (TextMessageWithLinkAndIconPreference) findPreference(PREF_GENERAL_SUMMARY);

    google_summary.setLinkClickDelegate(new Runnable() {
        @Override
        public void run() {
            new TabDelegate(false /* incognito */).launchUrl(
                    WEB_HISTORY_URL, TabLaunchType.FROM_CHROME_UI);
        }
    });
    general_summary.setLinkClickDelegate(new Runnable() {
        @Override
        public void run() {
            HelpAndFeedback.getInstance(getActivity()).show(
                    getActivity(),
                    getResources().getString(R.string.help_context_clear_browsing_data),
                    Profile.getLastUsedProfile(),
                    null);
        }
    });
    if (ChromeSigninController.get().isSignedIn()) {
        general_summary.setSummary(
                R.string.clear_browsing_data_footnote_sync_and_site_settings);
    } else {
        getPreferenceScreen().removePreference(google_summary);
        general_summary.setSummary(R.string.clear_browsing_data_footnote_site_settings);
    }
}
 
Example #4
Source File: ClearBrowsingDataPreferences.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void showNoticeAboutOtherFormsOfBrowsingHistory() {
    if (getActivity() == null) return;

    TextMessageWithLinkAndIconPreference google_summary =
            (TextMessageWithLinkAndIconPreference) findPreference(PREF_GOOGLE_SUMMARY);
    if (google_summary == null) return;
    google_summary.setSummary(
            R.string.clear_browsing_data_footnote_signed_and_other_forms_of_history);
}