1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // A struct for managing browser's settings that apply to the renderer or its
6 // webview. These differ from WebPreferences since they apply to Chromium's
7 // glue layer rather than applying to just WebKit.
9 // Adding new values to this class probably involves updating
10 // common/view_messages.h, browser/browser.cc, etc.
12 #ifndef CONTENT_PUBLIC_COMMON_RENDERER_PREFERENCES_H_
13 #define CONTENT_PUBLIC_COMMON_RENDERER_PREFERENCES_H_
17 #include "content/common/content_export.h"
18 #include "third_party/skia/include/core/SkColor.h"
22 enum RendererPreferencesHintingEnum
{
23 RENDERER_PREFERENCES_HINTING_SYSTEM_DEFAULT
= 0,
24 RENDERER_PREFERENCES_HINTING_NONE
,
25 RENDERER_PREFERENCES_HINTING_SLIGHT
,
26 RENDERER_PREFERENCES_HINTING_MEDIUM
,
27 RENDERER_PREFERENCES_HINTING_FULL
,
30 enum RendererPreferencesSubpixelRenderingEnum
{
31 RENDERER_PREFERENCES_SUBPIXEL_RENDERING_SYSTEM_DEFAULT
= 0,
32 RENDERER_PREFERENCES_SUBPIXEL_RENDERING_NONE
,
33 RENDERER_PREFERENCES_SUBPIXEL_RENDERING_RGB
,
34 RENDERER_PREFERENCES_SUBPIXEL_RENDERING_BGR
,
35 RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VRGB
,
36 RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VBGR
,
39 struct CONTENT_EXPORT RendererPreferences
{
40 RendererPreferences();
42 // Whether the renderer's current browser context accept drops from the OS
43 // that result in navigations away from the current page.
44 bool can_accept_load_drops
;
46 // Whether text should be antialiased.
47 // Currently only used by Linux.
48 bool should_antialias_text
;
50 // The level of hinting to use when rendering text.
51 // Currently only used by Linux.
52 RendererPreferencesHintingEnum hinting
;
54 // Whether auto hinter should be used. Currently only used by Linux.
57 // Whether embedded bitmap strikes in fonts should be used.
58 // Current only used by Linux.
61 // The type of subpixel rendering to use for text.
62 // Currently only used by Linux.
63 RendererPreferencesSubpixelRenderingEnum subpixel_rendering
;
65 // Whether subpixel positioning should be used, permitting fractional X
66 // positions for glyphs. Currently only used by Linux.
67 bool use_subpixel_positioning
;
69 // The color of the focus ring. Currently only used on Linux.
70 SkColor focus_ring_color
;
72 // The color of different parts of the scrollbar. Currently only used on
74 SkColor thumb_active_color
;
75 SkColor thumb_inactive_color
;
78 // The colors used in selection text. Currently only used on Linux.
79 SkColor active_selection_bg_color
;
80 SkColor active_selection_fg_color
;
81 SkColor inactive_selection_bg_color
;
82 SkColor inactive_selection_fg_color
;
84 // Browser wants a look at all non-local top level navigation requests.
85 bool browser_handles_non_local_top_level_requests
;
87 // Browser wants a look at all top-level navigation requests.
88 bool browser_handles_all_top_level_requests
;
90 // Cursor blink rate in seconds.
91 // Currently only changed from default on Linux. Uses |gtk-cursor-blink|
93 double caret_blink_interval
;
95 // Set to false to not send referrers.
96 bool enable_referrers
;
98 // Default page zoom level.
99 double default_zoom_level
;
101 // The user agent given to WebKit when it requests one and the user agent is
102 // being overridden for the current navigation.
103 std::string user_agent_override
;
105 // Specifies whether renderer input event throttle is enabled.
106 bool throttle_input_events
;
109 } // namespace content
111 #endif // CONTENT_PUBLIC_COMMON_RENDERER_PREFERENCES_H_