2015-10-17 02:44:00 +02:00
|
|
|
// Copyright (c) 2013 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_BROWSER_PREFS_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_PREFS_BROWSER_PREFS_H_
|
|
|
|
|
2016-05-25 01:35:43 +02:00
|
|
|
#include <memory>
|
2015-10-17 02:44:00 +02:00
|
|
|
|
|
|
|
namespace base {
|
|
|
|
class FilePath;
|
|
|
|
}
|
|
|
|
|
2021-04-28 19:12:06 +02:00
|
|
|
class CefBrowserContext;
|
|
|
|
class CefBrowserHostBase;
|
2021-04-10 04:00:33 +02:00
|
|
|
class PrefRegistrySimple;
|
2016-08-04 14:37:53 +02:00
|
|
|
class PrefService;
|
|
|
|
class Profile;
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
namespace browser_prefs {
|
|
|
|
|
|
|
|
// Name for the user prefs JSON file.
|
|
|
|
extern const char kUserPrefsFileName[];
|
|
|
|
|
2021-04-10 04:00:33 +02:00
|
|
|
// Register preferences specific to CEF.
|
|
|
|
void RegisterProfilePrefs(PrefRegistrySimple* registry);
|
|
|
|
|
2017-09-25 15:11:17 +02:00
|
|
|
// Create the PrefService used to manage pref registration and storage.
|
2019-03-21 01:23:23 +01:00
|
|
|
// |profile| will be nullptr for the system-level PrefService.
|
2017-05-17 11:29:28 +02:00
|
|
|
std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
|
|
|
const base::FilePath& cache_path,
|
2017-09-25 15:11:17 +02:00
|
|
|
bool persist_user_preferences);
|
2015-10-17 02:44:00 +02:00
|
|
|
|
2021-04-28 19:12:06 +02:00
|
|
|
// Returns the value for populating the accept-language HTTP request header.
|
|
|
|
// |browser_context| and/or |browser| may be nullptr. If |expand| is true then
|
|
|
|
// base languages and Q values may be added.
|
|
|
|
std::string GetAcceptLanguageList(CefBrowserContext* browser_context,
|
|
|
|
CefBrowserHostBase* browser,
|
|
|
|
bool expand);
|
2020-09-25 03:40:47 +02:00
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
} // namespace browser_prefs
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_PREFS_BROWSER_PREFS_H_
|