Commit 92b18f73 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Clean up web_runtime_features.h

Several of the functions here are never called. Several others are only
called from WebView::ApplyWebPreferences which is within blink so it can
simply call the RuntimeEnabledFeatures functions directly.

We also correct links in related documentation.

Bug: None
Change-Id: I2317f0c5ce328db14cb1e1e2c2ccf3d45bb13c47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522002Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825570}
parent afc43b58
...@@ -11,8 +11,8 @@ If you simply need to enable/disable the Blink feature you can simply use ...@@ -11,8 +11,8 @@ If you simply need to enable/disable the Blink feature you can simply use
However, if there are side effects (e.g. you need to disable other features if However, if there are side effects (e.g. you need to disable other features if
this feature is also disabled), you should declare a custom enabler function in this feature is also disabled), you should declare a custom enabler function in
- [third_party/blink/public/platform/web_runtime_features.h][WebRuntimeFeatures.h] - [third_party/blink/public/platform/web_runtime_features.h][web_runtime_features.h]
- [third_party/blink/public/platform/web_runtime_features.cc][WebRuntimeFeatures.cc] - [third_party/blink/renderer/platform/exported/web_runtime_features.cc][web_runtime_features.cc]
## Step 2: Determine how your feature is initialized. ## Step 2: Determine how your feature is initialized.
### 1) Depends on OS-specific Macros: ### 1) Depends on OS-specific Macros:
...@@ -94,9 +94,9 @@ command line switch. In this case, your custom logic should live here in ...@@ -94,9 +94,9 @@ command line switch. In this case, your custom logic should live here in
[runtime_features]:<https://chromium.googlesource.com/chromium/src/+/HEAD/content/child/runtime_features.cc> [runtime_features]:<https://chromium.googlesource.com/chromium/src/+/HEAD/content/child/runtime_features.cc>
[RuntimeEnabledFeatures]: [RuntimeEnabledFeatures]:
<https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/platform/RuntimeEnabledFeatures.md> <https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/platform/RuntimeEnabledFeatures.md>
[WebRuntimeFeatures.h]: [web_runtime_features.h]:
<https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/platform/exported/web_runtime_features.h> <https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/public/platform/web_runtime_features.h>
[WebRuntimeFeatures.cc]: [web_runtime_features.cc]:
<https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/platform/exported/web_runtime_features.cc> <https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/platform/exported/web_runtime_features.cc>
[EnableFeatureFromString]:<https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/public/platform/web_runtime_features.h#56> [EnableFeatureFromString]:<https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/public/platform/web_runtime_features.h#56>
[SetRuntimeFeatureDefaultsForPlatform]:<https://chromium.googlesource.com/chromium/src/+/HEAD/content/child/runtime_features.cc#46> [SetRuntimeFeatureDefaultsForPlatform]:<https://chromium.googlesource.com/chromium/src/+/HEAD/content/child/runtime_features.cc#46>
......
...@@ -63,13 +63,10 @@ class WebRuntimeFeatures { ...@@ -63,13 +63,10 @@ class WebRuntimeFeatures {
bool enable); bool enable);
BLINK_PLATFORM_EXPORT static void EnableForcedColors(bool); BLINK_PLATFORM_EXPORT static void EnableForcedColors(bool);
BLINK_PLATFORM_EXPORT static bool IsForcedColorsEnabled();
BLINK_PLATFORM_EXPORT static void EnableFractionalScrollOffsets(bool); BLINK_PLATFORM_EXPORT static void EnableFractionalScrollOffsets(bool);
BLINK_PLATFORM_EXPORT static bool IsFractionalScrollOffsetsEnabled();
BLINK_PLATFORM_EXPORT static void EnableCompositedSelectionUpdate(bool); BLINK_PLATFORM_EXPORT static void EnableCompositedSelectionUpdate(bool);
BLINK_PLATFORM_EXPORT static bool IsCompositedSelectionUpdateEnabled();
BLINK_PLATFORM_EXPORT static void EnableAccelerated2dCanvas(bool); BLINK_PLATFORM_EXPORT static void EnableAccelerated2dCanvas(bool);
BLINK_PLATFORM_EXPORT static void EnableAccessibilityExposeDisplayNone(bool); BLINK_PLATFORM_EXPORT static void EnableAccessibilityExposeDisplayNone(bool);
...@@ -80,7 +77,6 @@ class WebRuntimeFeatures { ...@@ -80,7 +77,6 @@ class WebRuntimeFeatures {
EnableAccessibilityUseAXPositionForDocumentMarkers(bool); EnableAccessibilityUseAXPositionForDocumentMarkers(bool);
BLINK_PLATFORM_EXPORT static void EnableAdTagging(bool); BLINK_PLATFORM_EXPORT static void EnableAdTagging(bool);
BLINK_PLATFORM_EXPORT static void EnableAllowActivationDelegationAttr(bool); BLINK_PLATFORM_EXPORT static void EnableAllowActivationDelegationAttr(bool);
BLINK_PLATFORM_EXPORT static void EnableAudioOutputDevices(bool);
BLINK_PLATFORM_EXPORT static void EnableAutomaticLazyFrameLoading(bool); BLINK_PLATFORM_EXPORT static void EnableAutomaticLazyFrameLoading(bool);
BLINK_PLATFORM_EXPORT static void EnableAutomaticLazyImageLoading(bool); BLINK_PLATFORM_EXPORT static void EnableAutomaticLazyImageLoading(bool);
BLINK_PLATFORM_EXPORT static void EnableBackgroundFetch(bool); BLINK_PLATFORM_EXPORT static void EnableBackgroundFetch(bool);
...@@ -110,32 +106,19 @@ class WebRuntimeFeatures { ...@@ -110,32 +106,19 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableDocumentPolicyNegotiation(bool); BLINK_PLATFORM_EXPORT static void EnableDocumentPolicyNegotiation(bool);
BLINK_PLATFORM_EXPORT static void EnableFeaturePolicyForSandbox(bool); BLINK_PLATFORM_EXPORT static void EnableFeaturePolicyForSandbox(bool);
BLINK_PLATFORM_EXPORT static void EnableFileSystem(bool); BLINK_PLATFORM_EXPORT static void EnableFileSystem(bool);
BLINK_PLATFORM_EXPORT static void EnableForceSynchronousHTMLParsing(bool);
BLINK_PLATFORM_EXPORT static void EnableForceTallerSelectPopup(bool);
BLINK_PLATFORM_EXPORT static void EnableGenericSensorExtraClasses(bool); BLINK_PLATFORM_EXPORT static void EnableGenericSensorExtraClasses(bool);
BLINK_PLATFORM_EXPORT static void EnableImplicitRootScroller(bool); BLINK_PLATFORM_EXPORT static void EnableImplicitRootScroller(bool);
BLINK_PLATFORM_EXPORT static void EnableInputMultipleFieldsUI(bool);
BLINK_PLATFORM_EXPORT static void EnableLayoutNG(bool);
BLINK_PLATFORM_EXPORT static void EnableLazyFrameLoading(bool); BLINK_PLATFORM_EXPORT static void EnableLazyFrameLoading(bool);
BLINK_PLATFORM_EXPORT static void EnableLazyFrameVisibleLoadTimeMetrics(bool); BLINK_PLATFORM_EXPORT static void EnableLazyFrameVisibleLoadTimeMetrics(bool);
BLINK_PLATFORM_EXPORT static void EnableLazyImageLoading(bool); BLINK_PLATFORM_EXPORT static void EnableLazyImageLoading(bool);
BLINK_PLATFORM_EXPORT static void EnableLazyImageVisibleLoadTimeMetrics(bool); BLINK_PLATFORM_EXPORT static void EnableLazyImageVisibleLoadTimeMetrics(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaCapture(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaFeeds(bool); BLINK_PLATFORM_EXPORT static void EnableMediaFeeds(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaSession(bool); BLINK_PLATFORM_EXPORT static void EnableMediaSession(bool);
BLINK_PLATFORM_EXPORT static void EnableMiddleClickAutoscroll(bool);
BLINK_PLATFORM_EXPORT static void EnableNavigatorContentUtils(bool);
BLINK_PLATFORM_EXPORT static void EnableNetInfoDownlinkMax(bool); BLINK_PLATFORM_EXPORT static void EnableNetInfoDownlinkMax(bool);
BLINK_PLATFORM_EXPORT static void EnableNeverSlowMode(bool); BLINK_PLATFORM_EXPORT static void EnableNeverSlowMode(bool);
BLINK_PLATFORM_EXPORT static void EnableNewCanvas2DAPI(bool);
BLINK_PLATFORM_EXPORT static void EnableNotificationConstructor(bool);
BLINK_PLATFORM_EXPORT static void EnableNotificationContentImage(bool); BLINK_PLATFORM_EXPORT static void EnableNotificationContentImage(bool);
BLINK_PLATFORM_EXPORT static void EnableNotifications(bool); BLINK_PLATFORM_EXPORT static void EnableNotifications(bool);
BLINK_PLATFORM_EXPORT static void EnableOnDeviceChange(bool);
BLINK_PLATFORM_EXPORT static void EnableOrientationEvent(bool);
BLINK_PLATFORM_EXPORT static void EnableOverlayScrollbars(bool); BLINK_PLATFORM_EXPORT static void EnableOverlayScrollbars(bool);
BLINK_PLATFORM_EXPORT static void EnableOverscrollCustomization(bool);
BLINK_PLATFORM_EXPORT static void EnablePagePopup(bool);
BLINK_PLATFORM_EXPORT static void EnablePaymentApp(bool); BLINK_PLATFORM_EXPORT static void EnablePaymentApp(bool);
BLINK_PLATFORM_EXPORT static void EnablePaymentHandlerMinimalUI(bool); BLINK_PLATFORM_EXPORT static void EnablePaymentHandlerMinimalUI(bool);
BLINK_PLATFORM_EXPORT static void EnablePaymentRequest(bool); BLINK_PLATFORM_EXPORT static void EnablePaymentRequest(bool);
...@@ -144,7 +127,6 @@ class WebRuntimeFeatures { ...@@ -144,7 +127,6 @@ class WebRuntimeFeatures {
bool); bool);
BLINK_PLATFORM_EXPORT static void EnablePeriodicBackgroundSync(bool); BLINK_PLATFORM_EXPORT static void EnablePeriodicBackgroundSync(bool);
BLINK_PLATFORM_EXPORT static void EnablePermissionsAPI(bool); BLINK_PLATFORM_EXPORT static void EnablePermissionsAPI(bool);
BLINK_PLATFORM_EXPORT static void EnablePermissionsPolicyHeader(bool);
BLINK_PLATFORM_EXPORT static void EnablePictureInPicture(bool); BLINK_PLATFORM_EXPORT static void EnablePictureInPicture(bool);
BLINK_PLATFORM_EXPORT static void EnablePictureInPictureAPI(bool); BLINK_PLATFORM_EXPORT static void EnablePictureInPictureAPI(bool);
BLINK_PLATFORM_EXPORT static void EnablePointerLockOptions(bool); BLINK_PLATFORM_EXPORT static void EnablePointerLockOptions(bool);
...@@ -178,7 +160,6 @@ class WebRuntimeFeatures { ...@@ -178,7 +160,6 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableWebBluetooth(bool); BLINK_PLATFORM_EXPORT static void EnableWebBluetooth(bool);
BLINK_PLATFORM_EXPORT static void BLINK_PLATFORM_EXPORT static void
EnableWebBluetoothRemoteCharacteristicNewWriteValue(bool); EnableWebBluetoothRemoteCharacteristicNewWriteValue(bool);
BLINK_PLATFORM_EXPORT static void EnableWebBluetoothScanning(bool);
BLINK_PLATFORM_EXPORT static void EnableWebGLDraftExtensions(bool); BLINK_PLATFORM_EXPORT static void EnableWebGLDraftExtensions(bool);
BLINK_PLATFORM_EXPORT static void EnableWebGLImageChromium(bool); BLINK_PLATFORM_EXPORT static void EnableWebGLImageChromium(bool);
BLINK_PLATFORM_EXPORT static void EnableWebGPU(bool); BLINK_PLATFORM_EXPORT static void EnableWebGPU(bool);
...@@ -196,24 +177,16 @@ class WebRuntimeFeatures { ...@@ -196,24 +177,16 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableWebXRLightEstimation(bool); BLINK_PLATFORM_EXPORT static void EnableWebXRLightEstimation(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRPlaneDetection(bool); BLINK_PLATFORM_EXPORT static void EnableWebXRPlaneDetection(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRViewportScale(bool); BLINK_PLATFORM_EXPORT static void EnableWebXRViewportScale(bool);
BLINK_PLATFORM_EXPORT static void EnableXSLT(bool);
BLINK_PLATFORM_EXPORT static void ForceOverlayFullscreenVideo(bool); BLINK_PLATFORM_EXPORT static void ForceOverlayFullscreenVideo(bool);
BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForBackgroundTabs( BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForBackgroundTabs(
bool); bool);
BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForHiddenFrames(bool); BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForHiddenFrames(bool);
BLINK_PLATFORM_EXPORT static void EnableExpensiveBackgroundTimerThrottling( BLINK_PLATFORM_EXPORT static void EnableExpensiveBackgroundTimerThrottling(
bool); bool);
BLINK_PLATFORM_EXPORT static void EnableCanvas2dDynamicRenderingModeSwitching(
bool);
BLINK_PLATFORM_EXPORT static void BLINK_PLATFORM_EXPORT static void
EnableSendBeaconThrowForBlobWithNonSimpleType(bool); EnableSendBeaconThrowForBlobWithNonSimpleType(bool);
BLINK_PLATFORM_EXPORT static void EnableBackgroundVideoTrackOptimization(
bool);
BLINK_PLATFORM_EXPORT static void EnableVideoFullscreenOrientationLock(bool);
BLINK_PLATFORM_EXPORT static void EnableVideoRotateToFullscreen(bool);
BLINK_PLATFORM_EXPORT static void EnableVideoPlaybackQuality(bool); BLINK_PLATFORM_EXPORT static void EnableVideoPlaybackQuality(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaControlsOverlayPlayButton(bool); BLINK_PLATFORM_EXPORT static void EnableMediaControlsOverlayPlayButton(bool);
BLINK_PLATFORM_EXPORT static void EnableRemotePlaybackBackend(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaCastOverlayButton(bool); BLINK_PLATFORM_EXPORT static void EnableMediaCastOverlayButton(bool);
BLINK_PLATFORM_EXPORT static void EnableLazyInitializeMediaControls(bool); BLINK_PLATFORM_EXPORT static void EnableLazyInitializeMediaControls(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaEngagementBypassAutoplayPolicies( BLINK_PLATFORM_EXPORT static void EnableMediaEngagementBypassAutoplayPolicies(
...@@ -223,7 +196,6 @@ class WebRuntimeFeatures { ...@@ -223,7 +196,6 @@ class WebRuntimeFeatures {
bool); bool);
BLINK_PLATFORM_EXPORT static void EnableAutoplayIgnoresWebAudio(bool); BLINK_PLATFORM_EXPORT static void EnableAutoplayIgnoresWebAudio(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaControlsExpandGesture(bool); BLINK_PLATFORM_EXPORT static void EnableMediaControlsExpandGesture(bool);
BLINK_PLATFORM_EXPORT static void EnableTranslateService(bool);
BLINK_PLATFORM_EXPORT static void EnableGetDisplayMedia(bool); BLINK_PLATFORM_EXPORT static void EnableGetDisplayMedia(bool);
BLINK_PLATFORM_EXPORT static void EnableGetCurrentBrowsingContextMedia(bool); BLINK_PLATFORM_EXPORT static void EnableGetCurrentBrowsingContextMedia(bool);
BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool); BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool);
...@@ -242,9 +214,6 @@ class WebRuntimeFeatures { ...@@ -242,9 +214,6 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableMouseSubframeNoImplicitCapture(bool); BLINK_PLATFORM_EXPORT static void EnableMouseSubframeNoImplicitCapture(bool);
BLINK_PLATFORM_EXPORT static void EnableBackForwardCache(bool); BLINK_PLATFORM_EXPORT static void EnableBackForwardCache(bool);
BLINK_PLATFORM_EXPORT static void EnableSurfaceEmbeddingFeatures(bool);
BLINK_PLATFORM_EXPORT static void EnableAcceleratedSmallCanvases(bool);
BLINK_PLATFORM_EXPORT static void EnableTrustTokens(bool); BLINK_PLATFORM_EXPORT static void EnableTrustTokens(bool);
BLINK_PLATFORM_EXPORT static void EnableTrustTokensAlwaysAllowIssuance(bool); BLINK_PLATFORM_EXPORT static void EnableTrustTokensAlwaysAllowIssuance(bool);
......
...@@ -1480,12 +1480,12 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, ...@@ -1480,12 +1480,12 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
settings->SetDownloadableBinaryFontsEnabled(prefs.remote_fonts_enabled); settings->SetDownloadableBinaryFontsEnabled(prefs.remote_fonts_enabled);
settings->SetJavaScriptCanAccessClipboard( settings->SetJavaScriptCanAccessClipboard(
prefs.javascript_can_access_clipboard); prefs.javascript_can_access_clipboard);
WebRuntimeFeatures::EnableXSLT(prefs.xslt_enabled); RuntimeEnabledFeatures::SetXSLTEnabled(prefs.xslt_enabled);
settings->SetDNSPrefetchingEnabled(prefs.dns_prefetching_enabled); settings->SetDNSPrefetchingEnabled(prefs.dns_prefetching_enabled);
blink::WebNetworkStateNotifier::SetSaveDataEnabled(prefs.data_saver_enabled); blink::WebNetworkStateNotifier::SetSaveDataEnabled(prefs.data_saver_enabled);
settings->SetLocalStorageEnabled(prefs.local_storage_enabled); settings->SetLocalStorageEnabled(prefs.local_storage_enabled);
settings->SetSyncXHRInDocumentsEnabled(prefs.sync_xhr_in_documents_enabled); settings->SetSyncXHRInDocumentsEnabled(prefs.sync_xhr_in_documents_enabled);
WebRuntimeFeatures::EnableDatabase(prefs.databases_enabled); RuntimeEnabledFeatures::SetDatabaseEnabled(prefs.databases_enabled);
settings->SetOfflineWebApplicationCacheEnabled( settings->SetOfflineWebApplicationCacheEnabled(
prefs.application_cache_enabled); prefs.application_cache_enabled);
settings->SetShouldProtectAgainstIpcFlooding( settings->SetShouldProtectAgainstIpcFlooding(
...@@ -1513,11 +1513,12 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, ...@@ -1513,11 +1513,12 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
settings->SetHideScrollbars(prefs.hide_scrollbars); settings->SetHideScrollbars(prefs.hide_scrollbars);
// Enable gpu-accelerated 2d canvas if requested on the command line. // Enable gpu-accelerated 2d canvas if requested on the command line.
WebRuntimeFeatures::EnableAccelerated2dCanvas( RuntimeEnabledFeatures::SetAccelerated2dCanvasEnabled(
prefs.accelerated_2d_canvas_enabled); prefs.accelerated_2d_canvas_enabled);
// Enable new canvas 2d api features // Enable new canvas 2d api features
WebRuntimeFeatures::EnableNewCanvas2DAPI(prefs.new_canvas_2d_api_enabled); RuntimeEnabledFeatures::SetNewCanvas2DAPIEnabled(
prefs.new_canvas_2d_api_enabled);
// Disable antialiasing for 2d canvas if requested on the command line. // Disable antialiasing for 2d canvas if requested on the command line.
settings->SetAntialiased2dCanvasEnabled( settings->SetAntialiased2dCanvasEnabled(
...@@ -1554,7 +1555,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, ...@@ -1554,7 +1555,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
settings->SetEnableScrollAnimator(prefs.enable_scroll_animator); settings->SetEnableScrollAnimator(prefs.enable_scroll_animator);
settings->SetPrefersReducedMotion(prefs.prefers_reduced_motion); settings->SetPrefersReducedMotion(prefs.prefers_reduced_motion);
WebRuntimeFeatures::EnableTouchEventFeatureDetection( RuntimeEnabledFeatures::SetTouchEventFeatureDetectionEnabled(
prefs.touch_event_feature_detection_enabled); prefs.touch_event_feature_detection_enabled);
settings->SetMaxTouchPoints(prefs.pointer_events_max_touch_points); settings->SetMaxTouchPoints(prefs.pointer_events_max_touch_points);
settings->SetAvailablePointerTypes(prefs.available_pointer_types); settings->SetAvailablePointerTypes(prefs.available_pointer_types);
...@@ -1576,7 +1577,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, ...@@ -1576,7 +1577,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
// disabled KFS because they need more time to update their custom elements, // disabled KFS because they need more time to update their custom elements,
// crbug.com/907284. Meanwhile, we pre-ship KFS to spatnav users. // crbug.com/907284. Meanwhile, we pre-ship KFS to spatnav users.
if (prefs.spatial_navigation_enabled) if (prefs.spatial_navigation_enabled)
WebRuntimeFeatures::EnableKeyboardFocusableScrollers(true); RuntimeEnabledFeatures::SetKeyboardFocusableScrollersEnabled(true);
settings->SetSelectionIncludesAltImageText(true); settings->SetSelectionIncludesAltImageText(true);
...@@ -1668,21 +1669,22 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, ...@@ -1668,21 +1669,22 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
settings->SetPreferHiddenVolumeControls(true); settings->SetPreferHiddenVolumeControls(true);
settings->SetSpellCheckEnabledByDefault(prefs.spellcheck_enabled_by_default); settings->SetSpellCheckEnabledByDefault(prefs.spellcheck_enabled_by_default);
WebRuntimeFeatures::EnableVideoFullscreenOrientationLock( RuntimeEnabledFeatures::SetVideoFullscreenOrientationLockEnabled(
prefs.video_fullscreen_orientation_lock_enabled); prefs.video_fullscreen_orientation_lock_enabled);
WebRuntimeFeatures::EnableVideoRotateToFullscreen( RuntimeEnabledFeatures::SetVideoRotateToFullscreenEnabled(
prefs.video_rotate_to_fullscreen_enabled); prefs.video_rotate_to_fullscreen_enabled);
settings->SetEmbeddedMediaExperienceEnabled( settings->SetEmbeddedMediaExperienceEnabled(
prefs.embedded_media_experience_enabled); prefs.embedded_media_experience_enabled);
settings->SetImmersiveModeEnabled(prefs.immersive_mode_enabled); settings->SetImmersiveModeEnabled(prefs.immersive_mode_enabled);
settings->SetDoNotUpdateSelectionOnMutatingSelectionRange( settings->SetDoNotUpdateSelectionOnMutatingSelectionRange(
prefs.do_not_update_selection_on_mutating_selection_range); prefs.do_not_update_selection_on_mutating_selection_range);
WebRuntimeFeatures::EnableCSSHexAlphaColor(prefs.css_hex_alpha_color_enabled); RuntimeEnabledFeatures::SetCSSHexAlphaColorEnabled(
WebRuntimeFeatures::EnableScrollTopLeftInterop( prefs.css_hex_alpha_color_enabled);
RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(
prefs.scroll_top_left_interop_enabled); prefs.scroll_top_left_interop_enabled);
WebRuntimeFeatures::EnableSurfaceEmbeddingFeatures( RuntimeEnabledFeatures::SetSurfaceEmbeddingFeaturesEnabled(
!prefs.disable_features_depending_on_viz); !prefs.disable_features_depending_on_viz);
WebRuntimeFeatures::EnableAcceleratedSmallCanvases( RuntimeEnabledFeatures::SetAcceleratedSmallCanvasesEnabled(
!prefs.disable_accelerated_small_canvases); !prefs.disable_accelerated_small_canvases);
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
settings->SetForceDarkModeEnabled(prefs.force_dark_mode_enabled); settings->SetForceDarkModeEnabled(prefs.force_dark_mode_enabled);
...@@ -1824,10 +1826,11 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, ...@@ -1824,10 +1826,11 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#endif #endif
#if defined(OS_WIN) #if defined(OS_WIN)
WebRuntimeFeatures::EnableMiddleClickAutoscroll(true); RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled(true);
#endif #endif
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); RuntimeEnabledFeatures::SetTranslateServiceEnabled(
prefs.translate_service_available);
} }
void WebViewImpl::ThemeChanged() { void WebViewImpl::ThemeChanged() {
......
...@@ -68,10 +68,6 @@ void WebRuntimeFeatures::EnableWebBluetoothRemoteCharacteristicNewWriteValue( ...@@ -68,10 +68,6 @@ void WebRuntimeFeatures::EnableWebBluetoothRemoteCharacteristicNewWriteValue(
SetWebBluetoothRemoteCharacteristicNewWriteValueEnabled(enable); SetWebBluetoothRemoteCharacteristicNewWriteValueEnabled(enable);
} }
void WebRuntimeFeatures::EnableWebBluetoothScanning(bool enable) {
RuntimeEnabledFeatures::SetWebBluetoothScanningEnabled(enable);
}
void WebRuntimeFeatures::EnableWebNfc(bool enable) { void WebRuntimeFeatures::EnableWebNfc(bool enable) {
RuntimeEnabledFeatures::SetWebNFCEnabled(enable); RuntimeEnabledFeatures::SetWebNFCEnabled(enable);
} }
...@@ -89,18 +85,10 @@ void WebRuntimeFeatures::EnableForcedColors(bool enable) { ...@@ -89,18 +85,10 @@ void WebRuntimeFeatures::EnableForcedColors(bool enable) {
RuntimeEnabledFeatures::SetForcedColorsEnabled(enable); RuntimeEnabledFeatures::SetForcedColorsEnabled(enable);
} }
bool WebRuntimeFeatures::IsForcedColorsEnabled() {
return RuntimeEnabledFeatures::ForcedColorsEnabled();
}
void WebRuntimeFeatures::EnableFractionalScrollOffsets(bool enable) { void WebRuntimeFeatures::EnableFractionalScrollOffsets(bool enable) {
RuntimeEnabledFeatures::SetFractionalScrollOffsetsEnabled(enable); RuntimeEnabledFeatures::SetFractionalScrollOffsetsEnabled(enable);
} }
bool WebRuntimeFeatures::IsFractionalScrollOffsetsEnabled() {
return RuntimeEnabledFeatures::FractionalScrollOffsetsEnabled();
}
void WebRuntimeFeatures::EnableTestOnlyFeatures(bool enable) { void WebRuntimeFeatures::EnableTestOnlyFeatures(bool enable) {
RuntimeEnabledFeatures::SetTestFeaturesEnabled(enable); RuntimeEnabledFeatures::SetTestFeaturesEnabled(enable);
} }
...@@ -143,10 +131,6 @@ void WebRuntimeFeatures::EnableAllowActivationDelegationAttr(bool enable) { ...@@ -143,10 +131,6 @@ void WebRuntimeFeatures::EnableAllowActivationDelegationAttr(bool enable) {
RuntimeEnabledFeatures::SetAllowActivationDelegationAttrEnabled(enable); RuntimeEnabledFeatures::SetAllowActivationDelegationAttrEnabled(enable);
} }
void WebRuntimeFeatures::EnableAudioOutputDevices(bool enable) {
RuntimeEnabledFeatures::SetAudioOutputDevicesEnabled(enable);
}
void WebRuntimeFeatures::EnableAutomaticLazyFrameLoading(bool enable) { void WebRuntimeFeatures::EnableAutomaticLazyFrameLoading(bool enable) {
RuntimeEnabledFeatures::SetAutomaticLazyFrameLoadingEnabled(enable); RuntimeEnabledFeatures::SetAutomaticLazyFrameLoadingEnabled(enable);
} }
...@@ -175,10 +159,6 @@ void WebRuntimeFeatures::EnableCompositedSelectionUpdate(bool enable) { ...@@ -175,10 +159,6 @@ void WebRuntimeFeatures::EnableCompositedSelectionUpdate(bool enable) {
RuntimeEnabledFeatures::SetCompositedSelectionUpdateEnabled(enable); RuntimeEnabledFeatures::SetCompositedSelectionUpdateEnabled(enable);
} }
bool WebRuntimeFeatures::IsCompositedSelectionUpdateEnabled() {
return RuntimeEnabledFeatures::CompositedSelectionUpdateEnabled();
}
void WebRuntimeFeatures::EnableCSSHexAlphaColor(bool enable) { void WebRuntimeFeatures::EnableCSSHexAlphaColor(bool enable) {
RuntimeEnabledFeatures::SetCSSHexAlphaColorEnabled(enable); RuntimeEnabledFeatures::SetCSSHexAlphaColorEnabled(enable);
} }
...@@ -215,14 +195,6 @@ void WebRuntimeFeatures::EnableFileSystem(bool enable) { ...@@ -215,14 +195,6 @@ void WebRuntimeFeatures::EnableFileSystem(bool enable) {
RuntimeEnabledFeatures::SetFileSystemEnabled(enable); RuntimeEnabledFeatures::SetFileSystemEnabled(enable);
} }
void WebRuntimeFeatures::EnableForceSynchronousHTMLParsing(bool enable) {
RuntimeEnabledFeatures::SetForceSynchronousHTMLParsingEnabled(enable);
}
void WebRuntimeFeatures::EnableForceTallerSelectPopup(bool enable) {
RuntimeEnabledFeatures::SetForceTallerSelectPopupEnabled(enable);
}
void WebRuntimeFeatures::EnableGenericSensorExtraClasses(bool enable) { void WebRuntimeFeatures::EnableGenericSensorExtraClasses(bool enable) {
RuntimeEnabledFeatures::SetSensorExtraClassesEnabled(enable); RuntimeEnabledFeatures::SetSensorExtraClassesEnabled(enable);
} }
...@@ -231,14 +203,6 @@ void WebRuntimeFeatures::EnableImplicitRootScroller(bool enable) { ...@@ -231,14 +203,6 @@ void WebRuntimeFeatures::EnableImplicitRootScroller(bool enable) {
RuntimeEnabledFeatures::SetImplicitRootScrollerEnabled(enable); RuntimeEnabledFeatures::SetImplicitRootScrollerEnabled(enable);
} }
void WebRuntimeFeatures::EnableInputMultipleFieldsUI(bool enable) {
RuntimeEnabledFeatures::SetInputMultipleFieldsUIEnabled(enable);
}
void WebRuntimeFeatures::EnableLayoutNG(bool enable) {
RuntimeEnabledFeatures::SetLayoutNGEnabled(enable);
}
void WebRuntimeFeatures::EnableLazyFrameLoading(bool enable) { void WebRuntimeFeatures::EnableLazyFrameLoading(bool enable) {
RuntimeEnabledFeatures::SetLazyFrameLoadingEnabled(enable); RuntimeEnabledFeatures::SetLazyFrameLoadingEnabled(enable);
} }
...@@ -255,10 +219,6 @@ void WebRuntimeFeatures::EnableLazyImageVisibleLoadTimeMetrics(bool enable) { ...@@ -255,10 +219,6 @@ void WebRuntimeFeatures::EnableLazyImageVisibleLoadTimeMetrics(bool enable) {
RuntimeEnabledFeatures::SetLazyImageVisibleLoadTimeMetricsEnabled(enable); RuntimeEnabledFeatures::SetLazyImageVisibleLoadTimeMetricsEnabled(enable);
} }
void WebRuntimeFeatures::EnableMediaCapture(bool enable) {
RuntimeEnabledFeatures::SetMediaCaptureEnabled(enable);
}
void WebRuntimeFeatures::EnableMediaFeeds(bool enable) { void WebRuntimeFeatures::EnableMediaFeeds(bool enable) {
RuntimeEnabledFeatures::SetMediaFeedsEnabled(enable); RuntimeEnabledFeatures::SetMediaFeedsEnabled(enable);
} }
...@@ -267,10 +227,6 @@ void WebRuntimeFeatures::EnableMediaSession(bool enable) { ...@@ -267,10 +227,6 @@ void WebRuntimeFeatures::EnableMediaSession(bool enable) {
RuntimeEnabledFeatures::SetMediaSessionEnabled(enable); RuntimeEnabledFeatures::SetMediaSessionEnabled(enable);
} }
void WebRuntimeFeatures::EnableNotificationConstructor(bool enable) {
RuntimeEnabledFeatures::SetNotificationConstructorEnabled(enable);
}
void WebRuntimeFeatures::EnableNotificationContentImage(bool enable) { void WebRuntimeFeatures::EnableNotificationContentImage(bool enable) {
RuntimeEnabledFeatures::SetNotificationContentImageEnabled(enable); RuntimeEnabledFeatures::SetNotificationContentImageEnabled(enable);
} }
...@@ -279,10 +235,6 @@ void WebRuntimeFeatures::EnableNotifications(bool enable) { ...@@ -279,10 +235,6 @@ void WebRuntimeFeatures::EnableNotifications(bool enable) {
RuntimeEnabledFeatures::SetNotificationsEnabled(enable); RuntimeEnabledFeatures::SetNotificationsEnabled(enable);
} }
void WebRuntimeFeatures::EnableNavigatorContentUtils(bool enable) {
RuntimeEnabledFeatures::SetNavigatorContentUtilsEnabled(enable);
}
void WebRuntimeFeatures::EnableNetInfoDownlinkMax(bool enable) { void WebRuntimeFeatures::EnableNetInfoDownlinkMax(bool enable) {
RuntimeEnabledFeatures::SetNetInfoDownlinkMaxEnabled(enable); RuntimeEnabledFeatures::SetNetInfoDownlinkMaxEnabled(enable);
} }
...@@ -291,30 +243,6 @@ void WebRuntimeFeatures::EnableNeverSlowMode(bool enable) { ...@@ -291,30 +243,6 @@ void WebRuntimeFeatures::EnableNeverSlowMode(bool enable) {
RuntimeEnabledFeatures::SetNeverSlowModeEnabled(enable); RuntimeEnabledFeatures::SetNeverSlowModeEnabled(enable);
} }
void WebRuntimeFeatures::EnableNewCanvas2DAPI(bool enable) {
RuntimeEnabledFeatures::SetNewCanvas2DAPIEnabled(enable);
}
void WebRuntimeFeatures::EnableOnDeviceChange(bool enable) {
RuntimeEnabledFeatures::SetOnDeviceChangeEnabled(enable);
}
void WebRuntimeFeatures::EnableOrientationEvent(bool enable) {
RuntimeEnabledFeatures::SetOrientationEventEnabled(enable);
}
void WebRuntimeFeatures::EnableOverscrollCustomization(bool enable) {
RuntimeEnabledFeatures::SetOverscrollCustomizationEnabled(enable);
}
void WebRuntimeFeatures::EnablePagePopup(bool enable) {
RuntimeEnabledFeatures::SetPagePopupEnabled(enable);
}
void WebRuntimeFeatures::EnableMiddleClickAutoscroll(bool enable) {
RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled(enable);
}
void WebRuntimeFeatures::EnablePaymentApp(bool enable) { void WebRuntimeFeatures::EnablePaymentApp(bool enable) {
RuntimeEnabledFeatures::SetPaymentAppEnabled(enable); RuntimeEnabledFeatures::SetPaymentAppEnabled(enable);
} }
...@@ -397,10 +325,6 @@ void WebRuntimeFeatures::EnableWebGLImageChromium(bool enable) { ...@@ -397,10 +325,6 @@ void WebRuntimeFeatures::EnableWebGLImageChromium(bool enable) {
RuntimeEnabledFeatures::SetWebGLImageChromiumEnabled(enable); RuntimeEnabledFeatures::SetWebGLImageChromiumEnabled(enable);
} }
void WebRuntimeFeatures::EnableXSLT(bool enable) {
RuntimeEnabledFeatures::SetXSLTEnabled(enable);
}
void WebRuntimeFeatures::EnableOverlayScrollbars(bool enable) { void WebRuntimeFeatures::EnableOverlayScrollbars(bool enable) {
ScrollbarThemeSettings::SetOverlayScrollbarsEnabled(enable); ScrollbarThemeSettings::SetOverlayScrollbarsEnabled(enable);
} }
...@@ -531,22 +455,10 @@ void WebRuntimeFeatures::EnableSendBeaconThrowForBlobWithNonSimpleType( ...@@ -531,22 +455,10 @@ void WebRuntimeFeatures::EnableSendBeaconThrowForBlobWithNonSimpleType(
enable); enable);
} }
void WebRuntimeFeatures::EnableBackgroundVideoTrackOptimization(bool enable) {
RuntimeEnabledFeatures::SetBackgroundVideoTrackOptimizationEnabled(enable);
}
void WebRuntimeFeatures::EnableRemotePlaybackAPI(bool enable) { void WebRuntimeFeatures::EnableRemotePlaybackAPI(bool enable) {
RuntimeEnabledFeatures::SetRemotePlaybackEnabled(enable); RuntimeEnabledFeatures::SetRemotePlaybackEnabled(enable);
} }
void WebRuntimeFeatures::EnableVideoFullscreenOrientationLock(bool enable) {
RuntimeEnabledFeatures::SetVideoFullscreenOrientationLockEnabled(enable);
}
void WebRuntimeFeatures::EnableVideoRotateToFullscreen(bool enable) {
RuntimeEnabledFeatures::SetVideoRotateToFullscreenEnabled(enable);
}
void WebRuntimeFeatures::EnableVideoPlaybackQuality(bool enable) { void WebRuntimeFeatures::EnableVideoPlaybackQuality(bool enable) {
RuntimeEnabledFeatures::SetVideoPlaybackQualityEnabled(enable); RuntimeEnabledFeatures::SetVideoPlaybackQualityEnabled(enable);
} }
...@@ -555,10 +467,6 @@ void WebRuntimeFeatures::EnableMediaControlsOverlayPlayButton(bool enable) { ...@@ -555,10 +467,6 @@ void WebRuntimeFeatures::EnableMediaControlsOverlayPlayButton(bool enable) {
RuntimeEnabledFeatures::SetMediaControlsOverlayPlayButtonEnabled(enable); RuntimeEnabledFeatures::SetMediaControlsOverlayPlayButtonEnabled(enable);
} }
void WebRuntimeFeatures::EnableRemotePlaybackBackend(bool enable) {
RuntimeEnabledFeatures::SetRemotePlaybackBackendEnabled(enable);
}
void WebRuntimeFeatures::EnableMediaCastOverlayButton(bool enable) { void WebRuntimeFeatures::EnableMediaCastOverlayButton(bool enable) {
RuntimeEnabledFeatures::SetMediaCastOverlayButtonEnabled(enable); RuntimeEnabledFeatures::SetMediaCastOverlayButtonEnabled(enable);
} }
...@@ -607,10 +515,6 @@ void WebRuntimeFeatures::EnableDocumentPolicyNegotiation(bool enable) { ...@@ -607,10 +515,6 @@ void WebRuntimeFeatures::EnableDocumentPolicyNegotiation(bool enable) {
RuntimeEnabledFeatures::SetDocumentPolicyNegotiationEnabled(enable); RuntimeEnabledFeatures::SetDocumentPolicyNegotiationEnabled(enable);
} }
void WebRuntimeFeatures::EnablePermissionsPolicyHeader(bool enable) {
RuntimeEnabledFeatures::SetPermissionsPolicyHeaderEnabled(enable);
}
void WebRuntimeFeatures::EnableAutoplayIgnoresWebAudio(bool enable) { void WebRuntimeFeatures::EnableAutoplayIgnoresWebAudio(bool enable) {
RuntimeEnabledFeatures::SetAutoplayIgnoresWebAudioEnabled(enable); RuntimeEnabledFeatures::SetAutoplayIgnoresWebAudioEnabled(enable);
} }
...@@ -619,10 +523,6 @@ void WebRuntimeFeatures::EnableMediaControlsExpandGesture(bool enable) { ...@@ -619,10 +523,6 @@ void WebRuntimeFeatures::EnableMediaControlsExpandGesture(bool enable) {
RuntimeEnabledFeatures::SetMediaControlsExpandGestureEnabled(enable); RuntimeEnabledFeatures::SetMediaControlsExpandGestureEnabled(enable);
} }
void WebRuntimeFeatures::EnableTranslateService(bool enable) {
RuntimeEnabledFeatures::SetTranslateServiceEnabled(enable);
}
void WebRuntimeFeatures::EnableBackgroundFetch(bool enable) { void WebRuntimeFeatures::EnableBackgroundFetch(bool enable) {
RuntimeEnabledFeatures::SetBackgroundFetchEnabled(enable); RuntimeEnabledFeatures::SetBackgroundFetchEnabled(enable);
} }
...@@ -693,14 +593,6 @@ void WebRuntimeFeatures::EnableBackForwardCache(bool enable) { ...@@ -693,14 +593,6 @@ void WebRuntimeFeatures::EnableBackForwardCache(bool enable) {
RuntimeEnabledFeatures::SetBackForwardCacheEnabled(enable); RuntimeEnabledFeatures::SetBackForwardCacheEnabled(enable);
} }
void WebRuntimeFeatures::EnableSurfaceEmbeddingFeatures(bool enable) {
RuntimeEnabledFeatures::SetSurfaceEmbeddingFeaturesEnabled(enable);
}
void WebRuntimeFeatures::EnableAcceleratedSmallCanvases(bool enable) {
RuntimeEnabledFeatures::SetAcceleratedSmallCanvasesEnabled(enable);
}
void WebRuntimeFeatures::EnableTrustTokens(bool enable) { void WebRuntimeFeatures::EnableTrustTokens(bool enable) {
RuntimeEnabledFeatures::SetTrustTokensEnabled(enable); RuntimeEnabledFeatures::SetTrustTokensEnabled(enable);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment