2015-10-17 02:44:00 +02:00
|
|
|
// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "include/internal/cef_types_wrappers.h"
|
|
|
|
|
2021-07-23 18:40:13 +02:00
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
class CommandLinePrefStore;
|
|
|
|
|
2020-10-08 21:54:42 +02:00
|
|
|
namespace blink {
|
|
|
|
namespace web_pref {
|
|
|
|
struct WebPreferences;
|
|
|
|
}
|
|
|
|
} // namespace blink
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
namespace content {
|
|
|
|
class RenderViewHost;
|
2020-09-15 18:34:22 +02:00
|
|
|
class WebContents;
|
2019-06-05 16:15:45 +02:00
|
|
|
} // namespace content
|
2015-10-17 02:44:00 +02:00
|
|
|
|
|
|
|
namespace user_prefs {
|
|
|
|
class PrefRegistrySyncable;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace renderer_prefs {
|
|
|
|
|
|
|
|
// Register additional renderer-related preferences.
|
2019-06-05 16:15:45 +02:00
|
|
|
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
|
|
|
const std::string& locale);
|
2015-10-17 02:44:00 +02:00
|
|
|
|
|
|
|
// Set default values based on CEF command-line flags for preferences that are
|
|
|
|
// available via the PrefService. Chromium command-line flags should not exist
|
|
|
|
// for these preferences.
|
|
|
|
void SetCommandLinePrefDefaults(CommandLinePrefStore* prefs);
|
|
|
|
|
2021-04-18 03:12:54 +02:00
|
|
|
// Set default values based on CEF command-line flags for preferences that are
|
|
|
|
// not available via the PrefService. Chromium command-line flags should not
|
|
|
|
// exist for these preferences.
|
|
|
|
void SetDefaultPrefs(blink::web_pref::WebPreferences& web);
|
|
|
|
|
|
|
|
// Set preferences based on CefBrowserSettings.
|
|
|
|
void SetCefPrefs(const CefBrowserSettings& cef,
|
|
|
|
blink::web_pref::WebPreferences& web);
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
// Populate WebPreferences based on a combination of command-line values,
|
|
|
|
// PrefService and CefBrowserSettings.
|
|
|
|
void PopulateWebPreferences(content::RenderViewHost* rvh,
|
2021-07-23 18:40:13 +02:00
|
|
|
blink::web_pref::WebPreferences& web,
|
|
|
|
SkColor& base_background_color);
|
2020-10-08 21:54:42 +02:00
|
|
|
bool PopulateWebPreferencesAfterNavigation(
|
|
|
|
content::WebContents* web_contents,
|
|
|
|
blink::web_pref::WebPreferences& web);
|
2015-10-17 02:44:00 +02:00
|
|
|
|
|
|
|
} // namespace renderer_prefs
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
|