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