![trop[bot]](/assets/img/avatar_default.png)
* fix: resolve font list in default prefernce values Co-authored-by: deepak1556 <hop2deep@gmail.com> * chore: fix unsafe buffer usage Co-authored-by: deepak1556 <hop2deep@gmail.com> * docs: add code comment Co-authored-by: deepak1556 <hop2deep@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
26 lines
885 B
C++
26 lines
885 B
C++
// Copyright (c) 2018 Slack Technologies, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
|
|
#define ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
|
|
|
|
namespace blink {
|
|
namespace web_pref {
|
|
struct WebPreferences;
|
|
} // namespace web_pref
|
|
} // namespace blink
|
|
|
|
namespace electron {
|
|
|
|
// Set the default font preferences. The functionality is copied from
|
|
// chrome/browser/prefs_tab_helper.cc with modifications to work
|
|
// without a preference service and cache chrome/browser/font_family_cache.cc
|
|
// that persists across app sessions.
|
|
// Keep the core logic in sync to avoid performance regressions
|
|
// Refs https://issues.chromium.org/issues/400473071
|
|
void SetFontDefaults(blink::web_pref::WebPreferences* prefs);
|
|
|
|
} // namespace electron
|
|
|
|
#endif // ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
|