Skip to content

Instantly share code, notes, and snippets.

@slawekradzyminski
Created February 21, 2016 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slawekradzyminski/b3bc2a733c1a2c821ac8 to your computer and use it in GitHub Desktop.
Save slawekradzyminski/b3bc2a733c1a2c821ac8 to your computer and use it in GitHub Desktop.
private static final String BROWSER_NOTIFICATIONS = "profile.managed_default_content_settings.notifications";
private static final short DISABLED = 2;
/**
* Full list of available prefs - https://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.cc?view=markup
*
* @return prefs
*/
private Map<String, Object> getChromePrefs() {
Map<String, Object> chromePrefs = new HashMap<>();
chromePrefs.put(BROWSER_NOTIFICATIONS, DISABLED);
return chromePrefs;
}
/**
* Full list of available switches - http://peter.sh/experiments/chromium-command-line-switches/
*
* @return switches List
*/
private List<String> getChromeSwitches() {
List<String> chromeSwitches = new ArrayList<>();
chromeSwitches.add(ChromeSwitchesInt.INCOGNITO);
chromeSwitches.add(ChromeSwitchesInt.ALLOW_INSECURE_CONTENT);
chromeSwitches.add(ChromeSwitchesInt.IGNORE_CERTIFICATE_ERRORS);
chromeSwitches.add(ChromeSwitchesInt.START_FULLSCREEN);
return chromeSwitches;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment