#include "url/gurl.h"
#include "url/origin.h"
+#if defined(ENABLE_WRT_JS)
+#include "base/files/file_path.h"
+#endif
+
namespace blink {
class WebView;
bool should_print_backgrounds;
bool should_clear_document_background;
bool enable_scroll_animator;
- bool threaded_scrolling_enabled;
bool prefers_reduced_motion;
+ bool prefers_reduced_transparency;
+ bool inverted_colors;
bool touch_event_feature_detection_enabled;
int pointer_events_max_touch_points;
int available_pointer_types;
blink::mojom::PointerType primary_pointer_type;
int available_hover_types;
blink::mojom::HoverType primary_hover_type;
+ blink::mojom::OutputDeviceUpdateAbilityType output_device_update_ability_type;
bool dont_send_key_events_to_javascript;
bool barrel_button_for_drag_enabled = false;
bool sync_xhr_in_documents_enabled;
bool initialize_at_minimum_page_scale;
bool smart_insert_delete_enabled;
bool spatial_navigation_enabled;
- bool navigate_on_drag_drop;
bool fake_no_alloc_direct_call_for_testing_enabled;
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;
// editable input fields which are non-password type.
bool stylus_handwriting_enabled;
+#if defined(ENABLE_WRT_JS)
+ // Begin Electron-specific WebPreferences.
+ bool context_isolation;
+ bool is_webview;
+ bool hidden_page;
+ bool offscreen;
+ bool node_integration;
+ bool node_integration_in_worker;
+ bool node_integration_in_sub_frames;
+ bool enable_spellcheck;
+ bool enable_plugins;
+ bool enable_websql;
+ bool webview_tag;
+ // End Electron-specific WebPreferences.
+#endif
+
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
// only controls whether or not the "document.cookie" field is properly
// connected to the backing store, for instance if you wanted to be able to
bool link_effect_enabled = false;
bool atk_enabled;
bool force_enable_zoom = false;
+ bool text_zoom_enabled = false;
+ bool selection_magnifier_enabled = false;
+ bool long_press_enabled = false;
+ bool uses_encoding_detector = true;
#endif
bool double_tap_to_zoom_enabled;
#if BUILDFLAG(IS_ANDROID)
float font_scale_factor;
+ int font_weight_adjustment;
+ int text_size_contrast_factor;
float device_scale_adjustment;
bool force_enable_zoom;
GURL default_video_poster_url;
// Don't accelerate small canvases to avoid crashes TODO(crbug.com/1004304)
bool disable_accelerated_small_canvases;
+#endif // BUILDFLAG(IS_ANDROID)
+
+// TODO(crbug.com/1284805): Remove IS_ANDROID once WebView supports WebAuthn.
+// TODO(crbug.com/1382970): Remove IS_FUCHSIA and merge with the block above
+// once all Content embedders on Fuchsia support WebAuthn.
+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
// Disable the Web Authentication API.
bool disable_webauthn = false;
-#endif // BUILDFLAG(IS_ANDROID)
+#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
// Enable forcibly modifying content rendering to result in a light on dark
// color scheme.
unsigned tizen_version_release = 0;
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+ bool media_playback_notification_enabled = false;
+ bool media_subtitle_notification_enabled = false;
+#endif
+
// Whether download UI should be hidden on this page.
bool hide_download_ui;
blink::mojom::AutoplayPolicy autoplay_policy =
blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
+ // `getDisplayMedia()`'s transient activation requirement can be bypassed via
+ // `ScreenCaptureWithoutGestureAllowedForOrigins` policy.
+ bool require_transient_activation_for_get_display_media;
+
+ // `show{OpenFile|SaveFile|Directory}Picker()`'s transient activation
+ // requirement can be bypassed via
+ // `FileOrDirectoryPickerWithoutGestureAllowedForOrigins` policy.
+ bool require_transient_activation_for_show_file_or_directory_picker;
+
// The preferred color scheme for the web content. The scheme is used to
// evaluate the prefers-color-scheme media query and resolve UA color scheme
// to be used based on the supported-color-schemes META tag and CSS property.
// Whether lazy loading of frames and images is enabled.
bool lazy_load_enabled = true;
- // Specifies how close a lazily loaded iframe or image should be from the
- // viewport before it should start being loaded in, depending on the effective
- // connection type of the current network. Blink will use the default distance
- // threshold for effective connection types that aren't specified here.
- std::map<EffectiveConnectionType, int>
- lazy_frame_loading_distance_thresholds_px;
- std::map<EffectiveConnectionType, int>
- lazy_image_loading_distance_thresholds_px;
- std::map<EffectiveConnectionType, int> lazy_image_first_k_fully_load;
-
// Setting to false disables upgrades to HTTPS for HTTP resources in HTTPS
// sites.
bool allow_mixed_content_upgrades;
// (false). Used by StrictMimetypeCheckForWorkerScriptsEnabled policy.
bool strict_mime_type_check_for_worker_scripts_enabled = true;
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Hosted app need to get local access privilege when they use tv device api
+ // located in local path(file://usr/apps/pepper/webapis/webapis.js)
+ bool allow_file_access_from_external_urls = false;
+
+ // Schemes on which SharedArrayBuffer is enabled unconditionally.
+ // Used in WRT for file:// scheme.
+ std::vector<std::string> additional_shared_array_buffer_schemes;
+
+ bool use_arrow_scroll = false;
+ bool use_scrollbar_thumb_focus_notifications = false;
+#endif
+
+ // Whether modal context menu is used. A modal context menu meaning it is
+ // blocking user's access to the background web content.
+ bool modal_context_menu = true;
+
// We try to keep the default values the same as the default values in
// chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value.