diff options
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r-- | src/core/web_engine_settings.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp index 957fe2b7d..ffa2b615e 100644 --- a/src/core/web_engine_settings.cpp +++ b/src/core/web_engine_settings.cpp @@ -49,9 +49,9 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" -#include "content/public/common/web_preferences.h" #include "media/base/media_switches.h" #include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h" +#include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/mojom/renderer_preferences.mojom.h" #include "ui/base/ui_base_switches.h" #include "ui/events/event_switches.h" @@ -116,7 +116,7 @@ WebEngineSettings::~WebEngineSettings() settings->parentSettings = nullptr; } -void WebEngineSettings::overrideWebPreferences(content::WebContents *webContents, content::WebPreferences *prefs) +void WebEngineSettings::overrideWebPreferences(content::WebContents *webContents, blink::web_pref::WebPreferences *prefs) { // Apply our settings on top of those. applySettingsToWebPreferences(prefs); @@ -124,7 +124,7 @@ void WebEngineSettings::overrideWebPreferences(content::WebContents *webContents // as the host process already overides some of the default WebPreferences values // before we get here (e.g. number_of_cpu_cores). if (webPreferences.isNull()) - webPreferences.reset(new content::WebPreferences(*prefs)); + webPreferences.reset(new blink::web_pref::WebPreferences(*prefs)); if (webContents && applySettingsToRendererPreferences(webContents->GetMutableRendererPrefs())) { @@ -347,7 +347,7 @@ void WebEngineSettings::doApply() m_adapter->webContents()->SyncRendererPrefs(); } -void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *prefs) +void WebEngineSettings::applySettingsToWebPreferences(blink::web_pref::WebPreferences *prefs) { // Override for now prefs->touch_event_feature_detection_enabled = isTouchEventsAPIEnabled(); @@ -385,20 +385,20 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p prefs->hide_scrollbars = !testAttribute(ShowScrollBars); if (isAttributeExplicitlySet(PlaybackRequiresUserGesture)) { prefs->autoplay_policy = testAttribute(PlaybackRequiresUserGesture) - ? content::AutoplayPolicy::kUserGestureRequired - : content::AutoplayPolicy::kNoUserGestureRequired; + ? blink::web_pref::AutoplayPolicy::kUserGestureRequired + : blink::web_pref::AutoplayPolicy::kNoUserGestureRequired; } prefs->dom_paste_enabled = testAttribute(JavascriptCanPaste); prefs->dns_prefetching_enabled = testAttribute(DnsPrefetchEnabled); // Fonts settings. - prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont)); - prefs->fixed_font_family_map[content::kCommonScript] = toString16(fontFamily(FixedFont)); - prefs->serif_font_family_map[content::kCommonScript] = toString16(fontFamily(SerifFont)); - prefs->sans_serif_font_family_map[content::kCommonScript] = toString16(fontFamily(SansSerifFont)); - prefs->cursive_font_family_map[content::kCommonScript] = toString16(fontFamily(CursiveFont)); - prefs->fantasy_font_family_map[content::kCommonScript] = toString16(fontFamily(FantasyFont)); - prefs->pictograph_font_family_map[content::kCommonScript] = toString16(fontFamily(PictographFont)); + prefs->standard_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(StandardFont)); + prefs->fixed_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(FixedFont)); + prefs->serif_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(SerifFont)); + prefs->sans_serif_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(SansSerifFont)); + prefs->cursive_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(CursiveFont)); + prefs->fantasy_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(FantasyFont)); + prefs->pictograph_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(PictographFont)); prefs->default_font_size = fontSize(DefaultFontSize); prefs->default_fixed_font_size = fontSize(DefaultFixedFontSize); prefs->minimum_font_size = fontSize(MinimumFontSize); |