chromium/third_party/blink/renderer/core/exported/web_settings_impl.cc

/*
 * Copyright (C) 2009 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/core/exported/web_settings_impl.h"

#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/inspector/dev_tools_emulator.h"
#include "third_party/blink/renderer/platform/graphics/deferred_image_decoder.h"

namespace blink {

WebSettingsImpl::WebSettingsImpl(Settings* settings,
                                 DevToolsEmulator* dev_tools_emulator)
    :{}

void WebSettingsImpl::SetFromStrings(const WebString& name,
                                     const WebString& value) {}

void WebSettingsImpl::SetStandardFontFamily(const WebString& font,
                                            UScriptCode script) {}

void WebSettingsImpl::SetFixedFontFamily(const WebString& font,
                                         UScriptCode script) {}

void WebSettingsImpl::SetNetworkQuietTimeout(double timeout) {}

void WebSettingsImpl::SetForceMainWorldInitialization(bool enabled) {}

void WebSettingsImpl::SetForceZeroLayoutHeight(bool enabled) {}

void WebSettingsImpl::SetFullscreenSupported(bool enabled) {}

void WebSettingsImpl::SetSerifFontFamily(const WebString& font,
                                         UScriptCode script) {}

void WebSettingsImpl::SetSansSerifFontFamily(const WebString& font,
                                             UScriptCode script) {}

void WebSettingsImpl::SetCursiveFontFamily(const WebString& font,
                                           UScriptCode script) {}

void WebSettingsImpl::SetFantasyFontFamily(const WebString& font,
                                           UScriptCode script) {}

void WebSettingsImpl::SetMathFontFamily(const WebString& font,
                                        UScriptCode script) {}

void WebSettingsImpl::SetDefaultFontSize(int size) {}

void WebSettingsImpl::SetDefaultFixedFontSize(int size) {}

void WebSettingsImpl::SetDefaultVideoPosterURL(const WebString& url) {}

void WebSettingsImpl::SetMinimumFontSize(int size) {}

void WebSettingsImpl::SetMinimumLogicalFontSize(int size) {}

void WebSettingsImpl::SetAutoplayPolicy(mojom::blink::AutoplayPolicy policy) {}

void WebSettingsImpl::SetRequireTransientActivationForGetDisplayMedia(
    bool required) {}

void WebSettingsImpl::SetRequireTransientActivationForShowFileOrDirectoryPicker(
    bool required) {}

void WebSettingsImpl::SetAutoZoomFocusedEditableToLegibleScale(
    bool auto_zoom_focused_editable_to_legible_scale) {}

void WebSettingsImpl::SetTextAutosizingEnabled(bool enabled) {}

void WebSettingsImpl::SetAccessibilityFontScaleFactor(float font_scale_factor) {}

void WebSettingsImpl::SetAccessibilityTextSizeContrastFactor(
    int text_size_contrast_factor) {}

void WebSettingsImpl::SetAccessibilityAlwaysShowFocus(bool always_show_focus) {}

void WebSettingsImpl::SetAccessibilityPasswordValuesEnabled(bool enabled) {}

void WebSettingsImpl::SetAccessibilityFontWeightAdjustment(int size) {}

void WebSettingsImpl::SetDeviceScaleAdjustment(float device_scale_adjustment) {}

void WebSettingsImpl::SetDefaultTextEncodingName(const WebString& encoding) {}

void WebSettingsImpl::SetJavaScriptEnabled(bool enabled) {}

void WebSettingsImpl::SetWebSecurityEnabled(bool enabled) {}

void WebSettingsImpl::SetSupportDeprecatedTargetDensityDPI(
    bool support_deprecated_target_density_dpi) {}

void WebSettingsImpl::SetViewportMetaMergeContentQuirk(
    bool viewport_meta_merge_content_quirk) {}

void WebSettingsImpl::SetViewportMetaNonUserScalableQuirk(
    bool viewport_meta_non_user_scalable_quirk) {}

void WebSettingsImpl::SetViewportMetaZeroValuesQuirk(
    bool viewport_meta_zero_values_quirk) {}

void WebSettingsImpl::SetIgnoreMainFrameOverflowHiddenQuirk(
    bool ignore_main_frame_overflow_hidden_quirk) {}

void WebSettingsImpl::SetReportScreenSizeInPhysicalPixelsQuirk(
    bool report_screen_size_in_physical_pixels_quirk) {}

void WebSettingsImpl::SetRubberBandingOnCompositorThread(
    bool rubber_banding_on_compositor_thread) {}

void WebSettingsImpl::SetClobberUserAgentInitialScaleQuirk(
    bool clobber_user_agent_initial_scale_quirk) {}

void WebSettingsImpl::SetSupportsMultipleWindows(
    bool supports_multiple_windows) {}

void WebSettingsImpl::SetLoadsImagesAutomatically(
    bool loads_images_automatically) {}

void WebSettingsImpl::SetImageAnimationPolicy(
    mojom::blink::ImageAnimationPolicy policy) {}

void WebSettingsImpl::SetImagesEnabled(bool enabled) {}

void WebSettingsImpl::SetLoadWithOverviewMode(bool enabled) {}

void WebSettingsImpl::SetShouldReuseGlobalForUnownedMainFrame(bool enabled) {}

void WebSettingsImpl::SetPluginsEnabled(bool enabled) {}

void WebSettingsImpl::SetAvailablePointerTypes(int pointers) {}

void WebSettingsImpl::SetPrimaryPointerType(mojom::blink::PointerType pointer) {}

void WebSettingsImpl::SetAvailableHoverTypes(int types) {}

void WebSettingsImpl::SetPrimaryHoverType(mojom::blink::HoverType type) {}

void WebSettingsImpl::SetOutputDeviceUpdateAbilityType(
    mojom::blink::OutputDeviceUpdateAbilityType type) {}

void WebSettingsImpl::SetPreferHiddenVolumeControls(bool enabled) {}

void WebSettingsImpl::SetShouldProtectAgainstIpcFlooding(bool enabled) {}

void WebSettingsImpl::SetDOMPasteAllowed(bool enabled) {}

void WebSettingsImpl::SetShrinksViewportContentToFit(
    bool shrink_viewport_content) {}

void WebSettingsImpl::SetSpatialNavigationEnabled(bool enabled) {}

void WebSettingsImpl::SetSpellCheckEnabledByDefault(bool enabled) {}

void WebSettingsImpl::SetTextAreasAreResizable(bool are_resizable) {}

void WebSettingsImpl::SetAllowScriptsToCloseWindows(bool allow) {}

void WebSettingsImpl::SetWideViewportQuirkEnabled(
    bool wide_viewport_quirk_enabled) {}

void WebSettingsImpl::SetUseWideViewport(bool use_wide_viewport) {}

void WebSettingsImpl::SetDontSendKeyEventsToJavascript(
    bool dont_send_key_events_to_javascript) {}

void WebSettingsImpl::SetDoubleTapToZoomEnabled(
    bool double_tap_to_zoom_enabled) {}

void WebSettingsImpl::SetDownloadableBinaryFontsEnabled(bool enabled) {}

void WebSettingsImpl::SetJavaScriptCanAccessClipboard(bool enabled) {}

void WebSettingsImpl::SetTextTrackKindUserPreference(
    TextTrackKindUserPreference preference) {}

void WebSettingsImpl::SetTextTrackBackgroundColor(const WebString& color) {}

void WebSettingsImpl::SetTextTrackFontFamily(const WebString& font_family) {}

void WebSettingsImpl::SetTextTrackFontStyle(const WebString& font_style) {}

void WebSettingsImpl::SetTextTrackFontVariant(const WebString& font_variant) {}

void WebSettingsImpl::SetTextTrackMarginPercentage(float percentage) {}

void WebSettingsImpl::SetTextTrackTextColor(const WebString& color) {}

void WebSettingsImpl::SetTextTrackTextShadow(const WebString& shadow) {}

void WebSettingsImpl::SetTextTrackTextSize(const WebString& size) {}

void WebSettingsImpl::SetTextTrackWindowColor(const WebString& color) {}

void WebSettingsImpl::SetTextTrackWindowRadius(const WebString& radius) {}

void WebSettingsImpl::SetDNSPrefetchingEnabled(bool enabled) {}

void WebSettingsImpl::SetLocalStorageEnabled(bool enabled) {}

void WebSettingsImpl::SetMainFrameClipsContent(bool enabled) {}

void WebSettingsImpl::SetMaxTouchPoints(int max_touch_points) {}

void WebSettingsImpl::SetAllowUniversalAccessFromFileURLs(bool allow) {}

void WebSettingsImpl::SetAllowFileAccessFromFileURLs(bool allow) {}

void WebSettingsImpl::SetAllowGeolocationOnInsecureOrigins(bool allow) {}

void WebSettingsImpl::SetTouchDragDropEnabled(bool enabled) {}

void WebSettingsImpl::SetTouchDragEndContextMenu(bool enabled) {}

void WebSettingsImpl::SetBarrelButtonForDragEnabled(bool enabled) {}

void WebSettingsImpl::SetWebGL1Enabled(bool enabled) {}

void WebSettingsImpl::SetWebGL2Enabled(bool enabled) {}

void WebSettingsImpl::SetRenderVSyncNotificationEnabled(bool enabled) {}

void WebSettingsImpl::SetWebGLErrorsToConsoleEnabled(bool enabled) {}

void WebSettingsImpl::SetAlwaysShowContextMenuOnTouch(bool enabled) {}

void WebSettingsImpl::SetSmoothScrollForFindEnabled(bool enabled) {}

void WebSettingsImpl::SetShowContextMenuOnMouseUp(bool enabled) {}

void WebSettingsImpl::SetEditingBehavior(
    mojom::blink::EditingBehavior behavior) {}

void WebSettingsImpl::SetHideScrollbars(bool enabled) {}

void WebSettingsImpl::SetPrefersDefaultScrollbarStyles(bool enabled) {}

void WebSettingsImpl::SetMockGestureTapHighlightsEnabled(bool enabled) {}

void WebSettingsImpl::SetAccelerated2dCanvasMSAASampleCount(int count) {}

void WebSettingsImpl::SetAntialiased2dCanvasEnabled(bool enabled) {}

void WebSettingsImpl::SetAntialiasedClips2dCanvasEnabled(bool enabled) {}

void WebSettingsImpl::SetLCDTextPreference(LCDTextPreference preference) {}

void WebSettingsImpl::SetHideDownloadUI(bool hide) {}

void WebSettingsImpl::SetPresentationReceiver(bool enabled) {}

void WebSettingsImpl::SetHighlightAds(bool enabled) {}

void WebSettingsImpl::SetHyperlinkAuditingEnabled(bool enabled) {}

void WebSettingsImpl::SetValidationMessageTimerMagnification(int new_value) {}

void WebSettingsImpl::SetAllowRunningOfInsecureContent(bool enabled) {}

void WebSettingsImpl::SetDisableReadingFromCanvas(bool enabled) {}

void WebSettingsImpl::SetStrictMixedContentChecking(bool enabled) {}

void WebSettingsImpl::SetStrictMixedContentCheckingForPlugin(bool enabled) {}

void WebSettingsImpl::SetStrictPowerfulFeatureRestrictions(bool enabled) {}

void WebSettingsImpl::SetStrictlyBlockBlockableMixedContent(bool enabled) {}

void WebSettingsImpl::SetPasswordEchoEnabled(bool flag) {}

void WebSettingsImpl::SetPasswordEchoDurationInSeconds(
    double duration_in_seconds) {}

void WebSettingsImpl::SetShouldPrintBackgrounds(bool enabled) {}

void WebSettingsImpl::SetShouldClearDocumentBackground(bool enabled) {}

void WebSettingsImpl::SetEnableScrollAnimator(bool enabled) {}

void WebSettingsImpl::SetPrefersReducedMotion(bool enabled) {}

void WebSettingsImpl::SetPrefersReducedTransparency(bool enabled) {}

void WebSettingsImpl::SetInvertedColors(bool enabled) {}

bool WebSettingsImpl::ViewportEnabled() const {}

bool WebSettingsImpl::ViewportMetaEnabled() const {}

bool WebSettingsImpl::DoubleTapToZoomEnabled() const {}

bool WebSettingsImpl::MockGestureTapHighlightsEnabled() const {}

bool WebSettingsImpl::ShrinksViewportContentToFit() const {}

void WebSettingsImpl::SetPictureInPictureEnabled(bool enabled) {}

void WebSettingsImpl::SetWebAppScope(const WebString& scope) {}

void WebSettingsImpl::SetPresentationRequiresUserGesture(bool required) {}

void WebSettingsImpl::SetEmbeddedMediaExperienceEnabled(bool enabled) {}

void WebSettingsImpl::SetImmersiveModeEnabled(bool enabled) {}

void WebSettingsImpl::SetViewportEnabled(bool enabled) {}

void WebSettingsImpl::SetViewportMetaEnabled(bool enabled) {}

void WebSettingsImpl::SetSyncXHRInDocumentsEnabled(bool enabled) {}

void WebSettingsImpl::SetTargetBlankImpliesNoOpenerEnabledWillBeRemoved(
    bool enabled) {}

void WebSettingsImpl::SetAllowNonEmptyNavigatorPlugins(bool enabled) {}

void WebSettingsImpl::SetCaretBrowsingEnabled(bool enabled) {}

void WebSettingsImpl::SetCookieEnabled(bool enabled) {}

void WebSettingsImpl::SetAllowCustomScrollbarInMainFrame(bool enabled) {}

void WebSettingsImpl::SetSelectTrailingWhitespaceEnabled(bool enabled) {}

void WebSettingsImpl::SetSelectionIncludesAltImageText(bool enabled) {}

void WebSettingsImpl::SetSelectionStrategy(SelectionStrategyType strategy) {}

void WebSettingsImpl::SetSmartInsertDeleteEnabled(bool enabled) {}

void WebSettingsImpl::SetMainFrameResizesAreOrientationChanges(bool enabled) {}

void WebSettingsImpl::SetV8CacheOptions(mojom::blink::V8CacheOptions options) {}

void WebSettingsImpl::SetViewportStyle(mojom::blink::ViewportStyle style) {}

void WebSettingsImpl::SetMediaControlsEnabled(bool enabled) {}

void WebSettingsImpl::SetDoNotUpdateSelectionOnMutatingSelectionRange(
    bool enabled) {}

void WebSettingsImpl::SetLowPriorityIframesThreshold(
    WebEffectiveConnectionType effective_connection_type) {}

void WebSettingsImpl::SetLazyLoadEnabled(bool enabled) {}

void WebSettingsImpl::SetLazyLoadingFrameMarginPxUnknown(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingFrameMarginPxOffline(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingFrameMarginPxSlow2G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingFrameMarginPx2G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingFrameMarginPx3G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingFrameMarginPx4G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingImageMarginPxUnknown(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingImageMarginPxOffline(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingImageMarginPxSlow2G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingImageMarginPx2G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingImageMarginPx3G(int distance_px) {}

void WebSettingsImpl::SetLazyLoadingImageMarginPx4G(int distance_px) {}

void WebSettingsImpl::SetForceDarkModeEnabled(bool enabled) {}

void WebSettingsImpl::SetInForcedColors(bool in_forced_colors) {}

void WebSettingsImpl::SetIsForcedColorsDisabled(
    bool is_forced_colors_disabled) {}

void WebSettingsImpl::SetPreferredRootScrollbarColorScheme(
    mojom::blink::PreferredColorScheme color_scheme) {}

void WebSettingsImpl::SetPreferredColorScheme(
    mojom::blink::PreferredColorScheme color_scheme) {}

void WebSettingsImpl::SetPreferredContrast(
    mojom::blink::PreferredContrast contrast) {}

void WebSettingsImpl::SetNavigationControls(
    NavigationControls navigation_controls) {}

void WebSettingsImpl::SetAriaModalPrunesAXTree(bool enabled) {}

void WebSettingsImpl::SetSelectionClipboardBufferAvailable(bool available) {}

void WebSettingsImpl::SetAccessibilityIncludeSvgGElement(bool include) {}

void WebSettingsImpl::SetWebXRImmersiveArAllowed(
    bool webxr_immersive_ar_allowed) {}

void WebSettingsImpl::SetModalContextMenu(bool is_available) {}

void WebSettingsImpl::
    SetRequireTransientActivationAndAuthorizationForSubAppsAPIs(
        bool is_required) {}

}  // namespace blink