1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// A struct for managing browser's settings that apply to the renderer or its
// webview. These differ from WebPreferences since they apply to Chromium's
// glue layer rather than applying to just WebKit.
//
// Adding new values to this class probably involves updating
// common/view_messages.h, browser/browser.cc, etc.
#ifndef CONTENT_PUBLIC_COMMON_RENDERER_PREFERENCES_H_
#define CONTENT_PUBLIC_COMMON_RENDERER_PREFERENCES_H_
#include <string>
#include <vector>
#include "base/strings/string16.h"
#include "content/common/content_export.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/font_render_params.h"
namespace content {
enum TapMultipleTargetsStrategy {
TAP_MULTIPLE_TARGETS_STRATEGY_ZOOM = 0,
TAP_MULTIPLE_TARGETS_STRATEGY_POPUP,
TAP_MULTIPLE_TARGETS_STRATEGY_NONE,
TAP_MULTIPLE_TARGETS_STRATEGY_MAX = TAP_MULTIPLE_TARGETS_STRATEGY_NONE,
};
struct CONTENT_EXPORT RendererPreferences {
RendererPreferences();
~RendererPreferences();
// Whether the renderer's current browser context accept drops from the OS
// that result in navigations away from the current page.
bool can_accept_load_drops;
// Whether text should be antialiased.
// Currently only used by Linux.
bool should_antialias_text;
// The level of hinting to use when rendering text.
// Currently only used by Linux.
gfx::FontRenderParams::Hinting hinting;
// Whether auto hinter should be used. Currently only used by Linux.
bool use_autohinter;
// Whether embedded bitmap strikes in fonts should be used.
// Current only used by Linux.
bool use_bitmaps;
// The type of subpixel rendering to use for text.
// Currently only used by Linux and Windows.
gfx::FontRenderParams::SubpixelRendering subpixel_rendering;
// Whether subpixel positioning should be used, permitting fractional X
// positions for glyphs. Currently only used by Linux.
bool use_subpixel_positioning;
// The color of the focus ring. Currently only used on Linux.
SkColor focus_ring_color;
// The color of different parts of the scrollbar. Currently only used on
// Linux.
SkColor thumb_active_color;
SkColor thumb_inactive_color;
SkColor track_color;
// The colors used in selection text. Currently only used on Linux and Ash.
SkColor active_selection_bg_color;
SkColor active_selection_fg_color;
SkColor inactive_selection_bg_color;
SkColor inactive_selection_fg_color;
// Browser wants a look at all non-local top level navigation requests.
bool browser_handles_non_local_top_level_requests;
// Browser wants a look at all top-level navigation requests.
bool browser_handles_all_top_level_requests;
// Cursor blink rate in seconds.
// Currently only changed from default on Linux. Uses |gtk-cursor-blink|
// from GtkSettings.
double caret_blink_interval;
// Whether or not to set custom colors at all.
bool use_custom_colors;
// Set to false to not send referrers.
bool enable_referrers;
// Set to true to indicate that the preference to set DNT to 1 is enabled.
bool enable_do_not_track;
// Set to false to indicate that WebRTC should use the OS default routing.
bool enable_webrtc_multiple_routes;
// Set to false to indicate that WebRTC should not use non-proxied UDP to
// connect to peers and TURN servers, which effectively disables all WebRTC's
// UDP traffic for now, until UDP-based proxy support is available in
// Chromium. Default is true.
bool enable_webrtc_nonproxied_udp_transport;
// Default page zoom level.
double default_zoom_level;
// The user agent given to WebKit when it requests one and the user agent is
// being overridden for the current navigation.
std::string user_agent_override;
// The accept-languages of the browser, comma-separated.
std::string accept_languages;
// Specifies whether the renderer reports frame name changes to the browser
// process.
// TODO(fsamuel): This is a short-term workaround to avoid regressing
// Sunspider. We need to find an efficient way to report changes to frame
// names to the browser process. See http://crbug.com/169110 for more
// information.
bool report_frame_name_changes;
// How to handle a tap gesture touching multiple targets
TapMultipleTargetsStrategy tap_multiple_targets_strategy;
// Disables rendering default error page when client choses to block a page.
// Corresponds to net::ERR_BLOCKED_BY_CLIENT.
bool disable_client_blocked_error_page;
// Determines whether plugins are allowed to enter fullscreen mode.
bool plugin_fullscreen_allowed;
// Whether video-overlay (hole-punching) should be used for the embedded
// encrypted video. Currently only used by Android.
bool use_video_overlay_for_embedded_encrypted_video;
// Use video-overlay (hole-punching) should be used for all video, not just
// encrypted video. Currently only used by Android.
bool use_view_overlay_for_all_video;
// Country iso of the mobile network for content detection purpose.
std::string network_contry_iso;
#if defined(OS_WIN)
// The default system font settings for caption, small caption, menu and
// status messages. Used only by Windows.
base::string16 caption_font_family_name;
int32 caption_font_height;
base::string16 small_caption_font_family_name;
int32 small_caption_font_height;
base::string16 menu_font_family_name;
int32 menu_font_height;
base::string16 status_font_family_name;
int32 status_font_height;
base::string16 message_font_family_name;
int32 message_font_height;
// The width of a vertical scroll bar in dips.
int32 vertical_scroll_bar_width_in_dips;
// The height of a horizontal scroll bar in dips.
int32 horizontal_scroll_bar_height_in_dips;
// The height of the arrow bitmap on a vertical scroll bar in dips.
int32 arrow_bitmap_height_vertical_scroll_bar_in_dips;
// The width of the arrow bitmap on a horizontal scroll bar in dips.
int32 arrow_bitmap_width_horizontal_scroll_bar_in_dips;
#endif
// The default font size used for rendering on Linux.
int default_font_size;
};
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_RENDERER_PREFERENCES_H_
|