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
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
#include <string>
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/internal/cef_types_wrappers.h"
|
2024-04-30 03:09:17 +02:00
|
|
|
#include "cef/libcef/features/features.h"
|
2021-07-23 18:40:13 +02:00
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#endif
|
2015-10-17 02:44:00 +02:00
|
|
|
|
2024-01-20 23:48:57 +01:00
|
|
|
namespace blink::web_pref {
|
2020-10-08 21:54:42 +02:00
|
|
|
struct WebPreferences;
|
|
|
|
}
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
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;
|
|
|
|
}
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
class CommandLinePrefStore;
|
|
|
|
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
namespace renderer_prefs {
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2015-10-17 02:44:00 +02:00
|
|
|
// 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);
|
2024-04-30 03:09:17 +02:00
|
|
|
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2015-10-17 02:44:00 +02:00
|
|
|
|
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);
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
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);
|
2024-04-30 03:09:17 +02:00
|
|
|
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2015-10-17 02:44:00 +02:00
|
|
|
|
|
|
|
} // namespace renderer_prefs
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
|