1 // Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that can 3 // be found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_BROWSER_PREFS_BROWSER_PREFS_H_ 6 #define CEF_LIBCEF_BROWSER_PREFS_BROWSER_PREFS_H_ 7 8 #include <memory> 9 10 namespace base { 11 class FilePath; 12 } 13 14 class CefBrowserContext; 15 class CefBrowserHostBase; 16 class PrefRegistrySimple; 17 class PrefService; 18 class Profile; 19 20 namespace browser_prefs { 21 22 // Name for the user prefs JSON file. 23 extern const char kUserPrefsFileName[]; 24 25 // Register preferences specific to CEF. 26 void RegisterProfilePrefs(PrefRegistrySimple* registry); 27 28 // Create the PrefService used to manage pref registration and storage. 29 // |profile| will be nullptr for the system-level PrefService. 30 std::unique_ptr<PrefService> CreatePrefService(Profile* profile, 31 const base::FilePath& cache_path, 32 bool persist_user_preferences); 33 34 // Returns the value for populating the accept-language HTTP request header. 35 // |browser_context| and/or |browser| may be nullptr. If |expand| is true then 36 // base languages and Q values may be added. 37 std::string GetAcceptLanguageList(CefBrowserContext* browser_context, 38 CefBrowserHostBase* browser, 39 bool expand); 40 41 } // namespace browser_prefs 42 43 #endif // CEF_LIBCEF_BROWSER_PREFS_BROWSER_PREFS_H_ 44