• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 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_RENDERER_PREFS_H_
6 #define CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
7 #pragma once
8 
9 #include "include/internal/cef_types_wrappers.h"
10 
11 class CommandLinePrefStore;
12 
13 namespace blink {
14 namespace web_pref {
15 struct WebPreferences;
16 }
17 }  // namespace blink
18 
19 namespace content {
20 class RenderViewHost;
21 class WebContents;
22 }  // namespace content
23 
24 namespace user_prefs {
25 class PrefRegistrySyncable;
26 }
27 
28 namespace renderer_prefs {
29 
30 // Register additional renderer-related preferences.
31 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
32                           const std::string& locale);
33 
34 // Set default values based on CEF command-line flags for preferences that are
35 // available via the PrefService. Chromium command-line flags should not exist
36 // for these preferences.
37 void SetCommandLinePrefDefaults(CommandLinePrefStore* prefs);
38 
39 // Set default values based on CEF command-line flags for preferences that are
40 // not available via the PrefService. Chromium command-line flags should not
41 // exist for these preferences.
42 void SetDefaultPrefs(blink::web_pref::WebPreferences& web);
43 
44 // Set preferences based on CefBrowserSettings.
45 void SetCefPrefs(const CefBrowserSettings& cef,
46                  blink::web_pref::WebPreferences& web);
47 
48 // Populate WebPreferences based on a combination of command-line values,
49 // PrefService and CefBrowserSettings.
50 void PopulateWebPreferences(content::RenderViewHost* rvh,
51                             blink::web_pref::WebPreferences& web);
52 bool PopulateWebPreferencesAfterNavigation(
53     content::WebContents* web_contents,
54     blink::web_pref::WebPreferences& web);
55 
56 }  // namespace renderer_prefs
57 
58 #endif  // CEF_LIBCEF_BROWSER_PREFS_RENDERER_PREFS_H_
59