font_defaults.h 885 B

1234567891011121314151617181920212223242526
  1. // Copyright (c) 2018 Slack Technologies, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
  5. #define ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
  6. namespace blink {
  7. namespace web_pref {
  8. struct WebPreferences;
  9. } // namespace web_pref
  10. } // namespace blink
  11. namespace electron {
  12. // Set the default font preferences. The functionality is copied from
  13. // chrome/browser/prefs_tab_helper.cc with modifications to work
  14. // without a preference service and cache chrome/browser/font_family_cache.cc
  15. // that persists across app sessions.
  16. // Keep the core logic in sync to avoid performance regressions
  17. // Refs https://issues.chromium.org/issues/400473071
  18. void SetFontDefaults(blink::web_pref::WebPreferences* prefs);
  19. } // namespace electron
  20. #endif // ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_