[AUTO][FILECONTROL] - version 147.0.7727.56 (#2833)
[AUTO][FILECONTROL] - version 147.0.7727.56
This commit is contained in:
@@ -1 +1 @@
|
||||
146.0.7680.31
|
||||
147.0.7727.56
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "android_webview/browser/network_service/aw_url_loader_throttle.h"
|
||||
#include "android_webview/browser/network_service/net_helpers.h"
|
||||
#include "android_webview/browser/prefetch/aw_prefetch_service_delegate.h"
|
||||
#include "android_webview/browser/safe_browsing/aw_advanced_protection_status_manager_bridge.h"
|
||||
#include "android_webview/browser/safe_browsing/aw_safe_browsing_navigation_throttle.h"
|
||||
#include "android_webview/browser/safe_browsing/aw_url_checker_delegate_impl.h"
|
||||
#include "android_webview/browser/supervised_user/aw_supervised_user_throttle.h"
|
||||
@@ -200,7 +201,14 @@ base::WeakPtr<AsyncCheckTracker> GetAsyncCheckTracker(
|
||||
} // anonymous namespace
|
||||
|
||||
std::string GetProduct() {
|
||||
return embedder_support::GetProductAndVersion();
|
||||
// We cannot use `embedder_support::GetProductAndVersion()` here because that
|
||||
// relies on base::FeatureList, which need not be initialized at this point -
|
||||
// GetDefaultUserAgent can call this before browser startup is completed.
|
||||
return base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kWebViewReduceUserAgentMinorVersion)
|
||||
? version_info::GetProductNameAndVersionForReducedUserAgent()
|
||||
: std::string(
|
||||
version_info::GetProductNameAndVersionForUserAgent());
|
||||
}
|
||||
|
||||
std::string GetUserAgent() {
|
||||
@@ -211,14 +219,14 @@ std::string GetUserAgent() {
|
||||
product += " Mobile";
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWebViewReduceUAAndroidVersionDeviceModel)) {
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kWebViewReduceUAAndroidVersionDeviceModel)) {
|
||||
// The user-agent reduction feature for WebView, when enabled, should
|
||||
// produce a consistent, unified platform string to ensure predictable
|
||||
// behavior. This hardcoded value prevents device-specific platform details
|
||||
// (e.g., "X11; Linux" on desktop devices) from appearing in the reduced
|
||||
// User-Agent. The "Linux; Android 10; K; wv" string matches the expected
|
||||
// format for a reduced WebView User-Agent.
|
||||
// behavior. This hardcoded value prevents device-specific platform
|
||||
// details (e.g., "X11; Linux" on desktop devices) from appearing in the
|
||||
// reduced User-Agent. The "Linux; Android 10; K; wv" string matches the
|
||||
// expected format for a reduced WebView User-Agent.
|
||||
constexpr char kUnifiedPlatformOsInfoWebview[] = "Linux; Android 10; K; wv";
|
||||
return embedder_support::BuildUserAgentFromOSAndProduct(
|
||||
kUnifiedPlatformOsInfoWebview, product);
|
||||
@@ -309,8 +317,21 @@ void AwContentBrowserClient::ConfigureNetworkContextParams(
|
||||
// Pass the mojo::PendingRemote<network::mojom::CookieManager> to
|
||||
// android_webview::CookieManager, so it can implement its APIs with this mojo
|
||||
// CookieManager.
|
||||
aw_context->GetCookieManager()->SetMojoCookieManager(
|
||||
std::move(cookie_manager_remote));
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWebViewNonBlockingCookieStoreHandoff)) {
|
||||
// New non-blocking path with proper close before handoff.
|
||||
mojo::PendingRemote<network::mojom::CookieStoreReadyCallback>
|
||||
ready_callback;
|
||||
network_context_params->cookie_store_ready_callback =
|
||||
ready_callback.InitWithNewPipeAndPassReceiver();
|
||||
|
||||
aw_context->GetCookieManager()->SetMojoCookieManagerNonBlocking(
|
||||
std::move(cookie_manager_remote), std::move(ready_callback));
|
||||
} else {
|
||||
// Original blocking path (for A/B comparison).
|
||||
aw_context->GetCookieManager()->SetMojoCookieManager(
|
||||
std::move(cookie_manager_remote));
|
||||
}
|
||||
}
|
||||
|
||||
void AwContentBrowserClient::InitBrowserContextStore() {
|
||||
@@ -1525,4 +1546,8 @@ bool AwContentBrowserClient::OriginSupportsConcreteCrossOriginIsolation(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::IsAndroidAdvancedProtectionEnabled() {
|
||||
return AwAdvancedProtectionStatusManagerBridge::IsUnderAdvancedProtection();
|
||||
}
|
||||
|
||||
} // namespace android_webview
|
||||
|
||||
@@ -83,7 +83,7 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
aw_feature_overrides.DisableFeature(ui::kAndroidHDR);
|
||||
|
||||
// Disable launch_handler on WebView.
|
||||
aw_feature_overrides.DisableFeature(::features::kAndroidWebAppLaunchHandler);
|
||||
aw_feature_overrides.DisableFeature(blink::features::kWebAppLaunchQueue);
|
||||
|
||||
// Disable Reducing User Agent minor version on WebView.
|
||||
aw_feature_overrides.DisableFeature(
|
||||
@@ -140,6 +140,11 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
aw_feature_overrides.DisableFeature(
|
||||
blink::features::kSecurePaymentConfirmationAvailabilityAPI);
|
||||
|
||||
// WebView does not support Secure Payment Confirmation, and thus should not
|
||||
// expose the PaymentRequest.securePaymentConfirmationCapabilities API.
|
||||
aw_feature_overrides.DisableFeature(
|
||||
blink::features::kSecurePaymentConfirmationCapabilities);
|
||||
|
||||
// WebView does not support handling payment links.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kPaymentLinkDetection);
|
||||
|
||||
@@ -233,7 +238,6 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
|
||||
// Disabling the permission element as it needs embedder support in order to
|
||||
// function and the webview permission manager cannot support it.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kPermissionElement);
|
||||
aw_feature_overrides.DisableFeature(blink::features::kGeolocationElement);
|
||||
aw_feature_overrides.DisableFeature(blink::features::kUserMediaElement);
|
||||
aw_feature_overrides.DisableFeature(blink::features::kInstallElement);
|
||||
@@ -317,4 +321,17 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
// Launched for WebView. Experimentation needed for Chrome on Android.
|
||||
aw_feature_overrides.EnableFeature(
|
||||
stylus_handwriting::android::kProbeStylusWritingInBackground);
|
||||
|
||||
// As WebSettings.setAllowContentAccess() allows this to be controlled by
|
||||
// the WebView's host, we keep the old behavior for content:// URLs.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kContentSchemeIsLocal);
|
||||
|
||||
// Disable No-Vary-Search in disk cache on WebView.
|
||||
// See https://crbug.com/382394774.
|
||||
aw_feature_overrides.DisableFeature(net::features::kHttpCacheNoVarySearch);
|
||||
|
||||
// TODO(crbug.com/489450060): Disable DirectReceiver on Viz for WebView until
|
||||
// its Viz thread is updated to handle IO.
|
||||
aw_feature_overrides.DisableFeature(
|
||||
::features::kVizDirectCompositorThreadIpcFrameSinkManager);
|
||||
}
|
||||
|
||||
+83
-56
@@ -143,10 +143,6 @@ interface Attr : Node
|
||||
getter value
|
||||
method constructor
|
||||
setter value
|
||||
interface AttributePart : NodePart
|
||||
attribute @@toStringTag
|
||||
getter localName
|
||||
method constructor
|
||||
interface Audio
|
||||
attribute @@toStringTag
|
||||
method constructor
|
||||
@@ -980,6 +976,10 @@ interface CSSPseudoElement
|
||||
getter parent
|
||||
getter type
|
||||
method constructor
|
||||
method convertPointFromNode
|
||||
method convertQuadFromNode
|
||||
method convertRectFromNode
|
||||
method getBoxQuads
|
||||
method pseudo
|
||||
interface CSSRGB : CSSColorValue
|
||||
attribute @@toStringTag
|
||||
@@ -992,6 +992,9 @@ interface CSSRGB : CSSColorValue
|
||||
setter b
|
||||
setter g
|
||||
setter r
|
||||
interface CSSResultRule : CSSGroupingRule
|
||||
attribute @@toStringTag
|
||||
method constructor
|
||||
interface CSSRotate : CSSTransformComponent
|
||||
attribute @@toStringTag
|
||||
getter angle
|
||||
@@ -1360,26 +1363,22 @@ interface CharacterData : Node
|
||||
getter nextElementSibling
|
||||
getter previousElementSibling
|
||||
method after
|
||||
method afterHTML
|
||||
method afterHTMLUnsafe
|
||||
method appendData
|
||||
method before
|
||||
method beforeHTML
|
||||
method beforeHTMLUnsafe
|
||||
method constructor
|
||||
method deleteData
|
||||
method insertData
|
||||
method remove
|
||||
method replaceData
|
||||
method replaceWith
|
||||
method replaceWithHTML
|
||||
method replaceWithHTMLUnsafe
|
||||
method substringData
|
||||
setter data
|
||||
interface ChildNodePart : Part
|
||||
attribute @@toStringTag
|
||||
getter children
|
||||
getter nextSibling
|
||||
getter previousSibling
|
||||
getter rootContainer
|
||||
method clone
|
||||
method constructor
|
||||
method getParts
|
||||
method replaceChildren
|
||||
interface Clipboard : EventTarget
|
||||
attribute @@toStringTag
|
||||
getter onclipboardchange
|
||||
@@ -2128,7 +2127,6 @@ interface Document : Node
|
||||
method getElementsByName
|
||||
method getElementsByTagName
|
||||
method getElementsByTagNameNS
|
||||
method getPartRoot
|
||||
method getSelection
|
||||
method hasFocus
|
||||
method hasPrivateToken
|
||||
@@ -2306,18 +2304,11 @@ interface DocumentFragment : Node
|
||||
method append
|
||||
method constructor
|
||||
method getElementById
|
||||
method getPartRoot
|
||||
method moveBefore
|
||||
method prepend
|
||||
method querySelector
|
||||
method querySelectorAll
|
||||
method replaceChildren
|
||||
interface DocumentPartRoot
|
||||
attribute @@toStringTag
|
||||
getter rootContainer
|
||||
method clone
|
||||
method constructor
|
||||
method getParts
|
||||
interface DocumentTimeline : AnimationTimeline
|
||||
attribute @@toStringTag
|
||||
method constructor
|
||||
@@ -2328,10 +2319,16 @@ interface DocumentType : Node
|
||||
getter publicId
|
||||
getter systemId
|
||||
method after
|
||||
method afterHTML
|
||||
method afterHTMLUnsafe
|
||||
method before
|
||||
method beforeHTML
|
||||
method beforeHTMLUnsafe
|
||||
method constructor
|
||||
method remove
|
||||
method replaceWith
|
||||
method replaceWithHTML
|
||||
method replaceWithHTMLUnsafe
|
||||
interface DragEvent : MouseEvent
|
||||
attribute @@toStringTag
|
||||
getter dataTransfer
|
||||
@@ -2373,7 +2370,6 @@ interface Element : Node
|
||||
attribute @@toStringTag
|
||||
attribute @@unscopables
|
||||
getter activeViewTransition
|
||||
getter anchorElement
|
||||
getter ariaActiveDescendantElement
|
||||
getter ariaAtomic
|
||||
getter ariaAutoComplete
|
||||
@@ -2450,6 +2446,7 @@ interface Element : Node
|
||||
getter innerHTML
|
||||
getter lastElementChild
|
||||
getter localName
|
||||
getter marker
|
||||
getter namespaceURI
|
||||
getter nextElementSibling
|
||||
getter onbeforecopy
|
||||
@@ -2473,11 +2470,17 @@ interface Element : Node
|
||||
getter slot
|
||||
getter tagName
|
||||
method after
|
||||
method afterHTML
|
||||
method afterHTMLUnsafe
|
||||
method animate
|
||||
method append
|
||||
method appendHTML
|
||||
method appendHTMLUnsafe
|
||||
method ariaNotify
|
||||
method attachShadow
|
||||
method before
|
||||
method beforeHTML
|
||||
method beforeHTMLUnsafe
|
||||
method checkVisibility
|
||||
method closest
|
||||
method computedStyleMap
|
||||
@@ -2504,6 +2507,8 @@ interface Element : Node
|
||||
method matches
|
||||
method moveBefore
|
||||
method prepend
|
||||
method prependHTML
|
||||
method prependHTMLUnsafe
|
||||
method pseudo
|
||||
method querySelector
|
||||
method querySelectorAll
|
||||
@@ -2514,6 +2519,8 @@ interface Element : Node
|
||||
method removeAttributeNode
|
||||
method replaceChildren
|
||||
method replaceWith
|
||||
method replaceWithHTML
|
||||
method replaceWithHTMLUnsafe
|
||||
method requestFullscreen
|
||||
method requestPointerLock
|
||||
method scroll
|
||||
@@ -2529,13 +2536,14 @@ interface Element : Node
|
||||
method setHTMLUnsafe
|
||||
method setPointerCapture
|
||||
method startViewTransition
|
||||
method streamAppendHTML
|
||||
method streamAppendHTMLUnsafe
|
||||
method streamHTML
|
||||
method streamHTMLUnsafe
|
||||
method toggleAttribute
|
||||
method webkitMatchesSelector
|
||||
method webkitRequestFullScreen
|
||||
method webkitRequestFullscreen
|
||||
setter anchorElement
|
||||
setter ariaActiveDescendantElement
|
||||
setter ariaAtomic
|
||||
setter ariaAutoComplete
|
||||
@@ -2597,6 +2605,7 @@ interface Element : Node
|
||||
setter headingReset
|
||||
setter id
|
||||
setter innerHTML
|
||||
setter marker
|
||||
setter onbeforecopy
|
||||
setter onbeforecut
|
||||
setter onbeforepaste
|
||||
@@ -2670,7 +2679,6 @@ interface ElementInternals
|
||||
getter role
|
||||
getter shadowRoot
|
||||
getter states
|
||||
getter type
|
||||
getter validationMessage
|
||||
getter validity
|
||||
getter willValidate
|
||||
@@ -2678,6 +2686,7 @@ interface ElementInternals
|
||||
method constructor
|
||||
method reportValidity
|
||||
method setFormValue
|
||||
method setToolParamSchema
|
||||
method setValidity
|
||||
setter ariaActiveDescendantElement
|
||||
setter ariaAtomic
|
||||
@@ -2732,7 +2741,6 @@ interface ElementInternals
|
||||
setter ariaValueText
|
||||
setter ariaVirtualContent
|
||||
setter role
|
||||
setter type
|
||||
interface EncodedAudioChunk
|
||||
attribute @@toStringTag
|
||||
getter byteLength
|
||||
@@ -2938,7 +2946,6 @@ interface Float16Array : TypedArray
|
||||
method constructor
|
||||
interface FocusEvent : UIEvent
|
||||
attribute @@toStringTag
|
||||
getter pseudoTarget
|
||||
getter relatedTarget
|
||||
method constructor
|
||||
interface FontFace
|
||||
@@ -2977,13 +2984,6 @@ interface FontFaceSetLoadEvent : Event
|
||||
attribute @@toStringTag
|
||||
getter fontfaces
|
||||
method constructor
|
||||
interface FormControlRange : AbstractRange
|
||||
attribute @@toStringTag
|
||||
method constructor
|
||||
method getBoundingClientRect
|
||||
method getClientRects
|
||||
method setFormControlRange
|
||||
method toString
|
||||
interface FormData
|
||||
attribute @@toStringTag
|
||||
method @@iterator
|
||||
@@ -3679,17 +3679,20 @@ interface HTMLCanvasElement : HTMLElement
|
||||
attribute @@toStringTag
|
||||
getter height
|
||||
getter layoutSubtree
|
||||
getter onpaint
|
||||
getter width
|
||||
method captureStream
|
||||
method configureHighDynamicRange
|
||||
method constructor
|
||||
method getContext
|
||||
method getElementTransform
|
||||
method requestPaint
|
||||
method toBlob
|
||||
method toDataURL
|
||||
method transferControlToOffscreen
|
||||
setter height
|
||||
setter layoutSubtree
|
||||
setter onpaint
|
||||
setter width
|
||||
interface HTMLCollection
|
||||
attribute @@toStringTag
|
||||
@@ -4391,6 +4394,7 @@ interface HTMLInputElement : HTMLElement
|
||||
getter willValidate
|
||||
method checkValidity
|
||||
method constructor
|
||||
method createValueRange
|
||||
method reportValidity
|
||||
method select
|
||||
method setCustomValidity
|
||||
@@ -4563,6 +4567,7 @@ interface HTMLMediaElement : HTMLElement
|
||||
getter ended
|
||||
getter error
|
||||
getter latencyHint
|
||||
getter loading
|
||||
getter loop
|
||||
getter mediaKeys
|
||||
getter muted
|
||||
@@ -4600,6 +4605,7 @@ interface HTMLMediaElement : HTMLElement
|
||||
setter defaultMuted
|
||||
setter defaultPlaybackRate
|
||||
setter latencyHint
|
||||
setter loading
|
||||
setter loop
|
||||
setter muted
|
||||
setter onencrypted
|
||||
@@ -5068,14 +5074,12 @@ interface HTMLTableSectionElement : HTMLElement
|
||||
interface HTMLTemplateElement : HTMLElement
|
||||
attribute @@toStringTag
|
||||
getter content
|
||||
getter parseparts
|
||||
getter shadowRootClonable
|
||||
getter shadowRootCustomElementRegistry
|
||||
getter shadowRootDelegatesFocus
|
||||
getter shadowRootMode
|
||||
getter shadowRootSerializable
|
||||
method constructor
|
||||
setter parseparts
|
||||
setter shadowRootClonable
|
||||
setter shadowRootCustomElementRegistry
|
||||
setter shadowRootDelegatesFocus
|
||||
@@ -5109,6 +5113,7 @@ interface HTMLTextAreaElement : HTMLElement
|
||||
getter wrap
|
||||
method checkValidity
|
||||
method constructor
|
||||
method createValueRange
|
||||
method reportValidity
|
||||
method select
|
||||
method setCustomValidity
|
||||
@@ -5566,6 +5571,7 @@ interface InteractionContentfulPaint : PerformanceEntry
|
||||
attribute @@toStringTag
|
||||
getter element
|
||||
getter id
|
||||
getter interactionId
|
||||
getter loadTime
|
||||
getter paintTime
|
||||
getter presentationTime
|
||||
@@ -5623,7 +5629,6 @@ interface KeyboardEvent : UIEvent
|
||||
getter keyCode
|
||||
getter location
|
||||
getter metaKey
|
||||
getter pseudoTarget
|
||||
getter repeat
|
||||
getter shiftKey
|
||||
method constructor
|
||||
@@ -6308,9 +6313,7 @@ interface MimeTypeArray
|
||||
method namedItem
|
||||
interface ModelContext
|
||||
attribute @@toStringTag
|
||||
method clearContext
|
||||
method constructor
|
||||
method provideContext
|
||||
method registerTool
|
||||
method unregisterTool
|
||||
interface Mojo
|
||||
@@ -6384,7 +6387,6 @@ interface MouseEvent : UIEvent
|
||||
getter offsetY
|
||||
getter pageX
|
||||
getter pageY
|
||||
getter pseudoTarget
|
||||
getter relatedTarget
|
||||
getter screenX
|
||||
getter screenY
|
||||
@@ -6586,6 +6588,7 @@ interface Navigator
|
||||
getter preferences
|
||||
getter product
|
||||
getter productSub
|
||||
getter rtc
|
||||
getter scheduling
|
||||
getter serviceWorker
|
||||
getter storage
|
||||
@@ -6617,7 +6620,6 @@ interface Navigator
|
||||
method share
|
||||
method vibrate
|
||||
method webkitGetUserMedia
|
||||
setter modelContext
|
||||
setter modelContextTesting
|
||||
interface NavigatorManagedData : EventTarget
|
||||
attribute @@toStringTag
|
||||
@@ -6724,10 +6726,6 @@ interface NodeList
|
||||
method item
|
||||
method keys
|
||||
method values
|
||||
interface NodePart : Part
|
||||
attribute @@toStringTag
|
||||
getter node
|
||||
method constructor
|
||||
interface NotRestoredReasonDetails
|
||||
attribute @@toStringTag
|
||||
getter reason
|
||||
@@ -6908,6 +6906,12 @@ interface OffscreenCanvasRenderingContext2D
|
||||
setter textBaseline
|
||||
setter textRendering
|
||||
setter wordSpacing
|
||||
interface OpaqueRange : AbstractRange
|
||||
attribute @@toStringTag
|
||||
method constructor
|
||||
method disconnect
|
||||
method getBoundingClientRect
|
||||
method getClientRects
|
||||
interface Option
|
||||
attribute @@toStringTag
|
||||
getter defaultSelected
|
||||
@@ -6951,8 +6955,7 @@ interface OverconstrainedError : DOMException
|
||||
method constructor
|
||||
interface OverscrollEvent : Event
|
||||
attribute @@toStringTag
|
||||
getter deltaX
|
||||
getter deltaY
|
||||
getter overscrollElement
|
||||
method constructor
|
||||
interface PageRevealEvent : Event
|
||||
attribute @@toStringTag
|
||||
@@ -6994,12 +6997,6 @@ interface PannerNode : AudioNode
|
||||
setter panningModel
|
||||
setter refDistance
|
||||
setter rolloffFactor
|
||||
interface Part
|
||||
attribute @@toStringTag
|
||||
getter metadata
|
||||
getter root
|
||||
method constructor
|
||||
method disconnect
|
||||
interface PasswordCredential : Credential
|
||||
attribute @@toStringTag
|
||||
getter iconURL
|
||||
@@ -7149,6 +7146,7 @@ interface PerformanceLongAnimationFrameTiming : PerformanceEntry
|
||||
attribute @@toStringTag
|
||||
getter blockingDuration
|
||||
getter firstUIEventTimestamp
|
||||
getter layoutDuration
|
||||
getter paintTime
|
||||
getter presentationTime
|
||||
getter renderStart
|
||||
@@ -7254,6 +7252,7 @@ interface PerformanceResourceTiming : PerformanceEntry
|
||||
interface PerformanceScriptTiming : PerformanceEntry
|
||||
attribute @@toStringTag
|
||||
getter executionStart
|
||||
getter forcedLayoutDuration
|
||||
getter forcedStyleAndLayoutDuration
|
||||
getter forcedStyleDuration
|
||||
getter invoker
|
||||
@@ -7398,6 +7397,13 @@ interface ProcessingInstruction : CharacterData
|
||||
getter sheet
|
||||
getter target
|
||||
method constructor
|
||||
method getAttribute
|
||||
method getAttributeNames
|
||||
method hasAttribute
|
||||
method hasAttributes
|
||||
method removeAttribute
|
||||
method setAttribute
|
||||
method toggleAttribute
|
||||
interface Profiler : EventTarget
|
||||
attribute @@toStringTag
|
||||
getter sampleInterval
|
||||
@@ -7424,6 +7430,12 @@ interface QuotaExceededError : DOMException
|
||||
getter quota
|
||||
getter requested
|
||||
method constructor
|
||||
interface RTC : EventTarget
|
||||
attribute @@toStringTag
|
||||
method cancelDiagnosticLogging
|
||||
method constructor
|
||||
method finishDiagnosticLogging
|
||||
method startDiagnosticLogging
|
||||
interface RTCCertificate
|
||||
attribute @@toStringTag
|
||||
getter expires
|
||||
@@ -7825,6 +7837,7 @@ interface Request
|
||||
getter headers
|
||||
getter integrity
|
||||
getter isHistoryNavigation
|
||||
getter isReloadNavigation
|
||||
getter keepalive
|
||||
getter method
|
||||
getter mode
|
||||
@@ -9324,6 +9337,7 @@ interface ShadowRoot : DocumentFragment
|
||||
getter fullscreenElement
|
||||
getter host
|
||||
getter innerHTML
|
||||
getter marker
|
||||
getter mode
|
||||
getter onslotchange
|
||||
getter pictureInPictureElement
|
||||
@@ -9332,15 +9346,21 @@ interface ShadowRoot : DocumentFragment
|
||||
getter serializable
|
||||
getter slotAssignment
|
||||
getter styleSheets
|
||||
method appendHTML
|
||||
method appendHTMLUnsafe
|
||||
method constructor
|
||||
method elementFromPoint
|
||||
method elementsFromPoint
|
||||
method getAnimations
|
||||
method getHTML
|
||||
method getSelection
|
||||
method prependHTML
|
||||
method prependHTMLUnsafe
|
||||
method setHTML
|
||||
method setHTMLUnsafe
|
||||
method streamAppendHTML
|
||||
method streamAppendHTMLUnsafe
|
||||
method streamHTML
|
||||
method streamHTMLUnsafe
|
||||
setter adoptedStyleSheets
|
||||
setter fullscreenElement
|
||||
@@ -9388,6 +9408,9 @@ interface SnapEvent : Event
|
||||
method constructor
|
||||
interface SoftNavigationEntry : PerformanceEntry
|
||||
attribute @@toStringTag
|
||||
getter interactionId
|
||||
getter largestInteractionContentfulPaint
|
||||
getter navigationType
|
||||
getter paintTime
|
||||
getter presentationTime
|
||||
method constructor
|
||||
@@ -9853,7 +9876,6 @@ interface TouchEvent : UIEvent
|
||||
getter changedTouches
|
||||
getter ctrlKey
|
||||
getter metaKey
|
||||
getter pseudoTarget
|
||||
getter shiftKey
|
||||
getter targetTouches
|
||||
getter touches
|
||||
@@ -9921,6 +9943,11 @@ interface TrustedHTML
|
||||
method constructor
|
||||
method toJSON
|
||||
method toString
|
||||
interface TrustedParserOptions
|
||||
attribute @@toStringTag
|
||||
getter runScripts
|
||||
getter sanitizer
|
||||
method constructor
|
||||
interface TrustedScript
|
||||
static method fromLiteral
|
||||
attribute @@toStringTag
|
||||
@@ -9938,6 +9965,7 @@ interface TrustedTypePolicy
|
||||
getter name
|
||||
method constructor
|
||||
method createHTML
|
||||
method createParserOptions
|
||||
method createScript
|
||||
method createScriptURL
|
||||
interface TrustedTypePolicyFactory
|
||||
@@ -9956,6 +9984,7 @@ interface TrustedTypePolicyFactory
|
||||
interface UIEvent : Event
|
||||
attribute @@toStringTag
|
||||
getter detail
|
||||
getter pseudoTarget
|
||||
getter sourceCapabilities
|
||||
getter view
|
||||
getter which
|
||||
@@ -11871,7 +11900,6 @@ interface XPathResult
|
||||
interface XRCompositionLayer : XRLayer
|
||||
attribute @@toStringTag
|
||||
getter blendTextureSourceAlpha
|
||||
getter chromaticAberrationCorrection
|
||||
getter forceMonoPresentation
|
||||
getter layout
|
||||
getter mipLevels
|
||||
@@ -11880,7 +11908,6 @@ interface XRCompositionLayer : XRLayer
|
||||
method constructor
|
||||
method destroy
|
||||
setter blendTextureSourceAlpha
|
||||
setter chromaticAberrationCorrection
|
||||
setter forceMonoPresentation
|
||||
setter opacity
|
||||
interface XRDOMOverlayState
|
||||
|
||||
@@ -72,11 +72,8 @@ by a child template that "extends" this file.
|
||||
<uses-permission android:name="android.permission.CAPTURE_KEYBOARD" />
|
||||
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
{% set is_desktop_android = is_desktop_android|default(0) %}
|
||||
{% if is_desktop_android == "true" %}
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
|
||||
{% endif %}
|
||||
{% set enable_screen_capture = enable_screen_capture|default(0) %}
|
||||
{% if enable_screen_capture == "true" %}
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
|
||||
@@ -126,6 +123,12 @@ by a child template that "extends" this file.
|
||||
<uses-permission android:name="android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS"/>
|
||||
<uses-permission android:name="android.permission.CREDENTIAL_MANAGER_SET_ORIGIN"/>
|
||||
|
||||
<!-- Permission for reading the Advanced Protection Mode status. -->
|
||||
<uses-permission android:name="android.permission.QUERY_ADVANCED_PROTECTION_MODE"/>
|
||||
|
||||
<!-- Needed for allowing cross-app and cross-profile communication over the loopback interface. -->
|
||||
<uses-permission android:name="android.permission.USE_LOOPBACK_INTERFACE"/>
|
||||
|
||||
{% set enable_vr = enable_vr|default(0) %}
|
||||
{% if enable_vr == "true" %}
|
||||
<!-- Indicates use of Android's VR-mode, available only on Android N+. -->
|
||||
@@ -229,7 +232,6 @@ by a child template that "extends" this file.
|
||||
android:allowBackup="false"
|
||||
{% endif %}
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:allowAudioPlaybackCapture="false"
|
||||
android:appComponentFactory="org.chromium.chrome.browser.base.SplitCompatAppComponentFactory"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
{% if javaless_renderers is defined %}
|
||||
@@ -409,7 +411,7 @@ by a child template that "extends" this file.
|
||||
android:theme="@style/Theme.Chromium.Activity"
|
||||
android:excludeFromRecents="true"
|
||||
android:configChanges=
|
||||
"screenSize|smallestScreenSize|screenLayout|orientation"
|
||||
"screenSize|smallestScreenSize|screenLayout|orientation|density|uiMode"
|
||||
{{ self.supports_video_persistence() }}
|
||||
>
|
||||
</activity>
|
||||
@@ -526,6 +528,16 @@ by a child template that "extends" this file.
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- Actor related -->
|
||||
<receiver android:name="org.chromium.chrome.browser.actor.ActorBroadcastReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="org.chromium.chrome.browser.actor.ACTION_PAUSE" />
|
||||
<action android:name="org.chromium.chrome.browser.actor.ACTION_RESUME" />
|
||||
<action android:name="org.chromium.chrome.browser.actor.ACTION_CANCEL" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- Custom Tabs -->
|
||||
<activity android:name="org.chromium.chrome.browser.customtabs.CustomTabActivity"
|
||||
android:theme="@style/Theme.Chromium.Activity"
|
||||
@@ -687,7 +699,7 @@ by a child template that "extends" this file.
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.chromium.chrome.browser.chrome_item_picker.ChromeItemPickerActivity"
|
||||
android:theme="@style/Theme.Chromium.WithWindowAnimation"
|
||||
android:theme="@style/Theme.Chromium.Activity.FakeTranslucent"
|
||||
android:exported="false"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize|uiMode">
|
||||
</activity>
|
||||
@@ -914,6 +926,11 @@ by a child template that "extends" this file.
|
||||
android:isolatedProcess="true"
|
||||
android:process=":decoder_service" />
|
||||
|
||||
<!-- Actor foreground service -->
|
||||
<service android:name="org.chromium.chrome.browser.actor.ActorForegroundService"
|
||||
android:foregroundServiceType="dataSync" android:exported="false">
|
||||
</service>
|
||||
|
||||
<!-- Download foreground service -->
|
||||
<service android:name="org.chromium.chrome.browser.download.DownloadForegroundService"
|
||||
android:foregroundServiceType="dataSync" android:exported="false">
|
||||
@@ -1115,6 +1132,7 @@ by a child template that "extends" this file.
|
||||
|
||||
<activity
|
||||
android:name="org.chromium.chrome.browser.notifications.NotificationIntentInterceptor$TrampolineActivity"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Theme.BrowserUI.Translucent.NoTitleBar"
|
||||
android:exported="false"
|
||||
android:autoRemoveFromRecents="true"
|
||||
@@ -1165,12 +1183,10 @@ by a child template that "extends" this file.
|
||||
android:exported="false"/>
|
||||
|
||||
<service android:name="org.chromium.chrome.browser.media.MediaCaptureNotificationService"
|
||||
{% if is_desktop_android == "true" and enable_screen_capture == "true" %}
|
||||
{% if enable_screen_capture == "true" %}
|
||||
android:foregroundServiceType="camera|microphone|mediaProjection|mediaPlayback"
|
||||
{% elif is_desktop_android == "true" %}
|
||||
{% else %}
|
||||
android:foregroundServiceType="camera|microphone"
|
||||
{% elif enable_screen_capture == "true" %}
|
||||
android:foregroundServiceType="mediaProjection|mediaPlayback"
|
||||
{% endif %}
|
||||
android:exported="false"/>
|
||||
<service android:name="org.chromium.chrome.browser.media.ui.ChromeMediaNotificationControllerServices$PlaybackListenerService"
|
||||
@@ -1277,6 +1293,10 @@ by a child template that "extends" this file.
|
||||
|
||||
<!-- NOTE: If you change the value of "android:process" for the below services,
|
||||
you also need to update kHelperProcessExecutableName in chrome_constants.cc. -->
|
||||
<!-- NOTE: num_sandboxed_services is simply the number of name slots available,
|
||||
and not a limit on the number of sandboxed processes that can be created.
|
||||
In practice, many fewer slots are used, and process names are often reused,
|
||||
such as many processes named with the suffix ":sandboxed_process0". -->
|
||||
{% set num_sandboxed_services = 40 %}
|
||||
<meta-data android:name="org.chromium.content.browser.NUM_SANDBOXED_SERVICES"
|
||||
android:value="{{ num_sandboxed_services }}"/>
|
||||
|
||||
+2
-4
@@ -62,7 +62,6 @@ import androidx.browser.customtabs.CustomTabsIntent.CloseButtonPosition;
|
||||
import androidx.browser.customtabs.CustomTabsIntent.OpenInBrowserState;
|
||||
import androidx.browser.customtabs.CustomTabsSessionToken;
|
||||
import androidx.browser.customtabs.ExperimentalCustomContentAction;
|
||||
import androidx.browser.customtabs.ExperimentalOpenInBrowser;
|
||||
import androidx.browser.customtabs.TrustedWebUtils;
|
||||
import androidx.browser.trusted.FileHandlingData;
|
||||
import androidx.browser.trusted.LaunchHandlerClientMode;
|
||||
@@ -94,6 +93,7 @@ import org.chromium.chrome.browser.customtabs.CustomTabsFeatureUsage.CustomTabsF
|
||||
import org.chromium.chrome.browser.firstrun.FirstRunStatus;
|
||||
import org.chromium.chrome.browser.flags.ActivityType;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.flags.CustomTabProfileType;
|
||||
import org.chromium.chrome.browser.share.ShareUtils;
|
||||
import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant;
|
||||
import org.chromium.chrome.browser.ui.google_bottom_bar.GoogleBottomBarCoordinator;
|
||||
@@ -309,7 +309,6 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
OpenInBrowserButtonState.OPEN_IN_BROWSER_STATE_DEFAULT
|
||||
})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@ExperimentalOpenInBrowser
|
||||
public @interface OpenInBrowserButtonState {
|
||||
int OPEN_IN_BROWSER_STATE_OFF = CustomTabsIntent.OPEN_IN_BROWSER_STATE_OFF;
|
||||
int OPEN_IN_BROWSER_STATE_ON = CustomTabsIntent.OPEN_IN_BROWSER_STATE_ON;
|
||||
@@ -1056,7 +1055,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
* the UI surface.
|
||||
*
|
||||
* @param type {@link CustomTabsUiType} value.
|
||||
* @param incognito Whether the {@link CustomTabProfileType} is incongnito.
|
||||
* @param incognito Whether the {@link CustomTabProfileType} is incognito.
|
||||
*/
|
||||
public static boolean isOpenInBrowserDisallowed(int type, boolean incognito) {
|
||||
return !isOpenInBrowserAllowedForType(type)
|
||||
@@ -1833,7 +1832,6 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
return mResolvedDisplayMode;
|
||||
}
|
||||
|
||||
@ExperimentalOpenInBrowser
|
||||
@Override
|
||||
public @OpenInBrowserState int getOpenInBrowserButtonState() {
|
||||
return mOpenInBrowserState;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2
-7
@@ -512,7 +512,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
if (lens::features::IsLensOverlayTranslateLanguagesFetchEnabled()) {
|
||||
profile_->GetDefaultStoragePartition()->ClearDataForOrigin(
|
||||
content::StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE,
|
||||
/*quota_storage_remove_mask=*/0,
|
||||
GURL(chrome::kChromeUILensOverlayUntrustedURL), base::DoNothing());
|
||||
}
|
||||
#endif
|
||||
@@ -698,8 +697,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
|
||||
profile_->GetDefaultStoragePartition()->ClearDataForOrigin(
|
||||
content::StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE,
|
||||
/*quota_storage_remove_mask=*/0, GURL(chrome::kChromeUINewTabPageURL),
|
||||
base::DoNothing());
|
||||
GURL(chrome::kChromeUINewTabPageURL), base::DoNothing());
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -1405,10 +1403,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
->registrar_unsafe();
|
||||
for (const web_app::WebApp& web_app :
|
||||
web_app_registrar.GetAppsIncludingStubs()) {
|
||||
if (!web_app_registrar.AppMatches(
|
||||
web_app.app_id(),
|
||||
web_app::WebAppFilter::IsIsolatedWebAppIncludingUninstalling()) ||
|
||||
!filter.Run(web_app.scope())) {
|
||||
if (!filter.Run(web_app.scope())) {
|
||||
continue;
|
||||
}
|
||||
std::vector<content::StoragePartitionConfig> partitions =
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "base/containers/fixed_flat_set.h"
|
||||
#include "base/containers/to_vector.h"
|
||||
#include "base/dcheck_is_on.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
@@ -98,11 +97,13 @@
|
||||
#include "chrome/browser/media/audio_service_util.h"
|
||||
#include "chrome/browser/media/prefs/capture_device_ranking.h"
|
||||
#include "chrome/browser/media/router/media_router_feature.h"
|
||||
#include "chrome/browser/media/unified_autoplay_config.h"
|
||||
#include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h"
|
||||
#include "chrome/browser/media/webrtc/capture_policy_utils.h"
|
||||
#include "chrome/browser/media/webrtc/chrome_screen_enumerator.h"
|
||||
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
|
||||
#include "chrome/browser/media/webrtc/media_device_salt_service_factory.h"
|
||||
#include "chrome/browser/media/webrtc/rtc_diagnostic_logging_utils.h"
|
||||
#include "chrome/browser/media/webrtc/webrtc_logging_controller.h"
|
||||
#include "chrome/browser/metrics/chrome_feature_list_creator.h"
|
||||
#include "chrome/browser/navigation_predictor/anchor_element_preloader.h"
|
||||
@@ -359,6 +360,7 @@
|
||||
#include "device/vr/buildflags/buildflags.h"
|
||||
#include "extensions/browser/browser_frame_context_data.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "extensions/common/switches.h"
|
||||
#include "google_apis/gaia/gaia_urls.h"
|
||||
#include "google_apis/google_api_keys.h"
|
||||
#include "gpu/config/gpu_switches.h"
|
||||
@@ -369,7 +371,6 @@
|
||||
#include "media/mojo/mojom/speech_recognizer.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "net/base/data_url.h"
|
||||
#include "net/base/features.h"
|
||||
#include "net/cookies/cookie_setting_override.h"
|
||||
#include "net/cookies/site_for_cookies.h"
|
||||
#include "net/ssl/client_cert_store.h"
|
||||
@@ -395,10 +396,12 @@
|
||||
#include "services/network/public/mojom/web_transport.mojom.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
#include "third_party/blink/public/common/mime_util/mime_util.h"
|
||||
#include "third_party/blink/public/common/navigation/navigation_policy.h"
|
||||
#include "third_party/blink/public/common/permissions/permission_utils.h"
|
||||
#include "third_party/blink/public/common/switches.h"
|
||||
#include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h"
|
||||
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-forward.h"
|
||||
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom.h"
|
||||
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
|
||||
#include "third_party/blink/public/public_buildflags.h"
|
||||
@@ -524,7 +527,6 @@
|
||||
#include "chrome/browser/devtools/devtools_window.h"
|
||||
#include "chrome/browser/digital_credentials/digital_identity_provider_desktop.h"
|
||||
#include "chrome/browser/direct_sockets/chrome_direct_sockets_delegate.h"
|
||||
#include "chrome/browser/media/unified_autoplay_config.h"
|
||||
#include "chrome/browser/metrics/usage_scenario/chrome_responsiveness_calculator_delegate.h"
|
||||
#include "chrome/browser/new_tab_page/new_tab_page_util.h"
|
||||
#include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h"
|
||||
@@ -551,6 +553,7 @@
|
||||
#include "chrome/browser/web_applications/locks/app_lock.h"
|
||||
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
|
||||
#include "chrome/browser/web_applications/proto/web_app_install_state.pb.h"
|
||||
#include "chrome/browser/web_applications/web_app_filter.h"
|
||||
#include "chrome/browser/web_applications/web_app_helpers.h"
|
||||
#include "chrome/browser/web_applications/web_app_provider.h"
|
||||
#include "chrome/browser/web_applications/web_app_registrar.h"
|
||||
@@ -571,6 +574,7 @@
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "ash/constants/webui_url_constants.h"
|
||||
#include "ash/shell.h"
|
||||
#include "base/debug/leak_annotations.h"
|
||||
#include "chrome/browser/chromeos/policy/dlp/dlp_scoped_file_access_delegate.h"
|
||||
@@ -633,8 +637,13 @@
|
||||
#include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
|
||||
#endif
|
||||
|
||||
#elif BUILDFLAG(IS_ANDROID)
|
||||
#else // !BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/android/guest_view/chrome_content_browser_client_guest_view_part.h"
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
#include "components/guest_view/browser/slim_web_view/slim_web_view_url_loader_factory_interceptor.h" // nogncheck
|
||||
#endif
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -784,6 +793,13 @@ bool g_disable_advanced_protection_caching_for_tests = false;
|
||||
BASE_FEATURE(kPrewarmServiceWorkerRegistrationForDSE,
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(ENABLE_REQUEST_HEADER_INTEGRITY)
|
||||
// Kill-switch for the request integrity headers support for prefetches
|
||||
// initiated by `content::PrefetchContainer`.
|
||||
BASE_FEATURE(kPrefetchRequestIntegrityHeaders,
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
// Cached version of the locale so we can return the locale on the I/O
|
||||
// thread.
|
||||
std::string& GetIOThreadApplicationLocale() {
|
||||
@@ -854,10 +870,17 @@ bool IsFileOrDirectoryPickerWithoutGestureAllowed(
|
||||
contents->GetURL(), prefs,
|
||||
prefs::kFileOrDirectoryPickerWithoutGestureAllowedForOrigins);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Check if autoplay is allowed by policy configuration.
|
||||
bool IsAutoplayAllowedByPolicy(content::WebContents* contents,
|
||||
PrefService* prefs) {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (!base::FeatureList::IsEnabled(media::kAutoplayPoliciesAndroid)) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!contents) {
|
||||
return false;
|
||||
}
|
||||
@@ -866,7 +889,67 @@ bool IsAutoplayAllowedByPolicy(content::WebContents* contents,
|
||||
prefs::kAutoplayAllowlist,
|
||||
prefs::kAutoplayAllowed);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
blink::mojom::AutoplayPolicy DetermineWebContentsAutoplayPolicy(
|
||||
content::WebContents* web_contents,
|
||||
blink::mojom::AutoplayPolicy current_policy) {
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
||||
PrefService* prefs = profile->GetPrefs();
|
||||
|
||||
if (IsAutoplayAllowedByPolicy(web_contents, prefs)) {
|
||||
return blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
|
||||
// If we can show a setting to disable autoplay policy and are currently set
|
||||
// to `kDocumentUserActivationRequired`, return the user preference.
|
||||
if (base::FeatureList::IsEnabled(media::kAutoplayDisableSettings) &&
|
||||
current_policy ==
|
||||
blink::mojom::AutoplayPolicy::kDocumentUserActivationRequired) {
|
||||
return UnifiedAutoplayConfig::ShouldBlockAutoplay(profile)
|
||||
? blink::mojom::AutoplayPolicy::kDocumentUserActivationRequired
|
||||
: blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
|
||||
// If the domain policy allows autoplay and has delegated that to an iframe,
|
||||
// allow autoplay within the iframe. Only allow a nesting of single depth.
|
||||
if (web_contents->GetPrimaryMainFrame()->IsFeatureEnabled(
|
||||
network::mojom::PermissionsPolicyFeature::kAutoplay) &&
|
||||
IsAutoplayAllowedByPolicy(web_contents->GetOuterWebContents(), prefs)) {
|
||||
return blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
|
||||
// Allow Autoplay if the user provided mic/cam access. This is for cases such
|
||||
// as received-video-call rings occurring before the user interacted with the
|
||||
// page.
|
||||
if (base::FeatureList::IsEnabled(media::kAutoplayBypassForMicCamera)) {
|
||||
const HostContentSettingsMap* const content_settings =
|
||||
HostContentSettingsMapFactory::GetForProfile(profile);
|
||||
const GURL& url = web_contents->GetLastCommittedURL();
|
||||
|
||||
if (content_settings->GetContentSetting(
|
||||
url, url, ContentSettingsType::MEDIASTREAM_MIC) ==
|
||||
CONTENT_SETTING_ALLOW ||
|
||||
content_settings->GetContentSetting(
|
||||
url, url, ContentSettingsType::MEDIASTREAM_CAMERA) ==
|
||||
CONTENT_SETTING_ALLOW) {
|
||||
return blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// TWAs don't require a user gesture for unmuted autoplay.
|
||||
if (base::FeatureList::IsEnabled(features::kAllowUnmutedAutoplayForTWA)) {
|
||||
if (auto* delegate = TabAndroid::FromWebContents(web_contents)) {
|
||||
if (delegate->IsTrustedWebActivity()) {
|
||||
return blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
return current_policy;
|
||||
}
|
||||
|
||||
blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebContents(
|
||||
WebContents* web_contents) {
|
||||
@@ -888,40 +971,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebContents(
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
||||
PrefService* prefs = profile->GetPrefs();
|
||||
|
||||
// Override autoplay policy used in internal switch in case of enabling
|
||||
// features such as policy, allowlisting or disabling from settings.
|
||||
if (IsAutoplayAllowedByPolicy(web_contents, prefs)) {
|
||||
result = blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
} else if (base::FeatureList::IsEnabled(media::kAutoplayDisableSettings) &&
|
||||
result == blink::mojom::AutoplayPolicy::
|
||||
kDocumentUserActivationRequired) {
|
||||
result = UnifiedAutoplayConfig::ShouldBlockAutoplay(profile)
|
||||
? blink::mojom::AutoplayPolicy::kDocumentUserActivationRequired
|
||||
: blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
} else if (web_contents->GetPrimaryMainFrame()->IsFeatureEnabled(
|
||||
network::mojom::PermissionsPolicyFeature::kAutoplay) &&
|
||||
IsAutoplayAllowedByPolicy(web_contents->GetOuterWebContents(),
|
||||
prefs)) {
|
||||
// If the domain policy allows autoplay and has delegated that to an iframe,
|
||||
// allow autoplay within the iframe. Only allow a nesting of single depth.
|
||||
result = blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
#else // !BUILDFLAG(IS_ANDROID)
|
||||
// TWAs don't require a user gesture for unmuted autoplay.
|
||||
if (base::FeatureList::IsEnabled(features::kAllowUnmutedAutoplayForTWA)) {
|
||||
if (auto* delegate = TabAndroid::FromWebContents(web_contents)) {
|
||||
if (delegate->IsTrustedWebActivity()) {
|
||||
result = blink::mojom::AutoplayPolicy::kNoUserGestureRequired;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
return result;
|
||||
return DetermineWebContentsAutoplayPolicy(web_contents, result);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
@@ -1462,9 +1512,9 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
registry->RegisterDictionaryPref(
|
||||
prefs::kDevToolsBackgroundServicesExpirationDict);
|
||||
registry->RegisterBooleanPref(prefs::kSignedHTTPExchangeEnabled, true);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterBooleanPref(prefs::kAutoplayAllowed, false);
|
||||
registry->RegisterListPref(prefs::kAutoplayAllowlist);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterListPref(
|
||||
prefs::kFileOrDirectoryPickerWithoutGestureAllowedForOrigins);
|
||||
registry->RegisterIntegerPref(prefs::kFetchKeepaliveDurationOnShutdown, 0);
|
||||
@@ -1632,7 +1682,7 @@ void ChromeContentBrowserClient::MaybeProxyNetworkBoundRequest(
|
||||
// the hijacked remote to this.
|
||||
network::mojom::URLLoaderFactoryParamsPtr params =
|
||||
network::mojom::URLLoaderFactoryParams::New();
|
||||
params->process_id = network::OriginatingProcess::browser();
|
||||
params->process_id = network::OriginatingProcessId::browser();
|
||||
params->is_trusted = true;
|
||||
params->isolation_info = isolation_info;
|
||||
// Disable CORS wrapping, this is already handled by the caller.
|
||||
@@ -1813,11 +1863,18 @@ void ChromeContentBrowserClient::OnRendererProcessLockedStateUpdated(
|
||||
if (!base::FeatureList::IsEnabled(features::kInstantUsesSpareRenderer)) {
|
||||
return;
|
||||
}
|
||||
chrome::mojom::StaticParamsPtr params = chrome::mojom::StaticParams::New();
|
||||
Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
|
||||
if (search::ShouldAssignURLToInstantRenderer(site_url, profile)) {
|
||||
params->is_instant_process = true;
|
||||
const bool is_instant_process =
|
||||
search::ShouldAssignURLToInstantRenderer(site_url, profile);
|
||||
if (is_instant_process) {
|
||||
// Grant commit scheme access to chrome-search for instant processes.
|
||||
// Browser-side enforcement ensures non-instant processes cannot access
|
||||
// chrome-search URLs.
|
||||
content::ChildProcessSecurityPolicy::GetInstance()->GrantCommitScheme(
|
||||
host->GetDeprecatedID(), chrome::kChromeSearchScheme);
|
||||
}
|
||||
chrome::mojom::StaticParamsPtr params = chrome::mojom::StaticParams::New();
|
||||
params->is_instant_process = is_instant_process;
|
||||
auto renderer_configuration = GetRendererConfiguration(host);
|
||||
renderer_configuration->SetConfigurationOnProcessLockUpdate(
|
||||
std::move(params));
|
||||
@@ -2302,26 +2359,35 @@ size_t ChromeContentBrowserClient::GetProcessCountToIgnoreForLimit() {
|
||||
#endif
|
||||
}
|
||||
|
||||
std::optional<std::vector<blink::mojom::IsolatedAppPermissionPolicyEntryPtr>>
|
||||
ChromeContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp(
|
||||
bool ChromeContentBrowserClient::
|
||||
SupportsBaselinePermissionsPolicyForIsolatedApp() {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<blink::mojom::IsolatedAppPermissionPolicyEntryPtr>
|
||||
ChromeContentBrowserClient::GetBaselinePermissionsPolicyForIsolatedApp(
|
||||
content::BrowserContext* browser_context,
|
||||
const url::Origin& iwa_origin) {
|
||||
const url::Origin& app_origin) {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
web_app::IwaPermissionsPolicyCache* cache =
|
||||
web_app::IwaPermissionsPolicyCacheFactory::GetForProfile(profile);
|
||||
if (!cache) {
|
||||
return std::nullopt;
|
||||
return {};
|
||||
}
|
||||
|
||||
ASSIGN_OR_RETURN(web_app::IwaOrigin origin,
|
||||
web_app::IwaOrigin::Create(iwa_origin.GetURL()),
|
||||
[](auto) { return std::nullopt; });
|
||||
ASSIGN_OR_RETURN(
|
||||
web_app::IwaOrigin origin,
|
||||
web_app::IwaOrigin::Create(app_origin.GetURL()), [](auto) {
|
||||
return std::vector<blink::mojom::IsolatedAppPermissionPolicyEntryPtr>();
|
||||
});
|
||||
|
||||
const web_app::IwaPermissionsPolicyCache::CacheEntry* policy =
|
||||
cache->GetPolicy(origin);
|
||||
if (!policy) {
|
||||
return std::nullopt;
|
||||
// If we can't calculate a baseline permissions policy for a valid IWA
|
||||
// origin for some reason, use a strict fallback.
|
||||
return {};
|
||||
}
|
||||
|
||||
return base::ToVector(*policy, [](const auto& entry) {
|
||||
@@ -2329,7 +2395,7 @@ ChromeContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp(
|
||||
entry.feature, entry.allowed_origins);
|
||||
});
|
||||
#else
|
||||
return std::nullopt;
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2338,7 +2404,7 @@ bool ChromeContentBrowserClient::ShouldTryToUseExistingProcessHost(
|
||||
const GURL& url) {
|
||||
// Top Chrome WebUI should try to share a RenderProcessHost with other
|
||||
// existing Top Chrome WebUI.
|
||||
if (IsTopChromeWebUIURL(url)) {
|
||||
if (::IsTopChromeWebUIURL(url)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2601,6 +2667,10 @@ bool ChromeContentBrowserClient::IsInitialWebUIURL(const GURL& url) {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
bool ChromeContentBrowserClient::IsTopChromeWebUIURL(const GURL& url) {
|
||||
return ::IsTopChromeWebUIURL(url);
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::IsIsolatedContextAllowedForUrl(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& lock_url) {
|
||||
@@ -2955,12 +3025,12 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
// only.
|
||||
extensions::switches::kAllowlistedExtensionID,
|
||||
extensions::switches::kExtensionTestApiOnWebPages, // For tests only.
|
||||
extensions::switches::kAppsGalleryURL,
|
||||
#endif
|
||||
switches::kAllowInsecureLocalhost,
|
||||
switches::kAppsGalleryURL,
|
||||
switches::kDisableJavaScriptHarmonyShipping,
|
||||
variations::switches::kEnableBenchmarking,
|
||||
variations::switches::kEnableBenchmarkingApi,
|
||||
switches::kEnableBenchmarking,
|
||||
switches::kEnableDistillabilityService,
|
||||
switches::kEnableNetBenchmarking,
|
||||
switches::kExtensionAiDataCollection,
|
||||
@@ -3461,6 +3531,8 @@ bool ChromeContentBrowserClient::IsPrivacySandboxReportingDestinationAttested(
|
||||
gated_api =
|
||||
privacy_sandbox::PrivacySandboxAttestationsGatedAPI::kSharedStorage;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return privacy_sandbox_settings->IsEventReportingDestinationAttested(
|
||||
@@ -3907,7 +3979,7 @@ bool ChromeContentBrowserClient::IsWebUIBundledCodeCachingEnabled(
|
||||
const GURL& webui_lock_url) const {
|
||||
// Enable bundled code caching only for top-chrome WebUI hosts.
|
||||
return base::FeatureList::IsEnabled(features::kWebUIBundledCodeCache) &&
|
||||
IsTopChromeWebUIURL(webui_lock_url);
|
||||
::IsTopChromeWebUIURL(webui_lock_url);
|
||||
}
|
||||
|
||||
base::flat_map<GURL, int>
|
||||
@@ -4690,9 +4762,8 @@ void ChromeContentBrowserClient::OverrideWebPreferences(
|
||||
const webapps::AppId& app_id = browser->app_controller()->app_id();
|
||||
const web_app::WebAppRegistrar& registrar =
|
||||
web_app_provider->registrar_unsafe();
|
||||
if (registrar.IsInstallState(
|
||||
app_id, {web_app::proto::INSTALLED_WITH_OS_INTEGRATION,
|
||||
web_app::proto::INSTALLED_WITHOUT_OS_INTEGRATION})) {
|
||||
if (registrar.AppMatches(app_id,
|
||||
web_app::WebAppFilter::InstalledInChrome())) {
|
||||
web_prefs->web_app_scope = registrar.GetAppScope(app_id);
|
||||
}
|
||||
|
||||
@@ -4820,9 +4891,9 @@ void ChromeContentBrowserClient::OverrideWebPreferences(
|
||||
base::FeatureList::IsEnabled(::features::kContextMenuEmptySpace);
|
||||
#endif
|
||||
|
||||
if (base::FeatureList::IsEnabled(::features::kDevToolsAiPromptApi) &&
|
||||
web_contents->GetVisibleURL().SchemeIs(content::kChromeDevToolsScheme)) {
|
||||
web_prefs->ai_prompt_api_enabled = true;
|
||||
if (web_contents->GetVisibleURL().SchemeIs(content::kChromeDevToolsScheme) &&
|
||||
base::FeatureList::IsEnabled(::features::kDevToolsAiOriginTrialsApis)) {
|
||||
web_prefs->ai_ot_apis_enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4900,6 +4971,17 @@ bool ChromeContentBrowserClient::OverrideWebPreferencesAfterNavigation(
|
||||
(web_prefs->force_dark_mode_enabled != force_dark_mode_new_state);
|
||||
web_prefs->force_dark_mode_enabled = force_dark_mode_new_state;
|
||||
}
|
||||
if (blink::IsSupportedImageMimeType(web_contents->GetContentsMimeType())) {
|
||||
// Ensure images can zoom out and will scale to fit the viewport width.
|
||||
prefs_changed |= (web_prefs->default_minimum_page_scale_factor !=
|
||||
WebPreferences::kDefaultMinimumPageScaleFactor);
|
||||
web_prefs->default_minimum_page_scale_factor =
|
||||
WebPreferences::kDefaultMinimumPageScaleFactor;
|
||||
prefs_changed |= (web_prefs->shrinks_viewport_contents_to_fit !=
|
||||
WebPreferences::kShrinksViewportContentsToFit);
|
||||
web_prefs->shrinks_viewport_contents_to_fit =
|
||||
WebPreferences::kShrinksViewportContentsToFit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -5286,7 +5368,7 @@ bool ChromeContentBrowserClient::PreSpawnChild(
|
||||
|
||||
// Allow loading Chrome's DLLs.
|
||||
for (const auto* dll : {chrome::kBrowserResourcesDll, chrome::kElfDll}) {
|
||||
result = config->AllowExtraDll(GetModulePath(dll).value().c_str());
|
||||
result = config->AllowExtraDll(GetModulePath(dll).value());
|
||||
if (result != sandbox::SBOX_ALL_OK) {
|
||||
return false;
|
||||
}
|
||||
@@ -5556,7 +5638,7 @@ ChromeContentBrowserClient::GetDevToolsBackgroundServiceExpirations(
|
||||
std::optional<base::TimeDelta>
|
||||
ChromeContentBrowserClient::GetSpareRendererDelayForSiteURL(
|
||||
const GURL& site_url) {
|
||||
if (IsTopChromeWebUIURL(site_url)) {
|
||||
if (::IsTopChromeWebUIURL(site_url)) {
|
||||
// Experiments have shown that delaying 2s brings the most significant
|
||||
// improvements to Top Chrome WebUIs. See crbug.com/41490050.
|
||||
return base::Seconds(2);
|
||||
@@ -6150,7 +6232,7 @@ bool IsSystemFeatureURLDisabled(const GURL& url) {
|
||||
|
||||
// chrome://os-settings/pwa.html shouldn't be replaced to let the settings app
|
||||
// installation complete successfully.
|
||||
if (url.DomainIs(chrome::kChromeUIOSSettingsHost) &&
|
||||
if (url.DomainIs(ash::kChromeUIOSSettingsHost) &&
|
||||
url.GetPath() != "/pwa.html") {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kOsSettings);
|
||||
}
|
||||
@@ -6159,8 +6241,7 @@ bool IsSystemFeatureURLDisabled(const GURL& url) {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kBrowserSettings);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
if (url.DomainIs(chrome::kChromeUIUntrustedCroshHost)) {
|
||||
if (url.DomainIs(ash::kChromeUIUntrustedCroshHost)) {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kCrosh);
|
||||
}
|
||||
|
||||
@@ -6180,7 +6261,7 @@ bool IsSystemFeatureURLDisabled(const GURL& url) {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kGallery);
|
||||
}
|
||||
|
||||
if (url.DomainIs(chrome::kChromeUIUntrustedTerminalHost)) {
|
||||
if (url.DomainIs(ash::kChromeUIUntrustedTerminalHost)) {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kTerminal);
|
||||
}
|
||||
|
||||
@@ -6196,8 +6277,6 @@ bool IsSystemFeatureURLDisabled(const GURL& url) {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kRecorder);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@@ -6448,6 +6527,11 @@ void ChromeContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW) && !BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
guest_view::MaybeInterceptURLLoaderFactoryForSlimWebView(
|
||||
frame, factory_builder, header_client);
|
||||
#endif
|
||||
|
||||
// WARNING: This must be the last interceptor in the chain as the proxying
|
||||
// URLLoaderFactory installed by this needs to be the one actually sending
|
||||
// packets over the network (to effectively target `bound_network`).
|
||||
@@ -6499,7 +6583,7 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
|
||||
|
||||
content::ContentBrowserClient::URLLoaderRequestHandler
|
||||
ChromeContentBrowserClient::
|
||||
CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
CreateURLLoaderHandlerForServiceWorkerInitiatedNavigationRequest(
|
||||
content::FrameTreeNodeId frame_tree_node_id,
|
||||
const network::ResourceRequest& resource_request) {
|
||||
SearchPrefetchURLLoader::RequestHandler prefetch_handler =
|
||||
@@ -6869,9 +6953,8 @@ ChromeContentBrowserClient::CreateLoginDelegate(
|
||||
// create a TGT using their credentials. Note that the credentials are NOT
|
||||
// passed to the browser and everything happens on OS level, hence we return
|
||||
// nullptr instead of LoginDelegate to fail authentication. (See b/260522530).
|
||||
if (base::FeatureList::IsEnabled(net::features::kKerberosInBrowserRedirect) &&
|
||||
auth_info.scheme ==
|
||||
net::HttpAuth::SchemeToString(net::HttpAuth::AUTH_SCHEME_NEGOTIATE)) {
|
||||
if (auth_info.scheme ==
|
||||
net::HttpAuth::SchemeToString(net::HttpAuth::AUTH_SCHEME_NEGOTIATE)) {
|
||||
ash::KerberosInBrowserDialog::Show();
|
||||
return nullptr;
|
||||
}
|
||||
@@ -7111,7 +7194,7 @@ bool ChromeContentBrowserClient::HandleWebUI(
|
||||
}
|
||||
|
||||
if (IsSystemFeatureURLDisabled(*url)) {
|
||||
*url = GURL(chrome::kChromeUIAppDisabledURL);
|
||||
*url = GURL(ash::kChromeUIAppDisabledURL);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -7396,6 +7479,29 @@ bool ChromeContentBrowserClient::IsBuiltinComponent(
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::StartRtcDiagnosticLogging(
|
||||
content::RenderFrameHost& frame_host,
|
||||
bool should_upload_on_stop,
|
||||
base::flat_map<std::string, std::string> metadata,
|
||||
base::OnceCallback<void(const std::string&)> callback) {
|
||||
rtc_diagnostic_logging::StartRtcDiagnosticLogging(
|
||||
frame_host, should_upload_on_stop, std::move(metadata),
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::FinishRtcDiagnosticLogging(
|
||||
content::RenderFrameHost& frame_host,
|
||||
base::OnceClosure callback) {
|
||||
rtc_diagnostic_logging::FinishRtcDiagnosticLogging(frame_host,
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::CancelRtcDiagnosticLogging(
|
||||
content::RenderFrameHost& frame_host,
|
||||
base::OnceClosure callback) {
|
||||
rtc_diagnostic_logging::CancelRtcDiagnosticLogging(frame_host,
|
||||
std::move(callback));
|
||||
}
|
||||
bool ChromeContentBrowserClient::ShouldBlockRendererDebugURL(
|
||||
const GURL& url,
|
||||
content::BrowserContext* context,
|
||||
@@ -7916,7 +8022,7 @@ bool ChromeContentBrowserClient::DisallowV8FeatureFlagOverridesForSite(
|
||||
const GURL& site_url) {
|
||||
// Disable V8 feature flag overrides specifically for top-chrome WebUI URLs.
|
||||
return base::FeatureList::IsEnabled(features::kWebUIBundledCodeCache) &&
|
||||
IsTopChromeWebUIURL(site_url);
|
||||
::IsTopChromeWebUIURL(site_url);
|
||||
}
|
||||
|
||||
ukm::UkmService* ChromeContentBrowserClient::GetUkmService() {
|
||||
@@ -8699,9 +8805,8 @@ void ChromeContentBrowserClient::QueryInstalledWebAppsByManifestId(
|
||||
.Set("manifest_id", manifest_id.spec())
|
||||
.Set("frame_url", frame_url.spec()));
|
||||
|
||||
if (!lock.registrar().IsInstallState(
|
||||
app_id, {web_app::proto::INSTALLED_WITHOUT_OS_INTEGRATION,
|
||||
web_app::proto::INSTALLED_WITH_OS_INTEGRATION})) {
|
||||
if (!lock.registrar().AppMatches(
|
||||
app_id, web_app::WebAppFilter::InstalledInChrome())) {
|
||||
debug_value.Set("did_find_application", false);
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -8875,10 +8980,6 @@ bool ChromeContentBrowserClient::UsePrefetchPrerenderIntegration() {
|
||||
base::FeatureList::IsEnabled(features::kNewTabPageTriggerForPrefetch);
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::UsePreloadServingMetrics() {
|
||||
return features::kDsePreload2UsePreloadServingMetrics.Get();
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool ChromeContentBrowserClient::ShouldDisallowCredentialRequest(
|
||||
content::WebContents* web_contents) {
|
||||
@@ -8996,3 +9097,31 @@ bool ChromeContentBrowserClient::ShouldAllowPrefetchRedirection(
|
||||
url)) ||
|
||||
google_util::IsGoogleSearchUrl(url));
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::ModifyRequestHeadersForPrefetch(
|
||||
const GURL& url,
|
||||
std::vector<std::string>& removed_headers,
|
||||
net::HttpRequestHeaders& modified_headers,
|
||||
net::HttpRequestHeaders& modified_cors_exempt_headers) {
|
||||
#if BUILDFLAG(ENABLE_REQUEST_HEADER_INTEGRITY)
|
||||
if (base::FeatureList::IsEnabled(kPrefetchRequestIntegrityHeaders) &&
|
||||
request_header_integrity::RequestHeaderIntegrityURLLoaderThrottle::
|
||||
IsFeatureEnabled()) {
|
||||
request_header_integrity::RequestHeaderIntegrityURLLoaderThrottle::
|
||||
ModifyRequestIntegrityHeadersForPrefetch(url, removed_headers,
|
||||
modified_cors_exempt_headers);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::UpdateCorsExemptHeaderForPrefetch(
|
||||
network::mojom::NetworkContextParams* params) {
|
||||
#if BUILDFLAG(ENABLE_REQUEST_HEADER_INTEGRITY)
|
||||
if (base::FeatureList::IsEnabled(kPrefetchRequestIntegrityHeaders) &&
|
||||
request_header_integrity::RequestHeaderIntegrityURLLoaderThrottle::
|
||||
IsFeatureEnabled()) {
|
||||
request_header_integrity::RequestHeaderIntegrityURLLoaderThrottle::
|
||||
UpdateCorsExemptHeaders(params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+22
-1
@@ -9,12 +9,14 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/buildflag.h"
|
||||
#include "chrome/browser/actor/actor_navigation_throttle.h"
|
||||
#include "chrome/browser/autocomplete/aim_eligibility_refresh_navigation_throttle.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/custom_handlers/chrome_protocol_handler_navigation_throttle.h"
|
||||
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
|
||||
#include "chrome/browser/data_sharing/data_sharing_navigation_throttle.h"
|
||||
#include "chrome/browser/enterprise/data_protection/view_source_navigation_throttle.h"
|
||||
#include "chrome/browser/first_party_sets/first_party_sets_navigation_throttle.h"
|
||||
#include "chrome/browser/glic/glic_navigation_throttle.h"
|
||||
#include "chrome/browser/history/history_service_factory.h"
|
||||
#include "chrome/browser/interstitials/enterprise_util.h"
|
||||
#include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h"
|
||||
@@ -35,6 +37,7 @@
|
||||
#include "chrome/browser/ui/passwords/password_manager_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/web_applications/navigation_capturing_redirection_throttle.h"
|
||||
#include "chrome/common/chrome_features.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/captive_portal/content/captive_portal_service.h"
|
||||
@@ -94,9 +97,11 @@
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "chrome/browser/ui/lens/lens_overlay_side_panel_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/read_anything/read_anything_side_panel_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/search/chrome_search_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/search/new_tab_page_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/web_applications/tabbed_web_app_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/web_applications/webui_web_app_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/webui/image/image_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/webui/ntp_microsoft_auth/ntp_microsoft_auth_response_capture_navigation_throttle.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.h"
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
@@ -453,19 +458,32 @@ void CreateAndAddChromeThrottlesForNavigation(
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ||
|
||||
// BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
// AimEligibilityRefreshNavigationThrottle must be registered before
|
||||
// ContextualTasksNavigationThrottle so it can detect AIM URL navigations
|
||||
// before ContextualTasksNavigationThrottle intercepts them.
|
||||
AimEligibilityRefreshNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks)) {
|
||||
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks) ||
|
||||
base::FeatureList::IsEnabled(
|
||||
contextual_tasks::kContextualTasksUrlRedirectToAimUrl)) {
|
||||
contextual_tasks::ContextualTasksNavigationThrottle::MaybeCreateAndAdd(
|
||||
registry);
|
||||
}
|
||||
|
||||
DevToolsWindow::MaybeCreateAndAddNavigationThrottle(registry);
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kInstantUsesSpareRenderer)) {
|
||||
ChromeSearchNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
}
|
||||
|
||||
NewTabPageNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
web_app::TabbedWebAppNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
web_app::WebUIWebAppNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
ImageNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
|
||||
@@ -591,10 +609,13 @@ void CreateAndAddChromeThrottlesForNavigation(
|
||||
web_app::IsolatedWebAppThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
actor::ActorNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
dom_distiller::DistillerPageWebContents::MaybeCreateAndAddNavigationThrottle(
|
||||
registry);
|
||||
|
||||
dom_distiller::DistillerReferrerThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
glic::GlicNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
}
|
||||
|
||||
+123
-99
@@ -8,7 +8,6 @@ import org.chromium.base.BaseFeatures;
|
||||
import org.chromium.base.FeatureMap;
|
||||
import org.chromium.base.MutableBooleanParamWithSafeDefault;
|
||||
import org.chromium.base.MutableFlagWithSafeDefault;
|
||||
import org.chromium.base.MutableIntParamWithSafeDefault;
|
||||
import org.chromium.base.MutableParamWithSafeDefault;
|
||||
import org.chromium.base.SysUtils;
|
||||
import org.chromium.base.TimeUtils;
|
||||
@@ -157,6 +156,7 @@ public abstract class ChromeFeatureList {
|
||||
// Feature names.
|
||||
// LINT.IfChange(FeaturesExposedToJava)
|
||||
// keep-sorted start group_prefixes=["public static final String"]
|
||||
|
||||
public static final String ABORT_NAVIGATIONS_FROM_TAB_CLOSURES =
|
||||
"AbortNavigationsFromTabClosures";
|
||||
public static final String ACCOUNT_FOR_SUPPRESSED_KEYBOARD_INSETS =
|
||||
@@ -190,17 +190,13 @@ public abstract class ChromeFeatureList {
|
||||
public static final String ANDROID_DESKTOP_DENSITY = "AndroidDesktopDensity";
|
||||
public static final String ANDROID_ELEGANT_TEXT_HEIGHT = "AndroidElegantTextHeight";
|
||||
public static final String ANDROID_FIRST_RUN_LAUNCH_BOUNDS = "AndroidFirstRunLaunchBounds";
|
||||
public static final String ANDROID_LOGO_VIEW_REFACTOR = "AndroidLogoViewRefactor";
|
||||
public static final String ANDROID_HISTORY_CLUSTERING = "AndroidHistoryClustering";
|
||||
public static final String ANDROID_NEW_MEDIA_PICKER = "AndroidNewMediaPicker";
|
||||
public static final String ANDROID_NO_VISIBLE_HINT_FOR_DIFFERENT_TLD =
|
||||
"AndroidNoVisibleHintForDifferentTLD";
|
||||
public static final String ANDROID_OMNIBOX_FOCUSED_NEW_TAB_PAGE =
|
||||
"AndroidOmniboxFocusedNewTabPage";
|
||||
public static final String ANDROID_OPEN_INCOGNITO_AS_WINDOW = "AndroidOpenIncognitoAsWindow";
|
||||
public static final String ANDROID_PB_DISABLE_PULSE_ANIMATION =
|
||||
"AndroidPbDisablePulseAnimation";
|
||||
public static final String ANDROID_PB_DISABLE_SMOOTH_ANIMATION =
|
||||
"AndroidPbDisableSmoothAnimation";
|
||||
public static final String ANDROID_PINNED_TABS = "AndroidPinnedTabs";
|
||||
public static final String ANDROID_PINNED_TABS_TABLET_TAB_STRIP =
|
||||
"AndroidPinnedTabsTabletTabStrip";
|
||||
@@ -211,7 +207,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String ANDROID_SURFACE_COLOR_UPDATE = "AndroidSurfaceColorUpdate";
|
||||
public static final String ANDROID_TAB_DECLUTTER_DEDUPE_TAB_IDS_KILL_SWITCH =
|
||||
"AndroidTabDeclutterDedupeTabIdsKillSwitch";
|
||||
public static final String ANDROID_TAB_HIGHLIGHTING = "AndroidTabHighlighting";
|
||||
public static final String ANDROID_TAB_SKIP_SAVE_TABS_TASK_KILLSWITCH =
|
||||
"AndroidTabSkipSaveTabsTaskKillswitch";
|
||||
public static final String ANDROID_THEME_MODULE = "AndroidThemeModule";
|
||||
@@ -221,7 +216,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String ANDROID_TWA_ORIGIN_DISPLAY = "AndroidTWAOriginDisplay";
|
||||
public static final String ANDROID_USE_ADMINS_FOR_ENTERPRISE_INFO =
|
||||
"AndroidUseAdminsForEnterpriseInfo";
|
||||
public static final String ANDROID_WEB_APP_LAUNCH_HANDLER = "AndroidWebAppLaunchHandler";
|
||||
public static final String ANDROID_WINDOW_CONTROLS_OVERLAY = "AndroidWindowControlsOverlay";
|
||||
public static final String ANDROID_WINDOW_MANAGEMENT_WEB_API = "AndroidWindowManagementWebApi";
|
||||
public static final String ANDROID_WINDOW_POPUP_CUSTOM_TAB_UI = "AndroidWindowPopupCustomTabUi";
|
||||
@@ -235,11 +229,15 @@ public abstract class ChromeFeatureList {
|
||||
public static final String ANIMATED_IMAGE_DRAG_SHADOW = "AnimatedImageDragShadow";
|
||||
public static final String ANNOTATED_PAGE_CONTENTS_VIRTUAL_STRUCTURE =
|
||||
"AnnotatedPageContentsVirtualStructure";
|
||||
public static final String APB144_PATCH1 = "Apb144Patch1";
|
||||
public static final String APP_SPECIFIC_HISTORY = "AppSpecificHistory";
|
||||
public static final String APP_SPECIFIC_HISTORY_VIEW_INTENT = "AppSpecificHistoryViewIntent";
|
||||
public static final String ASYNC_NOTIFICATION_MANAGER = "AsyncNotificationManager";
|
||||
public static final String ASYNC_NOTIFICATION_MANAGER_FOR_DOWNLOAD =
|
||||
"AsyncNotificationManagerForDownload";
|
||||
public static final String AUTOFILL_AI_CREATE_ENTITY_DATA_MANAGER =
|
||||
"AutofillAiCreateEntityDataManager";
|
||||
public static final String AUTOFILL_AI_REAUTH_REQUIRED = "AutofillAiReauthRequired";
|
||||
public static final String AUTOFILL_AI_WITH_DATA_SCHEMA = "AutofillAiWithDataSchema";
|
||||
public static final String AUTOFILL_ALLOW_NON_HTTP_ACTIVATION =
|
||||
"AutofillAllowNonHttpActivation";
|
||||
@@ -251,6 +249,8 @@ public abstract class ChromeFeatureList {
|
||||
"AutofillAndroidKeyboardAccessoryDynamicPositioning";
|
||||
public static final String AUTOFILL_DEEP_LINK_AUTOFILL_OPTIONS =
|
||||
"AutofillDeepLinkAutofillOptions";
|
||||
public static final String AUTOFILL_ENABLE_AI_BASED_AMOUNT_EXTRACTION =
|
||||
"AutofillEnableAiBasedAmountExtraction";
|
||||
public static final String AUTOFILL_ENABLE_BUY_NOW_PAY_LATER = "AutofillEnableBuyNowPayLater";
|
||||
public static final String AUTOFILL_ENABLE_CARD_BENEFITS_FOR_AMERICAN_EXPRESS =
|
||||
"AutofillEnableCardBenefitsForAmericanExpress";
|
||||
@@ -299,13 +299,14 @@ public abstract class ChromeFeatureList {
|
||||
"BackgroundThreadPoolFieldTrial";
|
||||
public static final String BACK_FORWARD_CACHE = "BackForwardCache";
|
||||
public static final String BLOCK_INTENTS_WHILE_LOCKED = "BlockIntentsWhileLocked";
|
||||
public static final String BOARDING_PASS_DETECTOR = "BoardingPassDetector";
|
||||
public static final String BOOKMARK_PANE_ANDROID = "BookmarkPaneAndroid";
|
||||
public static final String BOTTOM_SHEET_AS_BROWSER_CONTROLS = "BottomSheetAsBrowserControls";
|
||||
public static final String BROWSER_CONTROLS_DEBUGGING = "BrowserControlsDebugging";
|
||||
public static final String BROWSER_CONTROLS_EARLY_RESIZE = "BrowserControlsEarlyResize";
|
||||
public static final String BROWSER_CONTROLS_PERSISTS_ON_CVH = "BrowserControlsPersistsOnCvh";
|
||||
public static final String BROWSER_CONTROLS_RENDER_DRIVEN_SHOW_CONSTRAINT =
|
||||
"BrowserControlsRenderDrivenShowConstraint";
|
||||
public static final String BROWSER_WINDOW_INTERFACE_MOBILE = "BrowserWindowInterfaceMobile";
|
||||
public static final String BROWSING_DATA_MODEL = "BrowsingDataModel";
|
||||
public static final String CACHE_ACTIVITY_TASKID = "CacheActivityTaskID";
|
||||
public static final String CACHE_IS_MULTI_INSTANCE_API_31_ENABLED =
|
||||
@@ -365,6 +366,8 @@ public abstract class ChromeFeatureList {
|
||||
public static final String CLEAR_INTENT_WHEN_RECREATED = "ClearIntentWhenRecreated";
|
||||
public static final String COMMAND_LINE_ON_NON_ROOTED = "CommandLineOnNonRooted";
|
||||
public static final String COMMERCE_MERCHANT_VIEWER = "CommerceMerchantViewer";
|
||||
public static final String COMPOSITOR_VIEW_HOLDER_OBSCURING = "CompositorViewHolderObscuring";
|
||||
public static final String COMPOSITOR_VIEW_REMEASURE_FIX = "CompositorViewRemeasureFix";
|
||||
public static final String CONTENT_CAPTURE_SEND_METADATA_FOR_DATA_SHARE =
|
||||
"ContentCaptureSendMetadataForDataShare";
|
||||
public static final String CONTEXTUAL_PAGE_ACTIONS = "ContextualPageActions";
|
||||
@@ -385,6 +388,8 @@ public abstract class ChromeFeatureList {
|
||||
public static final String CONTROLS_VISIBILITY_FROM_NAVIGATIONS =
|
||||
"ControlsVisibilityFromNavigations";
|
||||
public static final String CORMORANT = "Cormorant";
|
||||
public static final String CROSS_DEVICE_PREF_TRACKER_EXTRA_LOGS =
|
||||
"CrossDevicePrefTrackerExtraLogs";
|
||||
public static final String CROSS_DEVICE_TAB_PANE_ANDROID = "CrossDeviceTabPaneAndroid";
|
||||
public static final String DARKEN_WEBSITES_CHECKBOX_IN_THEMES_SETTING =
|
||||
"DarkenWebsitesCheckboxInThemesSetting";
|
||||
@@ -396,11 +401,10 @@ public abstract class ChromeFeatureList {
|
||||
"DataSharingNonProductionEnvironment";
|
||||
public static final String DEFAULT_BROWSER_PROMO_ANDROID2 = "DefaultBrowserPromoAndroid2";
|
||||
public static final String DEFAULT_BROWSER_PROMO_ENTRY_POINT = "DefaultBrowserPromoEntryPoint";
|
||||
public static final String DEFAULT_BROWSER_PROMO_FRE = "DefaultBrowserPromoFre";
|
||||
public static final String DESKTOP_ANDROID_LINK_CAPTURING = "DesktopAndroidLinkCapturing";
|
||||
public static final String DESKTOP_UA_ON_CONNECTED_DISPLAY = "DesktopUAOnConnectedDisplay";
|
||||
public static final String DETAILED_LANGUAGE_SETTINGS = "DetailedLanguageSettings";
|
||||
public static final String DEVICE_AUTHENTICATOR_ANDROIDX = "DeviceAuthenticatorAndroidx";
|
||||
public static final String DISABLE_INSTANCE_LIMIT = "DisableInstanceLimit";
|
||||
public static final String DISCO_FEED_ENDPOINT = "DiscoFeedEndpoint";
|
||||
public static final String DISPLAY_EDGE_TO_EDGE_FULLSCREEN = "DisplayEdgeToEdgeFullscreen";
|
||||
public static final String DISPLAY_WILDCARD_CONTENT_SETTINGS =
|
||||
@@ -410,6 +414,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final String DRAW_CUTOUT_EDGE_TO_EDGE = "DrawCutoutEdgeToEdge";
|
||||
public static final String EDGE_TO_EDGE_BOTTOM_CHIN = "EdgeToEdgeBottomChin";
|
||||
public static final String EDGE_TO_EDGE_EVERYWHERE = "EdgeToEdgeEverywhere";
|
||||
public static final String EDGE_TO_EDGE_EXTRA_LOGS = "EdgeToEdgeExtraLogs";
|
||||
public static final String EDGE_TO_EDGE_MONITOR_CONFIGURATIONS =
|
||||
"EdgeToEdgeMonitorConfigurations";
|
||||
public static final String EDGE_TO_EDGE_TABLET = "EdgeToEdgeTablet";
|
||||
@@ -420,8 +425,14 @@ public abstract class ChromeFeatureList {
|
||||
public static final String EMPTY_TAB_LIST_ANIMATION_KILL_SWITCH =
|
||||
"EmptyTabListAnimationKillSwitch";
|
||||
public static final String ENABLE_ANDROID_SIDE_PANEL = "EnableAndroidSidePanel";
|
||||
public static final String ENABLE_ANDROID_SIDE_PANEL_DEV_FEATURE =
|
||||
"EnableAndroidSidePanelDevFeature";
|
||||
public static final String ENABLE_BROWSER_WINDOW_INTERFACE_FOR_CUSTOM_TAB_ACTIVITY =
|
||||
"EnableBrowserWindowInterfaceForCustomTabActivity";
|
||||
public static final String ENABLE_CLIPBOARD_DATA_CONTROLS_ANDROID =
|
||||
"EnableClipboardDataControlsAndroid";
|
||||
public static final String ENABLE_CONTEXT_MENU_FOR_PREVIEW_TAB =
|
||||
"EnableContextMenuForPreviewTab";
|
||||
public static final String ENABLE_DISCOUNT_INFO_API = "EnableDiscountInfoApi";
|
||||
public static final String ENABLE_ESCAPE_HANDLING_FOR_SECONDARY_ACTIVITIES =
|
||||
"EnableEscapeHandlingForSecondaryActivities";
|
||||
@@ -431,6 +442,8 @@ public abstract class ChromeFeatureList {
|
||||
public static final String ENABLE_SAVE_PACKAGE_FOR_OFF_THE_RECORD =
|
||||
"EnableSavePackageForOffTheRecord";
|
||||
public static final String ENABLE_SWIPE_TO_SWITCH_PANE = "EnableSwipeToSwitchPane";
|
||||
public static final String ENABLE_TOOLBAR_POSITIONING_IN_RESIZE_MODE =
|
||||
"EnableToolbarPositioningInResizeMode";
|
||||
public static final String ENABLE_X_AXIS_ACTIVITY_TRANSITION = "EnableXAxisActivityTransition";
|
||||
public static final String ESC_CANCEL_DRAG = "EscCancelDrag";
|
||||
public static final String FACILITATED_PAYMENTS_ENABLE_A2A_PAYMENT =
|
||||
@@ -451,15 +464,15 @@ public abstract class ChromeFeatureList {
|
||||
public static final String FULLSCREEN_INSETS_API_MIGRATION = "FullscreenInsetsApiMigration";
|
||||
public static final String FULLSCREEN_INSETS_API_MIGRATION_ON_AUTOMOTIVE =
|
||||
"FullscreenInsetsApiMigrationOnAutomotive";
|
||||
public static final String FULLSCREEN_VIDEO_PICTURE_IN_PICTURE =
|
||||
"FullscreenVideoPictureInPicture";
|
||||
public static final String GLIC = "Glic";
|
||||
public static final String GRID_TAB_SWITCHER_SURFACE_COLOR_UPDATE =
|
||||
"GridTabSwitcherSurfaceColorUpdate";
|
||||
public static final String GRID_TAB_SWITCHER_UPDATE = "GridTabSwitcherUpdate";
|
||||
public static final String GROUP_NEW_TAB_WITH_PARENT = "GroupNewTabWithParent";
|
||||
public static final String GROUP_SUGGESTION_SERVICE = "GroupSuggestionService";
|
||||
public static final String HASH_PREFIX_REAL_TIME_LOOKUPS =
|
||||
"SafeBrowsingHashPrefixRealTimeLookups";
|
||||
public static final String HEADLESS_TAB_MODEL = "HeadlessTabModel";
|
||||
public static final String HISTORY_JOURNEYS = "Journeys";
|
||||
public static final String HISTORY_PANE_ANDROID = "HistoryPaneAndroid";
|
||||
public static final String HOME_MODULE_PREF_REFACTOR = "HomeModulePrefRefactor";
|
||||
@@ -495,24 +508,27 @@ public abstract class ChromeFeatureList {
|
||||
public static final String MOST_VISITED_TILES_RESELECT = "MostVisitedTilesReselect";
|
||||
public static final String MOVE_TO_FRONT_IN_LAUNCH_INTENT_DISPATCHER =
|
||||
"MoveToFrontInLaunchIntentDispatcher";
|
||||
public static final String MULTI_INSTANCE_SHARED_PREFS_MIGRATION =
|
||||
"MultiInstanceSharedPrefsMigration";
|
||||
public static final String MVC_UPDATE_VIEW_WHEN_MODEL_CHANGED = "MvcUpdateViewWhenModelChanged";
|
||||
public static final String NAV_BAR_COLOR_ANIMATION = "NavBarColorAnimation";
|
||||
public static final String NEW_TAB_PAGE_CUSTOMIZATION = "NewTabPageCustomization";
|
||||
public static final String NEW_TAB_PAGE_CUSTOMIZATION_FOR_MVT = "NewTabPageCustomizationForMvt";
|
||||
public static final String NEW_TAB_PAGE_CUSTOMIZATION_TOOLBAR_BUTTON =
|
||||
"NewTabPageCustomizationToolbarButton";
|
||||
public static final String NEW_TAB_PAGE_CUSTOMIZATION_THEME_SYNC =
|
||||
"NewTabPageCustomizationThemeSync";
|
||||
public static final String NEW_TAB_PAGE_CUSTOMIZATION_V2 = "NewTabPageCustomizationV2";
|
||||
public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET =
|
||||
"NotificationPermissionBottomSheet";
|
||||
public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant";
|
||||
public static final String NOTIFICATION_TRAMPOLINE = "NotificationTrampoline";
|
||||
public static final String NOTIFICATION_TRAMPOLINE_NO_NEW_TASK =
|
||||
"NotificationTrampolineNoNewTask";
|
||||
public static final String NTP_MVC_REFACTOR = "NtpMvcRefactor";
|
||||
public static final String NTP_SIMPLIFICATION = "NtpSimplification";
|
||||
public static final String OMAHA_MIN_SDK_VERSION_ANDROID = "OmahaMinSdkVersionAndroid";
|
||||
public static final String OMNIBOX_AUTOFOCUS_ON_INCOGNITO_NTP =
|
||||
"OmniboxAutofocusOnIncognitoNtp";
|
||||
public static final String OMNIBOX_CACHE_SUGGESTION_RESOURCES =
|
||||
"OmniboxCacheSuggestionResources";
|
||||
public static final String ON_DEMAND_BACKGROUND_TAB_CONTEXT_CAPTURE =
|
||||
"OnDemandBackgroundTabContextCapture";
|
||||
public static final String PAGE_CONTENT_PROVIDER = "PageContentProvider";
|
||||
public static final String PAGE_INFO_ABOUT_THIS_SITE_MORE_LANGS =
|
||||
"PageInfoAboutThisSiteMoreLangs";
|
||||
@@ -523,8 +539,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String PCCT_MINIMUM_HEIGHT = "PCCTMinimumHeight";
|
||||
public static final String PERMISSION_DEDICATED_CPSS_SETTING_ANDROID =
|
||||
"PermissionDedicatedCpssSettingAndroid";
|
||||
public static final String PERMISSION_SITE_SETTING_RADIO_BUTTON =
|
||||
"PermissionSiteSettingsRadioButton";
|
||||
public static final String PERSIST_ACROSS_REBOOTS = "PersistAcrossReboots";
|
||||
public static final String PERSIST_ACROSS_REBOOTS_DEBUG_LOGS = "PersistAcrossRebootsDebugLogs";
|
||||
public static final String PLUS_ADDRESSES_ENABLED = "PlusAddressesEnabled";
|
||||
@@ -542,10 +556,8 @@ public abstract class ChromeFeatureList {
|
||||
"PrivacySandboxActivityTypeStorage";
|
||||
public static final String PRIVACY_SANDBOX_ADS_API_UX_ENHANCEMENTS =
|
||||
"PrivacySandboxAdsApiUxEnhancements";
|
||||
public static final String PRIVACY_SANDBOX_ADS_NOTICE_CCT = "PrivacySandboxAdsNoticeCCT";
|
||||
public static final String PRIVACY_SANDBOX_AD_TOPICS_CONTENT_PARITY =
|
||||
"PrivacySandboxAdTopicsContentParity";
|
||||
public static final String PRIVACY_SANDBOX_SENTIMENT_SURVEY = "PrivacySandboxSentimentSurvey";
|
||||
public static final String PRIVACY_SANDBOX_SETTINGS_4 = "PrivacySandboxSettings4";
|
||||
public static final String PROCESS_RANK_POLICY_ANDROID = "ProcessRankPolicyAndroid";
|
||||
public static final String PROTECT_RECENTLY_VISIBLE_TAB = "ProtectRecentlyVisibleTab";
|
||||
@@ -555,12 +567,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final String PWA_RESTORE_UI_AT_STARTUP = "PwaRestoreUiAtStartup";
|
||||
public static final String PWA_UPDATE_DIALOG_FOR_ICON = "PwaUpdateDialogForIcon";
|
||||
public static final String QUIET_NOTIFICATION_PROMPTS = "QuietNotificationPrompts";
|
||||
public static final String READALOUD = "ReadAloud";
|
||||
public static final String READALOUD_AUDIO_OVERVIEWS = "ReadAloudAudioOverviews";
|
||||
public static final String READALOUD_AUDIO_OVERVIEWS_FEEDBACK =
|
||||
"ReadAloudAudioOverviewsFeedback";
|
||||
public static final String READALOUD_AUDIO_OVERVIEWS_SKIP_DISCLAIMER_WHEN_POSSIBLE =
|
||||
"ReadAloudAudioOverviewsSkipDisclaimerWhenPossible";
|
||||
public static final String READALOUD_IPH_MENU_BUTTON_HIGHLIGHT_CCT =
|
||||
"ReadAloudIPHMenuButtonHighlightCCT";
|
||||
public static final String READALOUD_PLAYBACK = "ReadAloudPlayback";
|
||||
@@ -611,6 +618,8 @@ public abstract class ChromeFeatureList {
|
||||
"SegmentationPlatformAndroidHomeModuleRankerV2";
|
||||
public static final String SEGMENTATION_PLATFORM_EPHEMERAL_CARD_RANKER =
|
||||
"SegmentationPlatformEphemeralCardRanker";
|
||||
public static final String SEND_TAB_TO_SELF_PROPAGATE_SCROLL_POSITION =
|
||||
"SendTabToSelfPropagateScrollPosition";
|
||||
public static final String SENSITIVE_CONTENT = "SensitiveContent";
|
||||
public static final String SENSITIVE_CONTENT_WHILE_SWITCHING_TABS =
|
||||
"SensitiveContentWhileSwitchingTabs";
|
||||
@@ -622,10 +631,11 @@ public abstract class ChromeFeatureList {
|
||||
public static final String SHOW_CLOSE_ALL_INCOGNITO_TABS_BUTTON =
|
||||
"ShowCloseAllIncognitoTabsButton";
|
||||
public static final String SHOW_DOWNLOAD_SCANNING_STATE = "ShowDownloadScanningState";
|
||||
public static final String SHOW_NEW_TAB_ANIMATIONS = "ShowNewTabAnimations";
|
||||
public static final String SHOW_TAB_LIST_ANIMATIONS = "ShowTabListAnimations";
|
||||
public static final String SHOW_WARNINGS_FOR_SUSPICIOUS_NOTIFICATIONS =
|
||||
"ShowWarningsForSuspiciousNotifications";
|
||||
public static final String SITE_ISOLATION_ENABLE_MEMORY_THRESHOLD_ANDROID =
|
||||
"SiteIsolationEnableMemoryThresholdAndroid";
|
||||
public static final String SMALLER_TAB_STRIP_TITLE_LIMIT = "SmallerTabStripTitleLimit";
|
||||
public static final String SMART_SUGGESTION_FOR_LARGE_DOWNLOADS =
|
||||
"SmartSuggestionForLargeDownloads";
|
||||
@@ -646,7 +656,6 @@ public abstract class ChromeFeatureList {
|
||||
"SyncTrustedVaultErrorMessageDuration";
|
||||
public static final String TAB_BOTTOM_SHEET = "TabBottomSheet";
|
||||
public static final String TAB_CLOSURE_METHOD_REFACTOR = "TabClosureMethodRefactor";
|
||||
public static final String TAB_FREEZING_USES_DISCARD = "TabFreezingUsesDiscard";
|
||||
public static final String TAB_MODEL_INIT_FIXES = "TabModelInitFixes";
|
||||
public static final String TAB_STORAGE_SQLITE_PROTOTYPE = "TabStorageSqlitePrototype";
|
||||
public static final String TAB_STRIP_AUTO_SELECT_ON_CLOSE_CHANGE =
|
||||
@@ -704,6 +713,8 @@ public abstract class ChromeFeatureList {
|
||||
public static final String WEB_OTP_CROSS_DEVICE_SIMPLE_STRING = "WebOtpCrossDeviceSimpleString";
|
||||
public static final String XPLAT_SYNCED_SETUP = "XplatSyncedSetup";
|
||||
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
|
||||
public static final String YOUR_SAVED_INFO_SETTINGS_PAGE_ANDROID =
|
||||
"YourSavedInfoSettingsPageAndroid";
|
||||
// keep-sorted end
|
||||
// LINT.ThenChange(//chrome/browser/flags/android/chrome_feature_list.cc:FeaturesExposedToJava)
|
||||
|
||||
@@ -713,6 +724,7 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(ACCOUNT_FOR_SUPPRESSED_KEYBOARD_INSETS, /* defaultValue= */ true);
|
||||
public static final CachedFlag sAndroidAnimatedProgressBarInBrowser =
|
||||
newCachedFlag(ANDROID_ANIMATED_PROGRESS_BAR_IN_BROWSER, true);
|
||||
public static final CachedFlag sAndroidApb144Patch1 = newCachedFlag(APB144_PATCH1, true);
|
||||
public static final CachedFlag sAndroidAppIntegrationModule =
|
||||
newCachedFlag(ANDROID_APP_INTEGRATION_MODULE, true);
|
||||
public static final CachedFlag sAndroidAppIntegrationMultiDataSource =
|
||||
@@ -730,8 +742,6 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(ANDROID_DESKTOP_DENSITY, true);
|
||||
public static final CachedFlag sAndroidElegantTextHeight =
|
||||
newCachedFlag(ANDROID_ELEGANT_TEXT_HEIGHT, true);
|
||||
public static final CachedFlag sAndroidLogoViewRefactor =
|
||||
newCachedFlag(ANDROID_LOGO_VIEW_REFACTOR, /* defaultValue= */ true);
|
||||
public static final CachedFlag sAndroidNewMediaPicker =
|
||||
newCachedFlag(ANDROID_NEW_MEDIA_PICKER, false);
|
||||
public static final CachedFlag sAndroidOpenIncognitoAsWindow =
|
||||
@@ -748,9 +758,7 @@ public abstract class ChromeFeatureList {
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sAndroidSetupList =
|
||||
newCachedFlag(
|
||||
ANDROID_SETUP_LIST,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ false);
|
||||
ANDROID_SETUP_LIST, /* defaultValue= */ false, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sAndroidSurfaceColorUpdate =
|
||||
newCachedFlag(
|
||||
ANDROID_SURFACE_COLOR_UPDATE,
|
||||
@@ -764,11 +772,9 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sAndroidThemeResourceProvider =
|
||||
newCachedFlag(ANDROID_THEME_RESOURCE_PROVIDER, false, /* defaultValueInTests= */ false);
|
||||
public static final CachedFlag sAndroidTwaOriginDisplay =
|
||||
newCachedFlag(ANDROID_TWA_ORIGIN_DISPLAY, false);
|
||||
newCachedFlag(ANDROID_TWA_ORIGIN_DISPLAY, true);
|
||||
public static final CachedFlag sAndroidUseAdminsForEnterpriseInfo =
|
||||
newCachedFlag(ANDROID_USE_ADMINS_FOR_ENTERPRISE_INFO, true);
|
||||
public static final CachedFlag sAndroidWebAppLaunchHandler =
|
||||
newCachedFlag(ANDROID_WEB_APP_LAUNCH_HANDLER, false, true);
|
||||
public static final CachedFlag sAndroidWindowControlsOverlay =
|
||||
newCachedFlag(ANDROID_WINDOW_CONTROLS_OVERLAY, true);
|
||||
public static final CachedFlag sAndroidWindowManagementWebApi =
|
||||
@@ -804,6 +810,8 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(BLOCK_INTENTS_WHILE_LOCKED, false);
|
||||
public static final CachedFlag sBookmarkPaneAndroid =
|
||||
newCachedFlag(BOOKMARK_PANE_ANDROID, false);
|
||||
public static final CachedFlag sBottomSheetAsBrowserControls =
|
||||
newCachedFlag(BOTTOM_SHEET_AS_BROWSER_CONTROLS, true);
|
||||
public static final CachedFlag sBrowserControlsDebugging =
|
||||
newCachedFlag(BROWSER_CONTROLS_DEBUGGING, false);
|
||||
public static final CachedFlag sCacheIsMultiInstanceApi31Enabled =
|
||||
@@ -855,8 +863,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sCctResizableForThirdParties =
|
||||
newCachedFlag(CCT_RESIZABLE_FOR_THIRD_PARTIES, true);
|
||||
public static final CachedFlag sCctTabModalDialog = newCachedFlag(CCT_TAB_MODAL_DIALOG, true);
|
||||
public static final CachedFlag sCctToolbarRefactor =
|
||||
newCachedFlag(CCT_TOOLBAR_REFACTOR, false, true);
|
||||
public static final CachedFlag sCctToolbarRefactor = newCachedFlag(CCT_TOOLBAR_REFACTOR, true);
|
||||
public static final CachedFlag sChromeItemPickerUi =
|
||||
newCachedFlag(CHROME_ITEM_PICKER_UI, /* defaultValue= */ false);
|
||||
public static final CachedFlag sChromeNativeUrlOverriding =
|
||||
@@ -869,6 +876,8 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(CLEAR_INTENT_WHEN_RECREATED, /* defaultValue= */ false);
|
||||
public static final CachedFlag sCommandLineOnNonRooted =
|
||||
newCachedFlag(COMMAND_LINE_ON_NON_ROOTED, false);
|
||||
public static final CachedFlag sCompositorViewRemeasureFix =
|
||||
newCachedFlag(COMPOSITOR_VIEW_REMEASURE_FIX, true);
|
||||
public static final CachedFlag sCpaTabGroupingButton =
|
||||
newCachedFlag(
|
||||
CONTEXTUAL_PAGE_ACTION_TAB_GROUPING,
|
||||
@@ -881,6 +890,8 @@ public abstract class ChromeFeatureList {
|
||||
DEFAULT_BROWSER_PROMO_ENTRY_POINT,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sDefaultBrowserPromoFre =
|
||||
newCachedFlag(DEFAULT_BROWSER_PROMO_FRE, false);
|
||||
public static final CachedFlag sDesktopAndroidLinkCapturing =
|
||||
newCachedFlag(DESKTOP_ANDROID_LINK_CAPTURING, false);
|
||||
public static final CachedFlag sDesktopUAOnConnectedDisplay =
|
||||
@@ -896,6 +907,8 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(EDGE_TO_EDGE_BOTTOM_CHIN, /* defaultValue= */ true);
|
||||
public static final CachedFlag sEdgeToEdgeEverywhere =
|
||||
newCachedFlag(EDGE_TO_EDGE_EVERYWHERE, /* defaultValue= */ true);
|
||||
public static final CachedFlag sEdgeToEdgeExtraLogs =
|
||||
newCachedFlag(EDGE_TO_EDGE_EXTRA_LOGS, /* defaultValue= */ false);
|
||||
public static final CachedFlag sEdgeToEdgeMonitorConfigurations =
|
||||
newCachedFlag(EDGE_TO_EDGE_MONITOR_CONFIGURATIONS, /* defaultValue= */ true);
|
||||
public static final CachedFlag sEdgeToEdgeTablet =
|
||||
@@ -906,6 +919,12 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(EDUCATIONAL_TIP_DEFAULT_BROWSER_PROMO_CARD, false, true);
|
||||
public static final CachedFlag sEnableAndroidSidePanel =
|
||||
newCachedFlag(ENABLE_ANDROID_SIDE_PANEL, false);
|
||||
public static final CachedFlag sEnableAndroidSidePanelDevFeature =
|
||||
newCachedFlag(ENABLE_ANDROID_SIDE_PANEL_DEV_FEATURE, false);
|
||||
public static final CachedFlag sEnableBrowserWindowInterfaceForCustomTabActivity =
|
||||
newCachedFlag(
|
||||
ENABLE_BROWSER_WINDOW_INTERFACE_FOR_CUSTOM_TAB_ACTIVITY,
|
||||
/* defaultValue= */ true);
|
||||
public static final CachedFlag sEnableExclusiveAccessManager =
|
||||
newCachedFlag(ENABLE_EXCLUSIVE_ACCESS_MANAGER, true);
|
||||
public static final CachedFlag sEnableFullscreenToAnyScreenAndroid =
|
||||
@@ -913,20 +932,21 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sEnableXAxisActivityTransition =
|
||||
newCachedFlag(ENABLE_X_AXIS_ACTIVITY_TRANSITION, false);
|
||||
public static final CachedFlag sFluidResize =
|
||||
newCachedFlag(FLUID_RESIZE, /* defaultValue= */ false, /* defaultValueInTests= */ true);
|
||||
newCachedFlag(FLUID_RESIZE, /* defaultValue= */ true, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sForceTranslucentNotificationTrampoline =
|
||||
newCachedFlag(FORCE_TRANSLUCENT_NOTIFICATION_TRAMPOLINE, false);
|
||||
public static final CachedFlag sFullscreenInsetsApiMigration =
|
||||
newCachedFlag(FULLSCREEN_INSETS_API_MIGRATION, false);
|
||||
public static final CachedFlag sFullscreenInsetsApiMigrationOnAutomotive =
|
||||
newCachedFlag(FULLSCREEN_INSETS_API_MIGRATION_ON_AUTOMOTIVE, true);
|
||||
public static final CachedFlag sFullscreenVideoPictureInPicture =
|
||||
newCachedFlag(FULLSCREEN_VIDEO_PICTURE_IN_PICTURE, true);
|
||||
public static final CachedFlag sGlic = newCachedFlag(GLIC, false);
|
||||
public static final CachedFlag sGridTabSwitcherSurfaceColorUpdate =
|
||||
newCachedFlag(
|
||||
GRID_TAB_SWITCHER_SURFACE_COLOR_UPDATE,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ false);
|
||||
public static final CachedFlag sGridTabSwitcherUpdate =
|
||||
newCachedFlag(GRID_TAB_SWITCHER_UPDATE, true);
|
||||
public static final CachedFlag sHistoryPaneAndroid =
|
||||
newCachedFlag(
|
||||
HISTORY_PANE_ANDROID,
|
||||
@@ -977,6 +997,8 @@ public abstract class ChromeFeatureList {
|
||||
MOVE_TO_FRONT_IN_LAUNCH_INTENT_DISPATCHER,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sMultiInstanceSharedPrefsMigration =
|
||||
newCachedFlag(MULTI_INSTANCE_SHARED_PREFS_MIGRATION, false);
|
||||
public static final CachedFlag sMvcUpdateViewWhenModelChanged =
|
||||
newCachedFlag(
|
||||
MVC_UPDATE_VIEW_WHEN_MODEL_CHANGED,
|
||||
@@ -984,18 +1006,23 @@ public abstract class ChromeFeatureList {
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sNavBarColorAnimation =
|
||||
newCachedFlag(NAV_BAR_COLOR_ANIMATION, /* defaultValue= */ true);
|
||||
public static final CachedFlag sNewTabPageCustomization =
|
||||
newCachedFlag(NEW_TAB_PAGE_CUSTOMIZATION, true);
|
||||
public static final CachedFlag sNewTabPageCustomizationForMvt =
|
||||
newCachedFlag(NEW_TAB_PAGE_CUSTOMIZATION_FOR_MVT, true);
|
||||
public static final CachedFlag sNewTabPageCustomizationToolbarButton =
|
||||
newCachedFlag(NEW_TAB_PAGE_CUSTOMIZATION_TOOLBAR_BUTTON, false);
|
||||
public static final CachedFlag sNewTabPageCustomizationThemeSync =
|
||||
newCachedFlag(NEW_TAB_PAGE_CUSTOMIZATION_THEME_SYNC, /* defaultValue= */ false);
|
||||
public static final CachedFlag sNewTabPageCustomizationV2 =
|
||||
newCachedFlag(NEW_TAB_PAGE_CUSTOMIZATION_V2, false, true);
|
||||
public static final CachedFlag sNotificationTrampoline =
|
||||
newCachedFlag(NOTIFICATION_TRAMPOLINE, false);
|
||||
public static final CachedFlag sNotificationTrampolineNoNewTask =
|
||||
newCachedFlag(NOTIFICATION_TRAMPOLINE_NO_NEW_TASK, false);
|
||||
newCachedFlag(
|
||||
NOTIFICATION_TRAMPOLINE_NO_NEW_TASK,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sNtpMvcRefactor =
|
||||
newCachedFlag(NTP_MVC_REFACTOR, /* defaultValue= */ false);
|
||||
public static final CachedFlag sNtpSimplification =
|
||||
newCachedFlag(NTP_SIMPLIFICATION, /* defaultValue= */ true);
|
||||
public static final CachedFlag sPCctMinimumHeight = newCachedFlag(PCCT_MINIMUM_HEIGHT, true);
|
||||
public static final CachedFlag sPaintPreviewDemo = newCachedFlag(PAINT_PREVIEW_DEMO, false);
|
||||
public static final CachedFlag sPersistAcrossReboots =
|
||||
@@ -1079,19 +1106,16 @@ public abstract class ChromeFeatureList {
|
||||
/* defaultValue= */ true,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sToolbarTabletResizeRefactor =
|
||||
newCachedFlag(
|
||||
TOOLBAR_TABLET_RESIZE_REFACTOR,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
newCachedFlag(TOOLBAR_TABLET_RESIZE_REFACTOR, /* defaultValue= */ true);
|
||||
public static final CachedFlag sTopControlsRefactor =
|
||||
newCachedFlag(
|
||||
TOP_CONTROLS_REFACTOR,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValue= */ true,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sTopControlsRefactorV2 =
|
||||
newCachedFlag(
|
||||
TOP_CONTROLS_REFACTOR_V2,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValue= */ true,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sTouchToSearchCallout =
|
||||
newCachedFlag(
|
||||
@@ -1117,6 +1141,7 @@ public abstract class ChromeFeatureList {
|
||||
// keep-sorted start
|
||||
sAccountForSuppressedKeyboardInsets,
|
||||
sAndroidAnimatedProgressBarInBrowser,
|
||||
sAndroidApb144Patch1,
|
||||
sAndroidAppIntegrationModule,
|
||||
sAndroidAppIntegrationMultiDataSource,
|
||||
sAndroidAutoMintedTwa,
|
||||
@@ -1126,7 +1151,6 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidDataImporterService,
|
||||
sAndroidDesktopDensity,
|
||||
sAndroidElegantTextHeight,
|
||||
sAndroidLogoViewRefactor,
|
||||
sAndroidNewMediaPicker,
|
||||
sAndroidOpenIncognitoAsWindow,
|
||||
sAndroidProgressBarVisualUpdate,
|
||||
@@ -1139,7 +1163,6 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidThemeResourceProvider,
|
||||
sAndroidTwaOriginDisplay,
|
||||
sAndroidUseAdminsForEnterpriseInfo,
|
||||
sAndroidWebAppLaunchHandler,
|
||||
sAndroidWindowControlsOverlay,
|
||||
sAndroidWindowManagementWebApi,
|
||||
sAndroidWindowPopupCustomTabUi,
|
||||
@@ -1154,6 +1177,7 @@ public abstract class ChromeFeatureList {
|
||||
sBackgroundThreadPoolFieldTrial,
|
||||
sBlockIntentsWhileLocked,
|
||||
sBookmarkPaneAndroid,
|
||||
sBottomSheetAsBrowserControls,
|
||||
sBrowserControlsDebugging,
|
||||
sCacheIsMultiInstanceApi31Enabled,
|
||||
sCctAdaptiveButton,
|
||||
@@ -1185,20 +1209,25 @@ public abstract class ChromeFeatureList {
|
||||
sClankStartupLatencyInjection,
|
||||
sClearIntentWhenRecreated,
|
||||
sCommandLineOnNonRooted,
|
||||
sCompositorViewRemeasureFix,
|
||||
sCpaTabGroupingButton,
|
||||
sCrossDeviceTabPaneAndroid,
|
||||
sDefaultBrowserPromoEntryPoint,
|
||||
sDefaultBrowserPromoFre,
|
||||
sDesktopAndroidLinkCapturing,
|
||||
sDesktopUAOnConnectedDisplay,
|
||||
sDocumentPictureInPictureAPI,
|
||||
sDrawChromePagesEdgeToEdge,
|
||||
sEdgeToEdgeBottomChin,
|
||||
sEdgeToEdgeEverywhere,
|
||||
sEdgeToEdgeExtraLogs,
|
||||
sEdgeToEdgeMonitorConfigurations,
|
||||
sEdgeToEdgeTablet,
|
||||
sEdgeToEdgeUseBackupNavbarInsets,
|
||||
sEducationalTipDefaultBrowserPromoCard,
|
||||
sEnableAndroidSidePanel,
|
||||
sEnableAndroidSidePanelDevFeature,
|
||||
sEnableBrowserWindowInterfaceForCustomTabActivity,
|
||||
sEnableExclusiveAccessManager,
|
||||
sEnableFullscreenToAnyScreenAndroid,
|
||||
sEnableXAxisActivityTransition,
|
||||
@@ -1206,8 +1235,9 @@ public abstract class ChromeFeatureList {
|
||||
sForceTranslucentNotificationTrampoline,
|
||||
sFullscreenInsetsApiMigration,
|
||||
sFullscreenInsetsApiMigrationOnAutomotive,
|
||||
sFullscreenVideoPictureInPicture,
|
||||
sGlic,
|
||||
sGridTabSwitcherSurfaceColorUpdate,
|
||||
sGridTabSwitcherUpdate,
|
||||
sHistoryPaneAndroid,
|
||||
sIncognitoThemeOverlayTesting,
|
||||
sKeyboardEscBackNavigation,
|
||||
@@ -1221,14 +1251,16 @@ public abstract class ChromeFeatureList {
|
||||
sMostVisitedTilesCustomization,
|
||||
sMostVisitedTilesReselect,
|
||||
sMoveToFrontInLaunchIntentDispatcher,
|
||||
sMultiInstanceSharedPrefsMigration,
|
||||
sMvcUpdateViewWhenModelChanged,
|
||||
sNavBarColorAnimation,
|
||||
sNewTabPageCustomization,
|
||||
sNewTabPageCustomizationForMvt,
|
||||
sNewTabPageCustomizationToolbarButton,
|
||||
sNewTabPageCustomizationThemeSync,
|
||||
sNewTabPageCustomizationV2,
|
||||
sNotificationTrampoline,
|
||||
sNotificationTrampolineNoNewTask,
|
||||
sNtpMvcRefactor,
|
||||
sNtpSimplification,
|
||||
sPCctMinimumHeight,
|
||||
sPaintPreviewDemo,
|
||||
sPersistAcrossReboots,
|
||||
@@ -1290,19 +1322,17 @@ public abstract class ChromeFeatureList {
|
||||
public static final MutableFlagWithSafeDefault sAlwaysDrawCompositedToolbarHairline =
|
||||
newMutableFlagWithSafeDefault(ALWAYS_DRAW_COMPOSITED_TOOLBAR_HAIRLINE, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidAppearanceSettings =
|
||||
newMutableFlagWithSafeDefault(ANDROID_APPEARANCE_SETTINGS, false);
|
||||
newMutableFlagWithSafeDefault(ANDROID_APPEARANCE_SETTINGS, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidBookmarkBar =
|
||||
newMutableFlagWithSafeDefault(ANDROID_BOOKMARK_BAR, false);
|
||||
newMutableFlagWithSafeDefault(ANDROID_BOOKMARK_BAR, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidBookmarkBarFastFollow =
|
||||
newMutableFlagWithSafeDefault(ANDROID_BOOKMARK_BAR_FAST_FOLLOW, false);
|
||||
newMutableFlagWithSafeDefault(ANDROID_BOOKMARK_BAR_FAST_FOLLOW, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidContextMenuDuplicateTabs =
|
||||
newMutableFlagWithSafeDefault(ANDROID_CONTEXT_MENU_DUPLICATE_TABS, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidPinnedTabs =
|
||||
newMutableFlagWithSafeDefault(ANDROID_PINNED_TABS, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidPinnedTabsTabletTabStrip =
|
||||
newMutableFlagWithSafeDefault(ANDROID_PINNED_TABS_TABLET_TAB_STRIP, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidTabHighlighting =
|
||||
newMutableFlagWithSafeDefault(ANDROID_TAB_HIGHLIGHTING, true);
|
||||
public static final MutableFlagWithSafeDefault sAndroidTipsNotifications =
|
||||
newMutableFlagWithSafeDefault(ANDROID_TIPS_NOTIFICATIONS, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidTipsNotificationsV2 =
|
||||
@@ -1314,20 +1344,24 @@ public abstract class ChromeFeatureList {
|
||||
// Default to false. The logic behind the flag is not relevant when native is not initialized.
|
||||
public static final MutableFlagWithSafeDefault sBrowserControlsRenderDrivenShowConstraint =
|
||||
newMutableFlagWithSafeDefault(BROWSER_CONTROLS_RENDER_DRIVEN_SHOW_CONSTRAINT, false);
|
||||
public static final MutableFlagWithSafeDefault sBrowserWindowInterfaceMobile =
|
||||
newMutableFlagWithSafeDefault(BROWSER_WINDOW_INTERFACE_MOBILE, false);
|
||||
public static final MutableFlagWithSafeDefault sCompositorViewHolderObscuring =
|
||||
newMutableFlagWithSafeDefault(COMPOSITOR_VIEW_HOLDER_OBSCURING, true);
|
||||
public static final MutableFlagWithSafeDefault sControlsVisibilityFromNavigations =
|
||||
newMutableFlagWithSafeDefault(CONTROLS_VISIBILITY_FROM_NAVIGATIONS, true);
|
||||
public static final MutableFlagWithSafeDefault sDisableInstanceLimit =
|
||||
newMutableFlagWithSafeDefault(DISABLE_INSTANCE_LIMIT, false);
|
||||
// Defaulted to true in native, but since it is being used as a kill switch set the default
|
||||
// value pre-native to false as it is safer if the feature needs to be killed via Finch config.
|
||||
public static final MutableFlagWithSafeDefault sEmptyTabListAnimationKillSwitch =
|
||||
newMutableFlagWithSafeDefault(EMPTY_TAB_LIST_ANIMATION_KILL_SWITCH, false);
|
||||
public static final MutableFlagWithSafeDefault sEnableContextMenuForPreviewTab =
|
||||
newMutableFlagWithSafeDefault(ENABLE_CONTEXT_MENU_FOR_PREVIEW_TAB, false);
|
||||
public static final MutableFlagWithSafeDefault sEnableSwipeToSwitchPane =
|
||||
newMutableFlagWithSafeDefault(ENABLE_SWIPE_TO_SWITCH_PANE, false);
|
||||
public static final MutableFlagWithSafeDefault sEnableToolbarPositioningInResizeMode =
|
||||
newMutableFlagWithSafeDefault(ENABLE_TOOLBAR_POSITIONING_IN_RESIZE_MODE, true);
|
||||
public static final MutableFlagWithSafeDefault sEscCancelDrag =
|
||||
newMutableFlagWithSafeDefault(ESC_CANCEL_DRAG, false);
|
||||
public static final MutableFlagWithSafeDefault sGlic =
|
||||
newMutableFlagWithSafeDefault(GLIC, false);
|
||||
public static final MutableFlagWithSafeDefault sIncognitoNtpSmallIcon =
|
||||
newMutableFlagWithSafeDefault(INCOGNITO_NTP_SMALL_ICON, false);
|
||||
public static final MutableFlagWithSafeDefault sIncognitoScreenshot =
|
||||
@@ -1340,25 +1374,23 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(ANDROID_NO_VISIBLE_HINT_FOR_DIFFERENT_TLD, true);
|
||||
public static final MutableFlagWithSafeDefault sOmniboxAutofocusOnIncognitoNtp =
|
||||
newMutableFlagWithSafeDefault(OMNIBOX_AUTOFOCUS_ON_INCOGNITO_NTP, false);
|
||||
public static final MutableFlagWithSafeDefault sOnDemandBackgroundTabContextCapture =
|
||||
newMutableFlagWithSafeDefault(ON_DEMAND_BACKGROUND_TAB_CONTEXT_CAPTURE, false);
|
||||
public static final MutableFlagWithSafeDefault sRecentlyClosedTabsAndWindows =
|
||||
newMutableFlagWithSafeDefault(RECENTLY_CLOSED_TABS_AND_WINDOWS, false);
|
||||
newMutableFlagWithSafeDefault(RECENTLY_CLOSED_TABS_AND_WINDOWS, true);
|
||||
public static final MutableFlagWithSafeDefault sRecordIncognitoNtpTimeToFirstNavigationMetric =
|
||||
newMutableFlagWithSafeDefault(
|
||||
RECORD_INCOGNITO_NTP_TIME_TO_FIRST_NAVIGATION_METRIC, true);
|
||||
public static final MutableFlagWithSafeDefault sRecordSuppressionMetrics =
|
||||
newMutableFlagWithSafeDefault(RECORD_SUPPRESSION_METRICS, true);
|
||||
public static final MutableFlagWithSafeDefault sRobustWindowManagement =
|
||||
newMutableFlagWithSafeDefault(ROBUST_WINDOW_MANAGEMENT, false);
|
||||
public static final MutableFlagWithSafeDefault sShowNewTabAnimations =
|
||||
newMutableFlagWithSafeDefault(SHOW_NEW_TAB_ANIMATIONS, true);
|
||||
newMutableFlagWithSafeDefault(ROBUST_WINDOW_MANAGEMENT, true);
|
||||
public static final MutableFlagWithSafeDefault sShowTabListAnimations =
|
||||
newMutableFlagWithSafeDefault(SHOW_TAB_LIST_ANIMATIONS, false);
|
||||
public static final MutableFlagWithSafeDefault sSuppressToolbarCapturesAtGestureEnd =
|
||||
newMutableFlagWithSafeDefault(SUPPRESS_TOOLBAR_CAPTURES_AT_GESTURE_END, false);
|
||||
public static final MutableFlagWithSafeDefault sTabBottomSheet =
|
||||
newMutableFlagWithSafeDefault(TAB_BOTTOM_SHEET, false);
|
||||
public static final MutableFlagWithSafeDefault sTabFreezingUsesDiscard =
|
||||
newMutableFlagWithSafeDefault(TAB_FREEZING_USES_DISCARD, true);
|
||||
public static final MutableFlagWithSafeDefault sTabSwitcherGroupSuggestionsAndroid =
|
||||
newMutableFlagWithSafeDefault(TAB_SWITCHER_GROUP_SUGGESTIONS_ANDROID, false);
|
||||
public static final MutableFlagWithSafeDefault sTabSwitcherGroupSuggestionsTestModeAndroid =
|
||||
@@ -1416,12 +1448,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final BooleanCachedFeatureParam sAndroidComposeplateSkipLocaleCheck =
|
||||
newBooleanCachedFeatureParam(ANDROID_COMPOSEPLATE, "skip_locale_check", false);
|
||||
|
||||
public static final BooleanCachedFeatureParam sAndroidComposeplateHideIncognitoButton =
|
||||
newBooleanCachedFeatureParam(ANDROID_COMPOSEPLATE, "hide_incognito_button", false);
|
||||
|
||||
public static final BooleanCachedFeatureParam sAndroidComposeplateV2Enabled =
|
||||
newBooleanCachedFeatureParam(ANDROID_COMPOSEPLATE, "v2_enabled", true);
|
||||
|
||||
public static final BooleanCachedFeatureParam
|
||||
sAndroidBottomToolbarV2ForceBottomForFocusedOmnibox =
|
||||
newBooleanCachedFeatureParam(
|
||||
@@ -1535,6 +1561,10 @@ public abstract class ChromeFeatureList {
|
||||
newStringCachedFeatureParam(
|
||||
CCT_RESIZABLE_FOR_THIRD_PARTIES, "default_policy", "use-denylist");
|
||||
|
||||
public static final StringCachedFeatureParam sDefaultBrowserPromoFreArm =
|
||||
newStringCachedFeatureParam(
|
||||
DEFAULT_BROWSER_PROMO_FRE, "fre_promo_arm", "rmd_direct_invocation");
|
||||
|
||||
/**
|
||||
* A cached parameter representing the amount of latency to inject during Clank startup based on
|
||||
* experiment configuration.
|
||||
@@ -1584,6 +1614,9 @@ public abstract class ChromeFeatureList {
|
||||
"daily_refresh_threshold_ms",
|
||||
(int) TimeUtils.MILLISECONDS_PER_DAY); // 1 day in milliseconds.
|
||||
|
||||
public static final BooleanCachedFeatureParam sNewTabPageCustomizationV2EnableLogs =
|
||||
newBooleanCachedFeatureParam(NEW_TAB_PAGE_CUSTOMIZATION_V2, "enable_logs", false);
|
||||
|
||||
/**
|
||||
* Param for the OEMs that need an exception for min versions. Its value should be a comma
|
||||
* separated list of integers, and its index should match {@link #sEdgeToEdgeBottomChinOemList}.
|
||||
@@ -1678,9 +1711,11 @@ public abstract class ChromeFeatureList {
|
||||
"read_aloud_audio_overviews_speed_addition_percentage",
|
||||
10);
|
||||
|
||||
public static final IntCachedFeatureParam sReadAloudReadabilityDelayMsAfterPageLoad =
|
||||
newIntCachedFeatureParam(
|
||||
READALOUD, "read_aloud_readability_delay_ms_after_page_load", 500);
|
||||
public static final StringCachedFeatureParam sReadAloudAudioOverviewsSupportedLanguages =
|
||||
newStringCachedFeatureParam(
|
||||
READALOUD_AUDIO_OVERVIEWS,
|
||||
"read_aloud_audio_overviews_supported_languages",
|
||||
"en");
|
||||
|
||||
public static final BooleanCachedFeatureParam sShouldConsiderLanguageInOverviewReadability =
|
||||
newBooleanCachedFeatureParam(
|
||||
@@ -1750,9 +1785,7 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidBookmarkBarShowBookmarkBar,
|
||||
sAndroidBottomToolbarV2ForceBottomForFocusedOmnibox,
|
||||
sAndroidBottomToolbarV2ReverseOrderSuggestionsList,
|
||||
sAndroidComposeplateHideIncognitoButton,
|
||||
sAndroidComposeplateSkipLocaleCheck,
|
||||
sAndroidComposeplateV2Enabled,
|
||||
sAndroidThemeModuleForceDependencies,
|
||||
sAndroidThemeResourceProviderForceLight,
|
||||
sAndroidTipsNotificationsAlwaysShowOptInPromo,
|
||||
@@ -1778,6 +1811,7 @@ public abstract class ChromeFeatureList {
|
||||
sClampAutomotiveScalingMaxScalingPercentage,
|
||||
sClankStartupLatencyInjectionAmountMs,
|
||||
sDefaultBrowserPromoEntryPointShowAppMenu,
|
||||
sDefaultBrowserPromoFreArm,
|
||||
sDesktopUAAllowedOnExternalDisplayForOem,
|
||||
sEdgeToEdgeBottomChinOemList,
|
||||
sEdgeToEdgeBottomChinOemMinVersions,
|
||||
@@ -1800,6 +1834,7 @@ public abstract class ChromeFeatureList {
|
||||
sNavBarColorAnimationDisableBottomChinColorAnimation,
|
||||
sNavBarColorAnimationDisableEdgeToEdgeLayoutColorAnimation,
|
||||
sNewTabPageCustomizationV2DailyRefreshThresholdMs,
|
||||
sNewTabPageCustomizationV2EnableLogs,
|
||||
sNewTabPageCustomizationV2ShowColorPicker,
|
||||
sNewTabPageCustomizationV2ShowLogoAndSearchBox,
|
||||
sNotificationTrampolineImmediateJobDurationMs,
|
||||
@@ -1810,7 +1845,7 @@ public abstract class ChromeFeatureList {
|
||||
sPCctMinimumHeightRatio,
|
||||
sPriceChangeModuleSkipShoppingPersistedTabDataDelayedInit,
|
||||
sReadAloudAudioOverviewsSpeedAdditionPercentage,
|
||||
sReadAloudReadabilityDelayMsAfterPageLoad,
|
||||
sReadAloudAudioOverviewsSupportedLanguages,
|
||||
sSearchinCctApplyReferrerId,
|
||||
sShouldConsiderLanguageInOverviewReadability,
|
||||
sStartSurfaceReturnTimeTabletSecs,
|
||||
@@ -1836,11 +1871,6 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidPinnedTabsSearchBoxSquishAnimation =
|
||||
sAndroidPinnedTabs.newBooleanParam("search_box_squish_animation", true);
|
||||
|
||||
public static final MutableIntParamWithSafeDefault sDisableInstanceLimitMemoryThresholdMb =
|
||||
sDisableInstanceLimit.newIntParam("max_instance_limit_memory_threshold_mb", 6500);
|
||||
public static final MutableIntParamWithSafeDefault sDisableInstanceLimitMaxCount =
|
||||
sDisableInstanceLimit.newIntParam("max_instance_limit", 20);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault
|
||||
sOmniboxAutofocusOnIncognitoNtpNotFirstTab =
|
||||
sOmniboxAutofocusOnIncognitoNtp.newBooleanParam("not_first_tab", false);
|
||||
@@ -1858,17 +1888,11 @@ public abstract class ChromeFeatureList {
|
||||
sOmniboxAutofocusOnIncognitoNtpNoZeroSuggest =
|
||||
sOmniboxAutofocusOnIncognitoNtp.newBooleanParam("disable_zero_suggest", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault sShowNewTabAnimationsLogs =
|
||||
sShowNewTabAnimations.newBooleanParam("logs", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault sAndroidTabHighlightingForceCtrlClick =
|
||||
sAndroidTabHighlighting.newBooleanParam("force_ctrl_click", false);
|
||||
public static final MutableBooleanParamWithSafeDefault sAndroidTabHighlightingForceShiftClick =
|
||||
sAndroidTabHighlighting.newBooleanParam("force_shift_click", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault sTabBottomSheetDontShowFusebox =
|
||||
sTabBottomSheet.newBooleanParam("dont_show_fusebox", false);
|
||||
public static final MutableBooleanParamWithSafeDefault sTabBottomSheetResizeWebview =
|
||||
sTabBottomSheet.newBooleanParam("resize_webview", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault sRobustWindowManagementBulkClose =
|
||||
sRobustWindowManagement.newBooleanParam("bulk_close", false);
|
||||
sRobustWindowManagement.newBooleanParam("bulk_close", true);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "chrome/browser/enterprise/util/managed_browser_utils.h"
|
||||
#include "chrome/browser/external_protocol/external_protocol_handler.h"
|
||||
#include "chrome/browser/first_run/first_run.h"
|
||||
#include "chrome/browser/glic/glic_pref_names.h"
|
||||
#include "chrome/browser/gpu/gpu_mode_manager.h"
|
||||
#include "chrome/browser/lifetime/browser_shutdown.h"
|
||||
#include "chrome/browser/login_detection/login_detection_prefs.h"
|
||||
@@ -74,6 +75,7 @@
|
||||
#include "chrome/browser/serial/serial_policy_allowed_ports.h"
|
||||
#include "chrome/browser/sharing_hub/sharing_hub_features.h"
|
||||
#include "chrome/browser/signin/chrome_signin_client.h"
|
||||
#include "chrome/browser/signin/signin_promo_util.h"
|
||||
#include "chrome/browser/ssl/ssl_config_service_manager.h"
|
||||
#include "chrome/browser/subscription_eligibility/subscription_eligibility_prefs.h"
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
@@ -85,6 +87,7 @@
|
||||
#include "chrome/browser/ui/safety_hub/safety_hub_prefs.h"
|
||||
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
|
||||
#include "chrome/browser/ui/tabs/projects/projects_prefs.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_prefs.h"
|
||||
#include "chrome/browser/ui/toolbar/chrome_labs/chrome_labs_prefs.h"
|
||||
#include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h"
|
||||
#include "chrome/browser/ui/toolbar/toolbar_pref_names.h"
|
||||
@@ -216,8 +219,8 @@
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
#include "chrome/browser/extensions/activity_log/activity_log.h"
|
||||
#include "chrome/browser/extensions/commands/command_service.h"
|
||||
#include "chrome/browser/extensions/extension_url_overrides.h"
|
||||
#include "chrome/browser/extensions/extension_util.h"
|
||||
#include "chrome/browser/extensions/extension_web_ui.h"
|
||||
#include "chrome/browser/ui/webui/extensions/extensions_ui_prefs.h"
|
||||
#include "extensions/browser/api/runtime/runtime_api.h"
|
||||
#include "extensions/browser/extension_prefs.h"
|
||||
@@ -237,6 +240,8 @@
|
||||
#include "chrome/browser/pdf/pdf_pref_names.h"
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
|
||||
#include "chrome/browser/media/unified_autoplay_config.h"
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h"
|
||||
#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
|
||||
@@ -244,6 +249,7 @@
|
||||
#include "chrome/browser/android/preferences/browser_prefs_android.h"
|
||||
#include "chrome/browser/android/preferences/shared_preferences_migrator_android.h"
|
||||
#include "chrome/browser/android/usage_stats/usage_stats_bridge.h"
|
||||
#include "chrome/browser/auxiliary_search/auxiliary_search_donation_service.h"
|
||||
#include "chrome/browser/first_run/android/first_run_prefs.h"
|
||||
#include "chrome/browser/lens/android/lens_prefs.h"
|
||||
#include "chrome/browser/media/android/cdm/media_drm_origin_id_manager.h"
|
||||
@@ -260,12 +266,12 @@
|
||||
#include "components/webapps/browser/android/install_prompt_prefs.h"
|
||||
#else // BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/actor/ui/actor_ui_state_manager_prefs.h"
|
||||
#include "chrome/browser/desktop_to_mobile_promos/promos_utils.h" // nogncheck crbug.com/1125897
|
||||
#include "chrome/browser/gcm/gcm_product_util.h"
|
||||
#include "chrome/browser/hid/hid_policy_allowed_devices.h"
|
||||
#include "chrome/browser/intranet_redirect_detector.h"
|
||||
#include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h"
|
||||
#include "chrome/browser/media/router/media_router_feature.h"
|
||||
#include "chrome/browser/media/unified_autoplay_config.h"
|
||||
#include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h"
|
||||
#include "chrome/browser/new_tab_page/modules/file_suggestion/drive_service.h"
|
||||
#include "chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files_page_handler.h"
|
||||
@@ -276,7 +282,6 @@
|
||||
#include "chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/promos/promo_service.h"
|
||||
#include "chrome/browser/promos/promos_utils.h" // nogncheck crbug.com/1125897
|
||||
#include "chrome/browser/screen_ai/pref_names.h"
|
||||
#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service.h"
|
||||
#include "chrome/browser/signin/signin_promo.h"
|
||||
@@ -286,12 +291,12 @@
|
||||
#include "chrome/browser/ui/hats/hats_service_desktop.h"
|
||||
#include "chrome/browser/ui/read_anything/read_anything_prefs.h"
|
||||
#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h"
|
||||
#include "chrome/browser/ui/side_panel/side_panel_prefs.h"
|
||||
#include "chrome/browser/ui/startup/startup_browser_creator.h"
|
||||
#include "chrome/browser/ui/tabs/organization/prefs.h"
|
||||
#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
|
||||
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_pref_names.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_prefs.h"
|
||||
#include "chrome/browser/ui/views/side_panel/side_panel_prefs.h"
|
||||
#include "chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.h"
|
||||
#include "chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.h"
|
||||
#include "chrome/browser/ui/webui/history/foreign_session_handler.h"
|
||||
@@ -542,10 +547,6 @@
|
||||
#include "components/enterprise/data_controls/core/browser/prefs.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_GLIC)
|
||||
#include "chrome/browser/glic/glic_pref_names.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
|
||||
#include "components/safe_browsing/content/common/file_type_policies_prefs.h"
|
||||
#endif
|
||||
@@ -980,6 +981,28 @@ constexpr char kGlicGuestUrlPresetProd[] = "glic.guest_url_preset_prod";
|
||||
// Deprecated 02/2026.
|
||||
constexpr char kProfilesDeletedOld[] = "profiles.profiles_deleted";
|
||||
|
||||
// Deprecated 02/2026.
|
||||
inline constexpr char kExplicitBrowserSigninWithoutFeatureEnabled[] =
|
||||
"signin.explicit_browser_signin";
|
||||
|
||||
// Deprecated 02/2026.
|
||||
constexpr char kDiceMigrationDialogShownCount[] =
|
||||
"signin.dice_migration.dialog_shown_count";
|
||||
constexpr char kDiceMigrationDialogLastShownTime[] =
|
||||
"signin.dice_migration.dialog_last_shown_time";
|
||||
constexpr char kDiceMigrationBackup[] = "signin.dice_migration.backup";
|
||||
constexpr char kDiceMigrationRestoredFromBackup[] =
|
||||
"signin.dice_migration.restored_from_backup";
|
||||
|
||||
// Deprecated 02/2026.
|
||||
inline constexpr char kTabSearchOpened[] = "tab_search.opened";
|
||||
|
||||
// Deprecated 02/2026.
|
||||
constexpr char kTabOrganizationFeature[] = "tab_organization.feature";
|
||||
|
||||
// Deprecated 03/2026.
|
||||
constexpr char kTabDeclutterUsageCount[] = "tab_declutter.usage_count";
|
||||
|
||||
// Register local state used only for migration (clearing or moving to a new
|
||||
// key).
|
||||
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
@@ -1359,6 +1382,25 @@ void RegisterProfilePrefsForMigration(
|
||||
registry->RegisterStringPref(kGlicGuestUrlPresetAutopush, std::string());
|
||||
registry->RegisterStringPref(kGlicGuestUrlPresetPreprod, std::string());
|
||||
registry->RegisterStringPref(kGlicGuestUrlPresetProd, std::string());
|
||||
|
||||
// Deprecated 02/2026.
|
||||
registry->RegisterBooleanPref(kExplicitBrowserSigninWithoutFeatureEnabled,
|
||||
false);
|
||||
|
||||
// Deprecated 02/2026.
|
||||
registry->RegisterIntegerPref(kDiceMigrationDialogShownCount, 0);
|
||||
registry->RegisterTimePref(kDiceMigrationDialogLastShownTime, base::Time());
|
||||
registry->RegisterDictionaryPref(kDiceMigrationBackup);
|
||||
registry->RegisterBooleanPref(kDiceMigrationRestoredFromBackup, false);
|
||||
|
||||
// Deprecated 02/2026.
|
||||
registry->RegisterBooleanPref(kTabSearchOpened, false);
|
||||
|
||||
// Deprecated 02/2026.
|
||||
registry->RegisterIntegerPref(kTabOrganizationFeature, 0);
|
||||
|
||||
// Deprecated 03/2026.
|
||||
registry->RegisterIntegerPref(kTabDeclutterUsageCount, 0);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -1661,17 +1703,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
registry->RegisterBooleanPref(prefs::kUiAutomationProviderEnabled, false);
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kQRCodeGeneratorEnabled, true);
|
||||
|
||||
registry->RegisterIntegerPref(prefs::kChromeDataRegionSetting, 0);
|
||||
|
||||
#if BUILDFLAG(ENABLE_GLIC)
|
||||
glic::prefs::RegisterLocalStatePrefs(registry);
|
||||
#endif
|
||||
|
||||
registry->RegisterIntegerPref(prefs::kToastAlertLevel, 0);
|
||||
|
||||
@@ -1722,9 +1758,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
enterprise_reporting::RegisterProfilePrefs(registry);
|
||||
dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
|
||||
DownloadPrefs::RegisterProfilePrefs(registry);
|
||||
#if BUILDFLAG(ENABLE_GLIC)
|
||||
glic::prefs::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
permissions::PermissionHatsTriggerHelper::RegisterProfilePrefs(registry);
|
||||
history_clusters::prefs::RegisterProfilePrefs(registry);
|
||||
HostContentSettingsMap::RegisterProfilePrefs(registry);
|
||||
@@ -1797,6 +1831,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
registry);
|
||||
SessionStartupPref::RegisterProfilePrefs(registry);
|
||||
SharingSyncPreference::RegisterProfilePrefs(registry);
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
signin::AvatarButtonPromoManager::RegisterProfilePrefs(registry);
|
||||
#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
SigninPrefs::RegisterProfilePrefs(registry);
|
||||
site_engagement::SiteEngagementService::RegisterProfilePrefs(registry);
|
||||
subscription_eligibility::prefs::RegisterProfilePrefs(registry);
|
||||
@@ -1829,7 +1866,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
extensions::CommandService::RegisterProfilePrefs(registry);
|
||||
extensions::util::RegisterProfilePrefs(registry);
|
||||
extensions_ui_prefs::RegisterProfilePrefs(registry);
|
||||
ExtensionWebUI::RegisterProfilePrefs(registry);
|
||||
ExtensionUrlOverrides::RegisterProfilePrefs(registry);
|
||||
update_client::RegisterProfilePrefs(registry);
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
@@ -1861,7 +1898,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
|
||||
UnifiedAutoplayConfig::RegisterProfilePrefs(registry);
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
AuxiliarySearchDonationService::RegisterProfilePrefs(registry);
|
||||
feed::prefs::RegisterFeedSharedProfilePrefs(registry);
|
||||
feed::RegisterProfilePrefs(registry);
|
||||
cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
|
||||
@@ -1918,7 +1958,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
ThemeColorPickerHandler::RegisterProfilePrefs(registry);
|
||||
ThemeService::RegisterProfilePrefs(registry);
|
||||
toolbar::RegisterProfilePrefs(registry);
|
||||
UnifiedAutoplayConfig::RegisterProfilePrefs(registry);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(ENABLE_DEVTOOLS_FRONTEND)
|
||||
@@ -1940,8 +1979,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
registry->RegisterBooleanPref(prefs::kDeskAPIDeskSaveAndShareEnabled, false);
|
||||
registry->RegisterListPref(prefs::kDeskAPIThirdPartyAllowlist);
|
||||
registry->RegisterBooleanPref(prefs::kInsightsExtensionEnabled, false);
|
||||
registry->RegisterBooleanPref(prefs::kEssentialSearchEnabled, false);
|
||||
registry->RegisterBooleanPref(prefs::kLastEssentialSearchValue, false);
|
||||
registry->RegisterBooleanPref(ash::prefs::kEssentialSearchEnabled, false);
|
||||
registry->RegisterBooleanPref(ash::prefs::kLastEssentialSearchValue, false);
|
||||
// By default showing Sync Consent is set to true. It can changed by policy.
|
||||
registry->RegisterBooleanPref(prefs::kEnableSyncConsent, true);
|
||||
registry->RegisterListPref(
|
||||
@@ -2168,6 +2207,16 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
registry->RegisterBooleanPref(prefs::kAndroidTipNotificationShownLens, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kAndroidTipNotificationShownBottomOmnibox, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kAndroidTipNotificationShownPasswordAutofill, false);
|
||||
registry->RegisterBooleanPref(prefs::kAndroidTipNotificationShownSignin,
|
||||
false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kAndroidTipNotificationShownCreateTabGroups, false);
|
||||
registry->RegisterBooleanPref(prefs::kAndroidTipNotificationShownCustomizeMVT,
|
||||
false);
|
||||
registry->RegisterBooleanPref(prefs::kAndroidTipNotificationShownRecentTabs,
|
||||
false);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kStaticStorageQuotaEnabled, false);
|
||||
@@ -2646,6 +2695,20 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
profile_prefs->ClearPref(kGlicGuestUrlPresetPreprod);
|
||||
profile_prefs->ClearPref(kGlicGuestUrlPresetProd);
|
||||
|
||||
// Added 02/2026.
|
||||
profile_prefs->ClearPref(kExplicitBrowserSigninWithoutFeatureEnabled);
|
||||
|
||||
// Added 02/2026.
|
||||
profile_prefs->ClearPref(kTabSearchOpened);
|
||||
|
||||
// Added 03/2026.
|
||||
profile_prefs->ClearPref(kTabDeclutterUsageCount);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Added 02/2026.
|
||||
tabs::MigrateTabSearchPref(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Please don't delete the following line. It is used by PRESUBMIT.py.
|
||||
// END_MIGRATE_OBSOLETE_PROFILE_PREFS
|
||||
|
||||
|
||||
@@ -32,9 +32,12 @@
|
||||
#include "chrome/browser/file_system_access/file_system_access_features.h"
|
||||
#include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
|
||||
#include "chrome/browser/file_system_access/file_system_access_tab_helper.h"
|
||||
#include "chrome/browser/finds/core/finds_tab_helper.h"
|
||||
#include "chrome/browser/finds/finds_service_factory.h"
|
||||
#include "chrome/browser/history/history_tab_helper.h"
|
||||
#include "chrome/browser/history/top_sites_factory.h"
|
||||
#include "chrome/browser/history_clusters/history_clusters_tab_helper.h"
|
||||
#include "chrome/browser/history_embeddings/history_embeddings_service_factory.h"
|
||||
#include "chrome/browser/history_embeddings/history_embeddings_tab_helper.h"
|
||||
#include "chrome/browser/image_fetcher/image_fetcher_service_factory.h"
|
||||
#include "chrome/browser/login_detection/login_detection_tab_helper.h"
|
||||
@@ -442,9 +445,24 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
download::NavigationMonitorFactory::GetForKey(profile->GetProfileKey()));
|
||||
history::WebContentsTopSitesObserver::CreateForWebContents(
|
||||
web_contents, TopSitesFactory::GetForProfile(profile).get());
|
||||
HistoryTabHelper::CreateForWebContents(web_contents);
|
||||
HistoryClustersTabHelper::CreateForWebContents(web_contents);
|
||||
HistoryEmbeddingsTabHelper::CreateForWebContents(web_contents);
|
||||
{
|
||||
auto* history_tab_helper =
|
||||
HistoryTabHelper::GetOrCreateForWebContents(web_contents);
|
||||
HistoryClustersTabHelper::CreateForWebContents(web_contents,
|
||||
history_tab_helper);
|
||||
if (HistoryEmbeddingsServiceFactory::GetForProfile(profile)) {
|
||||
HistoryEmbeddingsTabHelper::CreateForWebContents(web_contents);
|
||||
auto* history_embeddings_tab_helper =
|
||||
HistoryEmbeddingsTabHelper::FromWebContents(web_contents);
|
||||
if (history_tab_helper && history_embeddings_tab_helper) {
|
||||
history_embeddings_tab_helper->SetHistoryTabHelperSubscription(
|
||||
history_tab_helper->RegisterOnUpdatedHistoryForNavigationCallback(
|
||||
base::BindRepeating(
|
||||
&HistoryEmbeddingsTabHelper::OnUpdatedHistoryForNavigation,
|
||||
history_embeddings_tab_helper->GetWeakPtr())));
|
||||
}
|
||||
}
|
||||
}
|
||||
HttpsOnlyModeTabHelper::CreateForWebContents(web_contents);
|
||||
webapps::InstallableManager::CreateForWebContents(web_contents);
|
||||
login_detection::LoginDetectionTabHelper::MaybeCreateForWebContents(
|
||||
@@ -618,6 +636,11 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
}
|
||||
ContextMenuHelper::CreateForWebContents(web_contents);
|
||||
|
||||
if (base::FeatureList::IsEnabled(chrome::android::kChromeFinds)) {
|
||||
finds::FindsTabHelper::CreateForWebContents(
|
||||
web_contents, finds::FindsServiceFactory::GetForProfile(profile));
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
page_load_metrics::features::kBeaconLeakageLogging)) {
|
||||
FromGWSNavigationAndKeepAliveRequestTabHelper::CreateForWebContents(
|
||||
|
||||
@@ -159,6 +159,13 @@ namespace autofillPrivate {
|
||||
FLIGHT_RESERVATION_ARRIVAL_AIRPORT,
|
||||
FLIGHT_RESERVATION_DEPARTURE_DATE,
|
||||
ADDRESS_HOME_ZIP_AND_CITY,
|
||||
ORDER_ID,
|
||||
ORDER_DATE,
|
||||
ORDER_MERCHANT_NAME,
|
||||
ORDER_MERCHANT_DOMAIN,
|
||||
ORDER_PRODUCT_NAMES,
|
||||
ORDER_ACCOUNT,
|
||||
ORDER_GRAND_TOTAL,
|
||||
MAX_VALID_FIELD_TYPE
|
||||
};
|
||||
|
||||
|
||||
@@ -534,16 +534,9 @@ namespace developerPrivate {
|
||||
};
|
||||
|
||||
dictionary RequestFileSourceResponse {
|
||||
// The region of the code which threw the error, and should be highlighted.
|
||||
DOMString highlight;
|
||||
|
||||
// The region before the "highlight" portion.
|
||||
// If the region which threw the error was not found, the full contents of
|
||||
// the file will be in the "beforeHighlight" section.
|
||||
DOMString beforeHighlight;
|
||||
|
||||
// The region after the "highlight" portion.
|
||||
DOMString afterHighlight;
|
||||
// The source code related to the request. Only populated if the file
|
||||
// was successfully read.
|
||||
ErrorFileSource? source;
|
||||
|
||||
// A title for the file in the form '<extension name>: <file name>'.
|
||||
DOMString title;
|
||||
|
||||
@@ -21,15 +21,11 @@ namespace enterprise.platformKeys {
|
||||
// interface. The cryptographic operations, including key generation, are
|
||||
// hardware-backed.
|
||||
// <p>Only non-extractable keys can be generated. The supported key types
|
||||
// are RSASSA-PKCS1-V1_5 and RSA-OAEP (on Chrome versions 135+) with
|
||||
// <code>modulusLength</code> up to 2048 and ECDSA with
|
||||
// <code>namedCurve</code> P-256. Each RSASSA-PKCS1-V1_5 and ECDSA key can
|
||||
// be used for signing data at most once, unless the extension is
|
||||
// allowlisted through the
|
||||
// are RSASSA-PKCS1-V1_5 with <code>modulusLength</code> up to 2048 and
|
||||
// ECDSA with <code>namedCurve</code> P-256. Each key can be used for
|
||||
// signing data at most once, unless the extension is allowlisted by the
|
||||
// <a href="https://chromeenterprise.google/policies/#KeyPermissions">KeyPermissions policy</a>,
|
||||
// in which case the key can be used indefinitely. RSA-OAEP keys are
|
||||
// supported since Chrome version 135 and can be used by extensions
|
||||
// allowlisted through that same policy to unwrap other keys.</p>
|
||||
// in which case the key can be used indefinitely.</p>
|
||||
// <p>Keys generated on a specific <code>Token</code> cannot be used with
|
||||
// any other Tokens, nor can they be used with
|
||||
// <code>window.crypto.subtle</code>. Equally, <code>Key</code> objects
|
||||
@@ -43,15 +39,12 @@ namespace enterprise.platformKeys {
|
||||
// software-backed. Protection of the keys, and thus implementation of the
|
||||
// non-extractable property, is done in software, so the keys are less
|
||||
// protected than hardware-backed keys.
|
||||
// <p>Only non-extractable keys can be generated. The supported key types
|
||||
// are RSASSA-PKCS1-V1_5 and RSA-OAEP (on Chrome versions 135+) with
|
||||
// <code>modulusLength</code> up to 2048. Each RSASSA-PKCS1-V1_5 key can be
|
||||
// used for signing data at most once, unless the extension is allowlisted
|
||||
// through the
|
||||
// <p>Only non-extractable keys can be generated. The only supported key
|
||||
// type is RSASSA-PKCS1-V1_5 with <code>modulusLength</code> up to 2048.
|
||||
// Each key can be used for signing data at most once, unless the extension
|
||||
// is allowlisted through the
|
||||
// <a href="https://chromeenterprise.google/policies/#KeyPermissions">KeyPermissions policy</a>,
|
||||
// in which case the key can be used indefinitely. RSA-OAEP keys are
|
||||
// supported since Chrome version 135 and can be used by extensions
|
||||
// allowlisted through that same policy to unwrap other keys.</p>
|
||||
// in which case the key can be used indefinitely.</p>
|
||||
// <p>Keys generated on a specific <code>Token</code> cannot be used with
|
||||
// any other Tokens, nor can they be used with
|
||||
// <code>window.crypto.subtle</code>. Equally, <code>Key</code> objects
|
||||
|
||||
+2
-3
@@ -21,8 +21,7 @@ namespace enterprise.platformKeysInternal {
|
||||
// Provided for all algorithms.
|
||||
DOMString name;
|
||||
|
||||
// Provided in case the algorithm is RSASSA-PKCS1-v1_5 or RSA-OAEP
|
||||
// (the last type is supported on Chrome versions 135+).
|
||||
// Provided in case the algorithm is RSASSA-PKCS1-v1_5.
|
||||
long? modulusLength;
|
||||
ArrayBuffer? publicExponent;
|
||||
Hash? hash;
|
||||
@@ -46,7 +45,7 @@ namespace enterprise.platformKeysInternal {
|
||||
static void getTokens(GetTokensCallback callback);
|
||||
|
||||
// Internal version of SubtleCrypto.generateKey, currently supporting only
|
||||
// RSASSA-PKCS1-v1_5, RSA-OAEP (on Chrome versions 135+), and ECDSA.
|
||||
// RSASSA-PKCS1-v1_5 and ECDSA.
|
||||
// |tokenId| The id of a Token returned by |getTokens|.
|
||||
// |algorithm| The algorithm parameters as specified by WebCrypto.
|
||||
// |softwareBacked| Whether the key operations should be executed in
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
#include "components/feed/content/renderer/rss_link_reader.h"
|
||||
#include "components/feed/feed_feature_list.h"
|
||||
#else
|
||||
#include "chrome/common/record_replay/record_replay_features.h"
|
||||
#include "chrome/renderer/record_replay/record_replay_agent.h"
|
||||
#include "chrome/renderer/searchbox/searchbox.h"
|
||||
#include "chrome/renderer/searchbox/searchbox_extension.h"
|
||||
#include "components/search/ntp_features.h" // nogncheck
|
||||
@@ -521,6 +523,10 @@ void ChromeContentRendererClient::RenderThreadStarted() {
|
||||
// processes can't display it or read it. (see http://crbug.com/40309067 for
|
||||
// more context on why chrome-search scheme registration is skipped for the
|
||||
// instant process).
|
||||
// TODO(crbug.com/40309067): When kInstantUsesSpareRenderer is shipped, the
|
||||
// kInstantProcess command-line switch and all code that depends on it will be
|
||||
// removed. Remove this display-isolation policy block as part of that
|
||||
// cleanup.
|
||||
bool should_restrict_chrome_search_scheme =
|
||||
!command_line->HasSwitch(switches::kInstantProcess);
|
||||
|
||||
@@ -694,6 +700,13 @@ void ChromeContentRendererClient::RenderFrameCreated(
|
||||
associated_interfaces);
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(
|
||||
record_replay::features::kRecordReplayBase)) {
|
||||
new record_replay::RecordReplayAgent(render_frame, associated_interfaces);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (content_capture::features::IsContentCaptureEnabled()) {
|
||||
new content_capture::ContentCaptureSender(render_frame,
|
||||
associated_interfaces);
|
||||
@@ -759,7 +772,8 @@ void ChromeContentRendererClient::RenderFrameCreated(
|
||||
}
|
||||
#endif
|
||||
|
||||
if (base::FeatureList::IsEnabled(wallet::kWalletablePassDetection) &&
|
||||
if (base::FeatureList::IsEnabled(
|
||||
wallet::features::kWalletablePassDetection) &&
|
||||
render_frame->IsMainFrame()) {
|
||||
wallet::ImageExtractor::Create(render_frame, registry);
|
||||
}
|
||||
@@ -1223,44 +1237,6 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel(
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChromeContentRendererClient::WaitForProcessReady() {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (!base::FeatureList::IsEnabled(features::kInstantUsesSpareRenderer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool process_was_ready = chrome_observer_->IsProcessReady();
|
||||
bool is_extension = IsStandaloneContentExtensionProcess();
|
||||
base::UmaHistogramBoolean(
|
||||
is_extension ? "Renderer.ProcessReadyWaitRequired.ExtensionProcess"
|
||||
: "Renderer.ProcessReadyWaitRequired.RegularProcess",
|
||||
!process_was_ready);
|
||||
if (process_was_ready) {
|
||||
return;
|
||||
}
|
||||
|
||||
base::TimeTicks start_time = base::TimeTicks::Now();
|
||||
base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_wait;
|
||||
bool ready_within_timeout =
|
||||
chrome_observer_->WaitForProcessReady(base::Seconds(5));
|
||||
// Add DumpWithoutCrashing() if the process did not become ready after 5
|
||||
// seconds. After the timeout, the wait is skipped and execution continues.
|
||||
// TODO(http://crbug.com/434977609): Determine whether a crash should be
|
||||
// triggered after a timeout, as this may pose a security risk.
|
||||
if (!ready_within_timeout) {
|
||||
SCOPED_CRASH_KEY_BOOL("WaitForProcessReady", "IsExtensionProcess",
|
||||
is_extension);
|
||||
base::debug::DumpWithoutCrashing();
|
||||
}
|
||||
|
||||
base::TimeDelta wait_duration = base::TimeTicks::Now() - start_time;
|
||||
base::UmaHistogramTimes(
|
||||
is_extension ? "Renderer.WaitTimeForProcessReady.ExtensionProcess"
|
||||
: "Renderer.WaitTimeForProcessReady.RegularProcess",
|
||||
wait_duration);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
}
|
||||
|
||||
void ChromeContentRendererClient::WillSendRequest(
|
||||
WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
@@ -1482,6 +1458,8 @@ void ChromeContentRendererClient::
|
||||
blink::WebRuntimeFeatures::EnableAIWriterAPIForWorkers(true);
|
||||
blink::WebRuntimeFeatures::EnableLanguageDetectionAPIForWorkers(true);
|
||||
blink::WebRuntimeFeatures::EnableTranslationAPIForWorkers(true);
|
||||
blink::WebRuntimeFeatures::EnableLanguageModelLegacyParamsAndAttributes(
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1533,12 +1511,14 @@ void ChromeContentRendererClient::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
void ChromeContentRendererClient::DidStartServiceWorkerContextOnWorkerThread(
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url) {
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
extensions::ExtensionsRendererClient::Get()
|
||||
->dispatcher()
|
||||
->DidStartServiceWorkerContextOnWorkerThread(
|
||||
service_worker_version_id, service_worker_scope, script_url);
|
||||
service_worker_version_id, service_worker_scope, script_url,
|
||||
service_worker_token);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1546,12 +1526,14 @@ void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url) {
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
extensions::ExtensionsRendererClient::Get()
|
||||
->dispatcher()
|
||||
->WillDestroyServiceWorkerContextOnWorkerThread(
|
||||
context, service_worker_version_id, service_worker_scope, script_url);
|
||||
context, service_worker_version_id, service_worker_scope, script_url,
|
||||
service_worker_token);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1595,8 +1577,8 @@ bool ChromeContentRendererClient::IsSafeRedirectTarget(
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
if (target_url.SchemeIs(extensions::kExtensionScheme)) {
|
||||
const extensions::Extension* extension =
|
||||
extensions::RendererExtensionRegistry::Get()->GetByID(
|
||||
target_url.GetHost());
|
||||
extensions::RendererExtensionRegistry::Get()->GetExtensionOrAppByURL(
|
||||
target_url, /*include_guid=*/true);
|
||||
if (!extension) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1431,6 +1431,8 @@ policies:
|
||||
1430: LocalNetworkAccessPermissionsPolicyDefaultEnabled
|
||||
1431: ForceForegroundPriorityForAllTabs
|
||||
1432: WebRtcDiagnosticLogCollectionAllowedForOrigins
|
||||
1433: IsolatedWebAppUserInstallationEnabled
|
||||
1434: ExtensionDOMActivityLoggingEnabled
|
||||
|
||||
atomic_groups:
|
||||
1: Homepage
|
||||
|
||||
+2
-1
@@ -41,7 +41,8 @@ desc: |-
|
||||
Support for this policy setting will end in <ph
|
||||
name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> 146.
|
||||
supported_on:
|
||||
- chrome.win:125-
|
||||
- chrome.win:125-146
|
||||
deprecated: true
|
||||
features:
|
||||
dynamic_refresh: false
|
||||
per_profile: false
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ features:
|
||||
dynamic_refresh: true
|
||||
per_profile: false
|
||||
cloud_only: true
|
||||
future_on:
|
||||
- chrome.*
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
owners:
|
||||
- janzarzycki@google.com
|
||||
- igorruvinov@chromium.org
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ features:
|
||||
per_profile: true
|
||||
user_only: true
|
||||
cloud_only: true
|
||||
future_on:
|
||||
- chrome.*
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
owners:
|
||||
- janzarzycki@google.com
|
||||
- igorruvinov@chromium.org
|
||||
|
||||
-2
@@ -10,8 +10,6 @@ desc: |-
|
||||
|
||||
Not setting the policy, or setting it to '<ph name="DEFAULT_NAME">default</ph>', configures <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> to use its default key exchange methods.
|
||||
|
||||
If this policy is set to a value that would configure <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> to prefer a post-quantum key agreement algorithm but <ph name="DEVICE_POST_QUANTUM_KEY_AGREEMENT_ENABLED_POLICY_NAME">DevicePostQuantumKeyAgreementEnabled</ph> is Disabled, the setting of <ph name="DEVICE_POST_QUANTUM_KEY_AGREEMENT_ENABLED_POLICY_NAME">DevicePostQuantumKeyAgreementEnabled</ph> takes precedence.
|
||||
|
||||
Setting this policy is not required for security. The default cryptography used by <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> is strong enough to withstand a brute force attack using the entire power of the Sun.
|
||||
|
||||
Setting this policy will cause <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> to be slower when making network requests from the login screen.
|
||||
|
||||
-2
@@ -10,8 +10,6 @@ desc: |-
|
||||
|
||||
Not setting the policy, or setting it to '<ph name="DEFAULT_NAME">default</ph>', configures <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> to use its default key exchange methods.
|
||||
|
||||
If this policy is set to a value that would configure <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> to prefer a post-quantum key agreement algorithm but <ph name="POST_QUANTUM_KEY_AGREEMENT_ENABLED_POLICY_NAME">PostQuantumKeyAgreementEnabled</ph> is Disabled, the setting of <ph name="POST_QUANTUM_KEY_AGREEMENT_ENABLED_POLICY_NAME">PostQuantumKeyAgreementEnabled</ph> takes precedence.
|
||||
|
||||
Setting this policy is not required for security. The default cryptography used by <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is strong enough to withstand a brute force attack using the entire power of the Sun.
|
||||
|
||||
Setting this policy will cause <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> to be slower when accessing websites.
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ items:
|
||||
Web Store
|
||||
value: false
|
||||
owners:
|
||||
- waffles@chromium.org
|
||||
- sorin@chromium.org
|
||||
- rdevlin.cronin@chromium.org
|
||||
schema:
|
||||
type: boolean
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
owners:
|
||||
- anunoy@chromium.org
|
||||
- file://components/policy/OWNERS
|
||||
caption: Control extension DOM activity logging
|
||||
desc: |-
|
||||
Control whether extension DOM activity logging is enabled for enterprise users.
|
||||
|
||||
Setting the policy to Enabled turns on telemetry for extension DOM activity. This includes monitoring code injection and sensitive data access by extensions.
|
||||
|
||||
If this policy is set to Enabled, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> will collect and transmit signals about extension interactions with web pages to the Extension Telemetry Service for security auditing.
|
||||
If this policy is set to Disabled or not set, these signals are not collected or transmitted for enterprise users.
|
||||
|
||||
Actual values of sensitive data (like cookies or input values) are NOT collected, only the fact that they were accessed.
|
||||
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
- android
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
default: false
|
||||
example_value: true
|
||||
items:
|
||||
- caption: Enable extension DOM activity logging
|
||||
value: true
|
||||
- caption: Disable extension DOM activity logging
|
||||
value: false
|
||||
schema:
|
||||
type: boolean
|
||||
tags: []
|
||||
type: main
|
||||
+6
-2
@@ -1,8 +1,12 @@
|
||||
caption: Extension management settings
|
||||
desc: |-
|
||||
Setting the policy controls extension management settings for <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>, including any controlled by existing extension-related policies. The policy supersedes any legacy policies that might be set.
|
||||
Setting the policy controls extension management settings for <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>, including any controlled by existing extension-related policies.
|
||||
|
||||
This policy maps an extension ID or an update URL to its specific setting only. A default configuration can be set for the special ID <ph name="DEFAULT_SCOPE">"*"</ph>, which applies to all extensions without a custom configuration in this policy. With an update URL, configuration applies to extensions with the exact update URL stated in the extension manifest ( http://support.google.com/chrome/a?p=Configure_ExtensionSettings_policy ). If the 'override_update_url' flag is set to true, the extension is installed and updated using the "update" URL specified in the <ph name="EXTENSION_INSTALL_FORCELIST_POLICY_NAME">ExtensionInstallForcelist</ph> policy or in 'update_url' field in this policy. The flag 'override_update_url' is ignored if the 'update_url' is a Chrome Web Store url.
|
||||
This policy maps an extension ID or an update URL to its specific setting only. A default configuration can be set for the special ID <ph name="DEFAULT_SCOPE">"*"</ph>, which applies to all extensions without a custom configuration in this policy.
|
||||
|
||||
This policy can override per-extension config from legacy policies.
|
||||
|
||||
Note that any per-ID extension setting from either <ph name="EXTENSION_INSTALL_FORCELIST_POLICY_NAME">ExtensionInstallForcelist</ph>, <ph name="EXTENSION_INSTALL_ALLOWLIST_POLICY_NAME">ExtensionInstallAllowlist</ph>, <ph name="EXTENSION_INSTALL_BLOCKLIST_POLICY_NAME">ExtensionInstallBlocklist</ph>, or <ph name="EXTENSION_SETTINGS_POLICY_NAME">ExtensionSettings</ph> will only inherit 'installation_mode' and 'update_url' from the <ph name="DEFAULT_SCOPE">"*"</ph> defaults. It will not inherit any other properties. With an update URL, configuration applies to extensions with the exact update URL stated in the extension manifest ( http://support.google.com/chrome/a?p=Configure_ExtensionSettings_policy ). If the 'override_update_url' flag is set to true, the extension is installed and updated using the "update" URL specified in the <ph name="EXTENSION_INSTALL_FORCELIST_POLICY_NAME">ExtensionInstallForcelist</ph> policy or in 'update_url' field in this policy. The flag 'override_update_url' is ignored if the 'update_url' is a Chrome Web Store url.
|
||||
|
||||
On <ph name="MS_WIN_NAME">Microsoft® Windows®</ph> instances, apps and extensions from outside the Chrome Web Store can only be forced installed if the instance is joined to a <ph name="MS_AD_NAME">Microsoft® Active Directory®</ph> domain, joined to <ph name="MS_AAD_NAME">Microsoft® Azure® Active Directory®</ph> or enrolled in <ph name="CHROME_ENTERPRISE_CORE_NAME">Chrome Enterprise Core</ph>.
|
||||
|
||||
|
||||
+1
@@ -11,3 +11,4 @@ Extensions:
|
||||
- ExtensionManifestV2Availability
|
||||
- ExtensionUnpublishedAvailability
|
||||
- ExtensionExtendedBackgroundLifetimeForPortConnectionsToUrls
|
||||
- ExtensionDOMActivityLoggingEnabled
|
||||
|
||||
+2
@@ -8,6 +8,8 @@ desc: |-
|
||||
Leaving this policy unset or setting this policy to False will use the default behavior defined on the device.
|
||||
|
||||
Attempting to launch a disabled Chrome App will show the user a message explaining why the app was not launched and suggesting to contact their IT department.
|
||||
|
||||
The value of this policy will be honored until the deprecation of Chrome Apps in Kiosk sessions, which is expected to happen in M151.
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: false
|
||||
|
||||
+1
@@ -29,5 +29,6 @@ supported_on:
|
||||
- chrome.linux:66-
|
||||
- chrome.mac:66-
|
||||
- chrome_os:66-
|
||||
- android:147-
|
||||
tags: []
|
||||
type: main
|
||||
|
||||
+1
@@ -21,5 +21,6 @@ schema:
|
||||
supported_on:
|
||||
- chrome.*:86-
|
||||
- chrome_os:86-
|
||||
- android:147-
|
||||
tags: []
|
||||
type: list
|
||||
|
||||
+7
-9
@@ -2,15 +2,13 @@ caption: List of URL patterns for which <ph name="CHROME_DEVTOOLS_NAME">Chrome D
|
||||
desc: |-
|
||||
This policy can be used to allow <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> on specific URLs.
|
||||
|
||||
URL patterns are matched against the URL of the page being inspected. If a match is found, the <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> are allowed. This applies even if the URL also matches the <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> policy, even if the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy is set to disallow (value 2). For information on the URL format, see https://support.google.com/chrome/a?p=url_blocklist_filter_format.
|
||||
URL patterns are matched against the URL of every frame on the page being inspected. The resulting behavior depends on whether the <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> policy is also set.
|
||||
|
||||
Leaving the policy unset means this allowlist has no effect.
|
||||
If this policy is set and <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> is not, every frame's URL must match a pattern on this allowlist for <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> to be allowed. If any frame's URL does not match, DevTools will be blocked for the entire page. For information on the URL format, see https://support.google.com/chrome/a?p=url_blocklist_filter_format.
|
||||
|
||||
If this policy is set and <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> is not, any URL not on this list will be blocked.
|
||||
If both this and the <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> policies are set, this allowlist takes precedence. If a frame's URL matches a pattern on this allowlist, it will be allowed, even if it also matches a pattern in the blocklist. If a URL matches a pattern on the blocklist (but not the allowlist), it will be blocked. If a URL matches neither, the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy will be used as a fallback.
|
||||
|
||||
If both this and the <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> policies are set, this allowlist takes precedence. If a URL matches a pattern on the allowlist, it will be allowed. If it matches a pattern on the blocklist (but not the allowlist), it will be blocked. If a URL matches neither, the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy will be used as a fallback.
|
||||
|
||||
If neither policy is set, the availability is determined by the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy.
|
||||
If this policy is not set, the availability of <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> is determined by the <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> and <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policies.
|
||||
|
||||
This policy also applies to <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> opened for extensions and web applications.
|
||||
|
||||
@@ -23,9 +21,9 @@ example_value:
|
||||
- https://server:8080/path
|
||||
- .exact.hostname.com
|
||||
- file://*
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
- chrome_os:147-
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
+8
-8
@@ -1,14 +1,14 @@
|
||||
caption: List of URL patterns for which <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> are blocked
|
||||
desc: |-
|
||||
URL patterns are matched against the URL of the page being inspected. If a match is found, the <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> are blocked. For information on the URL format, see https://support.google.com/chrome/a?p=url_blocklist_filter_format.
|
||||
This policy can be used to block <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> on specific URLs. For information on the URL format, see https://support.google.com/chrome/a?p=url_blocklist_filter_format.
|
||||
|
||||
If the <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> policy is set and this policy is not, any URL not on the allowlist will be blocked.
|
||||
URL patterns are matched against the URL of every frame on the page being inspected. The resulting behavior depends on whether the <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> policy is also set.
|
||||
|
||||
If both this and the <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> are set, the allowlist takes precedence. If a URL matches a pattern on the allowlist, it will be allowed. If it matches a pattern on this blocklist (but not the allowlist), it will be blocked. If a URL matches neither, the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy will be used as a fallback.
|
||||
If this policy is set and <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> is not, any frame's URL matching a pattern on this blocklist will block <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> for the entire page. If a frame's URL doesn't match any pattern, the availability is determined by the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy.
|
||||
|
||||
If neither policy is set, the availability is determined by the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy.
|
||||
If both this and the <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> policies are set, the allowlist takes precedence. If a frame's URL matches a pattern on the allowlist, it will be allowed, even if it also matches a pattern in this blocklist. If a URL matches a pattern on this blocklist (but not the allowlist), it will be blocked. If a URL matches neither, the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policy will be used as a fallback.
|
||||
|
||||
This policy also applies to <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> opened for extensions and web applications.
|
||||
If this policy is not set, the availability of <ph name="CHROME_DEVTOOLS_NAME">Chrome DevTools</ph> is determined by the <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> and <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph> policies.
|
||||
|
||||
This policy is limited to 1,000 entries.
|
||||
|
||||
@@ -21,9 +21,9 @@ example_value:
|
||||
- .exact.hostname.com
|
||||
- '*'
|
||||
- file://*
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
- chrome_os:147-
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
caption: Enable post-quantum key agreement for TLS for device
|
||||
default: true
|
||||
deprecated: true
|
||||
desc: |-
|
||||
This device-level policy configures whether <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> will offer a post-quantum key agreement algorithm in TLS, using the ML-KEM NIST standard. Prior to <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> 131, the algorithm was Kyber, an earlier draft iteration of the standard. This allows supporting servers to protect user traffic from being later decrypted by quantum computers.
|
||||
|
||||
@@ -31,7 +32,7 @@ owners:
|
||||
schema:
|
||||
type: boolean
|
||||
supported_on:
|
||||
- chrome_os:128-
|
||||
- chrome_os:128-146
|
||||
tags:
|
||||
- system-security
|
||||
type: main
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ desc: |-
|
||||
|
||||
owners:
|
||||
- mdanowski@google.com
|
||||
- file://components/policy/OWNERS
|
||||
- file://components/performance_manager/OWNERS
|
||||
supported_on:
|
||||
- chrome.*:146-
|
||||
- chrome_os:146-
|
||||
|
||||
+5
-5
@@ -22,11 +22,11 @@ example_value:
|
||||
- file://*
|
||||
- custom_scheme:*
|
||||
- '*'
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
- ios
|
||||
- android
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
- chrome_os:147-
|
||||
- ios:147-
|
||||
- android:147-
|
||||
owners:
|
||||
- file://components/policy/OWNERS
|
||||
- mwalachowski@google.com
|
||||
|
||||
+5
-5
@@ -20,11 +20,11 @@ example_value:
|
||||
- file://*
|
||||
- custom_scheme:*
|
||||
- '*'
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
- ios
|
||||
- android
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
- chrome_os:147-
|
||||
- ios:147-
|
||||
- android:147-
|
||||
owners:
|
||||
- file://components/policy/OWNERS
|
||||
- mwalachowski@google.com
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
caption: Controls the ability for a user to manually install Isolated Web Apps
|
||||
default: true
|
||||
desc: |
|
||||
Controls the user's ability to manually install Isolated Web Apps (IWAs).
|
||||
|
||||
If this policy is set to false, IWA user installation is blocked.
|
||||
|
||||
If this policy is set to true, or if the policy is not set, IWA user installations are permitted.
|
||||
example_value: true
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
items:
|
||||
- caption: Enable IWA user installation
|
||||
value: true
|
||||
- caption: Disable IWA user installation
|
||||
value: false
|
||||
name: IsolatedWebAppUserInstallationEnabled
|
||||
owners:
|
||||
- file://chrome/browser/web_applications/isolated_web_apps/OWNERS
|
||||
- iwa-team@google.com
|
||||
- mskarbinska@google.com
|
||||
schema:
|
||||
type: boolean
|
||||
supported_on:
|
||||
- chrome_os:146-
|
||||
tags: []
|
||||
type: main
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
caption: Allow <ph name="GOOGLE_LENS_PRODUCT_NAME">Google Lens</ph> camera assisted
|
||||
search
|
||||
deprecated: true
|
||||
default: true
|
||||
desc: Leaving the policy unset or setting it to Enabled allows users to search with
|
||||
their cameras using <ph name="GOOGLE_LENS_PRODUCT_NAME">Google Lens</ph>. Setting
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
caption: Allow <ph name="GOOGLE_LENS_PRODUCT_NAME">Google Lens</ph> button to
|
||||
be shown in the search box on the New Tab page if supported.
|
||||
deprecated: true
|
||||
default: true
|
||||
desc: Leaving the policy unset or setting it to Enabled allows users to view and
|
||||
use the <ph name="GOOGLE_LENS_PRODUCT_NAME">Google Lens</ph> button in the
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
caption: Settings for the Lens Overlay feature
|
||||
deprecated: true
|
||||
desc: |-
|
||||
Lens Overlay lets users perform contextual Google searches either via a screenshot or by asking a question about the current page's contents. This feature requires the end user to opt-in.
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
caption: Allow <ph name="GOOGLE_LENS_PRODUCT_NAME">Google Lens</ph> region search
|
||||
menu item to be shown in context menu if supported.
|
||||
deprecated: true
|
||||
default: true
|
||||
desc: Leaving the policy unset or setting it to Enabled allows users to view and use
|
||||
the <ph name="GOOGLE_LENS_PRODUCT_NAME">Google Lens</ph> region search menu item
|
||||
|
||||
+1
-2
@@ -67,8 +67,6 @@ features:
|
||||
cloud_only: true
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
future_on:
|
||||
- fuchsia
|
||||
owners:
|
||||
- cbe-cep-eng@google.com
|
||||
- domfc@chromium.org
|
||||
@@ -155,6 +153,7 @@ schema:
|
||||
type: object
|
||||
type: array
|
||||
future_on:
|
||||
- fuchsia
|
||||
- android
|
||||
supported_on:
|
||||
- chrome.*:84-
|
||||
|
||||
+4
-3
@@ -1,5 +1,6 @@
|
||||
caption: Enable post-quantum key agreement for TLS
|
||||
default: null
|
||||
deprecated: true
|
||||
desc: |-
|
||||
This policy configures whether <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> will offer a post-quantum key agreement algorithm in TLS, using the ML-KEM NIST standard. Prior to <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> 131, the algorithm was Kyber, an earlier draft iteration of the standard. This allows supporting servers to protect user traffic from being later decrypted by quantum computers.
|
||||
|
||||
@@ -32,9 +33,9 @@ owners:
|
||||
schema:
|
||||
type: boolean
|
||||
supported_on:
|
||||
- chrome.*:116-
|
||||
- chrome_os:116-
|
||||
- android:116-
|
||||
- chrome.*:116-146
|
||||
- chrome_os:116-146
|
||||
- android:116-146
|
||||
tags:
|
||||
- system-security
|
||||
type: main
|
||||
|
||||
+4
@@ -9,11 +9,15 @@ desc: |-
|
||||
|
||||
From <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> version 92, this policy is also supported in the headless mode.
|
||||
|
||||
From <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> version 147, the wildcard * on its own does not apply to internal chrome:// URLs. To block these, you must explicitly use the chrome://* pattern.
|
||||
|
||||
Note: Blocking internal chrome://* and chrome-untrusted://* URLs can lead to unexpected errors or can be circumvented in some cases. Instead of blocking certain internal URLs, see if there are more specific policies available. For example:
|
||||
|
||||
- Instead of blocking chrome://settings/certificates, use <ph name="CA_CERTIFICATE_MANAGEMENT_ALLOWED_POLICY_NAME">CACertificateManagementAllowed</ph>.
|
||||
|
||||
- Instead of blocking chrome-untrusted://crosh, use <ph name="SYSTEM_FEATURES_DISABLE_LIST_POLICY_NAME">SystemFeaturesDisableList</ph>.
|
||||
|
||||
- Instead of blocking devtools://*, use one of the <ph name="DEVELOPER_TOOLS_AVAILABILITY_POLICY_NAME">DeveloperToolsAvailability</ph>, <ph name="DEVELOPER_TOOLS_AVAILABILITY_ALLOWLIST_POLICY_NAME">DeveloperToolsAvailabilityAllowlist</ph> or <ph name="DEVELOPER_TOOLS_AVAILABILITY_BLOCKLIST_POLICY_NAME">DeveloperToolsAvailabilityBlocklist</ph> policies.
|
||||
example_value:
|
||||
- example.com
|
||||
- https://ssl.server.com
|
||||
|
||||
+34
-22
@@ -1,52 +1,64 @@
|
||||
caption: Proxy override rules
|
||||
desc: |-
|
||||
Setting this policy configures rules that select what proxy the browser uses depending on the destination's URL and other conditions. This policy will take precedence over proxy settings set from the <ph name="PROXY_SETTINGS_POLICY_NAME">ProxySettings</ph> policy, the <ph name="PROXY_SETTINGS_EXTENSION_API">chrome.proxy</ph> extension API or manual user settings if any is set.
|
||||
Configures rules that select which proxy the browser uses based on the destination URL and specific network conditions.
|
||||
|
||||
Leaving the policy unset has no effect on other proxy policies or user settings.
|
||||
This policy takes precedence over the <ph name="PROXY_SETTINGS_POLICY_NAME">ProxySettings</ph> policy, the <ph name="PROXY_SETTINGS_EXTENSION_API">chrome.proxy</ph> extension API, and manual user settings. If no rules in this policy match, the browser falls back to the settings defined in <ph name="PROXY_SETTINGS_POLICY_NAME">ProxySettings</ph>.
|
||||
|
||||
When the browser needs to decide what proxy to use, entries of the <ph name="PROXY_OVERRIDE_RULES_POLICY_NAME">ProxyOverrideRules</ph> policy are evaluated in sequence until an entry satisfies all the following points:
|
||||
* At least one of the URL patterns in <ph name="PROXY_OVERRIDE_RULES_DESTINATION_MATCHERS">DestinationMatchers</ph> is matched.
|
||||
* None of the URL patterns in <ph name="PROXY_OVERRIDE_RULES_EXCLUDE_DESTINATION_MATCHERS">ExcludeDestinationMatchers</ph> is matched.
|
||||
* If <ph name="PROXY_OVERRIDE_RULES_CONDITIONS">Conditions</ph> is specified and is a non-empty list, all conditions represented by its entries are satisfied.
|
||||
The value in <ph name="PROXY_OVERRIDE_RULES_PROXY_LIST">ProxyList</ph> will be used as a proxy for such a match. If no match is found, proxy settings will fall back to what is set in the <ph name="PROXY_SETTINGS_POLICY_NAME">ProxySettings</ph> policy.
|
||||
The browser evaluates entries in the <ph name="PROXY_OVERRIDE_RULES_POLICY_NAME">ProxyOverrideRules</ph> list in sequence. A rule is applied only if all of the following criteria are met:
|
||||
|
||||
The URL patterns supported by <ph name="PROXY_OVERRIDE_RULES_DESTINATION_MATCHERS">DestinationMatchers</ph> and <ph name="PROXY_OVERRIDE_RULES_EXCLUDE_DESTINATION_MATCHERS">ExcludeDestinationMatchers</ph> are documented at https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md#proxy-config-url-patterns.
|
||||
* Match: At least one URL pattern in <ph name="PROXY_OVERRIDE_RULES_DESTINATION_MATCHERS">DestinationMatchers</ph> is matched.
|
||||
|
||||
* Exclude: No URL patterns in <ph name="PROXY_OVERRIDE_RULES_EXCLUDE_DESTINATION_MATCHERS">ExcludeDestinationMatchers</ph> are matched.
|
||||
|
||||
* Conditions: If <ph name="PROXY_OVERRIDE_RULES_CONDITIONS">Conditions</ph> is specified, all listed conditions must be satisfied. If unset, this requirement is ignored.
|
||||
|
||||
URL patterns for matchers are documented at https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md#proxy-config-url-patterns.
|
||||
|
||||
The <ph name="PROXY_OVERRIDE_RULES_PROXY_LIST">ProxyList</ph> field defines a failover list. The first reachable entry is used; invalid entries are ignored. You can use PAC-style strings or URL-like specifiers:
|
||||
|
||||
PAC-style strings:
|
||||
|
||||
The <ph name="PROXY_OVERRIDE_RULES_PROXY_LIST">ProxyList</ph> field entries correspond to string values of PAC files such as:
|
||||
* DIRECT
|
||||
|
||||
* PROXY host:port
|
||||
|
||||
* HTTPS host:port
|
||||
|
||||
* SOCKS4 host:port
|
||||
|
||||
* SOCKS5 host:port
|
||||
Alternatively, URL-like proxy specifiers can be used directly to specify the proxy, for example:
|
||||
|
||||
URL-like specifiers:
|
||||
|
||||
* http://host:port
|
||||
|
||||
* https://host:port
|
||||
|
||||
* socks4://host:port
|
||||
|
||||
* socks5://host:port
|
||||
The first reachable entry in the list will be used as a proxy. Invalid entries in the list are ignored.
|
||||
|
||||
The <ph name="PROXY_OVERRIDE_RULES_CONDITIONS">Conditions</ph> field contains a list of conditions that must all be met for its override rule to be used to decide the proxy to use. If it is left unset, the entry will be used as long as at least one host in <ph name="PROXY_OVERRIDE_RULES_DESTINATION_MATCHERS">DestinationMatchers</ph> is matched.
|
||||
The <ph name="PROXY_OVERRIDE_RULES_DNS_PROBE">DnsProbe</ph> condition checks if a <ph name="PROXY_OVERRIDE_RULES_HOST">Host</ph> resolves to an IP address.
|
||||
|
||||
The <ph name="PROXY_OVERRIDE_RULES_DNS_PROBE">DnsProbe</ph> condition checks if the provided DNS <ph name="PROXY_OVERRIDE_RULES_HOST">Host</ph> is able to resolve to an IP address. It must contain a host (e.g. example.com), and optionally a scheme or a port (e.g. https://example.com, example.com:123, https://example.com:123). If a secure scheme is used (e.g. https), DNS lookup may also request the HTTPS record (see RFC 9460 for more details). If the value of <ph name="PROXY_OVERRIDE_RULES_RESULT">Result</ph> is "<ph name="PROXY_OVERRIDE_RULES_RESOLVED">resolved</ph>" then the condition is considered as met. If the value is instead set to <ph name="PROXY_OVERRIDE_RULES_NOT_FOUND">not_found</ph>, then the condition is considered met if the resolution failed.
|
||||
* Supports hostnames (e.g., example.com) or URI-style strings (e.g., https://example.com:123). Using a secure scheme (https) may trigger an HTTPS record request (see RFC 9460).
|
||||
|
||||
* Set to "<ph name="PROXY_OVERRIDE_RULES_RESOLVED">resolved</ph>" to meet the condition upon successful resolution, or "<ph name="PROXY_OVERRIDE_RULES_NOT_FOUND">not_found</ph>" to meet the condition if resolution fails.
|
||||
|
||||
The application of this policy on managed devices is influenced by the <ph name="ENABLE_PROXY_OVERRIDE_RULES_FOR_ALL_USERS_POLICY_NAME">EnableProxyOverrideRulesForAllUsers</ph> machine-level policy on the platforms where it is supported. By default, it prevents the usage of override rules configured by unaffiliated users.
|
||||
|
||||
example_value:
|
||||
- DestinationMatchers:
|
||||
- 'https://some.app.com'
|
||||
- 'https://other.app.org'
|
||||
ProxyList:
|
||||
- 'HTTPS proxy.app:443'
|
||||
- 'DIRECT'
|
||||
Conditions:
|
||||
- DnsProbe:
|
||||
Host: 'corp.ads'
|
||||
Result: "resolved"
|
||||
- DestinationMatchers:
|
||||
- 'https://google.com'
|
||||
ExcludeDestinationMatchers:
|
||||
- 'https://mail.google.com'
|
||||
ProxyList:
|
||||
- 'HTTPS proxy.app:443'
|
||||
- 'DIRECT'
|
||||
Conditions:
|
||||
- DnsProbe:
|
||||
Host: 'corp.ads'
|
||||
Result: 'resolved'
|
||||
features:
|
||||
cloud_only: true
|
||||
dynamic_refresh: true
|
||||
|
||||
-2
@@ -7,5 +7,3 @@ Proxy:
|
||||
- ProxyPacUrl
|
||||
- ProxyBypassList
|
||||
- ProxySettings
|
||||
- ProxyOverrideRules
|
||||
- EnableProxyOverrideRulesForAllUsers
|
||||
|
||||
+3
-3
@@ -25,8 +25,8 @@ schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome.*:147-
|
||||
- chrome_os:147-
|
||||
tags: []
|
||||
type: list
|
||||
|
||||
@@ -174,11 +174,14 @@
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "content/public/browser/web_contents_view_delegate.h"
|
||||
#include "content/public/browser/web_ui_controller.h"
|
||||
#include "content/public/browser/webui_config.h"
|
||||
#include "content/public/browser/webui_config_map.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/referrer_type_converters.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/widget_type.h"
|
||||
#include "ipc/constants.mojom.h"
|
||||
#include "media/base/media_switches.h"
|
||||
#include "net/base/url_util.h"
|
||||
@@ -2045,6 +2048,17 @@ RenderWidgetHostView* WebContentsImpl::GetTopLevelRenderWidgetHostView() {
|
||||
return GetRenderManager()->GetRenderWidgetHostView();
|
||||
}
|
||||
|
||||
std::vector<RenderWidgetHostView*> WebContentsImpl::GetPopupWidgets() {
|
||||
std::vector<RenderWidgetHostView*> result;
|
||||
for (const auto& [_, host] : created_widgets_) {
|
||||
RenderWidgetHostViewBase* view = host->GetView();
|
||||
if (view && view->GetWidgetType() == WidgetType::kPopup) {
|
||||
result.push_back(view);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RenderWidgetHost* WebContentsImpl::FindWidgetAtPoint(const gfx::PointF& point) {
|
||||
if (GetOuterWebContents()) {
|
||||
return GetOuterWebContents()->FindWidgetAtPoint(point);
|
||||
@@ -5184,8 +5198,12 @@ bool WebContentsImpl::RequestKeyboardLock(
|
||||
}
|
||||
|
||||
// KeyboardLock is only supported when called by the top-level browsing
|
||||
// context and is not supported in embedded content scenarios.
|
||||
if (GetOuterWebContents()) {
|
||||
// context and is not supported in embedded content scenarios such as
|
||||
// GuestView guests (<webview> tags, PDF viewer). However, some embedders
|
||||
// (e.g. WebUIBrowserWindow) attach top-level tabs as inner WebContents and
|
||||
// opt in via AllowKeyboardLockForInnerContents().
|
||||
if (GetOuterWebContents() &&
|
||||
(!delegate_ || !delegate_->AllowKeyboardLockForInnerContents(this))) {
|
||||
render_widget_host->GotResponseToKeyboardLockRequest(false);
|
||||
return false;
|
||||
}
|
||||
@@ -5279,7 +5297,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
int render_process_id = opener->GetProcess()->GetDeprecatedID();
|
||||
SiteInstanceImpl* source_site_instance = opener->GetSiteInstance();
|
||||
const auto& partition_config =
|
||||
source_site_instance->GetStoragePartitionConfig();
|
||||
source_site_instance->GetSecurityPrincipal().GetStoragePartitionConfig();
|
||||
|
||||
{
|
||||
StoragePartition* partition =
|
||||
@@ -5302,7 +5320,8 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
opener->GetLastCommittedURL(), params.frame_name, params.target_url,
|
||||
partition_config, session_storage_namespace));
|
||||
params.disposition, *params.features, partition_config,
|
||||
session_storage_namespace));
|
||||
if (!web_contents_impl) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -5320,7 +5339,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
: IsGuest();
|
||||
// While some guest types do not have a guest SiteInstance, the ones that
|
||||
// don't all override WebContents creation above.
|
||||
CHECK_EQ(source_site_instance->IsGuest(), is_guest);
|
||||
CHECK_EQ(source_site_instance->GetSecurityPrincipal().IsGuest(), is_guest);
|
||||
|
||||
// We usually create the new window in the same BrowsingInstance (group of
|
||||
// script-related windows), by passing in the current SiteInstance. However,
|
||||
@@ -5388,8 +5407,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// should be in the same StoragePartition.
|
||||
SiteInstanceImpl* new_site_instance = new_contents->GetSiteInstance();
|
||||
DCHECK(!new_site_instance->IsRelatedSiteInstance(source_site_instance));
|
||||
DCHECK_EQ(new_site_instance->GetStoragePartitionConfig(),
|
||||
source_site_instance->GetStoragePartitionConfig());
|
||||
DCHECK_EQ(
|
||||
new_site_instance->GetSecurityPrincipal().GetStoragePartitionConfig(),
|
||||
source_site_instance->GetSecurityPrincipal()
|
||||
.GetStoragePartitionConfig());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5601,7 +5622,7 @@ int64_t WebContentsImpl::AdjustWindowRect(gfx::Rect* bounds,
|
||||
// `blink::kMinimumBorderlessWindowSize` instead of the default
|
||||
// `blink::kMinimumWindowSize`.
|
||||
int minimum_size =
|
||||
GetDisplayMode() == blink::mojom::DisplayMode::kBorderless &&
|
||||
GetDisplayMode() == blink::mojom::DisplayMode::kUnframed &&
|
||||
IsWindowManagementGranted(opener)
|
||||
? blink::kMinimumBorderlessWindowSize
|
||||
: blink::kMinimumWindowSize;
|
||||
@@ -5710,6 +5731,16 @@ void WebContentsImpl::ShowCreatedWidget(int process_id,
|
||||
return;
|
||||
}
|
||||
|
||||
RenderWidgetHostImpl* rwh = GetPrimaryMainFrame()->GetRenderWidgetHost();
|
||||
if (base::FeatureList::IsEnabled(
|
||||
blink::features::kBlockSelectPopupUnfocusedWindow) &&
|
||||
!rwh->is_active()) {
|
||||
// If the OS window isn't focused, then don't open select element popups for
|
||||
// it: https://issues.chromium.org/issues/365089001
|
||||
widget_host_view->host()->ShutdownAndDestroyWidget(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// GetOutermostWebContents() returns |this| if there are no outer WebContents.
|
||||
auto* outer_web_contents = GetOuterWebContents();
|
||||
auto* outermost_web_contents = GetOutermostWebContents();
|
||||
@@ -5747,6 +5778,13 @@ void WebContentsImpl::ShowCreatedWidget(int process_id,
|
||||
}
|
||||
|
||||
RenderWidgetHostImpl* render_widget_host_impl = widget_host_view->host();
|
||||
|
||||
// A background tab cannot show a popup over the active tab.
|
||||
if (GetVisibility() != Visibility::VISIBLE) {
|
||||
render_widget_host_impl->ShutdownAndDestroyWidget(true);
|
||||
return;
|
||||
}
|
||||
|
||||
auto permission_exclusion_area_bounds =
|
||||
PermissionControllerImpl::FromBrowserContext(GetBrowserContext())
|
||||
->GetExclusionAreaBoundsInScreen(outermost_web_contents);
|
||||
@@ -6779,9 +6817,7 @@ void WebContentsImpl::SaveFrameWithHeaders(
|
||||
"triggered by user request."
|
||||
policy_exception_justification: "Not implemented."
|
||||
})");
|
||||
auto params = std::make_unique<download::DownloadUrlParameters>(
|
||||
url, rfh->GetProcess()->GetDeprecatedID(), rfh->GetRoutingID(),
|
||||
traffic_annotation);
|
||||
auto params = rfh->CreateDownloadUrlParameters(url, traffic_annotation);
|
||||
params->set_referrer(referrer.url);
|
||||
params->set_referrer_policy(
|
||||
Referrer::ReferrerPolicyForUrlRequest(referrer.policy));
|
||||
@@ -6815,6 +6851,7 @@ void WebContentsImpl::SaveFrameWithHeaders(
|
||||
.GetLastCommittedEntry()
|
||||
->GetFrameEntry(frame_tree_node);
|
||||
if (frame_navigation_entry) {
|
||||
// Replay the original initiator, rather than using the current frame origin
|
||||
params->set_initiator(frame_navigation_entry->initiator_origin());
|
||||
}
|
||||
|
||||
@@ -7016,8 +7053,12 @@ bool WebContentsImpl::GotResponseToKeyboardLockRequest(bool allowed) {
|
||||
return false;
|
||||
}
|
||||
// KeyboardLock is only supported when called by the top-level browsing
|
||||
// context and is not supported in embedded content scenarios.
|
||||
if (GetOuterWebContents()) {
|
||||
// context and is not supported in embedded content scenarios such as
|
||||
// GuestView guests (<webview> tags, PDF viewer). However, some embedders
|
||||
// (e.g. WebUIBrowserWindow) attach top-level tabs as inner WebContents and
|
||||
// opt in via AllowKeyboardLockForInnerContents().
|
||||
if (GetOuterWebContents() &&
|
||||
(!delegate_ || !delegate_->AllowKeyboardLockForInnerContents(this))) {
|
||||
keyboard_lock_widget_->GotResponseToKeyboardLockRequest(false);
|
||||
return false;
|
||||
}
|
||||
@@ -7697,28 +7738,57 @@ void WebContentsImpl::DidNavigateMainFramePreCommit(
|
||||
}
|
||||
#endif
|
||||
|
||||
// Ensure fullscreen mode is exited before committing the navigation to a
|
||||
// different page. The next page will not start out assuming it is in
|
||||
// fullscreen mode.
|
||||
if (navigation_is_within_page) {
|
||||
// No page change? Then, the renderer and browser can remain in fullscreen.
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsFullscreen()) {
|
||||
ExitFullscreen(false);
|
||||
}
|
||||
|
||||
auto* rwhvb = static_cast<RenderWidgetHostViewBase*>(
|
||||
frame_tree_node->current_frame_host()->GetView());
|
||||
if (rwhvb) {
|
||||
rwhvb->OnOldViewDidNavigatePreCommit();
|
||||
}
|
||||
|
||||
// Clean up keyboard lock state when navigating.
|
||||
CancelKeyboardLock(keyboard_lock_widget_);
|
||||
}
|
||||
|
||||
void WebContentsImpl::DidNavigateAnyFramePreCommit(
|
||||
NavigationHandle* navigation_handle,
|
||||
bool navigation_is_within_page) {
|
||||
// Ensure fullscreen mode is exited before committing the navigation to a
|
||||
// different page. The next page will not start out assuming it is in
|
||||
// fullscreen mode.
|
||||
if (navigation_is_within_page || !IsFullscreen()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool should_exit_fullscreen = false;
|
||||
if (navigation_handle->IsInPrimaryMainFrame()) {
|
||||
should_exit_fullscreen = true;
|
||||
} else {
|
||||
// For iframe navigation, exit if the fullscreen was requested by the
|
||||
// iframe or one of its descendants.
|
||||
const FrameTreeNodeId navigating_id =
|
||||
navigation_handle->GetFrameTreeNodeId();
|
||||
should_exit_fullscreen =
|
||||
std::any_of(fullscreen_frames_.begin(), fullscreen_frames_.end(),
|
||||
[navigating_id](RenderFrameHostImpl* rfh) {
|
||||
for (RenderFrameHostImpl* current = rfh; current;
|
||||
current = current->GetParentOrOuterDocument()) {
|
||||
if (current->frame_tree_node()->frame_tree_node_id() ==
|
||||
navigating_id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
if (should_exit_fullscreen) {
|
||||
ExitFullscreen(false);
|
||||
CancelKeyboardLock(keyboard_lock_widget_);
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentsImpl::DidNavigateMainFramePostCommit(
|
||||
RenderFrameHostImpl* render_frame_host,
|
||||
const LoadCommittedDetails& details) {
|
||||
@@ -9905,8 +9975,7 @@ void WebContentsImpl::DocumentOnLoadCompleted(
|
||||
}
|
||||
|
||||
void WebContentsImpl::UpdateTitle(RenderFrameHostImpl* render_frame_host,
|
||||
const std::u16string& title,
|
||||
base::i18n::TextDirection title_direction) {
|
||||
const std::u16string& title) {
|
||||
OPTIONAL_TRACE_EVENT2("content", "WebContentsImpl::UpdateTitle",
|
||||
"render_frame_host", render_frame_host, "title", title);
|
||||
// Try to find the navigation entry, which might not be the current one.
|
||||
@@ -9935,8 +10004,6 @@ void WebContentsImpl::UpdateTitle(RenderFrameHostImpl* render_frame_host,
|
||||
render_frame_host->frame_tree()->controller().GetLastCommittedEntry();
|
||||
}
|
||||
|
||||
// TODO(evan): make use of title_direction.
|
||||
// http://code.google.com/p/chromium/issues/detail?id=27094
|
||||
bool title_changed = UpdateTitleForEntryImpl(entry, title);
|
||||
if (title_changed) {
|
||||
if (render_frame_host == GetPrimaryMainFrame()) {
|
||||
@@ -10615,15 +10682,6 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
|
||||
ReattachOuterDelegateIfNeeded();
|
||||
}
|
||||
|
||||
// With SetHistoryInfoOnViewCreation enabled, the history and index length are
|
||||
// sent as part of the the CreateView() IPC via the CreateViewParams.
|
||||
if (!base::FeatureList::IsEnabled(features::kSetHistoryInfoOnViewCreation)) {
|
||||
SetHistoryIndexAndLengthForView(
|
||||
render_view_host,
|
||||
rvh_impl->frame_tree()->controller().GetLastCommittedEntryIndex(),
|
||||
rvh_impl->frame_tree()->controller().GetEntryCount());
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
|
||||
// Force a ViewMsg_Resize to be sent, needed to make plugins show up on
|
||||
// linux. See crbug.com/83941.
|
||||
@@ -11539,6 +11597,14 @@ void WebContentsImpl::OnTextCopiedToClipboard(
|
||||
render_frame_host, copied_text);
|
||||
}
|
||||
|
||||
void WebContentsImpl::TextSelectionChanged(
|
||||
RenderFrameHostImpl* render_frame_host,
|
||||
std::u16string_view selected_text) {
|
||||
// Notify observers.
|
||||
observers_.NotifyObservers(&WebContentsObserver::OnTextSelectionChanged,
|
||||
render_frame_host, selected_text);
|
||||
}
|
||||
|
||||
void WebContentsImpl::IsClipboardPasteAllowedWrapperCallback(
|
||||
IsClipboardPasteAllowedCallback callback,
|
||||
std::optional<ClipboardPasteData> clipboard_paste_data) {
|
||||
@@ -11605,6 +11671,19 @@ void WebContentsImpl::UpdateWebContentsVisibility(Visibility visibility) {
|
||||
OPTIONAL_TRACE_EVENT1("content",
|
||||
"WebContentsImpl::UpdateWebContentsVisibility",
|
||||
"visibility", visibility);
|
||||
|
||||
// For opt-in WebUIs, the WebContents's visibility will be kept VISIBLE until
|
||||
// the first visually non-empty paint has occurred.
|
||||
// This is an optimization to prevent the occlusion calculation from blocking
|
||||
// the first visually non-empty paint.
|
||||
WebUI* web_ui = GetWebUI();
|
||||
WebUIConfig* webui_config = web_ui ? web_ui->GetWebUIConfig() : nullptr;
|
||||
if (webui_config &&
|
||||
webui_config->ShouldKeepVisibleUntilFirstVisuallyNonEmptyPaint() &&
|
||||
!CompletedFirstVisuallyNonEmptyPaint()) {
|
||||
visibility = Visibility::VISIBLE;
|
||||
}
|
||||
|
||||
// Occlusion is disabled when
|
||||
// |switches::kDisableBackgroundingOccludedWindowsForTesting| is specified on
|
||||
// the command line (to avoid flakiness in browser tests).
|
||||
@@ -12114,9 +12193,9 @@ void WebContentsImpl::OnInputIgnored(const blink::WebInputEvent& event) {
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
float WebContentsImpl::GetCurrentTouchSequenceYOffset() {
|
||||
gfx::PointF WebContentsImpl::GetCurrentTouchSequenceOffset() {
|
||||
ui::ViewAndroid* view_android = GetNativeView();
|
||||
return view_android->event_forwarder()->GetCurrentTouchSequenceYOffset();
|
||||
return view_android->event_forwarder()->GetCurrentTouchSequenceOffset();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -12278,14 +12357,9 @@ bool WebContentsImpl::CancelPrerendering(FrameTreeNode* frame_tree_node,
|
||||
return frame_tree_node->GetParentOrOuterDocumentOrEmbedder()
|
||||
->CancelPrerendering(PrerenderCancellationReason(final_status));
|
||||
}
|
||||
PrerenderHost* prerender_host =
|
||||
GetPrerenderHostRegistry()->FindNonReservedHostById(
|
||||
frame_tree_node->frame_tree_node_id());
|
||||
if (!prerender_host) {
|
||||
return false;
|
||||
}
|
||||
return GetPrerenderHostRegistry()->CancelHost(
|
||||
prerender_host->prerender_host_id(), final_status);
|
||||
frame_tree_node->frame_tree().delegate()->GetPrerenderHostId(),
|
||||
final_status);
|
||||
}
|
||||
|
||||
ui::mojom::VirtualKeyboardMode WebContentsImpl::GetVirtualKeyboardMode() const {
|
||||
|
||||
@@ -75,31 +75,6 @@ void SetRuntimeFeatureDefaultsForPlatform(
|
||||
WebRuntimeFeatures::EnableCompositedSelectionUpdate(true);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_APPLE)
|
||||
const bool enable_canvas_2d_image_chromium =
|
||||
command_line.HasSwitch(
|
||||
blink::switches::kEnableGpuMemoryBufferCompositorResources) &&
|
||||
!command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) &&
|
||||
!command_line.HasSwitch(switches::kDisableGpu) &&
|
||||
base::FeatureList::IsEnabled(features::kCanvas2DImageChromium);
|
||||
#else
|
||||
constexpr bool enable_canvas_2d_image_chromium = false;
|
||||
#endif
|
||||
WebRuntimeFeatures::EnableCanvas2dImageChromium(
|
||||
enable_canvas_2d_image_chromium);
|
||||
|
||||
#if BUILDFLAG(IS_APPLE)
|
||||
const bool enable_web_gl_image_chromium =
|
||||
command_line.HasSwitch(
|
||||
blink::switches::kEnableGpuMemoryBufferCompositorResources) &&
|
||||
!command_line.HasSwitch(switches::kDisableWebGLImageChromium) &&
|
||||
!command_line.HasSwitch(switches::kDisableGpu);
|
||||
#else
|
||||
const bool enable_web_gl_image_chromium =
|
||||
command_line.HasSwitch(switches::kEnableWebGLImageChromium);
|
||||
#endif
|
||||
WebRuntimeFeatures::EnableWebGLImageChromium(enable_web_gl_image_chromium);
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) {
|
||||
WebRuntimeFeatures::EnableMediaSession(false);
|
||||
@@ -412,9 +387,6 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
raw_ref(webnn::mojom::features::
|
||||
kExperimentalWebMachineLearningNeuralNetwork),
|
||||
kSetOnlyIfOverridden},
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
{"WebAppLaunchQueue", raw_ref(features::kAndroidWebAppLaunchHandler)},
|
||||
#endif
|
||||
{"LocalNetworkAccessPermissionPolicy",
|
||||
raw_ref(network::features::kLocalNetworkAccessChecks)},
|
||||
{"LocalNetworkAccessSplitPermissions",
|
||||
@@ -532,6 +504,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs(
|
||||
ui::NativeTheme::GetInstanceForWeb()->use_overlay_scrollbar());
|
||||
#endif
|
||||
WebRuntimeFeatures::EnableFluentScrollbars(ui::IsFluentScrollbarEnabled());
|
||||
WebRuntimeFeatures::EnableDesktopAndroidScrollbars(
|
||||
command_line.HasSwitch(blink::switches::kEnableDesktopAndroidScrollbars));
|
||||
|
||||
// TODO(rodneyding): This is a rare case for a stable feature
|
||||
// Need to investigate more to determine whether to refactor it.
|
||||
@@ -636,17 +610,6 @@ void ResolveInvalidConfigurations() {
|
||||
WebRuntimeFeatures::EnableFledge(false);
|
||||
}
|
||||
|
||||
// PermissionElement cannot be enabled without the support of the
|
||||
// browser process.
|
||||
if (!base::FeatureList::IsEnabled(blink::features::kPermissionElement)) {
|
||||
LOG_IF(WARNING,
|
||||
WebRuntimeFeatures::IsPermissionElementEnabledByRuntimeFlag())
|
||||
<< "PermissionElement cannot be enabled in this configuration. Use --"
|
||||
<< switches::kEnableFeatures << "="
|
||||
<< blink::features::kPermissionElement.name << " instead.";
|
||||
WebRuntimeFeatures::EnablePermissionElement(false);
|
||||
}
|
||||
|
||||
// UserMediaElement cannot be enabled without the support of the
|
||||
// browser process.
|
||||
if (!base::FeatureList::IsEnabled(blink::features::kUserMediaElement)) {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/supports_user_data.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/uuid.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/buildflag.h"
|
||||
@@ -319,11 +320,15 @@ size_t ContentBrowserClient::GetProcessCountToIgnoreForLimit() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::optional<std::vector<blink::mojom::IsolatedAppPermissionPolicyEntryPtr>>
|
||||
ContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp(
|
||||
bool ContentBrowserClient::SupportsBaselinePermissionsPolicyForIsolatedApp() {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<blink::mojom::IsolatedAppPermissionPolicyEntryPtr>
|
||||
ContentBrowserClient::GetBaselinePermissionsPolicyForIsolatedApp(
|
||||
BrowserContext* browser_context,
|
||||
const url::Origin& iwa_origin) {
|
||||
return std::nullopt;
|
||||
const url::Origin& app_origin) {
|
||||
return {};
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldTryToUseExistingProcessHost(
|
||||
@@ -415,6 +420,10 @@ bool ContentBrowserClient::IsInitialWebUIURL(const GURL& url) {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
bool ContentBrowserClient::IsTopChromeWebUIURL(const GURL& url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::IsIsolatedContextAllowedForUrl(
|
||||
BrowserContext* browser_context,
|
||||
const GURL& lock_url) {
|
||||
@@ -1200,10 +1209,10 @@ ContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
|
||||
return std::vector<std::unique_ptr<URLLoaderRequestInterceptor>>();
|
||||
}
|
||||
|
||||
ContentBrowserClient::URLLoaderRequestHandler
|
||||
ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
FrameTreeNodeId frame_tree_node_id,
|
||||
const network::ResourceRequest& resource_request) {
|
||||
ContentBrowserClient::URLLoaderRequestHandler ContentBrowserClient::
|
||||
CreateURLLoaderHandlerForServiceWorkerInitiatedNavigationRequest(
|
||||
FrameTreeNodeId frame_tree_node_id,
|
||||
const network::ResourceRequest& resource_request) {
|
||||
return ContentBrowserClient::URLLoaderRequestHandler();
|
||||
}
|
||||
|
||||
@@ -1454,6 +1463,26 @@ bool ContentBrowserClient::IsBuiltinComponent(BrowserContext* browser_context,
|
||||
return false;
|
||||
}
|
||||
|
||||
void ContentBrowserClient::StartRtcDiagnosticLogging(
|
||||
RenderFrameHost& frame_host,
|
||||
bool should_upload_on_stop,
|
||||
base::flat_map<std::string, std::string> metadata,
|
||||
base::OnceCallback<void(const std::string&)> callback) {
|
||||
std::move(callback).Run(base::Uuid::GenerateRandomV4().AsLowercaseString());
|
||||
}
|
||||
|
||||
void ContentBrowserClient::FinishRtcDiagnosticLogging(
|
||||
RenderFrameHost& frame_host,
|
||||
base::OnceClosure callback) {
|
||||
std::move(callback).Run();
|
||||
}
|
||||
|
||||
void ContentBrowserClient::CancelRtcDiagnosticLogging(
|
||||
RenderFrameHost& frame_host,
|
||||
base::OnceClosure callback) {
|
||||
std::move(callback).Run();
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldBlockRendererDebugURL(
|
||||
const GURL& url,
|
||||
BrowserContext* context,
|
||||
@@ -1988,10 +2017,6 @@ bool ContentBrowserClient::UsePrefetchPrerenderIntegration() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::UsePreloadServingMetrics() {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool ContentBrowserClient::ShouldDisallowCredentialRequest(
|
||||
WebContents* web_contents) {
|
||||
@@ -2028,6 +2053,15 @@ bool ContentBrowserClient::ShouldAllowPrefetchRedirection(
|
||||
return true;
|
||||
}
|
||||
|
||||
void ContentBrowserClient::ModifyRequestHeadersForPrefetch(
|
||||
const GURL& url,
|
||||
std::vector<std::string>& removed_headers,
|
||||
net::HttpRequestHeaders& modified_headers,
|
||||
net::HttpRequestHeaders& modified_cors_exempt_headers) {}
|
||||
|
||||
void ContentBrowserClient::UpdateCorsExemptHeaderForPrefetch(
|
||||
network::mojom::NetworkContextParams* params) {}
|
||||
|
||||
bool ContentBrowserClient::OriginSupportsConcreteCrossOriginIsolation(
|
||||
const url::Origin& origin) {
|
||||
return true;
|
||||
|
||||
@@ -54,9 +54,11 @@
|
||||
focusChanged,
|
||||
focusContext,
|
||||
grabbedChanged,
|
||||
grammarMarkerChanged,
|
||||
haspopupChanged,
|
||||
hide,
|
||||
hierarchicalLevelChanged,
|
||||
highlightMarkerChanged,
|
||||
hitTestResult,
|
||||
hover,
|
||||
ignoredChanged,
|
||||
@@ -121,6 +123,7 @@
|
||||
setSizeChanged,
|
||||
show,
|
||||
sortChanged,
|
||||
spellingMarkerChanged,
|
||||
stateChanged,
|
||||
subtreeCreated,
|
||||
textAttributeChanged,
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
// Copyright 2015 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth
|
||||
// adapter state and handle device pairing.
|
||||
// NOTE: This IDL is dependent on bluetooth.idl.
|
||||
|
||||
[implemented_in = "extensions/browser/api/bluetooth/bluetooth_private_api.h"]
|
||||
namespace bluetoothPrivate {
|
||||
// Events that can occur during pairing. The method used for pairing varies
|
||||
// depending on the capability of the two devices.
|
||||
enum PairingEventType {
|
||||
// An alphanumeric PIN code is required to be entered by the user.
|
||||
requestPincode,
|
||||
|
||||
// Display a PIN code to the user.
|
||||
displayPincode,
|
||||
|
||||
// A numeric passkey is required to be entered by the user.
|
||||
requestPasskey,
|
||||
|
||||
// Display a zero padded 6 digit numeric passkey that the user entered on
|
||||
// the remote device. This event may occur multiple times during pairing to
|
||||
// update the entered passkey.
|
||||
displayPasskey,
|
||||
|
||||
// The number of keys inputted by the user on the remote device when
|
||||
// entering a passkey. This event may be called multiple times during
|
||||
// pairing to update the number of keys inputted.
|
||||
keysEntered,
|
||||
|
||||
// Requests that a 6 digit passkey be displayed and the user confirms that
|
||||
// both devies show the same passkey.
|
||||
confirmPasskey,
|
||||
|
||||
// Requests authorization for a pairing under the just-works model. It is up
|
||||
// to the app to ask for user confirmation.
|
||||
requestAuthorization,
|
||||
|
||||
// Pairing is completed.
|
||||
complete
|
||||
};
|
||||
|
||||
// Results for connect(). See function declaration for details.
|
||||
enum ConnectResultType {
|
||||
alreadyConnected,
|
||||
authCanceled,
|
||||
authFailed,
|
||||
authRejected,
|
||||
authTimeout,
|
||||
failed,
|
||||
inProgress,
|
||||
success,
|
||||
unknownError,
|
||||
unsupportedDevice,
|
||||
notReady,
|
||||
alreadyExists,
|
||||
notConnected,
|
||||
doesNotExist,
|
||||
invalidArgs,
|
||||
nonAuthTimeout,
|
||||
noMemory,
|
||||
jniEnvironment,
|
||||
jniThreadAttach,
|
||||
wakelock,
|
||||
unexpectedState,
|
||||
socketError
|
||||
};
|
||||
|
||||
// Valid pairing responses.
|
||||
enum PairingResponse {
|
||||
confirm, reject, cancel
|
||||
};
|
||||
|
||||
enum TransportType {
|
||||
le, bredr, dual
|
||||
};
|
||||
|
||||
// A pairing event received from a Bluetooth device.
|
||||
dictionary PairingEvent {
|
||||
PairingEventType pairing;
|
||||
bluetooth.Device device;
|
||||
DOMString? pincode;
|
||||
long? passkey;
|
||||
long? enteredKey;
|
||||
};
|
||||
|
||||
dictionary NewAdapterState {
|
||||
// The human-readable name of the adapter.
|
||||
DOMString? name;
|
||||
|
||||
// Whether or not the adapter has power.
|
||||
boolean? powered;
|
||||
|
||||
// Whether the adapter is discoverable by other devices.
|
||||
boolean? discoverable;
|
||||
};
|
||||
|
||||
dictionary SetPairingResponseOptions {
|
||||
// The remote device to send the pairing response.
|
||||
bluetooth.Device device;
|
||||
|
||||
// The response type.
|
||||
PairingResponse response;
|
||||
|
||||
// A 1-16 character alphanumeric set in response to
|
||||
// <code>requestPincode</code>.
|
||||
DOMString? pincode;
|
||||
|
||||
// An integer between 0-999999 set in response to
|
||||
// <code>requestPasskey</code>.
|
||||
long? passkey;
|
||||
};
|
||||
|
||||
dictionary DiscoveryFilter {
|
||||
// Transport type.
|
||||
TransportType? transport;
|
||||
|
||||
// uuid of service or array of uuids
|
||||
(DOMString or DOMString[])? uuids;
|
||||
|
||||
// RSSI ranging value. Only devices with RSSI higher than this value will be
|
||||
// reported.
|
||||
long? rssi;
|
||||
|
||||
// Pathloss ranging value. Only devices with pathloss lower than this value
|
||||
// will be reported.
|
||||
long? pathloss;
|
||||
};
|
||||
|
||||
callback VoidCallback = void();
|
||||
callback ConnectCallback = void(ConnectResultType result);
|
||||
|
||||
// These functions all report failures via chrome.runtime.lastError.
|
||||
interface Functions {
|
||||
// Changes the state of the Bluetooth adapter.
|
||||
// |adapterState|: The new state of the adapter.
|
||||
// |callback|: Called when all the state changes have been completed.
|
||||
static void setAdapterState(
|
||||
NewAdapterState adapterState,
|
||||
optional VoidCallback callback);
|
||||
|
||||
static void setPairingResponse(
|
||||
SetPairingResponseOptions options,
|
||||
optional VoidCallback callback);
|
||||
|
||||
// Tears down all connections to the given device.
|
||||
static void disconnectAll(
|
||||
DOMString deviceAddress,
|
||||
optional VoidCallback callback);
|
||||
|
||||
// Forgets the given device.
|
||||
static void forgetDevice(
|
||||
DOMString deviceAddress,
|
||||
optional VoidCallback callback);
|
||||
|
||||
// Set or clear discovery filter.
|
||||
static void setDiscoveryFilter(
|
||||
DiscoveryFilter discoveryFilter,
|
||||
optional VoidCallback callback);
|
||||
|
||||
// Connects to the given device. This will only throw an error if the
|
||||
// device address is invalid or the device is already connected. Otherwise
|
||||
// this will succeed and invoke |callback| with ConnectResultType.
|
||||
static void connect(
|
||||
DOMString deviceAddress,
|
||||
optional ConnectCallback callback);
|
||||
|
||||
// Pairs the given device.
|
||||
static void pair(
|
||||
DOMString deviceAddress,
|
||||
optional VoidCallback callback);
|
||||
|
||||
// Record that a pairing attempt finished. Ignores cancellations.
|
||||
static void recordPairing(bluetooth.Transport transport,
|
||||
long pairingDurationMs,
|
||||
optional ConnectResultType result);
|
||||
|
||||
// Record that a user-initiated reconnection attempt to an already paired
|
||||
// device finished. Ignores cancellations.
|
||||
static void recordReconnection(optional ConnectResultType result);
|
||||
|
||||
// Record that a user selected a device to connect to.
|
||||
static void recordDeviceSelection(long selectionDurationMs,
|
||||
boolean wasPaired,
|
||||
bluetooth.Transport transport);
|
||||
};
|
||||
|
||||
interface Events {
|
||||
// Fired when a pairing event occurs.
|
||||
// |pairingEvent|: A pairing event.
|
||||
[maxListeners=1] static void onPairing(PairingEvent pairingEvent);
|
||||
|
||||
// Fired when a Bluetooth device changed its address.
|
||||
static void onDeviceAddressChanged(bluetooth.Device device,
|
||||
DOMString oldAddress);
|
||||
};
|
||||
};
|
||||
@@ -1,66 +0,0 @@
|
||||
// Copyright 2020 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Stub namespace for the "content_scripts" manifest key.
|
||||
[generate_error_messages]
|
||||
namespace contentScripts {
|
||||
// Describes a content script to be injected into a web page.
|
||||
dictionary ContentScript {
|
||||
// Specifies which pages this content script will be injected into. See
|
||||
// <a href="develop/concepts/match-patterns">Match Patterns</a> for more
|
||||
// details on the syntax of these strings.
|
||||
DOMString[] matches;
|
||||
// Excludes pages that this content script would otherwise be injected into.
|
||||
// See <a href="develop/concepts/match-patterns">Match Patterns</a> for more
|
||||
// details on the syntax of these strings.
|
||||
DOMString[]? exclude_matches;
|
||||
// The list of CSS files to be injected into matching pages. These are
|
||||
// injected in the order they appear in this array, before any DOM is
|
||||
// constructed or displayed for the page.
|
||||
DOMString[]? css;
|
||||
// The list of JavaScript files to be injected into matching pages. These
|
||||
// are injected in the order they appear in this array.
|
||||
DOMString[]? js;
|
||||
// If specified true, it will inject into all frames, even if the frame is
|
||||
// not the top-most frame in the tab. Each frame is checked independently
|
||||
// for URL requirements; it will not inject into child frames if the URL
|
||||
// requirements are not met. Defaults to false, meaning that only the top
|
||||
// frame is matched.
|
||||
boolean? all_frames;
|
||||
// Whether the script should inject into any frames where the URL belongs to
|
||||
// a scheme that would never match a specified Match Pattern, including
|
||||
// about:, data:, blob:, and filesystem: schemes. In these cases, in order
|
||||
// to determine if the script should inject, the origin of the URL is
|
||||
// checked. If the origin is `null` (as is the case for data: URLs), then
|
||||
// the "initiator" or "creator" origin is used (i.e., the origin of the
|
||||
// frame that created or navigated this frame). Note that this may not
|
||||
// be the parent frame, if the frame was navigated by another frame in the
|
||||
// document hierarchy.
|
||||
boolean? match_origin_as_fallback;
|
||||
// Whether the script should inject into an about:blank frame where the
|
||||
// parent or opener frame matches one of the patterns declared in matches.
|
||||
// Defaults to false.
|
||||
boolean? match_about_blank;
|
||||
// Applied after matches to include only those URLs that also match this
|
||||
// glob. Intended to emulate the
|
||||
// <a href="http://wiki.greasespot.net/Metadata_Block#.40include">@include
|
||||
// </a> Greasemonkey keyword.
|
||||
DOMString[]? include_globs;
|
||||
// Applied after matches to exclude URLs that match this glob. Intended to
|
||||
// emulate the
|
||||
// <a href="https://wiki.greasespot.net/Metadata_Block#.40exclude">@exclude
|
||||
// </a> Greasemonkey keyword.
|
||||
DOMString[]? exclude_globs;
|
||||
// Specifies when JavaScript files are injected into the web page. The
|
||||
// preferred and default value is <code>document_idle</code>.
|
||||
extensionTypes.RunAt? run_at;
|
||||
// The JavaScript "world" to run the script in. Defaults to
|
||||
// <code>ISOLATED</code>. Only available in Manifest V3 extensions.
|
||||
extensionTypes.ExecutionWorld? world;
|
||||
};
|
||||
|
||||
dictionary ManifestKeys {
|
||||
ContentScript[]? content_scripts;
|
||||
};
|
||||
};
|
||||
@@ -1,948 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// The <code>chrome.declarativeNetRequest</code> API is used to block or modify
|
||||
// network requests by specifying declarative rules. This lets extensions
|
||||
// modify network requests without intercepting them and viewing their content,
|
||||
// thus providing more privacy.
|
||||
[generate_error_messages]
|
||||
namespace declarativeNetRequest {
|
||||
// This describes the resource type of the network request.
|
||||
enum ResourceType {
|
||||
main_frame,
|
||||
sub_frame,
|
||||
stylesheet,
|
||||
script,
|
||||
image,
|
||||
font,
|
||||
object,
|
||||
xmlhttprequest,
|
||||
ping,
|
||||
csp_report,
|
||||
media,
|
||||
websocket,
|
||||
webtransport,
|
||||
webbundle,
|
||||
other
|
||||
};
|
||||
|
||||
// This describes the HTTP request method of a network request.
|
||||
enum RequestMethod {
|
||||
connect,
|
||||
delete,
|
||||
get,
|
||||
head,
|
||||
options,
|
||||
patch,
|
||||
post,
|
||||
put,
|
||||
other
|
||||
};
|
||||
|
||||
// This describes whether the request is first or third party to the frame in
|
||||
// which it originated. A request is said to be first party if it has the same
|
||||
// domain (eTLD+1) as the frame in which the request originated.
|
||||
enum DomainType {
|
||||
// The network request is first party to the frame in which it originated.
|
||||
firstParty,
|
||||
// The network request is third party to the frame in which it originated.
|
||||
thirdParty
|
||||
};
|
||||
|
||||
// This describes the possible operations for a "modifyHeaders" rule.
|
||||
enum HeaderOperation {
|
||||
// Adds a new entry for the specified header. When modifying the headers of
|
||||
// a request, this operation is only supported for
|
||||
// <a href="#header_modification">specific headers</a>.
|
||||
append,
|
||||
// Sets a new value for the specified header, removing any existing headers
|
||||
// with the same name.
|
||||
set,
|
||||
// Removes all entries for the specified header.
|
||||
remove
|
||||
};
|
||||
|
||||
// Describes the kind of action to take if a given RuleCondition matches.
|
||||
enum RuleActionType {
|
||||
// Block the network request.
|
||||
block,
|
||||
// Redirect the network request.
|
||||
redirect,
|
||||
// Allow the network request. The request won't be intercepted if there is
|
||||
// an allow rule which matches it.
|
||||
allow,
|
||||
// Upgrade the network request url's scheme to https if the request is http
|
||||
// or ftp.
|
||||
upgradeScheme,
|
||||
// Modify request/response headers from the network request.
|
||||
modifyHeaders,
|
||||
// Allow all requests within a frame hierarchy, including the frame request
|
||||
// itself.
|
||||
allowAllRequests
|
||||
};
|
||||
|
||||
// Describes the reason why a given regular expression isn't supported.
|
||||
enum UnsupportedRegexReason {
|
||||
// The regular expression is syntactically incorrect, or uses features
|
||||
// not available in the
|
||||
// <a href = "https://github.com/google/re2/wiki/Syntax">RE2 syntax</a>.
|
||||
syntaxError,
|
||||
// The regular expression exceeds the memory limit.
|
||||
memoryLimitExceeded
|
||||
};
|
||||
|
||||
// <!-- Lists the types of condition currently supported by RuleCondition, to
|
||||
// aid feature detection. Must be kept consistent with the RuleCondition
|
||||
// dictionary. -->
|
||||
enum RuleConditionKeys {
|
||||
urlFilter,
|
||||
regexFilter,
|
||||
isUrlFilterCaseSensitive,
|
||||
initiatorDomains,
|
||||
excludedInitiatorDomains,
|
||||
requestDomains,
|
||||
excludedRequestDomains,
|
||||
topDomains,
|
||||
excludedTopDomains,
|
||||
domains,
|
||||
excludedDomains,
|
||||
resourceTypes,
|
||||
excludedResourceTypes,
|
||||
requestMethods,
|
||||
excludedRequestMethods,
|
||||
domainType,
|
||||
tabIds,
|
||||
excludedTabIds,
|
||||
responseHeaders,
|
||||
excludedResponseHeaders
|
||||
};
|
||||
|
||||
// Describes a single static ruleset.
|
||||
dictionary Ruleset {
|
||||
// A non-empty string uniquely identifying the ruleset. IDs beginning with
|
||||
// '_' are reserved for internal use.
|
||||
DOMString id;
|
||||
// The path of the JSON ruleset relative to the extension directory.
|
||||
DOMString path;
|
||||
// Whether the ruleset is enabled by default.
|
||||
boolean enabled;
|
||||
};
|
||||
|
||||
// Represents a query key-value pair.
|
||||
dictionary QueryKeyValue {
|
||||
DOMString key;
|
||||
DOMString value;
|
||||
|
||||
// If true, the query key is replaced only if it's already present.
|
||||
// Otherwise, the key is also added if it's missing. Defaults to false.
|
||||
boolean? replaceOnly;
|
||||
};
|
||||
|
||||
// Describes modification to the url query.
|
||||
dictionary QueryTransform {
|
||||
// The list of query keys to be removed.
|
||||
DOMString[]? removeParams;
|
||||
// The list of query key-value pairs to be added or replaced.
|
||||
QueryKeyValue[]? addOrReplaceParams;
|
||||
};
|
||||
|
||||
// Describes modification to various url components.
|
||||
dictionary URLTransform {
|
||||
// The new scheme for the request. Allowed values are "http", "https",
|
||||
// "ftp" and "chrome-extension".
|
||||
DOMString? scheme;
|
||||
|
||||
// The new host for the request.
|
||||
DOMString? host;
|
||||
|
||||
// The new port for the request. If empty, the existing port is cleared.
|
||||
DOMString? port;
|
||||
|
||||
// The new path for the request. If empty, the existing path is cleared.
|
||||
DOMString? path;
|
||||
|
||||
// The new query for the request. Should be either empty, in which case the
|
||||
// existing query is cleared; or should begin with '?'.
|
||||
DOMString? query;
|
||||
|
||||
// Add, remove or replace query key-value pairs.
|
||||
QueryTransform? queryTransform;
|
||||
|
||||
// The new fragment for the request. Should be either empty, in which case
|
||||
// the existing fragment is cleared; or should begin with '#'.
|
||||
DOMString? fragment;
|
||||
|
||||
// The new username for the request.
|
||||
DOMString? username;
|
||||
|
||||
// The new password for the request.
|
||||
DOMString? password;
|
||||
};
|
||||
|
||||
dictionary Redirect {
|
||||
// Path relative to the extension directory. Should start with '/'.
|
||||
DOMString? extensionPath;
|
||||
// Url transformations to perform.
|
||||
URLTransform? transform;
|
||||
// The redirect url. Redirects to JavaScript urls are not allowed.
|
||||
DOMString? url;
|
||||
|
||||
// Substitution pattern for rules which specify a <code>regexFilter</code>.
|
||||
// The first match of <code>regexFilter</code> within the url will be
|
||||
// replaced with this pattern. Within <code>regexSubstitution</code>,
|
||||
// backslash-escaped digits (\1 to \9) can be used to insert the
|
||||
// corresponding capture groups. \0 refers to the entire matching text.
|
||||
DOMString? regexSubstitution;
|
||||
};
|
||||
|
||||
dictionary HeaderInfo {
|
||||
// The name of the header. This condition matches on the name
|
||||
// only if both `values` and `excludedValues` are not specified.
|
||||
DOMString header;
|
||||
// If specified, this condition matches if the header's value matches at
|
||||
// least one pattern in this list. This supports case-insensitive header
|
||||
// value matching plus the following constructs:
|
||||
//
|
||||
// <b>'*'</b> : Matches any number of characters.
|
||||
//
|
||||
// <b>'?'</b> : Matches zero or one character(s).
|
||||
//
|
||||
// '*' and '?' can be escaped with a backslash, e.g. '\*' and '\?'
|
||||
DOMString[]? values;
|
||||
// If specified, this condition is not matched if the header exists but its
|
||||
// value contains at least one element in this list. This uses the same
|
||||
// match pattern syntax as `values`.
|
||||
DOMString[]? excludedValues;
|
||||
};
|
||||
|
||||
// <!-- When adding/removing keys from this dictionary, also update the
|
||||
// RuleConditionKeys enum. -->
|
||||
dictionary RuleCondition {
|
||||
|
||||
// The pattern which is matched against the network request url.
|
||||
// Supported constructs:
|
||||
//
|
||||
// <b>'*'</b> : Wildcard: Matches any number of characters.
|
||||
//
|
||||
// <b>'|'</b> : Left/right anchor: If used at either end of the pattern,
|
||||
// specifies the beginning/end of the url respectively.
|
||||
//
|
||||
// <b>'||'</b> : Domain name anchor: If used at the beginning of the
|
||||
// pattern, specifies the start of a (sub-)domain of the URL.
|
||||
//
|
||||
// <b>'^'</b> : Separator character: This matches anything except a letter,
|
||||
// a digit, or one of the following: <code>_</code>,
|
||||
// <code>-</code>, <code>.</code>, or <code>%</code>. This
|
||||
// also match the end of the URL.
|
||||
//
|
||||
// Therefore <code>urlFilter</code> is composed of the following parts:
|
||||
// (optional Left/Domain name anchor) + pattern + (optional Right anchor).
|
||||
//
|
||||
// If omitted, all urls are matched. An empty string is not allowed.
|
||||
//
|
||||
// A pattern beginning with <code>||*</code> is not allowed. Use
|
||||
// <code>*</code> instead.
|
||||
//
|
||||
// Note: Only one of <code>urlFilter</code> or <code>regexFilter</code> can
|
||||
// be specified.
|
||||
//
|
||||
// Note: The <code>urlFilter</code> must be composed of only ASCII
|
||||
// characters. This is matched against a url where the host is encoded in
|
||||
// the punycode format (in case of internationalized domains) and any other
|
||||
// non-ascii characters are url encoded in utf-8.
|
||||
// For example, when the request url is
|
||||
// http://abc.рф?q=ф, the
|
||||
// <code>urlFilter</code> will be matched against the url
|
||||
// http://abc.xn--p1ai/?q=%D1%84.
|
||||
DOMString? urlFilter;
|
||||
|
||||
// Regular expression to match against the network request url. This follows
|
||||
// the <a href = "https://github.com/google/re2/wiki/Syntax">RE2 syntax</a>.
|
||||
//
|
||||
// Note: Only one of <code>urlFilter</code> or <code>regexFilter</code> can
|
||||
// be specified.
|
||||
//
|
||||
// Note: The <code>regexFilter</code> must be composed of only ASCII
|
||||
// characters. This is matched against a url where the host is encoded in
|
||||
// the punycode format (in case of internationalized domains) and any other
|
||||
// non-ascii characters are url encoded in utf-8.
|
||||
DOMString? regexFilter;
|
||||
|
||||
// Whether the <code>urlFilter</code> or <code>regexFilter</code>
|
||||
// (whichever is specified) is case sensitive. Default is false.
|
||||
boolean? isUrlFilterCaseSensitive;
|
||||
|
||||
// The rule will only match network requests originating from the list of
|
||||
// <code>initiatorDomains</code>. If the list is omitted, the rule is
|
||||
// applied to requests from all domains. An empty list is not allowed.
|
||||
//
|
||||
// Notes:
|
||||
// <ul>
|
||||
// <li>Sub-domains like "a.example.com" are also allowed.</li>
|
||||
// <li>The entries must consist of only ascii characters.</li>
|
||||
// <li>Use punycode encoding for internationalized domains.</li>
|
||||
// <li>
|
||||
// This matches against the request initiator and not the request url.
|
||||
// </li>
|
||||
// <li>Sub-domains of the listed domains are also matched.</li>
|
||||
// </ul>
|
||||
DOMString[]? initiatorDomains;
|
||||
|
||||
// The rule will not match network requests originating from the list of
|
||||
// <code>excludedInitiatorDomains</code>. If the list is empty or omitted,
|
||||
// no domains are excluded. This takes precedence over
|
||||
// <code>initiatorDomains</code>.
|
||||
//
|
||||
// Notes:
|
||||
// <ul>
|
||||
// <li>Sub-domains like "a.example.com" are also allowed.</li>
|
||||
// <li>The entries must consist of only ascii characters.</li>
|
||||
// <li>Use punycode encoding for internationalized domains.</li>
|
||||
// <li>
|
||||
// This matches against the request initiator and not the request url.
|
||||
// </li>
|
||||
// <li>Sub-domains of the listed domains are also excluded.</li>
|
||||
// </ul>
|
||||
DOMString[]? excludedInitiatorDomains;
|
||||
|
||||
// The rule will only match network requests when the domain matches one
|
||||
// from the list of <code>requestDomains</code>. If the list is omitted,
|
||||
// the rule is applied to requests from all domains. An empty list is not
|
||||
// allowed.
|
||||
//
|
||||
// Notes:
|
||||
// <ul>
|
||||
// <li>Sub-domains like "a.example.com" are also allowed.</li>
|
||||
// <li>The entries must consist of only ascii characters.</li>
|
||||
// <li>Use punycode encoding for internationalized domains.</li>
|
||||
// <li>Sub-domains of the listed domains are also matched.</li>
|
||||
// </ul>
|
||||
DOMString[]? requestDomains;
|
||||
|
||||
// The rule will not match network requests when the domains matches one
|
||||
// from the list of <code>excludedRequestDomains</code>. If the list is
|
||||
// empty or omitted, no domains are excluded. This takes precedence over
|
||||
// <code>requestDomains</code>.
|
||||
//
|
||||
// Notes:
|
||||
// <ul>
|
||||
// <li>Sub-domains like "a.example.com" are also allowed.</li>
|
||||
// <li>The entries must consist of only ascii characters.</li>
|
||||
// <li>Use punycode encoding for internationalized domains.</li>
|
||||
// <li>Sub-domains of the listed domains are also excluded.</li>
|
||||
// </ul>
|
||||
DOMString[]? excludedRequestDomains;
|
||||
|
||||
// The rule will only match network requests when the associated top-level
|
||||
// frame's domain matches one from the list of <code>topDomains</code>. If
|
||||
// the list is omitted, the rule is applied to requests associated with all
|
||||
// top-level frame domains. An empty list is not allowed.
|
||||
//
|
||||
// Notes:
|
||||
// <ul>
|
||||
// <li>Sub-domains like "a.example.com" are also allowed.</li>
|
||||
// <li>The entries must consist of only ascii characters.</li>
|
||||
// <li>Use punycode encoding for internationalized domains.</li>
|
||||
// <li>Sub-domains of the listed domains are also matched.</li>
|
||||
// <li>For requests with no associated top-level frame (e.g. ServiceWorker
|
||||
// initiated requests, the request initiator's domain is considered
|
||||
// instead.</li>
|
||||
// </ul>
|
||||
DOMString[]? topDomains;
|
||||
|
||||
// The rule will not match network requests when the associated top-level
|
||||
// frame's domain matches one from the list of
|
||||
// <code>excludedTopDomains</code>. If the list is empty or omitted, no
|
||||
// domains are excluded. This takes precedence over
|
||||
// <code>topDomains</code>.
|
||||
//
|
||||
// Notes:
|
||||
// <ul>
|
||||
// <li>Sub-domains like "a.example.com" are also allowed.</li>
|
||||
// <li>The entries must consist of only ascii characters.</li>
|
||||
// <li>Use punycode encoding for internationalized domains.</li>
|
||||
// <li>Sub-domains of the listed domains are also excluded.</li>
|
||||
// <li>For requests with no associated top-level frame (e.g. ServiceWorker
|
||||
// initiated requests, the request initiator's domain is considered
|
||||
// instead.</li>
|
||||
// </ul>
|
||||
DOMString[]? excludedTopDomains;
|
||||
|
||||
// The rule will only match network requests originating from the list of
|
||||
// <code>domains</code>.
|
||||
[deprecated="Use $(ref:initiatorDomains) instead"]
|
||||
DOMString[]? domains;
|
||||
|
||||
// The rule will not match network requests originating from the list of
|
||||
// <code>excludedDomains</code>.
|
||||
[deprecated="Use $(ref:excludedInitiatorDomains) instead"]
|
||||
DOMString[]? excludedDomains;
|
||||
|
||||
// List of resource types which the rule can match. An empty list is not
|
||||
// allowed.
|
||||
//
|
||||
// Note: this must be specified for <code>allowAllRequests</code> rules and
|
||||
// may only include the <code>sub_frame</code> and <code>main_frame</code>
|
||||
// resource types.
|
||||
ResourceType[]? resourceTypes;
|
||||
|
||||
// List of resource types which the rule won't match. Only one of
|
||||
// <code>resourceTypes</code> and <code>excludedResourceTypes</code> should
|
||||
// be specified. If neither of them is specified, all resource types except
|
||||
// "main_frame" are blocked.
|
||||
ResourceType[]? excludedResourceTypes;
|
||||
|
||||
// List of HTTP request methods which the rule can match. An empty list is
|
||||
// not allowed.
|
||||
//
|
||||
// Note: Specifying a <code>requestMethods</code> rule condition will also
|
||||
// exclude non-HTTP(s) requests, whereas specifying
|
||||
// <code>excludedRequestMethods</code> will not.
|
||||
RequestMethod[]? requestMethods;
|
||||
|
||||
// List of request methods which the rule won't match. Only one of
|
||||
// <code>requestMethods</code> and <code>excludedRequestMethods</code>
|
||||
// should be specified. If neither of them is specified, all request methods
|
||||
// are matched.
|
||||
RequestMethod[]? excludedRequestMethods;
|
||||
|
||||
// Specifies whether the network request is first-party or third-party to
|
||||
// the domain from which it originated. If omitted, all requests are
|
||||
// accepted.
|
||||
DomainType? domainType;
|
||||
|
||||
// List of $(ref:tabs.Tab.id) which the rule should match. An ID of
|
||||
// $(ref:tabs.TAB_ID_NONE) matches requests which don't originate from a
|
||||
// tab. An empty list is not allowed. Only supported for session-scoped
|
||||
// rules.
|
||||
long[]? tabIds;
|
||||
|
||||
// List of $(ref:tabs.Tab.id) which the rule should not match. An ID of
|
||||
// $(ref:tabs.TAB_ID_NONE) excludes requests which don't originate from a
|
||||
// tab. Only supported for session-scoped rules.
|
||||
long[]? excludedTabIds;
|
||||
|
||||
// Rule matches if the request matches any response header condition in this
|
||||
// list (if specified).
|
||||
HeaderInfo[]? responseHeaders;
|
||||
|
||||
// Rule does not match if the request matches any response header
|
||||
// condition in this list (if specified). If both `excludedResponseHeaders`
|
||||
// and `responseHeaders` are specified, then the `excludedResponseHeaders`
|
||||
// property takes precedence.
|
||||
HeaderInfo[]? excludedResponseHeaders;
|
||||
};
|
||||
|
||||
// Options for regex filters and substitutions for headers.
|
||||
[nodoc] dictionary HeaderRegexOptions {
|
||||
// Whether the regex should match all groups for the value. This is only
|
||||
// relevant if a regex substitution is present and would thus need to be
|
||||
// applied onto all matching groups. Equivalent to the "g" flag.
|
||||
// Defaults to false.
|
||||
boolean? matchAll;
|
||||
};
|
||||
|
||||
dictionary ModifyHeaderInfo {
|
||||
// The name of the header to be modified.
|
||||
DOMString header;
|
||||
|
||||
// The operation to be performed on a header.
|
||||
// <!-- TODO(crbug.com/352093575): Make this field optional: It is ignored
|
||||
// if `regexSubstitution` is specified but is required otherwise. -->
|
||||
HeaderOperation operation;
|
||||
|
||||
// The new value for the header. Must be specified for <code>append</code>
|
||||
// and <code>set</code> operations.
|
||||
// <!-- TODO(crbug.com/352093575): Ignored if `regexSubstitution` is
|
||||
// specified, -->
|
||||
DOMString? value;
|
||||
|
||||
// A regular expression to match against the header value. This follows the
|
||||
// RE2 syntax for consistency with the rest of the API.
|
||||
[nodoc] DOMString? regexFilter;
|
||||
|
||||
// Substitution pattern for the response header. `regexFilter` must be
|
||||
// specified for this to be valid. Takes precedence over `value` and
|
||||
// `operation` if specified and valid.
|
||||
[nodoc] DOMString? regexSubstitution;
|
||||
|
||||
// Options for the regex filter. If not specified, all options will be
|
||||
// default.
|
||||
[nodoc] HeaderRegexOptions? regexOptions;
|
||||
};
|
||||
|
||||
dictionary RuleAction {
|
||||
// The type of action to perform.
|
||||
RuleActionType type;
|
||||
|
||||
// Describes how the redirect should be performed. Only valid for redirect
|
||||
// rules.
|
||||
Redirect? redirect;
|
||||
|
||||
// The request headers to modify for the request. Only valid if
|
||||
// RuleActionType is "modifyHeaders".
|
||||
ModifyHeaderInfo[]? requestHeaders;
|
||||
|
||||
// The response headers to modify for the request. Only valid if
|
||||
// RuleActionType is "modifyHeaders".
|
||||
ModifyHeaderInfo[]? responseHeaders;
|
||||
};
|
||||
|
||||
dictionary Rule {
|
||||
// An id which uniquely identifies a rule. Mandatory and should be >= 1.
|
||||
long id;
|
||||
|
||||
// Rule priority. Defaults to 1. When specified, should be >= 1.
|
||||
long? priority;
|
||||
|
||||
// The condition under which this rule is triggered.
|
||||
RuleCondition condition;
|
||||
|
||||
// The action to take if this rule is matched.
|
||||
RuleAction action;
|
||||
};
|
||||
|
||||
// Uniquely describes a declarative rule specified by the extension.
|
||||
dictionary MatchedRule {
|
||||
// A matching rule's ID.
|
||||
long ruleId;
|
||||
|
||||
// ID of the $(ref:Ruleset) this rule belongs to. For a rule originating
|
||||
// from the set of dynamic rules, this will be equal to
|
||||
// $(ref:DYNAMIC_RULESET_ID).
|
||||
DOMString rulesetId;
|
||||
};
|
||||
|
||||
dictionary GetRulesFilter {
|
||||
// If specified, only rules with matching IDs are included.
|
||||
long[]? ruleIds;
|
||||
};
|
||||
|
||||
dictionary MatchedRuleInfo {
|
||||
MatchedRule rule;
|
||||
|
||||
// The time the rule was matched. Timestamps will correspond to the
|
||||
// Javascript convention for times, i.e. number of milliseconds since the
|
||||
// epoch.
|
||||
double timeStamp;
|
||||
|
||||
// The tabId of the tab from which the request originated if the tab is
|
||||
// still active. Else -1.
|
||||
long tabId;
|
||||
};
|
||||
|
||||
dictionary MatchedRulesFilter {
|
||||
// If specified, only matches rules for the given tab. Matches rules not
|
||||
// associated with any active tab if set to -1.
|
||||
long? tabId;
|
||||
|
||||
// If specified, only matches rules after the given timestamp.
|
||||
double? minTimeStamp;
|
||||
};
|
||||
|
||||
dictionary RulesMatchedDetails {
|
||||
// Rules matching the given filter.
|
||||
MatchedRuleInfo[] rulesMatchedInfo;
|
||||
};
|
||||
|
||||
dictionary RequestDetails {
|
||||
// The ID of the request. Request IDs are unique within a browser session.
|
||||
DOMString requestId;
|
||||
|
||||
// The URL of the request.
|
||||
DOMString url;
|
||||
|
||||
// The origin where the request was initiated. This does not change through
|
||||
// redirects. If this is an opaque origin, the string 'null' will be used.
|
||||
DOMString? initiator;
|
||||
|
||||
// Standard HTTP method.
|
||||
DOMString method;
|
||||
|
||||
// The value 0 indicates that the request happens in the main frame; a
|
||||
// positive value indicates the ID of a subframe in which the request
|
||||
// happens. If the document of a (sub-)frame is loaded (<code>type</code> is
|
||||
// <code>main_frame</code> or <code>sub_frame</code>), <code>frameId</code>
|
||||
// indicates the ID of this frame, not the ID of the outer frame. Frame IDs
|
||||
// are unique within a tab.
|
||||
long frameId;
|
||||
|
||||
// The unique identifier for the frame's document, if this request is for a
|
||||
// frame.
|
||||
DOMString? documentId;
|
||||
|
||||
// The type of the frame, if this request is for a frame.
|
||||
extensionTypes.FrameType? frameType;
|
||||
|
||||
// The lifecycle of the frame's document, if this request is for a
|
||||
// frame.
|
||||
extensionTypes.DocumentLifecycle? documentLifecycle;
|
||||
|
||||
// ID of frame that wraps the frame which sent the request. Set to -1 if no
|
||||
// parent frame exists.
|
||||
long parentFrameId;
|
||||
|
||||
// The unique identifier for the frame's parent document, if this request
|
||||
// is for a frame and has a parent.
|
||||
DOMString? parentDocumentId;
|
||||
|
||||
// The ID of the tab in which the request takes place. Set to -1 if the
|
||||
// request isn't related to a tab.
|
||||
long tabId;
|
||||
|
||||
// The resource type of the request.
|
||||
ResourceType type;
|
||||
};
|
||||
|
||||
dictionary TestMatchRequestDetails {
|
||||
// The URL of the hypothetical request.
|
||||
DOMString url;
|
||||
|
||||
// The initiator URL (if any) for the hypothetical request.
|
||||
DOMString? initiator;
|
||||
|
||||
// Standard HTTP method of the hypothetical request. Defaults to "get" for
|
||||
// HTTP requests and is ignored for non-HTTP requests.
|
||||
RequestMethod? method;
|
||||
|
||||
// The resource type of the hypothetical request.
|
||||
ResourceType type;
|
||||
|
||||
// The ID of the tab in which the hypothetical request takes place. Does
|
||||
// not need to correspond to a real tab ID. Default is -1, meaning that
|
||||
// the request isn't related to a tab.
|
||||
long? tabId;
|
||||
|
||||
// The associated top-level frame URL (if any) for the request.
|
||||
DOMString? topUrl;
|
||||
|
||||
// The headers provided by a hypothetical response if the request does not
|
||||
// get blocked or redirected before it is sent. Represented as an object
|
||||
// which maps a header name to a list of string values. If not specified,
|
||||
// the hypothetical response would return empty response headers, which can
|
||||
// match rules which match on the non-existence of headers.
|
||||
// E.g. <code>{"content-type": ["text/html; charset=utf-8",
|
||||
// "multipart/form-data"]}</code>
|
||||
object? responseHeaders;
|
||||
};
|
||||
|
||||
dictionary MatchedRuleInfoDebug {
|
||||
MatchedRule rule;
|
||||
|
||||
// Details about the request for which the rule was matched.
|
||||
RequestDetails request;
|
||||
};
|
||||
|
||||
[nodoc] dictionary DNRInfo {
|
||||
Ruleset[] rule_resources;
|
||||
};
|
||||
|
||||
[nodoc] dictionary ManifestKeys {
|
||||
DNRInfo? declarative_net_request;
|
||||
};
|
||||
|
||||
dictionary RegexOptions {
|
||||
// The regular expresson to check.
|
||||
DOMString regex;
|
||||
|
||||
// Whether the <code>regex</code> specified is case sensitive. Default is
|
||||
// true.
|
||||
boolean? isCaseSensitive;
|
||||
|
||||
// Whether the <code>regex</code> specified requires capturing. Capturing is
|
||||
// only required for redirect rules which specify a
|
||||
// <code>regexSubstition</code> action. The default is false.
|
||||
boolean? requireCapturing;
|
||||
};
|
||||
|
||||
dictionary IsRegexSupportedResult {
|
||||
boolean isSupported;
|
||||
|
||||
// Specifies the reason why the regular expression is not supported. Only
|
||||
// provided if <code>isSupported</code> is false.
|
||||
UnsupportedRegexReason? reason;
|
||||
};
|
||||
|
||||
dictionary TestMatchOutcomeResult {
|
||||
// The rules (if any) that match the hypothetical request.
|
||||
MatchedRule[] matchedRules;
|
||||
};
|
||||
|
||||
dictionary UpdateRuleOptions {
|
||||
// IDs of the rules to remove. Any invalid IDs will be ignored.
|
||||
long[]? removeRuleIds;
|
||||
// Rules to add.
|
||||
Rule[]? addRules;
|
||||
};
|
||||
|
||||
dictionary UpdateRulesetOptions {
|
||||
// The set of ids corresponding to a static $(ref:Ruleset) that should be
|
||||
// disabled.
|
||||
DOMString[]? disableRulesetIds;
|
||||
// The set of ids corresponding to a static $(ref:Ruleset) that should be
|
||||
// enabled.
|
||||
DOMString[]? enableRulesetIds;
|
||||
};
|
||||
|
||||
dictionary UpdateStaticRulesOptions {
|
||||
// The id corresponding to a static $(ref:Ruleset).
|
||||
DOMString rulesetId;
|
||||
// Set of ids corresponding to rules in the $(ref:Ruleset) to disable.
|
||||
long[]? disableRuleIds;
|
||||
// Set of ids corresponding to rules in the $(ref:Ruleset) to enable.
|
||||
long[]? enableRuleIds;
|
||||
};
|
||||
|
||||
dictionary GetDisabledRuleIdsOptions {
|
||||
// The id corresponding to a static $(ref:Ruleset).
|
||||
DOMString rulesetId;
|
||||
};
|
||||
|
||||
dictionary TabActionCountUpdate {
|
||||
// The tab for which to update the action count.
|
||||
long tabId;
|
||||
// The amount to increment the tab's action count by. Negative values will
|
||||
// decrement the count.
|
||||
long increment;
|
||||
};
|
||||
|
||||
dictionary ExtensionActionOptions {
|
||||
// Whether to automatically display the action count for a page as the
|
||||
// extension's badge text. This preference is persisted across sessions.
|
||||
boolean? displayActionCountAsBadgeText;
|
||||
// Details of how the tab's action count should be adjusted.
|
||||
TabActionCountUpdate? tabUpdate;
|
||||
};
|
||||
|
||||
callback EmptyCallback = void();
|
||||
callback GetAllowedPagesCallback = void(DOMString[] result);
|
||||
callback GetRulesCallback = void(Rule[] rules);
|
||||
callback GetMatchedRulesCallback = void(RulesMatchedDetails details);
|
||||
callback GetEnabledRulesetsCallback = void(DOMString[] rulesetIds);
|
||||
callback GetDisabledRuleIdsCallback = void(long[] disabledRuleIds);
|
||||
callback IsRegexSupportedCallback = void(IsRegexSupportedResult result);
|
||||
callback GetAvailableStaticRuleCountCallback = void(long count);
|
||||
callback TestMatchOutcomeCallback = void(TestMatchOutcomeResult result);
|
||||
|
||||
interface Functions {
|
||||
|
||||
// Modifies the current set of dynamic rules for the extension.
|
||||
// The rules with IDs listed in <code>options.removeRuleIds</code> are first
|
||||
// removed, and then the rules given in <code>options.addRules</code> are
|
||||
// added. Notes:
|
||||
// <ul>
|
||||
// <li>This update happens as a single atomic operation: either all
|
||||
// specified rules are added and removed, or an error is returned.</li>
|
||||
// <li>These rules are persisted across browser sessions and across
|
||||
// extension updates.</li>
|
||||
// <li>Static rules specified as part of the extension package can not be
|
||||
// removed using this function.</li>
|
||||
// <li>$(ref:MAX_NUMBER_OF_DYNAMIC_RULES) is the maximum number
|
||||
// of dynamic rules an extension can add. The number of
|
||||
// <a href="#safe_rules">unsafe rules</a> must not exceed
|
||||
// $(ref:MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES).</li>
|
||||
// </ul>
|
||||
// |callback|: Promise that resolves once the update is complete.
|
||||
// In case of an error, the promise will be rejected and no change will be
|
||||
// made to the rule set. This can happen for multiple reasons, such as
|
||||
// invalid rule format, duplicate rule ID, rule count limit exceeded,
|
||||
// internal errors, and others.
|
||||
static void updateDynamicRules(
|
||||
UpdateRuleOptions options,
|
||||
optional EmptyCallback callback);
|
||||
|
||||
// Returns the current set of dynamic rules for the extension. Callers can
|
||||
// optionally filter the list of fetched rules by specifying a
|
||||
// <code>filter</code>.
|
||||
// |filter|: An object to filter the list of fetched rules.
|
||||
// |callback|: Promise that resolves with the set of dynamic rules. The
|
||||
// Promise may be rejected in case of transient internal errors.
|
||||
static void getDynamicRules(
|
||||
optional GetRulesFilter filter,
|
||||
GetRulesCallback callback);
|
||||
|
||||
// Modifies the current set of session scoped rules for the extension.
|
||||
// The rules with IDs listed in <code>options.removeRuleIds</code> are first
|
||||
// removed, and then the rules given in <code>options.addRules</code> are
|
||||
// added. Notes:
|
||||
// <ul>
|
||||
// <li>This update happens as a single atomic operation: either all
|
||||
// specified rules are added and removed, or an error is returned.</li>
|
||||
// <li>These rules are not persisted across sessions and are backed in
|
||||
// memory.</li>
|
||||
// <li>$(ref:MAX_NUMBER_OF_SESSION_RULES) is the maximum number
|
||||
// of session rules an extension can add.</li>
|
||||
// </ul>
|
||||
// |callback|: Promise that resolves once the update is complete. In case
|
||||
// of an error, the promise will be rejected and no change will be
|
||||
// made to the rule set. This can happen for multiple reasons, such as
|
||||
// invalid rule format, duplicate rule ID, rule count limit exceeded, and
|
||||
// others.
|
||||
static void updateSessionRules(
|
||||
UpdateRuleOptions options,
|
||||
optional EmptyCallback callback);
|
||||
|
||||
// Returns the current set of session scoped rules for the extension.
|
||||
// Callers can optionally filter the list of fetched rules by specifying a
|
||||
// <code>filter</code>.
|
||||
// |filter|: An object to filter the list of fetched rules.
|
||||
// |callback|: Promise that resolves with the set of session scoped rules.
|
||||
static void getSessionRules(
|
||||
optional GetRulesFilter filter,
|
||||
GetRulesCallback callback);
|
||||
|
||||
// Updates the set of enabled static rulesets for the extension. The
|
||||
// rulesets with IDs listed in <code>options.disableRulesetIds</code> are
|
||||
// first removed, and then the rulesets listed in
|
||||
// <code>options.enableRulesetIds</code> are added.<br/>
|
||||
// Note that the set of enabled static rulesets is persisted across sessions
|
||||
// but not across extension updates, i.e. the <code>rule_resources</code>
|
||||
// manifest key will determine the set of enabled static rulesets on each
|
||||
// extension update.
|
||||
// |callback|: Promise that resolves once the update is complete. In case of
|
||||
// an error, the promise will be rejected and no change will be made to the
|
||||
// set of enabled rulesets. This can happen for multiple reasons, such as
|
||||
// invalid ruleset IDs, rule count limit exceeded, or internal errors.
|
||||
static void updateEnabledRulesets(
|
||||
UpdateRulesetOptions options,
|
||||
optional EmptyCallback callback);
|
||||
|
||||
// Returns the ids for the current set of enabled static rulesets.
|
||||
// |callback|: Promise that resolves with a list of ids, where each id
|
||||
// corresponds to an enabled static $(ref:Ruleset).
|
||||
static void getEnabledRulesets(
|
||||
GetEnabledRulesetsCallback callback);
|
||||
|
||||
// Disables and enables individual static rules in a $(ref:Ruleset).
|
||||
// Changes to rules belonging to a disabled $(ref:Ruleset) will take
|
||||
// effect the next time that it becomes enabled.
|
||||
// |callback|: Promise that resolves when the update is complete. In case of
|
||||
// an error, the promise will be rejected and no change will be made to the
|
||||
// enabled static rules.
|
||||
static void updateStaticRules(
|
||||
UpdateStaticRulesOptions options,
|
||||
optional EmptyCallback callback);
|
||||
|
||||
// Returns the list of static rules in the given $(ref:Ruleset) that are
|
||||
// currently disabled.
|
||||
// |options|: Specifies the ruleset to query.
|
||||
// |callback|: Promise that resolves with a list of ids that correspond to
|
||||
// the disabled rules in that ruleset.
|
||||
static void getDisabledRuleIds(
|
||||
GetDisabledRuleIdsOptions options,
|
||||
GetDisabledRuleIdsCallback callback);
|
||||
|
||||
// Returns all rules matched for the extension. Callers can optionally
|
||||
// filter the list of matched rules by specifying a <code>filter</code>.
|
||||
// This method is only available to extensions with the
|
||||
// <code>"declarativeNetRequestFeedback"</code> permission or having the
|
||||
// <code>"activeTab"</code> permission granted for the <code>tabId</code>
|
||||
// specified in <code>filter</code>.
|
||||
// Note: Rules not associated with an active document that were matched more
|
||||
// than five minutes ago will not be returned.
|
||||
// |filter|: An object to filter the list of matched rules.
|
||||
// |callback|: Promise that resolves once the list of matched rules has been
|
||||
// fetched. In case of an error, the Promise will be rejected. This can
|
||||
// happen for multiple reasons, such as insufficient permissions, or
|
||||
// exceeding the quota.
|
||||
static void getMatchedRules(
|
||||
optional MatchedRulesFilter filter,
|
||||
GetMatchedRulesCallback callback);
|
||||
|
||||
// Configures if the action count for tabs should be displayed as the
|
||||
// extension action's badge text and provides a way for that action count to
|
||||
// be incremented.
|
||||
static void setExtensionActionOptions(
|
||||
ExtensionActionOptions options,
|
||||
optional EmptyCallback callback);
|
||||
|
||||
// Checks if the given regular expression will be supported as a
|
||||
// <code>regexFilter</code> rule condition.
|
||||
// |regexOptions|: The regular expression to check.
|
||||
// |callback|: Promise that resolves with details consisting of whether the
|
||||
// regular expression is supported and the reason if not.
|
||||
static void isRegexSupported(
|
||||
RegexOptions regexOptions,
|
||||
IsRegexSupportedCallback callback);
|
||||
|
||||
// Returns the number of static rules an extension can enable before the
|
||||
// <a href="#global-static-rule-limit">global static rule limit</a> is
|
||||
// reached.
|
||||
static void getAvailableStaticRuleCount(
|
||||
GetAvailableStaticRuleCountCallback callback);
|
||||
|
||||
// Checks if any of the extension's declarativeNetRequest rules would match
|
||||
// a hypothetical request.
|
||||
// Note: Only available for unpacked extensions as this is only intended to
|
||||
// be used during extension development.
|
||||
// |requestDetails|: The request details to test.
|
||||
// |callback|: Promise that resolves with the details of matched rules.
|
||||
static void testMatchOutcome(
|
||||
TestMatchRequestDetails request,
|
||||
TestMatchOutcomeCallback callback);
|
||||
};
|
||||
|
||||
interface Properties {
|
||||
// The minimum number of static rules guaranteed to an extension across its
|
||||
// enabled static rulesets. Any rules above this limit will count towards
|
||||
// the <a href="#global-static-rule-limit">global static rule limit</a>.
|
||||
[value=30000] static long GUARANTEED_MINIMUM_STATIC_RULES();
|
||||
|
||||
// The maximum number of combined dynamic and session scoped rules an
|
||||
// extension can add.
|
||||
[nodoc, value=5000, deprecated="There is no longer a combined limit. See $(ref:MAX_NUMBER_OF_DYNAMIC_RULES) and $(ref:MAX_NUMBER_OF_SESSION_RULES)."] static long MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES();
|
||||
|
||||
// The maximum number of dynamic rules that an extension can add.
|
||||
[value=30000] static long MAX_NUMBER_OF_DYNAMIC_RULES();
|
||||
|
||||
// The maximum number of "unsafe" dynamic rules that an extension can add.
|
||||
[value=5000] static long MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES();
|
||||
|
||||
// The maximum number of session scoped rules that an extension can add.
|
||||
[value=5000] static long MAX_NUMBER_OF_SESSION_RULES();
|
||||
|
||||
// The maximum number of "unsafe" session scoped rules that an extension can
|
||||
// add.
|
||||
[value=5000] static long MAX_NUMBER_OF_UNSAFE_SESSION_RULES();
|
||||
|
||||
// Time interval within which <code>MAX_GETMATCHEDRULES_CALLS_PER_INTERVAL
|
||||
// getMatchedRules</code> calls can be made, specified in minutes.
|
||||
// Additional calls will fail immediately and set $(ref:runtime.lastError).
|
||||
// Note: <code>getMatchedRules</code> calls associated with a user gesture
|
||||
// are exempt from the quota.
|
||||
[value=10] static long GETMATCHEDRULES_QUOTA_INTERVAL();
|
||||
|
||||
// The number of times <code>getMatchedRules</code> can be called within a
|
||||
// period of <code>GETMATCHEDRULES_QUOTA_INTERVAL</code>.
|
||||
[value=20] static long MAX_GETMATCHEDRULES_CALLS_PER_INTERVAL();
|
||||
|
||||
// The maximum number of regular expression rules that an extension can
|
||||
// add. This limit is evaluated separately for the set of dynamic rules and
|
||||
// those specified in the rule resources file.
|
||||
[value=1000] static long MAX_NUMBER_OF_REGEX_RULES();
|
||||
|
||||
// The maximum number of static <code>Rulesets</code> an extension can
|
||||
// specify as part of the <code>"rule_resources"</code> manifest key.
|
||||
[value=100] static long MAX_NUMBER_OF_STATIC_RULESETS();
|
||||
|
||||
// The maximum number of static <code>Rulesets</code> an extension can
|
||||
// enable at any one time.
|
||||
[value=50] static long MAX_NUMBER_OF_ENABLED_STATIC_RULESETS();
|
||||
|
||||
// Ruleset ID for the dynamic rules added by the extension.
|
||||
[value="_dynamic"] static DOMString DYNAMIC_RULESET_ID();
|
||||
|
||||
// Ruleset ID for the session-scoped rules added by the extension.
|
||||
[value="_session"] static DOMString SESSION_RULESET_ID();
|
||||
};
|
||||
|
||||
interface Events {
|
||||
// Fired when a rule is matched with a request. Only available for unpacked
|
||||
// extensions with the <code>"declarativeNetRequestFeedback"</code> permission
|
||||
// as this is intended to be used for debugging purposes only.
|
||||
// |info|: The rule that has been matched along with information about the
|
||||
// associated request.
|
||||
static void onRuleMatchedDebug(MatchedRuleInfoDebug info);
|
||||
};
|
||||
};
|
||||
@@ -1,114 +0,0 @@
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// The <code>chrome.printerProvider</code> API exposes events used by print
|
||||
// manager to query printers controlled by extensions, to query their
|
||||
// capabilities and to submit print jobs to these printers.
|
||||
namespace printerProvider {
|
||||
// Error codes returned in response to $(ref:onPrintRequested) event.
|
||||
enum PrintError {
|
||||
// Specifies that the operation was completed successfully.
|
||||
OK,
|
||||
|
||||
// Specifies that a general failure occured.
|
||||
FAILED,
|
||||
|
||||
// Specifies that the print ticket is invalid. For example, the ticket is
|
||||
// inconsistent with some capabilities, or the extension is not able to
|
||||
// handle all settings from the ticket.
|
||||
INVALID_TICKET,
|
||||
|
||||
// Specifies that the document is invalid. For example, data may be
|
||||
// corrupted or the format is incompatible with the extension.
|
||||
INVALID_DATA
|
||||
};
|
||||
|
||||
// Printer description for $(ref:onGetPrintersRequested) event.
|
||||
dictionary PrinterInfo {
|
||||
// Unique printer ID.
|
||||
DOMString id;
|
||||
|
||||
// Printer's human readable name.
|
||||
DOMString name;
|
||||
|
||||
// Printer's human readable description.
|
||||
DOMString? description;
|
||||
};
|
||||
|
||||
// Printing request parameters. Passed to $(ref:onPrintRequested) event.
|
||||
dictionary PrintJob {
|
||||
// ID of the printer which should handle the job.
|
||||
DOMString printerId;
|
||||
|
||||
// The print job title.
|
||||
DOMString title;
|
||||
|
||||
// Print ticket in
|
||||
// <a href="https://developers.google.com/cloud-print/docs/cdd#cjt">
|
||||
// CJT format</a>.
|
||||
// <aside class="aside flow bg-state-info-bg color-state-info-text">
|
||||
// <div class="flow">The CJT reference is marked as deprecated. It is
|
||||
// deprecated for Google Cloud Print only. is not deprecated for
|
||||
// ChromeOS printing.
|
||||
// </div>
|
||||
// </aside>
|
||||
object ticket;
|
||||
|
||||
// The document content type. Supported formats are
|
||||
// <code>"application/pdf"</code> and <code>"image/pwg-raster"</code>.
|
||||
DOMString contentType;
|
||||
|
||||
// Blob containing the document data to print. Format must match
|
||||
// |contentType|.
|
||||
[instanceOf=Blob] object document;
|
||||
};
|
||||
|
||||
callback PrintersCallback = void(PrinterInfo[] printerInfo);
|
||||
|
||||
callback PrinterInfoCallback = void(optional PrinterInfo printerInfo);
|
||||
|
||||
// |capabilities|: Device capabilities in
|
||||
// <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">CDD
|
||||
// format</a>.
|
||||
callback CapabilitiesCallback = void(object capabilities);
|
||||
|
||||
callback PrintCallback = void(PrintError result);
|
||||
|
||||
interface Events {
|
||||
// Event fired when print manager requests printers provided by extensions.
|
||||
// |resultCallback|: Callback to return printer list. Every listener must
|
||||
// call callback exactly once.
|
||||
static void onGetPrintersRequested(PrintersCallback resultCallback);
|
||||
|
||||
// Event fired when print manager requests information about a USB device
|
||||
// that may be a printer.
|
||||
// <p><em>Note:</em> An application should not rely on this event being
|
||||
// fired more than once per device. If a connected device is supported it
|
||||
// should be returned in the $(ref:onGetPrintersRequested) event.</p>
|
||||
// |device|: The USB device.
|
||||
// |resultCallback|: Callback to return printer info. The receiving listener
|
||||
// must call callback exactly once. If the parameter to this callback is
|
||||
// undefined that indicates that the application has determined that the
|
||||
// device is not supported.
|
||||
static void onGetUsbPrinterInfoRequested(
|
||||
usb.Device device,
|
||||
PrinterInfoCallback resultCallback);
|
||||
|
||||
// Event fired when print manager requests printer capabilities.
|
||||
// |printerId|: Unique ID of the printer whose capabilities are requested.
|
||||
// |resultCallback|: Callback to return device capabilities in
|
||||
// <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">CDD
|
||||
// format</a>.
|
||||
// The receiving listener must call callback exectly once.
|
||||
static void onGetCapabilityRequested(DOMString printerId,
|
||||
CapabilitiesCallback resultCallback);
|
||||
|
||||
// Event fired when print manager requests printing.
|
||||
// |printJob|: The printing request parameters.
|
||||
// |resultCallback|: Callback that should be called when the printing
|
||||
// request is completed.
|
||||
static void onPrintRequested(PrintJob printJob,
|
||||
PrintCallback resultCallback);
|
||||
};
|
||||
};
|
||||
@@ -1,58 +0,0 @@
|
||||
// Copyright 2015 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// printerProviderInternal
|
||||
// Internal API used to run callbacks passed to chrome.printerProvider API
|
||||
// events.
|
||||
// When dispatching a chrome.printerProvider API event, its arguments will be
|
||||
// massaged in custom bindings so a callback is added. The callback uses
|
||||
// chrome.printerProviderInternal API to report the event results.
|
||||
// In order to identify the event for which the callback is called, the event
|
||||
// is internally dispatched having a requestId argument (which is removed from
|
||||
// the argument list before the event actually reaches the event listeners). The
|
||||
// requestId is forwarded to the chrome.printerProviderInternal API functions.
|
||||
[implemented_in="extensions/browser/api/printer_provider/printer_provider_internal_api.h"]
|
||||
namespace printerProviderInternal {
|
||||
// Same as in printerProvider.PrintError enum API.
|
||||
enum PrintError { OK, FAILED, INVALID_TICKET, INVALID_DATA };
|
||||
|
||||
// Callback carrying a blob.
|
||||
callback BlobCallback = void([instanceOf=Blob] object blob);
|
||||
|
||||
interface Functions {
|
||||
// Runs callback to printerProvider.onGetPrintersRequested event.
|
||||
// |requestId|: Parameter identifying the event instance for which the
|
||||
// callback is run.
|
||||
// |printers|: List of printers reported by the extension.
|
||||
void reportPrinters(long requestId,
|
||||
optional printerProvider.PrinterInfo[] printers);
|
||||
|
||||
// Runs callback to printerProvider.onUsbAccessGranted event.
|
||||
// |requestId|: Parameter identifying the event instance for which the
|
||||
// callback is run.
|
||||
// |printerInfo|: Printer information reported by the extension.
|
||||
void reportUsbPrinterInfo(long requestId,
|
||||
optional printerProvider.PrinterInfo printerInfo);
|
||||
|
||||
// Runs callback to printerProvider.onGetCapabilityRequested event.
|
||||
// |requestId|: Parameter identifying the event instance for which the
|
||||
// callback is run.
|
||||
// |error|: The printer capability returned by the extension.
|
||||
void reportPrinterCapability(long request_id, optional object capability);
|
||||
|
||||
// Runs callback to printerProvider.onPrintRequested event.
|
||||
// |requestId|: Parameter identifying the event instance for which the
|
||||
// callback is run.
|
||||
// |error|: The requested print job result.
|
||||
void reportPrintResult(long request_id, optional PrintError error);
|
||||
|
||||
// Gets information needed to create a print data blob for a print request.
|
||||
// The blob will be dispatched to the extension via
|
||||
// printerProvider.onPrintRequested event.
|
||||
// |requestId|: The request id for the print request for which data is
|
||||
// needed.
|
||||
// |callback|: Callback called with a blob of print data.
|
||||
void getPrintData(long requestId, BlobCallback callback);
|
||||
};
|
||||
};
|
||||
@@ -1,72 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Internal namespace for representing content scripts.
|
||||
namespace scriptsInternal {
|
||||
// The source of the user script. This will also determine certain
|
||||
// capabilities of the script (such as whether it can use globs, raw strings
|
||||
// for code, etc).
|
||||
enum Source {
|
||||
DYNAMIC_CONTENT_SCRIPT,
|
||||
DYNAMIC_USER_SCRIPT,
|
||||
MANIFEST_CONTENT_SCRIPT
|
||||
};
|
||||
|
||||
// The source of the script to inject.
|
||||
dictionary ScriptSource {
|
||||
// A string containing the JavaScript code to inject. Exactly one of
|
||||
// <code>file</code> or <code>code</code> must be specified.
|
||||
DOMString? code;
|
||||
// The path of the JavaScript file to inject relative to the extension's
|
||||
// root directory. Exactly one of <code>file</code> or <code>code</code>
|
||||
// must be specified.
|
||||
DOMString? file;
|
||||
};
|
||||
|
||||
// Describes a serialized script, intended for storage and persistence across
|
||||
// browser sessions.
|
||||
// Note: Though it is called "UserScript", this is used for scripts through
|
||||
// the scripting API (dynamic content scripts), content scripts in the
|
||||
// manifest (static content scripts), and user scripts through the userScripts
|
||||
// API. "UserScript" was chosen because it matches the correspodning
|
||||
// extenisons::UserScript object (the runtime representation of this) and
|
||||
// because "Script" is ambiguous (e.g. background script, general JS script,
|
||||
// etc).
|
||||
dictionary SerializedUserScript {
|
||||
// Whether the script will inject into all frames, regardless if it is not
|
||||
// the top-most frame in the tab.
|
||||
boolean? allFrames;
|
||||
// The list of CSS files to be injected into matching pages. Note that,
|
||||
// today, we only expect these to contain files. It is represented as a
|
||||
// ScriptSource for compatibility and consistency with `js`.
|
||||
ScriptSource[]? css;
|
||||
// Excludes pages that this user script would otherwise be injected into.
|
||||
DOMString[]? excludeMatches;
|
||||
// Specifies wildcard patterns for pages this user script will NOT be
|
||||
// injected into.
|
||||
DOMString[]? excludeGlobs;
|
||||
// The ID of the script.
|
||||
DOMString id;
|
||||
// Specifies wildcard patterns for pages this user script will be injected
|
||||
// into.
|
||||
DOMString[]? includeGlobs;
|
||||
// The list of sources of javascript to be injected into matching pages.
|
||||
ScriptSource[]? js;
|
||||
// Specifies which pages this user script will be injected into.
|
||||
DOMString[] matches;
|
||||
// Whether the script should inject into any frames where the URL belongs to
|
||||
// a scheme that would never match a specified Match Pattern, including
|
||||
// about:, data:, blob:, and filesystem: schemes.
|
||||
boolean? matchOriginAsFallback;
|
||||
// Specifies when JavaScript files are injected into the web page.
|
||||
extensionTypes.RunAt? runAt;
|
||||
// The "source" of the user script.
|
||||
Source source;
|
||||
// The JavaScript "world" to run the script in.
|
||||
extensionTypes.ExecutionWorld world;
|
||||
// The ID of the world into which to inject. If omitted, uses the default
|
||||
// world.
|
||||
DOMString? worldId;
|
||||
};
|
||||
};
|
||||
@@ -1,237 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Use the <code>userScripts</code> API to execute user scripts in the User
|
||||
// Scripts context.
|
||||
namespace userScripts {
|
||||
// The JavaScript world for a user script to execute within.
|
||||
enum ExecutionWorld {
|
||||
// Specifies the execution environment of the DOM, which is the execution
|
||||
// environment shared with the host page's JavaScript.
|
||||
MAIN,
|
||||
// Specifies the execution environment that is specific to user scripts and
|
||||
// is exempt from the page's CSP.
|
||||
USER_SCRIPT
|
||||
};
|
||||
|
||||
// The source of the script to inject.
|
||||
dictionary ScriptSource {
|
||||
// A string containing the JavaScript code to inject. Exactly one of
|
||||
// <code>file</code> or <code>code</code> must be specified.
|
||||
DOMString? code;
|
||||
// The path of the JavaScript file to inject relative to the extension's
|
||||
// root directory. Exactly one of <code>file</code> or <code>code</code>
|
||||
// must be specified.
|
||||
DOMString? file;
|
||||
};
|
||||
|
||||
// Describes a user script to be injected into a web page registered through
|
||||
// this API. The script is injected into a page if its URL matches any of
|
||||
// "matches" or "include_globs" patterns, and the URL doesn't match
|
||||
// "exclude_matches" and "exclude_globs" patterns.
|
||||
dictionary RegisteredUserScript {
|
||||
// If true, it will inject into all frames, even if the frame is not the
|
||||
// top-most frame in the tab. Each frame is checked independently for URL
|
||||
// requirements; it will not inject into child frames if the URL
|
||||
// requirements are not met. Defaults to false, meaning that only the top
|
||||
// frame is matched.
|
||||
boolean? allFrames;
|
||||
// Excludes pages that this user script would otherwise be injected into.
|
||||
// See <a href="develop/concepts/match-patterns">Match Patterns</a> for more details on
|
||||
// the syntax of these strings.
|
||||
DOMString[]? excludeMatches;
|
||||
// The ID of the user script specified in the API call. This property must
|
||||
// not start with a '_' as it's reserved as a prefix for generated script
|
||||
// IDs.
|
||||
DOMString id;
|
||||
// Specifies wildcard patterns for pages this user script will be injected
|
||||
// into.
|
||||
DOMString[]? includeGlobs;
|
||||
// Specifies wildcard patterns for pages this user script will NOT be
|
||||
// injected into.
|
||||
DOMString[]? excludeGlobs;
|
||||
// The list of ScriptSource objects defining sources of scripts to be
|
||||
// injected into matching pages.
|
||||
// This property must be specified for ${ref:register}, and when specified
|
||||
// it must be a non-empty array.
|
||||
ScriptSource[]? js;
|
||||
// Specifies which pages this user script will be injected into. See
|
||||
// <a href="develop/concepts/match-patterns">Match Patterns</a> for more details on the
|
||||
// syntax of these strings. This property must be specified for
|
||||
// ${ref:register}.
|
||||
DOMString[]? matches;
|
||||
// Specifies when JavaScript files are injected into the web page. The
|
||||
// preferred and default value is <code>document_idle</code>.
|
||||
extensionTypes.RunAt? runAt;
|
||||
// The JavaScript execution environment to run the script in. The default is
|
||||
// <code>`USER_SCRIPT`</code>.
|
||||
ExecutionWorld? world;
|
||||
// Specifies the user script world ID to execute in. If omitted, the script
|
||||
// will execute in the default user script world. Only valid if `world` is
|
||||
// omitted or is `USER_SCRIPT`. Values with leading underscores (`_`) are
|
||||
// reserved.
|
||||
DOMString? worldId;
|
||||
};
|
||||
|
||||
// An object used to filter user scripts for ${ref:getScripts}.
|
||||
dictionary UserScriptFilter {
|
||||
// $(ref:getScripts) only returns scripts with the IDs specified in this
|
||||
// list.
|
||||
DOMString[]? ids;
|
||||
};
|
||||
|
||||
dictionary InjectionTarget {
|
||||
// Whether the script should inject into all frames within the tab. Defaults
|
||||
// to false. This must not be true if <code>frameIds</code> is specified.
|
||||
boolean? allFrames;
|
||||
// The IDs of specific documentIds to inject into. This must not be set if
|
||||
// <code>frameIds</code> is set.
|
||||
DOMString[]? documentIds;
|
||||
// The IDs of specific frames to inject into.
|
||||
long[]? frameIds;
|
||||
// The ID of the tab into which to inject.
|
||||
long tabId;
|
||||
};
|
||||
|
||||
dictionary InjectionResult {
|
||||
// The document associated with the injection.
|
||||
DOMString documentId;
|
||||
// The frame associated with the injection.
|
||||
long frameId;
|
||||
// The result of the script execution.
|
||||
any? result;
|
||||
// The error, if any. <code>error</code> and <code>result</code> are
|
||||
// mutually exclusive.
|
||||
DOMString? error;
|
||||
};
|
||||
|
||||
dictionary UserScriptInjection {
|
||||
// Whether the injection should be triggered in the target as soon as
|
||||
// possible. Note that this is not a guarantee that injection will occur
|
||||
// prior to page load, as the page may have already loaded by the time the
|
||||
// script reaches the target.
|
||||
boolean? injectImmediately;
|
||||
// The list of ScriptSource objects defining sources of scripts to be
|
||||
// injected into the target.
|
||||
ScriptSource[] js;
|
||||
// Details specifying the target into which to inject the script.
|
||||
InjectionTarget target;
|
||||
// The JavaScript "world" to run the script in. The default is
|
||||
// <code>USER_SCRIPT</code>.
|
||||
ExecutionWorld? world;
|
||||
// Specifies the user script world ID to execute in. If omitted, the script
|
||||
// will execute in the default user script world. Only valid if `world` is
|
||||
// omitted or is `USER_SCRIPT`. Values with leading underscores (`_`) are
|
||||
// reserved.
|
||||
DOMString? worldId;
|
||||
};
|
||||
|
||||
// An object used to update the <code>`USER_SCRIPT`</code> world
|
||||
// configuration. If a property is not specified, it will reset it to its
|
||||
// default value.
|
||||
dictionary WorldProperties{
|
||||
// Specifies the ID of the specific user script world to update.
|
||||
// If not provided, updates the properties of the default user script world.
|
||||
// Values with leading underscores (`_`) are reserved.
|
||||
DOMString? worldId;
|
||||
|
||||
// Specifies the world csp. The default is the <code>`ISOLATED`</code>
|
||||
// world csp.
|
||||
DOMString? csp;
|
||||
|
||||
// Specifies whether messaging APIs are exposed. The default is
|
||||
// <code>false</code>.
|
||||
boolean? messaging;
|
||||
};
|
||||
|
||||
callback RegisterCallback = void();
|
||||
|
||||
callback GetScriptsCallback = void(RegisteredUserScript[] scripts);
|
||||
|
||||
callback UnregisterCallback = void();
|
||||
|
||||
callback UpdateCallback = void();
|
||||
|
||||
callback ExecuteCallback = void(InjectionResult[] result);
|
||||
|
||||
callback ConfigureWorldCallback = void();
|
||||
|
||||
callback GetAllWorldConfigurationsCallback = void(WorldProperties[] worlds);
|
||||
|
||||
callback ResetWorldConfigurationCallback = void();
|
||||
|
||||
interface Functions {
|
||||
// Registers one or more user scripts for this extension.
|
||||
// |scripts|: Contains a list of user scripts to be registered.
|
||||
// |callback|: Promise that resolves once scripts have been fully
|
||||
// registered. The promise will be rejected if an error occurs.
|
||||
static void register(
|
||||
RegisteredUserScript[] scripts,
|
||||
optional RegisterCallback callback);
|
||||
|
||||
// Returns all dynamically-registered user scripts for this extension.
|
||||
// |filter|: If specified, this method returns only the user scripts that
|
||||
// match it.
|
||||
// |callback|: Promise that resolves with the registered scripts.
|
||||
// The promise will be rejected if an error occurs.
|
||||
static void getScripts(
|
||||
optional UserScriptFilter filter,
|
||||
GetScriptsCallback callback);
|
||||
|
||||
// Unregisters all dynamically-registered user scripts for this extension.
|
||||
// |filter|: If specified, this method unregisters only the user scripts
|
||||
// that match it.
|
||||
// |callback|: Promise that resolves once scripts have been fully
|
||||
// unregistered. The promise will be rejected if an error occurs.
|
||||
static void unregister(
|
||||
optional UserScriptFilter filter,
|
||||
UnregisterCallback callback);
|
||||
|
||||
// Updates one or more user scripts for this extension.
|
||||
// |scripts|: Contains a list of user scripts to be updated. A property is
|
||||
// only updated for the existing script if it is specified in this object.
|
||||
// If there are errors during script parsing/file validation, or if the IDs
|
||||
// specified do not correspond to a fully registered script, then no scripts
|
||||
// are updated.
|
||||
// |callback|: Promise that resolves once scripts have been fully updated.
|
||||
// The promise will be rejected if an error occurs.
|
||||
static void update(
|
||||
RegisteredUserScript[] scripts,
|
||||
optional UpdateCallback callback);
|
||||
|
||||
// Injects a script into a target context. By default, the script will be
|
||||
// run at <code>document_idle</code>, or immediately if the page has already
|
||||
// loaded. If the <code>injectImmediately</code> property is set, the script
|
||||
// will inject without waiting, even if the page has not finished loading.
|
||||
// If the script evaluates to a promise, the browser will wait for the
|
||||
// promise to settle and return the resulting value.
|
||||
static void execute(
|
||||
UserScriptInjection injection,
|
||||
optional ExecuteCallback callback);
|
||||
|
||||
// Configures the <code>`USER_SCRIPT`</code> execution environment.
|
||||
// |properties|: Contains the user script world configuration.
|
||||
// |callback|: Promise that resolves once the world has been
|
||||
// configured.
|
||||
static void configureWorld(
|
||||
WorldProperties properties,
|
||||
optional ConfigureWorldCallback callback);
|
||||
|
||||
// Retrieves all registered world configurations.
|
||||
// |callback|: Promise that resolves with the registered world
|
||||
// configurations.
|
||||
static void getWorldConfigurations(
|
||||
GetAllWorldConfigurationsCallback callback);
|
||||
|
||||
// Resets the configuration for a user script world. Any scripts that inject
|
||||
// into the world with the specified ID will use the default world
|
||||
// configuration.
|
||||
// |worldId|: The ID of the user script world to reset. If omitted, resets
|
||||
// the default world's configuration.
|
||||
// |callback|: Promise that resolves when the configuration is reset.
|
||||
static void resetWorldConfiguration(
|
||||
optional DOMString worldId,
|
||||
ResetWorldConfigurationCallback callback);
|
||||
};
|
||||
};
|
||||
@@ -404,6 +404,10 @@ void SetFeatureFlags() {
|
||||
SetV8FlagsFormatted("--preconfigured-old-space-size=%i",
|
||||
features::kV8PreconfigureOldGenSize.Get());
|
||||
}
|
||||
if (base::FeatureList::IsEnabled(features::kV8MemoryReducerDelay)) {
|
||||
SetV8FlagsFormatted("--memory-reducer-delay-ms=%i",
|
||||
features::kV8MemoryReducerDelayInSeconds.Get() * 1000);
|
||||
}
|
||||
if (base::FeatureList::IsEnabled(features::kV8HighEndAndroid)) {
|
||||
SetV8FlagsFormatted("--high-end-android-physical-memory-threshold=%i",
|
||||
features::kV8HighEndAndroidMemoryThreshold.Get());
|
||||
@@ -568,26 +572,14 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
// do it is that there are no Isolates available yet, which are required
|
||||
// for recording histograms in V8.
|
||||
|
||||
// Record the mode of the sandbox.
|
||||
// These values are persisted to logs. Entries should not be renumbered and
|
||||
// numeric values should never be reused. This should match enum
|
||||
// V8SandboxMode in tools/metrics/histograms/enums.xml.
|
||||
enum class V8SandboxMode {
|
||||
kSecure = 0,
|
||||
kInsecure = 1,
|
||||
kMaxValue = kInsecure,
|
||||
};
|
||||
base::UmaHistogramEnumeration("V8.SandboxMode",
|
||||
v8::V8::IsSandboxConfiguredSecurely()
|
||||
? V8SandboxMode::kSecure
|
||||
: V8SandboxMode::kInsecure);
|
||||
base::UmaHistogramEnumeration("V8.SandboxMode", v8::V8::GetSandboxMode());
|
||||
|
||||
// Record the size of the address space reservation backing the sandbox.
|
||||
// The size will always be one of a handful of values, so use a sparse
|
||||
// histogram to capture it.
|
||||
size_t size = v8::V8::GetSandboxReservationSizeInBytes();
|
||||
const size_t size = v8::V8::GetSandboxReservationSizeInBytes();
|
||||
DCHECK_GT(size, 0U);
|
||||
size_t sizeInGB = size >> 30;
|
||||
const size_t sizeInGB = size >> 30;
|
||||
DCHECK_EQ(sizeInGB << 30, size);
|
||||
base::UmaHistogramSparse("V8.SandboxReservationSizeGB", sizeInGB);
|
||||
|
||||
|
||||
@@ -106,7 +106,9 @@ enum VideoCodecProfile {
|
||||
HEVCPROFILE_SCALABLE_REXT = 35,
|
||||
HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED = 36,
|
||||
HEVCPROFILE_EXT_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
|
||||
VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
|
||||
DOLBYVISION_PROFILE10 = 37,
|
||||
DOLBYVISION_PROFILE20 = 38,
|
||||
VIDEO_CODEC_PROFILE_MAX = DOLBYVISION_PROFILE20,
|
||||
};
|
||||
// clang-format off
|
||||
// LINT.ThenChange(//gpu/config/gpu_info.h:VideoCodecProfile, //tools/metrics/histograms/enums.xml:VideoCodecProfile)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/sequence_checker.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@@ -565,7 +566,7 @@ bool GetFullDataFilePath(
|
||||
// processes.
|
||||
mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() {
|
||||
auto params = mojom::URLLoaderFactoryParams::New();
|
||||
params->process_id = OriginatingProcess::browser();
|
||||
params->process_id = OriginatingProcessId::browser();
|
||||
// We want to be able to use TrustedParams to set the IsolationInfo for each
|
||||
// prefetch separately, so make it trusted.
|
||||
// TODO(crbug.com/342445996): Maybe stop using TrustedParams and lock this
|
||||
@@ -999,7 +1000,7 @@ void NetworkContext::CreateURLLoaderFactoryForCertNetFetcher(
|
||||
// TODO(crbug.com/40695068): investigate changing these params.
|
||||
auto url_loader_factory_params = mojom::URLLoaderFactoryParams::New();
|
||||
url_loader_factory_params->is_trusted = true;
|
||||
url_loader_factory_params->process_id = OriginatingProcess::browser();
|
||||
url_loader_factory_params->process_id = OriginatingProcessId::browser();
|
||||
url_loader_factory_params->automatically_assign_isolation_info = true;
|
||||
url_loader_factory_params->is_orb_enabled = false;
|
||||
if (url_request_context()->bound_network() !=
|
||||
@@ -1021,6 +1022,12 @@ void NetworkContext::ActivateDohProbes() {
|
||||
doh_probes_request_ =
|
||||
url_request_context_->host_resolver()->CreateDohProbeRequest();
|
||||
doh_probes_request_->Start();
|
||||
|
||||
net::HostResolver* primary_resolver = url_request_context_->host_resolver();
|
||||
canary_domain_service_ = primary_resolver->CreateCanaryDomainService();
|
||||
if (canary_domain_service_) {
|
||||
canary_domain_service_->Start();
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkContext::SetClient(
|
||||
@@ -1261,11 +1268,11 @@ void NetworkContext::Remove(WebTransport* transport) {
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkContext::LoaderCreated(const OriginatingProcess& process_id) {
|
||||
void NetworkContext::LoaderCreated(const OriginatingProcessId& process_id) {
|
||||
loader_count_per_process_[process_id] += 1;
|
||||
}
|
||||
|
||||
void NetworkContext::LoaderDestroyed(const OriginatingProcess& process_id) {
|
||||
void NetworkContext::LoaderDestroyed(const OriginatingProcessId& process_id) {
|
||||
auto it = loader_count_per_process_.find(process_id);
|
||||
CHECK(it != loader_count_per_process_.end());
|
||||
it->second -= 1;
|
||||
@@ -1274,7 +1281,7 @@ void NetworkContext::LoaderDestroyed(const OriginatingProcess& process_id) {
|
||||
}
|
||||
}
|
||||
|
||||
bool NetworkContext::CanCreateLoader(const OriginatingProcess& process_id) {
|
||||
bool NetworkContext::CanCreateLoader(const OriginatingProcessId& process_id) {
|
||||
auto it = loader_count_per_process_.find(process_id);
|
||||
uint32_t count = (it == loader_count_per_process_.end() ? 0 : it->second);
|
||||
return count < max_loaders_per_process_;
|
||||
@@ -1367,6 +1374,43 @@ void NetworkContext::ClearHttpCache(base::Time start_time,
|
||||
base::Time end_time,
|
||||
mojom::ClearDataFilterPtr filter,
|
||||
ClearHttpCacheCallback callback) {
|
||||
if (base::FeatureList::IsEnabled(net::features::kLogicalClearHttpCache)) {
|
||||
net::HttpCache* cache =
|
||||
url_request_context_->http_transaction_factory()->GetCache();
|
||||
if (cache) {
|
||||
// Step 1: Add a logical filter to the HttpCache. This is near-instant
|
||||
// and ensures that subsequent requests won't see invalidated data.
|
||||
net::HttpCache::InvalidationFilter invalidation_filter;
|
||||
invalidation_filter.begin_time = start_time;
|
||||
// Cap the end_time to Now() so we don't accidentally invalidate future
|
||||
// cache entries if the caller passes Time::Max().
|
||||
invalidation_filter.end_time = std::min(end_time, base::Time::Now());
|
||||
if (filter) {
|
||||
invalidation_filter.filter_type =
|
||||
ConvertClearDataFilterType(filter->type);
|
||||
invalidation_filter.origins = base::flat_set<url::Origin>(
|
||||
filter->origins.begin(), filter->origins.end());
|
||||
invalidation_filter.domains = base::flat_set<std::string>(
|
||||
filter->domains.begin(), filter->domains.end());
|
||||
} else {
|
||||
invalidation_filter.filter_type = net::UrlFilterType::kFalseIfMatches;
|
||||
}
|
||||
cache->AddInvalidationFilter(std::move(invalidation_filter));
|
||||
}
|
||||
|
||||
// Step 2: Trigger the slow physical cleanup in the background. We use a
|
||||
// no-op callback because the logical invalidation already satisfies
|
||||
// the consistency requirements of the caller.
|
||||
http_cache_data_removers_.push_back(HttpCacheDataRemover::CreateAndStart(
|
||||
url_request_context_, std::move(filter), start_time, end_time,
|
||||
base::BindOnce(&NetworkContext::OnHttpCacheCleared,
|
||||
base::Unretained(this), base::DoNothing())));
|
||||
|
||||
// Step 3: Respond to the caller immediately.
|
||||
std::move(callback).Run();
|
||||
return;
|
||||
}
|
||||
|
||||
// It's safe to use Unretained below as the HttpCacheDataRemover is owned by
|
||||
// |this| and guarantees it won't call its callback if deleted.
|
||||
http_cache_data_removers_.push_back(HttpCacheDataRemover::CreateAndStart(
|
||||
@@ -1923,11 +1967,10 @@ void NetworkContext::ClearBadProxiesCache(
|
||||
void NetworkContext::CreateWebSocket(
|
||||
const GURL& url,
|
||||
const std::vector<std::string>& requested_protocols,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
net::StorageAccessApiStatus storage_access_api_status,
|
||||
const net::IsolationInfo& isolation_info,
|
||||
std::vector<mojom::HttpHeaderPtr> additional_headers,
|
||||
const network::OriginatingProcess& process_id,
|
||||
const network::OriginatingProcessId& process_id,
|
||||
const url::Origin& origin,
|
||||
network::mojom::ClientSecurityStatePtr client_security_state,
|
||||
uint32_t options,
|
||||
@@ -1946,8 +1989,8 @@ void NetworkContext::CreateWebSocket(
|
||||
DCHECK(process_id);
|
||||
|
||||
websocket_factory_->CreateWebSocket(
|
||||
url, requested_protocols, site_for_cookies, storage_access_api_status,
|
||||
isolation_info, std::move(additional_headers), process_id, origin,
|
||||
url, requested_protocols, storage_access_api_status, isolation_info,
|
||||
std::move(additional_headers), process_id, origin,
|
||||
std::move(client_security_state), options,
|
||||
static_cast<net::NetworkTrafficAnnotationTag>(traffic_annotation),
|
||||
std::move(handshake_client), std::move(url_loader_network_observer),
|
||||
@@ -3360,7 +3403,7 @@ void NetworkContext::CreateTrustedUrlLoaderFactoryForNetworkService(
|
||||
url_loader_factory_pending_receiver) {
|
||||
auto url_loader_factory_params = mojom::URLLoaderFactoryParams::New();
|
||||
url_loader_factory_params->is_trusted = true;
|
||||
url_loader_factory_params->process_id = OriginatingProcess::browser();
|
||||
url_loader_factory_params->process_id = OriginatingProcessId::browser();
|
||||
CreateURLLoaderFactory(std::move(url_loader_factory_pending_receiver),
|
||||
std::move(url_loader_factory_params));
|
||||
}
|
||||
@@ -3609,7 +3652,8 @@ void NetworkContext::AddQuicHints(
|
||||
|
||||
bool NetworkContext::IsNetworkForNonceAndUrlAllowed(
|
||||
const base::UnguessableToken& nonce,
|
||||
const GURL& url) const {
|
||||
const GURL& url,
|
||||
bool is_redirect) const {
|
||||
// If network hasn't been revoked for the nonce, it's allowed.
|
||||
if (!network_revocation_nonces_.contains(nonce)) {
|
||||
return true;
|
||||
@@ -3627,16 +3671,17 @@ bool NetworkContext::IsNetworkForNonceAndUrlAllowed(
|
||||
for (const std::unique_ptr<url_pattern::SimpleUrlPatternMatcher>& pattern :
|
||||
allowlisted_patterns) {
|
||||
if (pattern->Match(url)) {
|
||||
return true;
|
||||
// Redirects are blocked for URLs allowed through connection allowlists.
|
||||
return !is_redirect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If network has been revoked for the nonce, but the url is exempted, it's
|
||||
// allowed.
|
||||
if (network_revocation_exemptions_.contains(nonce) &&
|
||||
network_revocation_exemptions_.find(nonce)->second.contains(
|
||||
url.GetWithoutFilename())) {
|
||||
if (auto it = network_revocation_exemptions_.find(nonce);
|
||||
it != network_revocation_exemptions_.end() &&
|
||||
it->second.contains(url.GetWithoutFilename())) {
|
||||
return true;
|
||||
}
|
||||
// The nonce was revoked and the url isn't exempted.
|
||||
@@ -3650,16 +3695,16 @@ bool NetworkContext::IsHostResolutionForNonceAndHostAllowed(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!network_revocation_nonces_.contains(nonce)) {
|
||||
auto it = network_revocation_nonces_.find(nonce);
|
||||
if (it == network_revocation_nonces_.end()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string host_fragment = host.is_host_port_pair()
|
||||
? host.get_host_port_pair().host()
|
||||
: host.get_scheme_host_port().host();
|
||||
GURL synthetic_url =
|
||||
GURL(std::string(url::kHttpsScheme) +
|
||||
std::string(url::kStandardSchemeSeparator) + host_fragment);
|
||||
GURL synthetic_url = GURL(base::StrCat(
|
||||
{url::kHttpsScheme, url::kStandardSchemeSeparator, host_fragment}));
|
||||
if (!synthetic_url.is_valid()) {
|
||||
return false;
|
||||
}
|
||||
@@ -3669,7 +3714,7 @@ bool NetworkContext::IsHostResolutionForNonceAndHostAllowed(
|
||||
// we need to match `synthetic_url` against a host-only variant against each
|
||||
// URLPattern corresponding to `nonce`.
|
||||
const std::set<std::unique_ptr<url_pattern::SimpleUrlPatternMatcher>>&
|
||||
allowlisted_patterns = network_revocation_nonces_.find(nonce)->second;
|
||||
allowlisted_patterns = it->second;
|
||||
for (const std::unique_ptr<url_pattern::SimpleUrlPatternMatcher>& pattern :
|
||||
allowlisted_patterns) {
|
||||
if (pattern->HostOnlyMatch(synthetic_url)) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+53
-22
@@ -4066,8 +4066,8 @@ enum WebFeature {
|
||||
kEffectiveAlignContentForTableCell = 4774,
|
||||
kUserFeatureNgOptimizedImage = 4775,
|
||||
kCSSAtRulePageMargin = 4776,
|
||||
kOBSOLETE_ThirdPartyCookieDeprecation_AllowByEnterprisePolicyCookieAllowedForUrls =
|
||||
4777,
|
||||
kOBSOLETE_ThirdPartyCookieDeprecation_AllowByEnterprisePolicyCookieAllowedForUrls
|
||||
= 4777,
|
||||
kUserFeatureNgAfterRender = 4778,
|
||||
kUserFeatureNgHydration = 4779,
|
||||
kCapturedSurfaceControl = 4780,
|
||||
@@ -4525,11 +4525,11 @@ enum WebFeature {
|
||||
kSrcSetUsedHigherDensityImageFromCache = 5219,
|
||||
kHTMLElementWritingSuggestions = 5220,
|
||||
kCSSPseudoOpen = 5221,
|
||||
kAdScriptInStackOnGeoLocation = 5222,
|
||||
kAdScriptInStackOnClipboardRead = 5223,
|
||||
kAdScriptInStackOnBluetooth = 5224,
|
||||
kAdScriptInStackOnMicrophoneRead = 5225,
|
||||
kAdScriptInStackOnCameraRead = 5226,
|
||||
kOBSOLETE_AdScriptInStackOnGeoLocation = 5222,
|
||||
kOBSOLETE_AdScriptInStackOnClipboardRead = 5223,
|
||||
kOBSOLETE_AdScriptInStackOnBluetooth = 5224,
|
||||
kOBSOLETE_AdScriptInStackOnMicrophoneRead = 5225,
|
||||
kOBSOLETE_AdScriptInStackOnCameraRead = 5226,
|
||||
kClipboardCustomFormatRead = 5227,
|
||||
kClipboardCustomFormatWrite = 5228,
|
||||
kClipboardSvgRead = 5229,
|
||||
@@ -4631,8 +4631,8 @@ enum WebFeature {
|
||||
kScrollButtonPseudoElement = 5323,
|
||||
kScrollMarkerPseudoElement = 5324,
|
||||
kOBSOLETE_V8AITranslatorFactory_Availability_Method = 5325,
|
||||
kGeolocationWouldSucceedWhenAdScriptInStack = 5326,
|
||||
kAdScriptInStackOnWatchGeoLocation = 5327,
|
||||
kOBSOLETE_GeolocationWouldSucceedWhenAdScriptInStack = 5326,
|
||||
kOBSOLETE_AdScriptInStackOnWatchGeoLocation = 5327,
|
||||
kDeviceBoundSessionRegistered = 5328,
|
||||
kOBSOLETE_V8AILanguageDetectorFactory_Availability_Method = 5329,
|
||||
kCrossPartitionSameOriginBlobURLFetch = 5330,
|
||||
@@ -4857,18 +4857,18 @@ enum WebFeature {
|
||||
kInputParsedParentSelect = 5546,
|
||||
kInputParsedAncestorSelect = 5547,
|
||||
kCSSSelectorPseudoHasSlotted = 5548,
|
||||
kSelectMultipleShowPopup = 5549,
|
||||
kOBSOLETE_SelectMultipleShowPopup = 5549,
|
||||
kSharedWorkerExtendedLifetimeFeatureEnabled = 5550,
|
||||
kSharedWorkerExtendedLifetimeIsTrue = 5551,
|
||||
// The items above roughly this point are available in the M137 branch.
|
||||
kEditContextTextFormatUpdateAddListener = 5552,
|
||||
kEditContextTextFormatUpdateFireEvent = 5553,
|
||||
kEditContextTextFormatUpdateTextFormatThicknessOrStyleNotNone = 5554,
|
||||
kOBSOLETE_EditContextTextFormatUpdateAddListener = 5552,
|
||||
kOBSOLETE_EditContextTextFormatUpdateFireEvent = 5553,
|
||||
kOBSOLETE_EditContextTextFormatUpdateTextFormatThicknessOrStyleNotNone = 5554,
|
||||
kC2PAManifest = 5555,
|
||||
kLanguageModel_Append = 5556,
|
||||
kIntegrityPolicyInServiceWorkerResponse = 5557,
|
||||
kEditContextTextFormatUnderlineStyle = 5558,
|
||||
kEditContextTextFormatUnderlineThickness = 5559,
|
||||
kOBSOLETE_EditContextTextFormatUnderlineStyle = 5558,
|
||||
kOBSOLETE_EditContextTextFormatUnderlineThickness = 5559,
|
||||
kProofreader_IncludeCorrectionTypes = 5560,
|
||||
kProofreader_IncludeCorrectionExplanations = 5561,
|
||||
kProofreader_ExpectedInputLanguages = 5562,
|
||||
@@ -4931,10 +4931,10 @@ enum WebFeature {
|
||||
kLocalNetworkAccessNonSecureContextAllowedDeprecationTrial = 5617,
|
||||
kCSPUrlHashes = 5618,
|
||||
kCSPEvalHashes = 5619,
|
||||
kWebAppManifestNameLocalized = 5620,
|
||||
kWebAppManifestShortNameLocalized = 5621,
|
||||
kWebAppManifestDescriptionLocalized = 5622,
|
||||
kWebAppManifestIconsLocalized = 5623,
|
||||
kOBSOLETE_WebAppManifestNameLocalized = 5620,
|
||||
kOBSOLETE_WebAppManifestShortNameLocalized = 5621,
|
||||
kOBSOLETE_WebAppManifestDescriptionLocalized = 5622,
|
||||
kOBSOLETE_WebAppManifestIconsLocalized = 5623,
|
||||
kHTMLControlledFrameElement = 5624,
|
||||
kSlowDeserialization = 5625,
|
||||
kSharedWorkerStartOnAndroid = 5626,
|
||||
@@ -4972,7 +4972,7 @@ enum WebFeature {
|
||||
kMulticastControllerJoinGroupFunction = 5656,
|
||||
kMulticastControllerLeaveGroupFunction = 5657,
|
||||
kMulticastControllerJoinedGroupsAttribute = 5658,
|
||||
kContainerNameQueryFailedTreeScope = 5659,
|
||||
kOBSOLETE_ContainerNameQueryFailedTreeScope = 5659,
|
||||
kLocalNetworkAccessWebSocketResourceNotKnownPrivate = 5660,
|
||||
kCSSPseudoElementUsesImplicitAnchor = 5661,
|
||||
kLineClampByLinesOverflows = 5662,
|
||||
@@ -5096,14 +5096,45 @@ enum WebFeature {
|
||||
kAudioContextAsyncTransitionToRunningStateRead = 5780,
|
||||
kAudioContextAsyncTransitionToSuspendedStateRead = 5781,
|
||||
kGetComputedStylePseudoElementWithoutColon = 5782,
|
||||
kGeolocationRequestPositionWithPotentiallyUpToDateWatchedCachedPosition = 5783,
|
||||
kGeolocationRequestPositionWithPotentiallyUpToDateWatchedCachedPosition =
|
||||
5783,
|
||||
kAnchorCaseSensitiveMatch = 5784,
|
||||
kAnchorCaseInsensitiveMatch = 5785,
|
||||
kPrerenderActivationByFormSubmission = 5786,
|
||||
kLinkRelModulePreloadStyle = 5787,
|
||||
kAudioContextPlaybackStats = 5788,
|
||||
kParseFromStringXML = 5789,
|
||||
kNonParentOriginInitiatedNavigationOfSubframe = 5790,
|
||||
kModelContextRegisterTool = 5791,
|
||||
kModelContextRegisterDeclarativeTool = 5792,
|
||||
kLanguageModel_ContextUsage = 5793,
|
||||
kLanguageModel_ContextWindow = 5794,
|
||||
kLanguageModel_MeasureContextUsage = 5795,
|
||||
kV8WindowClient_Navigate_Method = 5796,
|
||||
kLanguageModel_OnQuotaOverflow = 5797,
|
||||
kLanguageModel_OnContextOverflow = 5798,
|
||||
kModelContextExecuteTool = 5799,
|
||||
kModelContextExecuteDeclarativeTool = 5800,
|
||||
kModelContextExecuteDeclarativeAutosubmit = 5801,
|
||||
kPrerender2CrossOriginIframes = 5802,
|
||||
kHTMLGeolocationElement = 5803,
|
||||
kHTMLInstallElement = 5804,
|
||||
kHTMLUserMediaElement = 5805,
|
||||
kAutofillEvent = 5806,
|
||||
kWebAppManifestMigrateFrom = 5807,
|
||||
kWebAppManifestMigrateTo = 5808,
|
||||
kLongAnimationFrameTimingStyleDuration = 5809,
|
||||
kLongAnimationFrameTimingLayoutDuration = 5810,
|
||||
kPerformanceScriptTimingForcedStyleDuration = 5811,
|
||||
kPerformanceScriptTimingForcedLayoutDuration = 5812,
|
||||
kPaymentRequestGetSecurePaymentConfirmationCapabilities = 5813,
|
||||
kOpaqueRange = 5814,
|
||||
kHTMLButtonElementTypeChangedWhileConnected = 5815,
|
||||
kHTMLInputElementTypeChangedWhileConnected = 5816,
|
||||
kHTMLButtonElementTypeChangedWhileDisconnected = 5817,
|
||||
kHTMLInputElementTypeChangedWhileDisconnected = 5818,
|
||||
|
||||
// Add new features immediately above this line. Don't change assigned
|
||||
// Add new features immediately above this line. Don't change the existing
|
||||
// numbers of any item, and don't reuse removed slots. Also don't add extra
|
||||
// spaces or comments in this file. Comments belong next to the usage of
|
||||
// these constants in code.
|
||||
|
||||
Vendored
+3
-1
@@ -514,7 +514,9 @@ struct WebPreferences {
|
||||
// WebView and by `kWebPayments` feature flag everywhere.
|
||||
bool payment_request_enabled = false;
|
||||
|
||||
bool ai_prompt_api_enabled = false;
|
||||
// Enables the origin trial Built-in AI APIs, for use within DevTools and
|
||||
// devtools extension panels.
|
||||
bool ai_ot_apis_enabled = false;
|
||||
|
||||
[EnableIf=is_android]
|
||||
bool should_screenshot_on_mainframe_same_doc_navigation = true;
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// Copyright 2026 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[Exposed=Window, RuntimeEnabled=CSSMixins]
|
||||
interface CSSResultRule : CSSGroupingRule {
|
||||
};
|
||||
+1
@@ -3,6 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
dictionary CSSStyleSheetInit {
|
||||
[RuntimeEnabled=CSSStyleSheetInitBaseURL] DOMString? baseURL = null;
|
||||
(MediaList or DOMString) media = "";
|
||||
boolean alternate = false;
|
||||
boolean disabled = false;
|
||||
|
||||
+5
-5
@@ -177,11 +177,11 @@ namespace {
|
||||
|
||||
bool IsRestrictorOrLogicalOperator(const CSSParserToken& token) {
|
||||
// FIXME: it would be more efficient to use lower-case always for tokenValue.
|
||||
return EqualIgnoringASCIICase(token.Value(), "not") ||
|
||||
EqualIgnoringASCIICase(token.Value(), "and") ||
|
||||
EqualIgnoringASCIICase(token.Value(), "or") ||
|
||||
EqualIgnoringASCIICase(token.Value(), "only") ||
|
||||
EqualIgnoringASCIICase(token.Value(), "layer");
|
||||
return EqualIgnoringAsciiCase(token.Value(), "not") ||
|
||||
EqualIgnoringAsciiCase(token.Value(), "and") ||
|
||||
EqualIgnoringAsciiCase(token.Value(), "or") ||
|
||||
EqualIgnoringAsciiCase(token.Value(), "only") ||
|
||||
EqualIgnoringAsciiCase(token.Value(), "layer");
|
||||
}
|
||||
|
||||
bool ConsumeUntilCommaInclusive(CSSParserTokenStream& stream) {
|
||||
|
||||
+6
-2
@@ -3,13 +3,17 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://dom.spec.whatwg.org/#interface-abstractrange
|
||||
// Note: This interface diverges from the spec to support OpaqueRange
|
||||
// (crbug.com/421421332), which when the OpaqueRange feature flag is
|
||||
// enabled, returns null for startContainer/endContainer to hide internal
|
||||
// DOM structure.
|
||||
|
||||
[
|
||||
Exposed=Window
|
||||
] interface AbstractRange {
|
||||
readonly attribute Node startContainer;
|
||||
readonly attribute Node? startContainer;
|
||||
readonly attribute unsigned long startOffset;
|
||||
readonly attribute Node endContainer;
|
||||
readonly attribute Node? endContainer;
|
||||
readonly attribute unsigned long endOffset;
|
||||
readonly attribute boolean collapsed;
|
||||
};
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://crbug.com/1453291
|
||||
// https://github.com/WICG/webcomponents/blob/gh-pages/proposals/DOM-Parts.md
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface AttributePart : NodePart {
|
||||
[RaisesException] constructor(PartRoot root, Element element, DOMString localName, optional PartInit init = {});
|
||||
// For now, HTML only, don't deal with prefix or namespaceURI.
|
||||
readonly attribute DOMString localName;
|
||||
};
|
||||
@@ -26,4 +26,12 @@ interface mixin ChildNode {
|
||||
[Unscopable, RaisesException, CEReactions] undefined after((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] undefined replaceWith((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] undefined remove();
|
||||
|
||||
// https://github.com/whatwg/html/issues/11669
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void beforeHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void beforeHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void afterHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void afterHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void replaceWithHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void replaceWithHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
};
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://crbug.com/1453291
|
||||
// https://github.com/WICG/webcomponents/blob/gh-pages/proposals/DOM-Parts.md
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface ChildNodePart : Part {
|
||||
[RaisesException] constructor(PartRoot root, Node previousSibling, Node nextSibling, optional PartInit init = {});
|
||||
readonly attribute Node previousSibling;
|
||||
readonly attribute Node nextSibling;
|
||||
readonly attribute FrozenArray<Node> children;
|
||||
[RaisesException] void replaceChildren((Node or DOMString)... nodes);
|
||||
};
|
||||
+5
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://www.w3.org/TR/css-pseudo-4/#CSSPseudoElement-interface
|
||||
|
||||
[
|
||||
RuntimeEnabled=CSSPseudoElementInterface,
|
||||
Exposed=Window
|
||||
@@ -12,3 +14,6 @@ interface CSSPseudoElement {
|
||||
readonly attribute (Element or CSSPseudoElement) parent;
|
||||
CSSPseudoElement? pseudo(CSSOMString type);
|
||||
};
|
||||
|
||||
[RuntimeEnabled=GeometryUtilsForCSSPseudoElement]
|
||||
CSSPseudoElement includes GeometryUtils;
|
||||
|
||||
@@ -97,7 +97,7 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
|
||||
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
|
||||
[RaisesException=Setter] attribute USVString domain;
|
||||
readonly attribute USVString referrer;
|
||||
[RaisesException, RuntimeCallStatsCounter=DocumentCookie] attribute DOMString cookie;
|
||||
[LogActivity=GetterOnly, RaisesException, RuntimeCallStatsCounter=DocumentCookie] attribute DOMString cookie;
|
||||
readonly attribute DOMString lastModified;
|
||||
readonly attribute DocumentReadyState readyState;
|
||||
|
||||
@@ -219,9 +219,6 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
|
||||
// https://github.com/WICG/aom/blob/gh-pages/notification-api.md
|
||||
[RuntimeEnabled=AriaNotify,MeasureAs=AriaNotify] void ariaNotify(DOMString announcement, optional AriaNotificationOptions options = {});
|
||||
|
||||
// The (experimental) DOM Parts API.
|
||||
[RuntimeEnabled=DOMPartsAPI] DocumentPartRoot getPartRoot();
|
||||
|
||||
[RuntimeEnabled=RouteMatching] readonly attribute RouteMap routeMap;
|
||||
|
||||
// Event handler attributes
|
||||
|
||||
+1
-2
@@ -24,8 +24,7 @@
|
||||
] interface DocumentFragment : Node {
|
||||
[CallWith=Document] constructor();
|
||||
|
||||
// The (experimental) DOM Parts API.
|
||||
[RuntimeEnabled=DOMPartsAPI] DocumentPartRoot getPartRoot();
|
||||
// No DOM Parts API
|
||||
};
|
||||
|
||||
DocumentFragment includes ParentNode;
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://crbug.com/1453291
|
||||
// https://github.com/WICG/webcomponents/blob/gh-pages/proposals/DOM-Parts.md
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface DocumentPartRoot {
|
||||
};
|
||||
@@ -113,14 +113,26 @@ dictionary SetHTMLUnsafeOptions {
|
||||
// https://github.com/whatwg/html/pull/9538
|
||||
[RaisesException,MeasureAs=SetHTMLUnsafe,CEReactions] void setHTMLUnsafe((TrustedHTML or DOMString) html);
|
||||
// https://wicg.github.io/sanitizer-api/#sanitizer-api
|
||||
// TODO(vogelheim): Merge the two setHTMLUnsafe variants into one, once the
|
||||
// TODO(vogelheim): Merge the 3 setHTMLUnsafe variants into one, once the
|
||||
// different RuntimeEnabled flags are both perma-enabled.
|
||||
[RuntimeEnabled=SanitizerAPI,RaisesException,MeasureAs=SetHTMLUnsafe,CEReactions] void setHTMLUnsafe((TrustedHTML or DOMString) html, SetHTMLUnsafeOptions options);
|
||||
[RuntimeEnabled=TrustedTypesCreateParserOptions,RaisesException,MeasureAs=SetHTMLUnsafe,CEReactions] void setHTMLUnsafe((TrustedHTML or DOMString) html, TrustedParserOptions options);
|
||||
[RuntimeEnabled=SanitizerAPI,RaisesException,MeasureAs=SetHTMLSafe,CEReactions] void setHTML(DOMString html, optional SetHTMLOptions options = {});
|
||||
[RuntimeEnabled=TrustedTypesCreateParserOptions,RaisesException,MeasureAs=SetHTMLSafe,CEReactions] void setHTML(DOMString html, TrustedParserOptions options);
|
||||
|
||||
// https://github.com/whatwg/html/issues/2142
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamAppendHTMLUnsafe(optional SetHTMLUnsafeOptions options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamHTMLUnsafe(optional SetHTMLUnsafeOptions options = {});
|
||||
// https://github.com/whatwg/html/issues/11542
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamAppendHTMLUnsafe(optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamHTMLUnsafe(optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamAppendHTML(optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamHTML(optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[SameObject, PutForwards=value, RuntimeEnabled=DocumentPatching] readonly attribute DOMTokenList marker;
|
||||
|
||||
// https://github.com/whatwg/html/issues/11669
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void appendHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void appendHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void prependHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void prependHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
|
||||
// Declarative Shadow DOM getHTML() function.
|
||||
[Affects=Nothing, MeasureAs=ElementGetHTML, RaisesException] DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
@@ -138,13 +150,13 @@ dictionary SetHTMLUnsafeOptions {
|
||||
// https://drafts.csswg.org/cssom-view/#dom-element-checkvisibility
|
||||
[MeasureAs=ElementCheckVisibility] boolean checkVisibility(optional CheckVisibilityOptions options = {});
|
||||
|
||||
[CallWith=ScriptState] Promise<undefined> scrollIntoView(optional (ScrollIntoViewOptions or boolean) arg = {});
|
||||
[ImplementedAs=scrollTo, CallWith=ScriptState] Promise<undefined> scroll(optional ScrollToOptions options = {});
|
||||
[ImplementedAs=scrollTo, CallWith=ScriptState] Promise<undefined> scroll(unrestricted double x, unrestricted double y);
|
||||
[CallWith=ScriptState] Promise<undefined> scrollTo(optional ScrollToOptions options = {});
|
||||
[CallWith=ScriptState] Promise<undefined> scrollTo(unrestricted double x, unrestricted double y);
|
||||
[CallWith=ScriptState] Promise<undefined> scrollBy(optional ScrollToOptions options = {});
|
||||
[CallWith=ScriptState] Promise<undefined> scrollBy(unrestricted double x, unrestricted double y);
|
||||
[CallWith=ScriptState] Promise<ScrollResult> scrollIntoView(optional (ScrollIntoViewOptions or boolean) arg = {});
|
||||
[ImplementedAs=scrollTo, CallWith=ScriptState] Promise<ScrollResult> scroll(optional ScrollToOptions options = {});
|
||||
[ImplementedAs=scrollTo, CallWith=ScriptState] Promise<ScrollResult> scroll(unrestricted double x, unrestricted double y);
|
||||
[CallWith=ScriptState] Promise<ScrollResult> scrollTo(optional ScrollToOptions options = {});
|
||||
[CallWith=ScriptState] Promise<ScrollResult> scrollTo(unrestricted double x, unrestricted double y);
|
||||
[CallWith=ScriptState] Promise<ScrollResult> scrollBy(optional ScrollToOptions options = {});
|
||||
[CallWith=ScriptState] Promise<ScrollResult> scrollBy(unrestricted double x, unrestricted double y);
|
||||
attribute unrestricted double scrollTop;
|
||||
attribute unrestricted double scrollLeft;
|
||||
readonly attribute long scrollWidth;
|
||||
@@ -155,9 +167,6 @@ dictionary SetHTMLUnsafeOptions {
|
||||
readonly attribute long clientHeight;
|
||||
[RuntimeEnabled=StandardizedBrowserZoom] readonly attribute double currentCSSZoom;
|
||||
|
||||
// Used by both Anchor Positioning and Popover
|
||||
[CEReactions,RuntimeEnabled=HTMLAnchorAttribute,ImplementedAs=anchorElementForBinding] attribute Element? anchorElement;
|
||||
|
||||
// Non-standard API
|
||||
[MeasureAs=ElementScrollIntoViewIfNeeded] void scrollIntoViewIfNeeded(optional boolean centerIfNeeded);
|
||||
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// Copyright 2025 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=FormControlRange
|
||||
] interface FormControlRange : AbstractRange {
|
||||
[CallWith=Document] constructor();
|
||||
|
||||
[RaisesException] void setFormControlRange(Node element,
|
||||
unsigned long start,
|
||||
unsigned long end);
|
||||
|
||||
DOMRectList getClientRects();
|
||||
DOMRect getBoundingClientRect();
|
||||
stringifier;
|
||||
};
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// Copyright 2026 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
||||
// https://www.w3.org/TR/cssom-view-1/#typedefdef-geometrynode
|
||||
typedef (Text or Element or CSSPseudoElement or Document) GeometryNode;
|
||||
|
||||
// https://www.w3.org/TR/cssom-view-1/#enumdef-cssboxtype
|
||||
enum CSSBoxType { "margin", "border", "padding", "content" };
|
||||
|
||||
// https://www.w3.org/TR/cssom-view-1/#dictdef-convertcoordinateoptions
|
||||
dictionary ConvertCoordinateOptions {
|
||||
CSSBoxType fromBox = "border";
|
||||
CSSBoxType toBox = "border";
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/cssom-view-1/#dictdef-boxquadoptions
|
||||
dictionary BoxQuadOptions {
|
||||
CSSBoxType box = "border";
|
||||
GeometryNode relativeTo;
|
||||
};
|
||||
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#the-geometryutils-interface
|
||||
[RuntimeEnabled=GeometryUtils]
|
||||
interface mixin GeometryUtils {
|
||||
sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options = {});
|
||||
DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options = {});
|
||||
DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options = {});
|
||||
DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options = {});
|
||||
};
|
||||
+2
-1
@@ -41,6 +41,7 @@ interface mixin GlobalEventHandlers {
|
||||
attribute EventHandler onclick;
|
||||
attribute EventHandler onclose;
|
||||
attribute EventHandler oncommand;
|
||||
[RuntimeEnabled=LoginElement] attribute EventHandler oncomplete;
|
||||
attribute EventHandler oncontentvisibilityautostatechange;
|
||||
attribute EventHandler oncontextlost;
|
||||
attribute EventHandler oncontextmenu;
|
||||
@@ -79,7 +80,7 @@ interface mixin GlobalEventHandlers {
|
||||
attribute EventHandler onmouseover;
|
||||
attribute EventHandler onmouseup;
|
||||
attribute EventHandler onmousewheel;
|
||||
[RuntimeEnabled=OverscrollCustomization] attribute EventHandler onoverscroll;
|
||||
[RuntimeEnabled=OverscrollGestures] attribute EventHandler onoverscroll;
|
||||
attribute EventHandler onpause;
|
||||
attribute EventHandler onplay;
|
||||
attribute EventHandler onplaying;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
// https://dom.spec.whatwg.org/#interface-nodelist
|
||||
|
||||
[
|
||||
V8EnableIndexOf,
|
||||
Exposed=Window
|
||||
] interface NodeList {
|
||||
[Affects=Nothing] getter Node? item(unsigned long index);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://crbug.com/1453291
|
||||
// https://github.com/WICG/webcomponents/blob/gh-pages/proposals/DOM-Parts.md
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface NodePart : Part {
|
||||
[RaisesException] constructor(PartRoot root, Node node, optional PartInit init = {});
|
||||
readonly attribute Node node;
|
||||
};
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// Copyright 2025 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=OpaqueRange
|
||||
] interface OpaqueRange : AbstractRange {
|
||||
undefined disconnect();
|
||||
DOMRectList getClientRects();
|
||||
DOMRect getBoundingClientRect();
|
||||
};
|
||||
|
||||
[RuntimeEnabled=OpaqueRange]
|
||||
interface mixin OpaqueRangeCreation {
|
||||
[RaisesException, NewObject] OpaqueRange createValueRange(unsigned long start, unsigned long end);
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://crbug.com/1453291
|
||||
// https://github.com/WICG/webcomponents/blob/gh-pages/proposals/DOM-Parts.md
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface Part {
|
||||
[ImplementedAs=rootForBindings] readonly attribute PartRoot? root;
|
||||
readonly attribute FrozenArray<DOMString> metadata;
|
||||
void disconnect();
|
||||
};
|
||||
|
||||
// While Part is not directly constructible, PartInit is used to initialize
|
||||
// the subclasses of Part.
|
||||
dictionary PartInit {
|
||||
FrozenArray<DOMString> metadata;
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// https://crbug.com/1453291
|
||||
// https://github.com/WICG/webcomponents/blob/gh-pages/proposals/DOM-Parts.md
|
||||
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface mixin PartRootMixin {
|
||||
// Retrieve the parts list for this PartRoot, always in tree order breaking
|
||||
// ties for a Node using the order Parts were constructed.
|
||||
sequence<Part> getParts();
|
||||
// Retrieve the Nodes corresponding to the NodeParts returned by getParts(),
|
||||
// without building the Part objects.
|
||||
[RuntimeEnabled=DOMPartsAPIMinimal] sequence<Node> getNodePartNodes();
|
||||
// Retrieve the pairs of previous/next Nodes corresponding to the
|
||||
// ChildNodeParts returned by getParts(), without building the Part objects.
|
||||
// Nodes are paired, so for 3 ChildNodeParts, 6 Nodes will be returned.
|
||||
[RuntimeEnabled=DOMPartsAPIMinimal] sequence<Node> getChildNodePartNodes();
|
||||
// This clones the PartRoot, and also clones the Node tree itself, starting
|
||||
// at the RootContainer. In the case of a DocumentPartRoot, the entire
|
||||
// document tree is cloned. In the case of a ChildPartRoot, only the children
|
||||
// between `previous_node` and `next_node` are included, inclusive. The
|
||||
// `clone()` method returns the cloned PartRoot.
|
||||
[RaisesException] PartRoot clone();
|
||||
// Return the root container for the PartRoot, which is the Document or
|
||||
// DocumentFragment for a DocumentPartRoot, or the parent ContainerNode of
|
||||
// a ChildNodePart.
|
||||
readonly attribute Node rootContainer;
|
||||
};
|
||||
|
||||
DocumentPartRoot includes PartRootMixin;
|
||||
ChildNodePart includes PartRootMixin;
|
||||
|
||||
typedef (DocumentPartRoot or ChildNodePart) PartRoot;
|
||||
+8
@@ -28,4 +28,12 @@
|
||||
// ProcessingInstruction includes LinkStyle
|
||||
// https://drafts.csswg.org/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction
|
||||
readonly attribute StyleSheet? sheet;
|
||||
|
||||
[RuntimeEnabled=HTMLProcessingInstruction, Affects=Nothing] DOMString? getAttribute(DOMString name);
|
||||
[RuntimeEnabled=HTMLProcessingInstruction, Affects=Nothing] boolean hasAttribute(DOMString name);
|
||||
[RuntimeEnabled=HTMLProcessingInstruction, RaisesException] void setAttribute(DOMString name, DOMString value);
|
||||
[RuntimeEnabled=HTMLProcessingInstruction] void removeAttribute(DOMString name);
|
||||
[RuntimeEnabled=HTMLProcessingInstruction, RaisesException] void toggleAttribute(DOMString name, optional boolean force);
|
||||
[RuntimeEnabled=HTMLProcessingInstruction, Affects=Nothing] boolean hasAttributes();
|
||||
[RuntimeEnabled=HTMLProcessingInstruction, Affects=Nothing] sequence<DOMString> getAttributeNames();
|
||||
};
|
||||
|
||||
+15
-2
@@ -48,19 +48,32 @@ interface ShadowRoot : DocumentFragment {
|
||||
// cloned by DOM cloning operations.
|
||||
readonly attribute boolean clonable;
|
||||
|
||||
[RuntimeEnabled=DocumentPatching] readonly attribute FrozenArray<DOMString> marker;
|
||||
|
||||
// The referenceTarget attribute is the ID of an element in the shadow tree.
|
||||
// When the host element is the target of an IDREF attribute like
|
||||
// aria-activedescendant, the reference resolves to the referenceTarget.
|
||||
// See https://crbug.com/346835896
|
||||
[RuntimeEnabled=ShadowRootReferenceTarget] attribute DOMString? referenceTarget;
|
||||
|
||||
// TODO(nrosenthal): remove duplicates once flags are merged.
|
||||
[RaisesException,MeasureAs=SetHTMLUnsafe,CEReactions] void setHTMLUnsafe((TrustedHTML or DOMString) string);
|
||||
[RuntimeEnabled=SanitizerAPI,RaisesException,MeasureAs=SetHTMLUnsafe,CEReactions] void setHTMLUnsafe((TrustedHTML or DOMString) html, SetHTMLUnsafeOptions options);
|
||||
[RuntimeEnabled=SanitizerAPI,RaisesException,MeasureAs=SetHTMLSafe,CEReactions] void setHTML(DOMString html, optional SetHTMLOptions options = {});
|
||||
[RuntimeEnabled=TrustedTypesCreateParserOptions,RaisesException,MeasureAs=SetHTMLUnsafe,CEReactions] void setHTMLUnsafe((TrustedHTML or DOMString) html, TrustedParserOptions options);
|
||||
[RuntimeEnabled=TrustedTypesCreateParserOptions,RaisesException,MeasureAs=SetHTMLSafe,CEReactions] void setHTML(DOMString html, TrustedParserOptions options);
|
||||
|
||||
// https://github.com/whatwg/html/issues/2142
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamAppendHTMLUnsafe(optional SetHTMLUnsafeOptions options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamHTMLUnsafe(optional SetHTMLUnsafeOptions options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamAppendHTMLUnsafe(optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamHTMLUnsafe(optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamAppendHTML(optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, CallWith=ScriptState, RaisesException] WritableStream streamHTML(optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
|
||||
// https://github.com/whatwg/html/issues/11669
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void appendHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void appendHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void prependHTML(DOMString html, optional (SetHTMLOptions or TrustedParserOptions) options = {});
|
||||
[RuntimeEnabled=DocumentPatching, RaisesException] void prependHTMLUnsafe((TrustedHTML or DOMString) html, optional (SetHTMLUnsafeOptions or TrustedParserOptions) options = {});
|
||||
};
|
||||
|
||||
ShadowRoot includes DocumentOrShadowRoot;
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ dictionary ShadowRootInit {
|
||||
boolean serializable;
|
||||
boolean clonable;
|
||||
[RuntimeEnabled=ShadowRootReferenceTarget] DOMString? referenceTarget;
|
||||
[RuntimeEnabled=DocumentPatching] sequence<DOMString> marker;
|
||||
// Note: if you add a parameter here, be sure to add it to the list of checks
|
||||
// in Element::attachShadow() for existing declarative shadow roots.
|
||||
};
|
||||
|
||||
+3
-9
@@ -13,17 +13,11 @@ enum UnderlineThickness { "none", "thin", "thick" };
|
||||
[
|
||||
Exposed=Window
|
||||
] interface TextFormat {
|
||||
// TODO(crbug.com/354497121): Remove "RaisesException" when the `underlineStyle`
|
||||
// and `underlineThickness` attributes are converted to enums as per the spec [1].
|
||||
// [1]: https://w3c.github.io/edit-context/#textformatupdateevent
|
||||
[RaisesException] constructor(optional TextFormatInit options = {});
|
||||
constructor(optional TextFormatInit options = {});
|
||||
|
||||
readonly attribute unsigned long rangeStart;
|
||||
readonly attribute unsigned long rangeEnd;
|
||||
|
||||
// https://crbug.com/354497121 These should be UnderlineStyle and
|
||||
// UnderlineThickness enumerations but the values returned by the
|
||||
// implementation do not match what the IDL defines.
|
||||
[MeasureAs=EditContextTextFormatUnderlineStyle] readonly attribute DOMString underlineStyle;
|
||||
[MeasureAs=EditContextTextFormatUnderlineThickness] readonly attribute DOMString underlineThickness;
|
||||
readonly attribute UnderlineStyle underlineStyle;
|
||||
readonly attribute UnderlineThickness underlineThickness;
|
||||
};
|
||||
|
||||
+2
-2
@@ -10,6 +10,6 @@
|
||||
dictionary TextFormatInit {
|
||||
unsigned long rangeStart;
|
||||
unsigned long rangeEnd;
|
||||
DOMString underlineStyle;
|
||||
DOMString underlineThickness;
|
||||
UnderlineStyle underlineStyle;
|
||||
UnderlineThickness underlineThickness;
|
||||
};
|
||||
|
||||
+4
@@ -86,6 +86,7 @@
|
||||
"contentvisibilityautostatechange",
|
||||
"contextlost",
|
||||
"contextmenu",
|
||||
"contextoverflow",
|
||||
"contextrestored",
|
||||
"controllerchange",
|
||||
"cookiechange",
|
||||
@@ -223,6 +224,7 @@
|
||||
"pagereveal",
|
||||
"pageshow",
|
||||
"pageswap",
|
||||
"paint",
|
||||
"paste",
|
||||
"patch",
|
||||
"pause",
|
||||
@@ -316,6 +318,7 @@
|
||||
"statechange",
|
||||
"stop",
|
||||
"storage",
|
||||
"stream",
|
||||
"submit",
|
||||
"success",
|
||||
"suspend",
|
||||
@@ -331,6 +334,7 @@
|
||||
"tonechange",
|
||||
"toolactivated",
|
||||
"toolcancel",
|
||||
"toolchange",
|
||||
"touchcancel",
|
||||
"touchend",
|
||||
"touchmove",
|
||||
|
||||
-2
@@ -30,6 +30,4 @@
|
||||
] interface FocusEvent : UIEvent {
|
||||
constructor(DOMString type, optional FocusEventInit eventInitDict = {});
|
||||
readonly attribute EventTarget? relatedTarget;
|
||||
[RuntimeEnabled=EventPseudoTargetProperty, Exposed=Window]
|
||||
readonly attribute CSSPseudoElement? pseudoTarget;
|
||||
};
|
||||
|
||||
-2
@@ -39,8 +39,6 @@
|
||||
readonly attribute boolean repeat;
|
||||
readonly attribute boolean isComposing;
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
[RuntimeEnabled=EventPseudoTargetProperty, Exposed=Window]
|
||||
readonly attribute CSSPseudoElement? pseudoTarget;
|
||||
|
||||
// https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers
|
||||
[CallWith=ScriptState, Measure] void initKeyboardEvent(DOMString type,
|
||||
|
||||
-2
@@ -34,8 +34,6 @@
|
||||
readonly attribute short button;
|
||||
readonly attribute unsigned short buttons;
|
||||
readonly attribute EventTarget? relatedTarget;
|
||||
[RuntimeEnabled=EventPseudoTargetProperty, Exposed=Window]
|
||||
readonly attribute CSSPseudoElement? pseudoTarget;
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
|
||||
// https://w3c.github.io/uievents/#idl-interface-MouseEvent-initializers
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// Copyright 2018 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(crbug.com/907601): Add link to w3c.
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=OverscrollCustomization
|
||||
] interface OverscrollEvent : Event {
|
||||
constructor(DOMString type, boolean bubbles, optional OverscrollEventInit eventInitDict = {});
|
||||
readonly attribute double deltaX;
|
||||
readonly attribute double deltaY;
|
||||
};
|
||||
-2
@@ -36,6 +36,4 @@
|
||||
readonly attribute boolean metaKey;
|
||||
readonly attribute boolean ctrlKey;
|
||||
readonly attribute boolean shiftKey;
|
||||
[RuntimeEnabled=EventPseudoTargetProperty, Exposed=Window]
|
||||
readonly attribute CSSPseudoElement? pseudoTarget;
|
||||
};
|
||||
|
||||
@@ -35,4 +35,7 @@
|
||||
optional long detail = 0);
|
||||
|
||||
readonly attribute unsigned long which;
|
||||
|
||||
[RuntimeEnabled=EventPseudoTargetProperty, Exposed=Window]
|
||||
readonly attribute CSSPseudoElement? pseudoTarget;
|
||||
};
|
||||
|
||||
+65
-32
@@ -190,6 +190,7 @@
|
||||
#include "third_party/blink/renderer/platform/weborigin/known_ports.h"
|
||||
#include "third_party/blink/renderer/platform/widget/widget_base.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/casting.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/functional.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/string_to_number.h"
|
||||
#include "third_party/icu/source/common/unicode/uscript.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
@@ -240,6 +241,11 @@ static const float minScaleChangeToTriggerZoom = 1.5f;
|
||||
static const float leftBoxRatio = 0.3f;
|
||||
static const int caretPadding = 10;
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
|
||||
static constexpr base::TimeDelta kWindowingControlsChangeTimeout =
|
||||
base::Seconds(5);
|
||||
#endif
|
||||
|
||||
namespace blink {
|
||||
|
||||
using mojom::blink::EffectiveConnectionType;
|
||||
@@ -722,16 +728,6 @@ void WebViewImpl::EnableFakePageScaleAnimationForTesting(bool enable) {
|
||||
fake_page_scale_animation_page_scale_factor_ = 0;
|
||||
}
|
||||
|
||||
void WebViewImpl::AcceptLanguagesChanged() {
|
||||
FontCache::AcceptLanguagesChanged(
|
||||
String::FromUTF8(renderer_preferences_.accept_languages));
|
||||
|
||||
if (!GetPage())
|
||||
return;
|
||||
|
||||
GetPage()->AcceptLanguagesChanged();
|
||||
}
|
||||
|
||||
gfx::Rect WebViewImpl::WidenRectWithinPageBounds(const gfx::Rect& source,
|
||||
int target_margin,
|
||||
int minimum_margin) {
|
||||
@@ -1052,8 +1048,6 @@ void WebViewImpl::ZoomToFindInPageRect(const gfx::Rect& rect_in_root_frame) {
|
||||
StartPageScaleAnimation(scroll, false, scale, kFindInPageAnimationDuration);
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_MAC)
|
||||
// Mac has no way to open a context menu based on a keyboard event.
|
||||
WebInputEventResult WebViewImpl::SendContextMenuEvent() {
|
||||
// The contextMenuController() holds onto the last context menu that was
|
||||
// popped up on the page until a new one is created. We need to clear
|
||||
@@ -1078,11 +1072,6 @@ WebInputEventResult WebViewImpl::SendContextMenuEvent() {
|
||||
nullptr, kMenuSourceKeyboard);
|
||||
}
|
||||
}
|
||||
#else
|
||||
WebInputEventResult WebViewImpl::SendContextMenuEvent() {
|
||||
return WebInputEventResult::kNotHandled;
|
||||
}
|
||||
#endif
|
||||
|
||||
WebPagePopupImpl* WebViewImpl::OpenPagePopup(PagePopupClient* client) {
|
||||
DCHECK(client);
|
||||
@@ -1928,8 +1917,12 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
RuntimeEnabledFeatures::SetPaymentRequestEnabled(
|
||||
prefs.payment_request_enabled);
|
||||
|
||||
if (prefs.ai_prompt_api_enabled) {
|
||||
if (prefs.ai_ot_apis_enabled) {
|
||||
RuntimeEnabledFeatures::SetAIPromptAPIEnabled(true);
|
||||
RuntimeEnabledFeatures::SetAIPromptAPIMultimodalInputEnabled(true);
|
||||
RuntimeEnabledFeatures::SetAIProofreadingAPIEnabled(true);
|
||||
RuntimeEnabledFeatures::SetAIRewriterAPIEnabled(true);
|
||||
RuntimeEnabledFeatures::SetAIWriterAPIEnabled(true);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
@@ -2993,10 +2986,10 @@ void WebViewImpl::UpdatePageDefinedViewportConstraints(
|
||||
|
||||
Document* document = GetPage()->DeprecatedLocalMainFrame()->GetDocument();
|
||||
|
||||
Length default_min_width =
|
||||
ViewportLength default_min_width =
|
||||
document->GetViewportData().ViewportDefaultMinWidth();
|
||||
if (default_min_width.IsAuto())
|
||||
default_min_width = Length::ExtendToZoom();
|
||||
default_min_width = ViewportLength::ExtendToZoom();
|
||||
|
||||
float old_initial_scale =
|
||||
GetPageScaleConstraintsSet().PageDefinedConstraints().initial_scale;
|
||||
@@ -3006,11 +2999,12 @@ void WebViewImpl::UpdatePageDefinedViewportConstraints(
|
||||
if (SettingsImpl()->ClobberUserAgentInitialScaleQuirk() &&
|
||||
GetPageScaleConstraintsSet().UserAgentConstraints().initial_scale != -1 &&
|
||||
GetPageScaleConstraintsSet().UserAgentConstraints().initial_scale <= 1) {
|
||||
if (description.max_width == Length::DeviceWidth() ||
|
||||
if (description.max_width.IsDeviceWidth() ||
|
||||
(description.max_width.IsAuto() &&
|
||||
GetPageScaleConstraintsSet().PageDefinedConstraints().initial_scale ==
|
||||
1.0f))
|
||||
1.0f)) {
|
||||
SetInitialPageScaleOverride(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Settings& page_settings = GetPage()->GetSettings();
|
||||
@@ -3173,9 +3167,11 @@ void WebViewImpl::Minimize(WindowingControlsChangeCallback callback) {
|
||||
if (window_show_state_change_callback_.has_value()) {
|
||||
std::move(callback).Run(/*succeeded=*/false);
|
||||
} else {
|
||||
uint64_t id = base::RandUint64();
|
||||
window_show_state_change_callback_.emplace(
|
||||
WindowShowStateChangeType::kMinimize, std::move(callback));
|
||||
id, WindowShowStateChangeType::kMinimize, std::move(callback));
|
||||
local_main_frame_host_remote_->Minimize();
|
||||
PostDelayedRejectionForAWCPromise(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3184,9 +3180,11 @@ void WebViewImpl::Maximize(WindowingControlsChangeCallback callback) {
|
||||
if (window_show_state_change_callback_.has_value()) {
|
||||
std::move(callback).Run(/*succeeded=*/false);
|
||||
} else {
|
||||
uint64_t id = base::RandUint64();
|
||||
window_show_state_change_callback_.emplace(
|
||||
WindowShowStateChangeType::kMaximize, std::move(callback));
|
||||
id, WindowShowStateChangeType::kMaximize, std::move(callback));
|
||||
local_main_frame_host_remote_->Maximize();
|
||||
PostDelayedRejectionForAWCPromise(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3195,9 +3193,11 @@ void WebViewImpl::Restore(WindowingControlsChangeCallback callback) {
|
||||
if (window_show_state_change_callback_.has_value()) {
|
||||
std::move(callback).Run(/*succeeded=*/false);
|
||||
} else {
|
||||
uint64_t id = base::RandUint64();
|
||||
window_show_state_change_callback_.emplace(
|
||||
WindowShowStateChangeType::kRestore, std::move(callback));
|
||||
id, WindowShowStateChangeType::kRestore, std::move(callback));
|
||||
local_main_frame_host_remote_->Restore();
|
||||
PostDelayedRejectionForAWCPromise(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3216,8 +3216,11 @@ void WebViewImpl::SetResizable(bool resizable,
|
||||
} else {
|
||||
// We need to wait for the window resizable property to be changed by the
|
||||
// operating system.
|
||||
set_resizable_change_callback_.emplace(resizable, std::move(callback));
|
||||
uint64_t id = base::RandUint64();
|
||||
set_resizable_change_callback_.emplace(id, resizable,
|
||||
std::move(callback));
|
||||
local_main_frame_host_remote_->SetResizable(resizable);
|
||||
PostDelayedRejectionForAWCPromise(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3261,8 +3264,8 @@ void WebViewImpl::OnResizableChanged(bool new_resizable) {
|
||||
}
|
||||
|
||||
if (set_resizable_change_callback_.has_value() &&
|
||||
set_resizable_change_callback_->first == new_resizable) {
|
||||
std::move(set_resizable_change_callback_->second).Run(/*succeeded=*/true);
|
||||
set_resizable_change_callback_->requested_resizable == new_resizable) {
|
||||
std::move(set_resizable_change_callback_->callback).Run(/*succeeded=*/true);
|
||||
set_resizable_change_callback_.reset();
|
||||
}
|
||||
}
|
||||
@@ -3299,12 +3302,36 @@ void WebViewImpl::WasRestored() {
|
||||
void WebViewImpl::HandleWindowShowStateChangeCallbackWith(
|
||||
WindowShowStateChangeType type) {
|
||||
if (window_show_state_change_callback_.has_value() &&
|
||||
window_show_state_change_callback_->first == type) {
|
||||
std::move(window_show_state_change_callback_->second)
|
||||
window_show_state_change_callback_->requested_action == type) {
|
||||
std::move(window_show_state_change_callback_->callback)
|
||||
.Run(/*succeeded=*/true);
|
||||
window_show_state_change_callback_.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void WebViewImpl::PostDelayedRejectionForAWCPromise(uint64_t id) {
|
||||
GetPage()
|
||||
->GetAgentGroupScheduler()
|
||||
.DefaultTaskRunner()
|
||||
->PostNonNestableDelayedTask(
|
||||
FROM_HERE,
|
||||
BindOnce(&WebViewImpl::RejectAWCPromise, Unretained(this), id),
|
||||
kWindowingControlsChangeTimeout);
|
||||
}
|
||||
|
||||
void WebViewImpl::RejectAWCPromise(uint64_t id) {
|
||||
if (window_show_state_change_callback_.has_value() &&
|
||||
window_show_state_change_callback_->id == id) {
|
||||
std::move(window_show_state_change_callback_->callback)
|
||||
.Run(/*succeeded=*/false);
|
||||
window_show_state_change_callback_.reset();
|
||||
} else if (set_resizable_change_callback_.has_value() &&
|
||||
set_resizable_change_callback_->id == id) {
|
||||
std::move(set_resizable_change_callback_->callback)
|
||||
.Run(/*succeeded=*/false);
|
||||
set_resizable_change_callback_.reset();
|
||||
}
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
|
||||
|
||||
void WebViewImpl::UpdateTargetURL(const WebURL& url,
|
||||
@@ -3728,8 +3755,14 @@ void WebViewImpl::UpdateRendererPreferences(
|
||||
SetFocusRingColor(renderer_preferences_.focus_ring_color);
|
||||
}
|
||||
|
||||
if (old_accept_languages != renderer_preferences_.accept_languages)
|
||||
AcceptLanguagesChanged();
|
||||
if (old_accept_languages != renderer_preferences_.accept_languages) {
|
||||
FontCache::AcceptLanguagesChanged(
|
||||
String::FromUTF8(renderer_preferences_.accept_languages));
|
||||
if (GetPage()) {
|
||||
GetPage()->GetSettings().SetAcceptLanguages(
|
||||
String::FromUTF8(renderer_preferences_.accept_languages));
|
||||
}
|
||||
}
|
||||
|
||||
GetSettings()->SetCaretBrowsingEnabled(
|
||||
renderer_preferences_.caret_browsing_enabled);
|
||||
|
||||
@@ -70,6 +70,7 @@ enum ReferrerPolicy {
|
||||
[RuntimeEnabled=LocalNetworkAccessPermissionPolicy] readonly attribute IPAddressSpace targetAddressSpace;
|
||||
|
||||
[MeasureAs=RequestIsHistoryNavigation] readonly attribute boolean isHistoryNavigation;
|
||||
[RuntimeEnabled=RequestIsReloadNavigation] readonly attribute boolean isReloadNavigation;
|
||||
[RaisesException, CallWith=ScriptState, NewObject] Request clone();
|
||||
|
||||
[RuntimeEnabled=FetchRetry] RetryOptions? getRetryOptions();
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// Copyright 2026 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(crbug.com/41406914): Update this interface when spec'd.
|
||||
|
||||
dictionary ScrollResult {
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user