[AUTO][FILECONTROL] - version 143.0.7499.40
This commit is contained in:
committed by
github-actions[bot]
parent
97d638e44a
commit
2251675be7
@@ -1 +1 @@
|
||||
142.0.7444.176
|
||||
143.0.7499.40
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
#include "android_webview/browser/aw_contents.h"
|
||||
#include "android_webview/browser/aw_contents_client_bridge.h"
|
||||
#include "android_webview/browser/aw_contents_io_thread_client.h"
|
||||
#include "android_webview/browser/aw_contents_statics.h"
|
||||
#include "android_webview/browser/aw_cookie_access_policy.h"
|
||||
#include "android_webview/browser/aw_devtools_manager_delegate.h"
|
||||
#include "android_webview/browser/aw_feature_list_creator.h"
|
||||
#include "android_webview/browser/aw_http_auth_handler.h"
|
||||
#include "android_webview/browser/aw_origin_matched_header.h"
|
||||
#include "android_webview/browser/aw_policy_blocklist_service_factory.h"
|
||||
#include "android_webview/browser/aw_settings.h"
|
||||
#include "android_webview/browser/aw_speech_recognition_manager_delegate.h"
|
||||
#include "android_webview/browser/aw_web_contents_delegate.h"
|
||||
@@ -61,6 +63,7 @@
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
@@ -78,6 +81,7 @@
|
||||
#include "components/page_load_metrics/browser/metrics_navigation_throttle.h"
|
||||
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
|
||||
#include "components/policy/content/policy_blocklist_navigation_throttle.h"
|
||||
#include "components/policy/content/safe_search_service.h"
|
||||
#include "components/policy/core/browser/browser_policy_connector_base.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/safe_browsing/content/browser/async_check_tracker.h"
|
||||
@@ -87,6 +91,7 @@
|
||||
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
||||
#include "components/url_matcher/url_matcher.h"
|
||||
#include "components/url_matcher/url_util.h"
|
||||
#include "components/user_prefs/user_prefs.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
@@ -172,7 +177,6 @@ bool g_created_network_context_params = false;
|
||||
// On apps targeting API level O or later, check cleartext is enforced.
|
||||
bool g_check_cleartext_permitted = false;
|
||||
|
||||
|
||||
// Get async check tracker to make Safe Browsing v5 check asynchronous
|
||||
base::WeakPtr<AsyncCheckTracker> GetAsyncCheckTracker(
|
||||
const base::RepeatingCallback<content::WebContents*()>& wc_getter,
|
||||
@@ -210,8 +214,15 @@ std::string GetUserAgent() {
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWebViewReduceUAAndroidVersionDeviceModel)) {
|
||||
return embedder_support::BuildUnifiedPlatformUAFromProductAndExtraOs(
|
||||
product, "; wv");
|
||||
// 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.
|
||||
constexpr char kUnifiedPlatformOsInfoWebview[] = "Linux; Android 10; K; wv";
|
||||
return embedder_support::BuildUserAgentFromOSAndProduct(
|
||||
kUnifiedPlatformOsInfoWebview, product);
|
||||
}
|
||||
|
||||
return embedder_support::BuildUserAgentFromProductAndExtraOSInfo(
|
||||
@@ -403,7 +414,7 @@ bool AwContentBrowserClient::IsHandledURL(const GURL& url) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const std::string scheme = url.scheme();
|
||||
const std::string scheme = url.GetScheme();
|
||||
DCHECK_EQ(scheme, base::ToLowerASCII(scheme));
|
||||
static const char* const kProtocolList[] = {
|
||||
url::kHttpScheme, url::kHttpsScheme,
|
||||
@@ -451,6 +462,29 @@ void AwContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(),
|
||||
kSwitchNames);
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWebViewConfigurableLibraryPrefetch)) {
|
||||
RendererLibraryPrefetchMode mode = GetRendererLibraryPrefetchMode();
|
||||
switch (mode) {
|
||||
case RendererLibraryPrefetchMode::kDisabled:
|
||||
command_line->AppendSwitchASCII(
|
||||
switches::kWebViewRendererLibraryPrefetch,
|
||||
switches::kWebViewRendererLibraryPrefetchDisabled);
|
||||
break;
|
||||
case RendererLibraryPrefetchMode::kEnabled:
|
||||
command_line->AppendSwitchASCII(
|
||||
switches::kWebViewRendererLibraryPrefetch,
|
||||
switches::kWebViewRendererLibraryPrefetchEnabled);
|
||||
break;
|
||||
default:
|
||||
// kDefault or unknown values are ignored. But sanitize for histograms.
|
||||
mode = RendererLibraryPrefetchMode::kDefault;
|
||||
break;
|
||||
}
|
||||
base::UmaHistogramEnumeration("Android.WebView.RendererLibraryPrefetchMode",
|
||||
mode);
|
||||
}
|
||||
}
|
||||
|
||||
std::string AwContentBrowserClient::GetApplicationLocale() {
|
||||
@@ -628,10 +662,8 @@ void AwContentBrowserClient::OverrideWebPreferences(
|
||||
aw_settings->PopulateWebPreferences(web_prefs);
|
||||
}
|
||||
|
||||
// This preference is needed for back-forward transitions, but they are not
|
||||
// enabled for webview (crbug.com/361600214).
|
||||
web_prefs->increment_local_surface_id_for_mainframe_same_doc_navigation =
|
||||
false;
|
||||
// Back-forward transitions are not enabled for webview (crbug.com/361600214).
|
||||
web_prefs->should_screenshot_on_mainframe_same_doc_navigation = false;
|
||||
|
||||
AwWebContentsDelegate* delegate =
|
||||
static_cast<AwWebContentsDelegate*>(web_contents->GetDelegate());
|
||||
@@ -663,9 +695,12 @@ void AwContentBrowserClient::CreateThrottlesForNavigation(
|
||||
navigation_interception::InterceptNavigationDelegate::MaybeCreateAndAdd(
|
||||
registry, navigation_interception::SynchronyMode::kSync);
|
||||
|
||||
AwBrowserContext* context =
|
||||
AwBrowserContext::FromWebContents(navigation_handle.GetWebContents());
|
||||
registry.AddThrottle(std::make_unique<PolicyBlocklistNavigationThrottle>(
|
||||
registry,
|
||||
AwBrowserContext::FromWebContents(navigation_handle.GetWebContents())));
|
||||
registry, user_prefs::UserPrefs::Get(context),
|
||||
AwPolicyBlocklistServiceFactory::GetForBrowserContext(context),
|
||||
SafeSearchFactory::GetForBrowserContext(context)));
|
||||
|
||||
AwSafeBrowsingNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
@@ -1428,18 +1463,6 @@ AwContentBrowserClient::GetAttributionReportingOsRegistrars(
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
network::mojom::IpProtectionProxyBypassPolicy
|
||||
AwContentBrowserClient::GetIpProtectionProxyBypassPolicy() {
|
||||
// The exact WebView-specific exclusion policy that is used will depend
|
||||
// on android_webview::features::kWebViewIpProtectionExclusionCriteria
|
||||
return network::mojom::IpProtectionProxyBypassPolicy::kExclusionList;
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::WillProvidePublicFirstPartySets() {
|
||||
return base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kWebViewFpsComponent);
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::IsFullCookieAccessAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
content::WebContents* web_contents,
|
||||
@@ -1495,4 +1518,8 @@ bool AwContentBrowserClient::IsSharedStorageSelectURLAllowed(
|
||||
return base::FeatureList::IsEnabled(network::features::kSharedStorageAPI);
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::ShouldAnimateBackForwardTransitions() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace android_webview
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "android_webview/browser/aw_field_trials.h"
|
||||
|
||||
#include "android_webview/browser/metrics/aw_metrics_service_client.h"
|
||||
#include "android_webview/common/aw_features.h"
|
||||
#include "android_webview/common/aw_switches.h"
|
||||
#include "base/allocator/partition_alloc_features.h"
|
||||
@@ -24,7 +25,6 @@
|
||||
#include "gpu/config/gpu_finch_features.h"
|
||||
#include "media/audio/audio_features.h"
|
||||
#include "media/base/media_switches.h"
|
||||
#include "mojo/public/cpp/bindings/features.h"
|
||||
#include "net/base/features.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/tracing/public/cpp/tracing_features.h"
|
||||
@@ -37,12 +37,11 @@
|
||||
|
||||
void AwFieldTrials::OnVariationsSetupComplete() {
|
||||
// Persistent histograms must be enabled ASAP, but depends on Features.
|
||||
base::FilePath metrics_dir;
|
||||
if (base::PathService::Get(base::DIR_ANDROID_APP_DATA, &metrics_dir)) {
|
||||
InstantiatePersistentHistogramsWithFeaturesAndCleanup(metrics_dir);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
}
|
||||
android_webview::AwMetricsServiceClient* metrics_service_client =
|
||||
android_webview::AwMetricsServiceClient::GetInstance();
|
||||
metrics_service_client->SetUpMetricsDir();
|
||||
InstantiatePersistentHistogramsWithFeaturesAndCleanup(
|
||||
metrics_service_client->GetMetricsDir());
|
||||
}
|
||||
|
||||
// TODO(crbug.com/40271903): Consider to migrate all WebView feature overrides
|
||||
@@ -66,15 +65,18 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
aw_feature_overrides.DisableFeature(
|
||||
blink::features::kAboutBlankPageRespectsDarkModeOnUserAction);
|
||||
|
||||
// TODO(crbug.com/433304196): Remove this once webview experiment has
|
||||
// concluded.
|
||||
aw_feature_overrides.DisableFeature(
|
||||
blink::features::kAsyncTouchMovesImmediatelyAfterScroll);
|
||||
|
||||
// Disable enforcing `noopener` on Blob URL navigations on WebView.
|
||||
aw_feature_overrides.DisableFeature(
|
||||
blink::features::kEnforceNoopenerOnBlobURLNavigation);
|
||||
|
||||
#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER)
|
||||
// Disable the passthrough on WebView.
|
||||
aw_feature_overrides.DisableFeature(
|
||||
::features::kDefaultPassthroughCommandDecoder);
|
||||
#endif
|
||||
|
||||
// HDR does not support webview yet. See crbug.com/1493153 for an explanation.
|
||||
aw_feature_overrides.DisableFeature(ui::kAndroidHDR);
|
||||
@@ -201,8 +203,10 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
aw_feature_overrides.DisableFeature(::features::kFedCm);
|
||||
|
||||
// Disable Digital Credentials API on WebView.
|
||||
aw_feature_overrides.DisableFeature(::features::kWebIdentityDigitalCredentials);
|
||||
aw_feature_overrides.DisableFeature(::features::kWebIdentityDigitalCredentialsCreation);
|
||||
aw_feature_overrides.DisableFeature(
|
||||
::features::kWebIdentityDigitalCredentials);
|
||||
aw_feature_overrides.DisableFeature(
|
||||
::features::kWebIdentityDigitalCredentialsCreation);
|
||||
|
||||
// TODO(crbug.com/40272633): Web MIDI permission prompt for all usage.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kBlockMidiByDefault);
|
||||
@@ -217,10 +221,6 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
// enabling site isolation. See crbug.com/356170748.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kPaintHoldingForIframes);
|
||||
|
||||
// Default Nav Transition does not support WebView.
|
||||
// TODO(crbug.com/434928245): cleanup this feature gate in M141.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kBackForwardTransitions);
|
||||
|
||||
// Disabling this feature for WebView, since it can switch focus when scrolled
|
||||
// in cases with multiple views which can trigger HTML focus changes that
|
||||
// aren't intended. See crbug.com/378779896, crbug.com/373672168 for more
|
||||
@@ -303,12 +303,22 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
|
||||
aw_feature_overrides.DisableFeature(
|
||||
features::kAAudioPerStreamDeviceSelection);
|
||||
|
||||
// WebView exposes text autosizing to apps via setLayoutAlgorithm(), so
|
||||
// we keep text autosizing support in WebView for now. Further WebView
|
||||
// work will take place in https://crbug.com/391990606.
|
||||
aw_feature_overrides.DisableFeature(blink::features::kForceOffTextAutosizing);
|
||||
|
||||
// Local Network Access restrictions should not be enforced in WebView.
|
||||
// The LNA permission is auto-granted in WebView, but the permission
|
||||
// policy currently blocks iframes from using it. crbug.com/442879527
|
||||
aw_feature_overrides.DisableFeature(
|
||||
network::features::kLocalNetworkAccessChecks);
|
||||
|
||||
// Disable background media for WebView, until we have consensus on long-term
|
||||
// behavior crbug.com/453706851
|
||||
aw_feature_overrides.DisableFeature(
|
||||
features::kAndroidEnableBackgroundMediaLargeFormFactors);
|
||||
|
||||
// SystemTracing is enabled by default only in WebView for now.
|
||||
aw_feature_overrides.EnableFeature(features::kEnablePerfettoSystemTracing);
|
||||
}
|
||||
|
||||
@@ -24,21 +24,21 @@ by a child template that "extends" this file.
|
||||
|
||||
<uses-feature android:glEsVersion="0x00030000" />
|
||||
|
||||
|
||||
<!-- Needed for
|
||||
* servicing requests from websites to obtain location through the Web Geolocation API,
|
||||
which, however, is further gated on the user expressly granting the geolocation
|
||||
permission to individual web origins
|
||||
* supporting bluetooth discovery pre-S
|
||||
* providing a geolocation header to the default search engine; used to annotate omnibox
|
||||
suggestions, search prefetch and search navigation requests.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
|
||||
<uses-permission-sdk-23 android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<!--
|
||||
Enable runtime permissions as uses-permission in tip of tree builds
|
||||
only for ease of development on Android L and earlier. For consumer
|
||||
channels use "runtime permission" uses-permission-sdk-23 which provides
|
||||
permission on Android M and later without a prompt.
|
||||
-->
|
||||
{% if channel in ['default'] %}
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
|
||||
{% endif %}
|
||||
|
||||
<uses-permission-sdk-23 android:name="android.permission.ACCESS_ADSERVICES_ATTRIBUTION" />
|
||||
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30"/>
|
||||
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_CONNECT"/>
|
||||
@@ -64,6 +64,8 @@ by a child template that "extends" this file.
|
||||
|
||||
<uses-permission-sdk-23 android:name="android.permission.READ_CONTACTS"/>
|
||||
<uses-permission-sdk-23 android:name="android.permission.REORDER_TASKS"/>
|
||||
|
||||
<!-- Needed for allowing downloaded APKs to be installed. -->
|
||||
<uses-permission-sdk-23 android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
|
||||
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
@@ -90,11 +92,20 @@ by a child template that "extends" this file.
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<!-- Needed to determine whether an app installed on the device should handle a web navigation. -->
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission-sdk-23 android:name="android.permission.READ_MEDIA_AUDIO"/>
|
||||
|
||||
<!-- Needed for handling media-viewing Intents from other apps for images and video on low end
|
||||
or managed devices (eg. crbug.com/40546519), monitoring of screenshots if permission has
|
||||
been previously granted (doesn't request independently) (crbug.com/40520892), and
|
||||
Chromium's custom photo picker used on Android S and below (crbug.com/40489056) -->
|
||||
<uses-permission-sdk-23 android:name="android.permission.READ_MEDIA_IMAGES"/>
|
||||
<uses-permission-sdk-23 android:name="android.permission.READ_MEDIA_VIDEO"/>
|
||||
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||
<!--
|
||||
@@ -593,7 +604,7 @@ by a child template that "extends" this file.
|
||||
@android:style/Theme.NoDisplay can't be used here.
|
||||
-->
|
||||
<activity android:name="org.chromium.chrome.browser.sync.ui.SyncTrustedVaultProxyActivity"
|
||||
android:theme="@style/Theme.Material3.DayNight"
|
||||
android:theme="@style/Theme.Material3Expressive.DayNight"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
@@ -1214,7 +1225,7 @@ by a child template that "extends" this file.
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true"
|
||||
android:noHistory="true"
|
||||
android:theme="@style/Theme.Material3.DayNight"
|
||||
android:theme="@style/Theme.Material3Expressive.DayNight"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize" >
|
||||
</activity>
|
||||
|
||||
|
||||
+74
-35
@@ -321,7 +321,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
private final @Nullable Intent mKeepAliveServiceIntent;
|
||||
private final @Nullable Bundle mAnimationBundle;
|
||||
|
||||
private final int mUiType;
|
||||
private int mUiType;
|
||||
private final int mTitleVisibilityState;
|
||||
private final @Nullable String mMediaViewerUrl;
|
||||
private final boolean mEnableEmbeddedMediaExperience;
|
||||
@@ -589,11 +589,6 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
}
|
||||
}
|
||||
|
||||
mOpenInBrowserState =
|
||||
IntentUtils.safeGetIntExtra(
|
||||
intent,
|
||||
EXTRA_OPEN_IN_BROWSER_STATE,
|
||||
OpenInBrowserButtonState.OPEN_IN_BROWSER_STATE_DEFAULT);
|
||||
if (mUiType == CustomTabsUiType.POPUP) {
|
||||
mShareState = CustomTabsIntent.SHARE_STATE_OFF;
|
||||
} else {
|
||||
@@ -611,12 +606,15 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
List<Bundle> menuItems =
|
||||
IntentUtils.getParcelableArrayListExtra(intent, CustomTabsIntent.EXTRA_MENU_ITEMS);
|
||||
|
||||
addOpenInBrowserOption(intent, context);
|
||||
mOpenInBrowserState =
|
||||
IntentUtils.safeGetIntExtra(
|
||||
intent,
|
||||
EXTRA_OPEN_IN_BROWSER_STATE,
|
||||
OpenInBrowserButtonState.OPEN_IN_BROWSER_STATE_DEFAULT);
|
||||
int oibState = adjustOpenInBrowserOption(intent);
|
||||
maybeAddOpenInBrowserOption(context, oibState);
|
||||
updateExtraMenuItems(menuItems);
|
||||
// Disable CCT share options for automotive. See b/300292495.
|
||||
if (ShareUtils.enableShareForAutomotive(true)) {
|
||||
addShareOption(intent, context);
|
||||
}
|
||||
maybeAddShareOption(intent, context);
|
||||
|
||||
boolean isTwa =
|
||||
mSession != null
|
||||
@@ -639,6 +637,9 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
mTrustedWebActivityDisplayMode = resolveTwaDisplayMode();
|
||||
mTrustedWebActivityDisplayOverrideMode = resolveTwaDisplayOverrideMode();
|
||||
|
||||
// After TWA checks, update custom tabs ui types. Order seems to matter
|
||||
// here.
|
||||
mUiType = getCustomTabsUiType(requestedUiType);
|
||||
int intentVisibilityState =
|
||||
IntentUtils.safeGetIntExtra(
|
||||
intent,
|
||||
@@ -818,12 +819,12 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the verified custom tabs UI type, according to the intent extras, and whether
|
||||
* the intent is trusted.
|
||||
* Get the verified custom tabs UI type, according to the intent extras, and whether the intent
|
||||
* is trusted.
|
||||
*
|
||||
* If the intent extras include a valid EXTRA_NETWORK, consider that the custom tab is
|
||||
* used for captive portal scenarios especially and the UI hides the "Open in Chrome browser"
|
||||
* menu item accordingly.
|
||||
* <p>If the intent extras include a valid EXTRA_NETWORK, consider that the custom tab is used
|
||||
* for captive portal scenarios especially and the UI hides the "Open in Chrome browser" menu
|
||||
* item accordingly.
|
||||
*
|
||||
* @param requestedUiType requested UI type in the intent, unqualified
|
||||
* @return verified UI type
|
||||
@@ -831,6 +832,9 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
@BrowserServicesIntentDataProvider.CustomTabsUiType
|
||||
private int getCustomTabsUiType(int requestedUiType) {
|
||||
if (mNetwork != null) return CustomTabsUiType.NETWORK_BOUND_TAB;
|
||||
if (isTrustedWebActivity() && resolveDisplayMode() == DisplayMode.MINIMAL_UI) {
|
||||
return CustomTabsUiType.TRUSTED_WEB_ACTIVITY;
|
||||
}
|
||||
if (!isTrustedIntent()) {
|
||||
if (VersionInfo.isLocalBuild()) Log.w(TAG, FIRST_PARTY_PITFALL_MSG);
|
||||
return CustomTabsUiType.DEFAULT;
|
||||
@@ -942,10 +946,12 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
* {@link CustomTabsIntent#EXTRA_DEFAULT_SHARE_MENU_ITEM}.
|
||||
* </ul>
|
||||
*/
|
||||
private void addShareOption(Intent intent, Context context) {
|
||||
private void maybeAddShareOption(Intent intent, Context context) {
|
||||
// Disable CCT share options for automotive. See crbug.com/300292495.
|
||||
if (!ShareUtils.enableShareForAutomotive(true)) return;
|
||||
|
||||
if (mShareState == CustomTabsIntent.SHARE_STATE_DEFAULT) {
|
||||
if (mToolbarButtons.isEmpty()
|
||||
|| (isCpaOnlyOpenInBrowserDefault() && canAddMoreToolbarItems())) {
|
||||
if (canAddShareAction()) {
|
||||
mToolbarButtons.add(
|
||||
CustomButtonParamsImpl.createShareButton(
|
||||
context, getColorProvider().getToolbarColor()));
|
||||
@@ -953,8 +959,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
mShowShareItemInMenu = true;
|
||||
}
|
||||
} else if (mShareState == CustomTabsIntent.SHARE_STATE_ON) {
|
||||
if (mToolbarButtons.isEmpty()
|
||||
|| (isCpaOnlyOpenInBrowserDefault() && canAddMoreToolbarItems())) {
|
||||
if (canAddShareAction()) {
|
||||
mToolbarButtons.add(
|
||||
CustomButtonParamsImpl.createShareButton(
|
||||
context, getColorProvider().getToolbarColor()));
|
||||
@@ -970,7 +975,21 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
}
|
||||
}
|
||||
|
||||
private void addOpenInBrowserOption(Intent intent, Context context) {
|
||||
private boolean canAddShareAction() {
|
||||
if (!ChromeFeatureList.sCctAdaptiveButton.isEnabled()) return mToolbarButtons.isEmpty();
|
||||
|
||||
if (!canAddMoreToolbarItems()) return false;
|
||||
|
||||
if (mShareState == CustomTabsIntent.SHARE_STATE_OFF) {
|
||||
return false;
|
||||
} else if (mShareState == CustomTabsIntent.SHARE_STATE_ON) {
|
||||
return true;
|
||||
} else { // mShareState == CustomTabsIntent.SHARE_STATE_DEFAULT
|
||||
return mToolbarButtons.isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
private int adjustOpenInBrowserOption(Intent intent) {
|
||||
boolean usingInteractiveOmnibox =
|
||||
CustomTabsConnection.getInstance().shouldEnableOmniboxForIntent(this);
|
||||
|
||||
@@ -992,18 +1011,40 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
&& IntentUtils.safeGetBooleanExtra(
|
||||
intent, EXTRA_OPEN_IN_BROWSER_BUTTON_ALLOWED, false)) {
|
||||
openInBrowserState = CustomTabsButtonState.BUTTON_STATE_ON;
|
||||
} else {
|
||||
} else if (!isCpaOnlyOpenInBrowserDefault()) {
|
||||
openInBrowserState = CustomTabsButtonState.BUTTON_STATE_OFF;
|
||||
}
|
||||
}
|
||||
|
||||
if (openInBrowserState == CustomTabsButtonState.BUTTON_STATE_ON) {
|
||||
if (mToolbarButtons.isEmpty()
|
||||
|| (isCpaOnlyOpenInBrowserDefault() && canAddMoreToolbarItems())) {
|
||||
mToolbarButtons.add(
|
||||
CustomButtonParamsImpl.createOpenInBrowserButton(
|
||||
context, getColorProvider().getToolbarColor()));
|
||||
}
|
||||
return openInBrowserState;
|
||||
}
|
||||
|
||||
private void maybeAddOpenInBrowserOption(Context context, int oibState) {
|
||||
if (canAddOpenInBrowserAction(oibState)) {
|
||||
mToolbarButtons.add(
|
||||
CustomButtonParamsImpl.createOpenInBrowserButton(
|
||||
context, getColorProvider().getToolbarColor()));
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canAddOpenInBrowserAction(int oibState) {
|
||||
if (!ChromeFeatureList.sCctAdaptiveButton.isEnabled()
|
||||
&& oibState == CustomTabsButtonState.BUTTON_STATE_ON) {
|
||||
return mToolbarButtons.isEmpty();
|
||||
}
|
||||
|
||||
if (!canAddMoreToolbarItems()) return false;
|
||||
|
||||
if (oibState == CustomTabsButtonState.BUTTON_STATE_OFF) {
|
||||
return false;
|
||||
} else if (oibState == CustomTabsButtonState.BUTTON_STATE_ON) {
|
||||
return mToolbarButtons.isEmpty() || mShareState != CustomTabsIntent.SHARE_STATE_ON;
|
||||
} else { // oibState == CustomTabsButtonState.BUTTON_STATE_DEFAULT
|
||||
// Give SHARE a higher precedence than OIB. OIB is visible only in CPA+OIB
|
||||
// experiment arm where SHARE is explicitly off.
|
||||
return mToolbarButtons.isEmpty()
|
||||
&& isCpaOnlyOpenInBrowserDefault()
|
||||
&& mShareState == CustomTabsIntent.SHARE_STATE_OFF;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1690,10 +1731,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
|
||||
@Override
|
||||
public boolean isInteractiveOmniboxEnabled() {
|
||||
return ChromeFeatureList.sSearchInCCT.isEnabled()
|
||||
&& isPackageNameInList(
|
||||
getClientPackageName(),
|
||||
ChromeFeatureList.sSearchinCctOmniboxAllowedPackageNames.getValue());
|
||||
return ChromeFeatureList.sSearchInCCT.isEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1857,7 +1895,8 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
}
|
||||
|
||||
private boolean isCpaOnlyOpenInBrowserDefault() {
|
||||
return ChromeFeatureList.sCctAdaptiveButtonContextualOnly.getValue()
|
||||
return ChromeFeatureList.sCctAdaptiveButton.isEnabled()
|
||||
&& ChromeFeatureList.sCctAdaptiveButtonContextualOnly.getValue()
|
||||
&& ChromeFeatureList.sCctAdaptiveButtonDefaultVariant.getValue()
|
||||
== AdaptiveToolbarButtonVariant.OPEN_IN_BROWSER;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+9
-5
@@ -120,10 +120,11 @@
|
||||
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
|
||||
#include "components/password_manager/core/browser/password_store/password_store_interface.h"
|
||||
#include "components/password_manager/core/browser/password_store/smart_bubble_stats_store.h"
|
||||
#include "components/payments/content/browser_binding/browser_bound_keys_deleter.h"
|
||||
#include "components/payments/content/browser_binding/browser_bound_keys_deleter_factory.h"
|
||||
#include "components/payments/content/browser_binding/browser_bound_key_deleter.h"
|
||||
#include "components/payments/content/browser_binding/browser_bound_key_deleter_factory.h"
|
||||
#include "components/payments/content/web_payments_web_data_service.h"
|
||||
#include "components/performance_manager/public/user_tuning/prefs.h"
|
||||
#include "components/permissions/features.h"
|
||||
#include "components/permissions/permission_actions_history.h"
|
||||
#include "components/permissions/permission_decision_auto_blocker.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -335,7 +336,7 @@ ChromeBrowsingDataRemoverDelegate::GetDomainsForDeferredCookieDeletion(
|
||||
std::string domain = GetDomainAndRegistry(
|
||||
url, net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
|
||||
if (domain.empty())
|
||||
domain = url.host();
|
||||
domain = url.GetHost();
|
||||
domains.insert(domain);
|
||||
}
|
||||
return {domains.begin(), domains.end()};
|
||||
@@ -732,13 +733,11 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (payments::BrowserBoundKeyDeleter* browser_bound_key_deleter =
|
||||
payments::BrowserBoundKeyDeleterFactory::GetForBrowserContext(
|
||||
profile_)) {
|
||||
browser_bound_key_deleter->RemoveInvalidBBKs();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
if (base::FeatureList::IsEnabled(
|
||||
@@ -940,6 +939,11 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
|
||||
PermissionDecisionAutoBlockerFactory::GetForProfile(profile_)
|
||||
->RemoveEmbargoAndResetCounts(filter);
|
||||
if (base::FeatureList::IsEnabled(
|
||||
permissions::features::kPermissionHeuristicAutoGrant)) {
|
||||
PermissionActionsHistoryFactory::GetForProfile(profile_)
|
||||
->ResetHeuristicData(filter);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "chrome/browser/media/media_foundation_service_monitor.h"
|
||||
#include "content/public/browser/site_instance.h"
|
||||
#include "media/mojo/mojom/media_foundation_preferences.mojom.h"
|
||||
#include "media/mojo/services/media_foundation_preferences.h"
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM
|
||||
#include "chrome/browser/preloading/search_preload/search_preload_features.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/ai/ai_manager.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
@@ -67,6 +66,7 @@
|
||||
#include "chrome/browser/btm/btm_browser_signin_detector.h"
|
||||
#include "chrome/browser/btm/stateful_bounce_counter.h"
|
||||
#include "chrome/browser/child_process_host_flags.h"
|
||||
#include "chrome/browser/chrome_browser_main.h"
|
||||
#include "chrome/browser/chrome_content_browser_client_binder_policies.h"
|
||||
#include "chrome/browser/chrome_content_browser_client_navigation_throttles.h"
|
||||
#include "chrome/browser/chrome_content_browser_client_parts.h"
|
||||
@@ -87,7 +87,6 @@
|
||||
#include "chrome/browser/external_protocol/external_protocol_handler.h"
|
||||
#include "chrome/browser/favicon/favicon_utils.h"
|
||||
#include "chrome/browser/font_family_cache.h"
|
||||
#include "chrome/browser/gpu/chrome_browser_main_extra_parts_gpu.h"
|
||||
#include "chrome/browser/headless/headless_mode_util.h"
|
||||
#include "chrome/browser/hid/chrome_hid_delegate.h"
|
||||
#include "chrome/browser/history/history_service_factory.h"
|
||||
@@ -104,21 +103,21 @@
|
||||
#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/webrtc_logging_controller.h"
|
||||
#include "chrome/browser/memory/chrome_browser_main_extra_parts_memory.h"
|
||||
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
|
||||
#include "chrome/browser/metrics/chrome_feature_list_creator.h"
|
||||
#include "chrome/browser/navigation_predictor/anchor_element_preloader.h"
|
||||
#include "chrome/browser/net/chrome_network_delegate.h"
|
||||
#include "chrome/browser/net/profile_network_context_service.h"
|
||||
#include "chrome/browser/net/profile_network_context_service_factory.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h"
|
||||
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h"
|
||||
#include "chrome/browser/payments/payment_request_display_manager_factory.h"
|
||||
#include "chrome/browser/performance_manager/public/chrome_browser_main_extra_parts_performance_manager.h"
|
||||
#include "chrome/browser/performance_manager/public/chrome_content_browser_client_performance_manager_part.h"
|
||||
#include "chrome/browser/performance_monitor/chrome_browser_main_extra_parts_performance_monitor.h"
|
||||
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
|
||||
#include "chrome/browser/picture_in_picture/scoped_tuck_picture_in_picture.h"
|
||||
#include "chrome/browser/plugins/plugin_utils.h"
|
||||
#include "chrome/browser/policy/chrome_policy_blocklist_service_factory.h"
|
||||
#include "chrome/browser/policy/policy_util.h"
|
||||
#include "chrome/browser/policy/profile_policy_connector.h"
|
||||
#include "chrome/browser/predictors/loading_predictor.h"
|
||||
@@ -133,29 +132,28 @@
|
||||
#include "chrome/browser/preloading/preloading_features.h"
|
||||
#include "chrome/browser/preloading/preloading_prefs.h"
|
||||
#include "chrome/browser/preloading/prerender/prerender_web_contents_delegate.h"
|
||||
#include "chrome/browser/preloading/search_preload/search_preload_features.h"
|
||||
#include "chrome/browser/privacy_budget/identifiability_study_state.h"
|
||||
#include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h"
|
||||
#include "chrome/browser/privacy_sandbox/tracking_protection_settings_factory.h"
|
||||
#include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/profiles/profile_io_data.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "chrome/browser/profiles/profile_selections.h"
|
||||
#include "chrome/browser/profiles/renderer_updater.h"
|
||||
#include "chrome/browser/profiles/renderer_updater_factory.h"
|
||||
#include "chrome/browser/profiling_host/chrome_browser_main_extra_parts_profiling.h"
|
||||
#include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
|
||||
#include "chrome/browser/renderer_preferences_util.h"
|
||||
#include "chrome/browser/safe_browsing/url_checker_delegate_impl.h"
|
||||
#include "chrome/browser/search/search.h"
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
#include "chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.h"
|
||||
#include "chrome/browser/serial/chrome_serial_delegate.h"
|
||||
#include "chrome/browser/sharing/sms/sms_remote_fetcher.h"
|
||||
#include "chrome/browser/signin/chrome_signin_proxying_url_loader_factory.h"
|
||||
#include "chrome/browser/signin/chrome_signin_url_loader_throttle.h"
|
||||
#include "chrome/browser/signin/header_modification_delegate_impl.h"
|
||||
#include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
|
||||
#include "chrome/browser/speech/on_device_speech_recognition_util.h"
|
||||
#include "chrome/browser/ssl/chrome_security_blocking_page_factory.h"
|
||||
#include "chrome/browser/ssl/chrome_security_state_tab_helper.h"
|
||||
#include "chrome/browser/ssl/https_upgrades_interceptor.h"
|
||||
@@ -164,8 +162,6 @@
|
||||
#include "chrome/browser/tab_group_sync/tab_group_sync_utils.h"
|
||||
#include "chrome/browser/task_manager/sampling/task_manager_impl.h"
|
||||
#include "chrome/browser/task_manager/task_manager_interface.h"
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "chrome/browser/tracing/chrome_tracing_delegate.h"
|
||||
#include "chrome/browser/translate/translate_service.h"
|
||||
#include "chrome/browser/ui/blocked_content/blocked_window_params.h"
|
||||
@@ -212,6 +208,7 @@
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "chrome/installer/util/google_update_settings.h"
|
||||
#include "components/autofill/core/common/autofill_features.h"
|
||||
#include "components/autofill/core/common/autofill_switches.h"
|
||||
#include "components/blocked_content/popup_blocker.h"
|
||||
#include "components/browsing_topics/browsing_topics_service.h"
|
||||
@@ -223,6 +220,7 @@
|
||||
#include "components/content_settings/core/common/content_settings.h"
|
||||
#include "components/content_settings/core/common/content_settings_types.h"
|
||||
#include "components/content_settings/core/common/cookie_settings_base.h"
|
||||
#include "components/contextual_tasks/public/features.h"
|
||||
#include "components/custom_handlers/protocol_handler_registry.h"
|
||||
#include "components/custom_handlers/protocol_handler_throttle.h"
|
||||
#include "components/dom_distiller/core/dom_distiller_switches.h"
|
||||
@@ -262,6 +260,7 @@
|
||||
#include "components/no_state_prefetch/common/no_state_prefetch_final_status.h"
|
||||
#include "components/no_state_prefetch/common/no_state_prefetch_url_loader_throttle.h"
|
||||
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
|
||||
#include "components/password_manager/core/browser/features/password_features.h"
|
||||
#include "components/payments/content/payment_request_display_manager.h"
|
||||
#include "components/payments/content/secure_payment_confirmation_service_factory.h"
|
||||
#include "components/pdf/common/pdf_util.h"
|
||||
@@ -360,6 +359,7 @@
|
||||
#include "media/base/media_switches.h"
|
||||
#include "media/media_buildflags.h"
|
||||
#include "media/mojo/buildflags.h"
|
||||
#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"
|
||||
@@ -416,7 +416,6 @@
|
||||
#include "base/strings/string_tokenizer.h"
|
||||
#include "base/win/win_util.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "chrome/browser/chrome_browser_main_win.h"
|
||||
#include "chrome/browser/lifetime/application_lifetime_desktop.h"
|
||||
#include "chrome/browser/performance_manager/public/dll_pre_read_policy_win.h"
|
||||
#include "chrome/browser/tracing/tracing_features.h"
|
||||
@@ -427,8 +426,6 @@
|
||||
#include "sandbox/win/src/sandbox_policy.h"
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
#include "chrome/browser/browser_process_platform_part_mac.h"
|
||||
#include "chrome/browser/chrome_browser_main_mac.h"
|
||||
#include "chrome/browser/mac/chrome_browser_main_extra_parts_mac.h"
|
||||
#include "chrome/common/chrome_version.h"
|
||||
#include "components/soda/constants.h"
|
||||
#include "sandbox/mac/sandbox_serializer.h"
|
||||
@@ -456,7 +453,6 @@
|
||||
#include "chrome/browser/ash/fileapi/mtp_file_system_backend_delegate.h"
|
||||
#include "chrome/browser/ash/login/signin_partition_manager.h"
|
||||
#include "chrome/browser/ash/login/startup_utils.h"
|
||||
#include "chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.h"
|
||||
#include "chrome/browser/ash/net/network_health/network_health_manager.h"
|
||||
#include "chrome/browser/ash/net/system_proxy_manager.h"
|
||||
#include "chrome/browser/ash/profiles/profile_helper.h"
|
||||
@@ -466,7 +462,6 @@
|
||||
#include "chrome/browser/media/webrtc/multi_capture/multi_capture_data_service_factory.h"
|
||||
#include "chrome/browser/speech/tts_chromeos.h"
|
||||
#include "chrome/browser/speech/tts_controller_delegate_impl.h"
|
||||
#include "chrome/browser/ui/ash/main_extra_parts/chrome_browser_main_extra_parts_ash.h"
|
||||
#include "chrome/browser/ui/ash/system_web_apps/system_web_app_ui_utils.h"
|
||||
#include "chrome/browser/ui/browser_dialogs.h"
|
||||
#include "chrome/browser/ui/webui/ash/kerberos/kerberos_in_browser_dialog.h"
|
||||
@@ -479,9 +474,6 @@
|
||||
#include "components/user_manager/user_manager.h"
|
||||
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
|
||||
#include "storage/browser/file_system/external_mount_points.h"
|
||||
#elif BUILDFLAG(IS_LINUX)
|
||||
#include "chrome/browser/chrome_browser_main_linux.h"
|
||||
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
|
||||
#elif BUILDFLAG(IS_ANDROID)
|
||||
#include "base/android/application_status_listener.h"
|
||||
#include "base/feature_list.h"
|
||||
@@ -491,7 +483,6 @@
|
||||
#include "chrome/browser/android/service_tab_launcher.h"
|
||||
#include "chrome/browser/android/tab_android.h"
|
||||
#include "chrome/browser/android/tab_web_contents_delegate_android.h"
|
||||
#include "chrome/browser/chrome_browser_main_android.h"
|
||||
#include "chrome/browser/chrome_content_browser_client_android.h"
|
||||
#include "chrome/browser/digital_credentials/digital_identity_provider_android.h"
|
||||
#include "chrome/browser/flags/android/chrome_feature_list.h"
|
||||
@@ -509,30 +500,35 @@
|
||||
#include "ui/base/resource/resource_bundle_android.h"
|
||||
#include "ui/base/ui_base_paths.h"
|
||||
#include "ui/display/util/display_util.h"
|
||||
#elif BUILDFLAG(IS_POSIX)
|
||||
#include "chrome/browser/chrome_browser_main_posix.h"
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/actor/actor_features.h"
|
||||
#include "chrome/browser/actor/actor_keyed_service.h"
|
||||
#include "chrome/browser/actor/actor_keyed_service_factory.h"
|
||||
#include "chrome/browser/contextual_tasks/contextual_tasks_ui_service.h"
|
||||
#include "chrome/browser/contextual_tasks/contextual_tasks_ui_service_factory.h"
|
||||
#include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
|
||||
#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/headless/chrome_browser_main_extra_parts_headless.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"
|
||||
#include "chrome/browser/printing/print_preview_dialog_controller.h"
|
||||
#include "chrome/browser/screen_ai/screen_ai_install_state.h"
|
||||
#include "chrome/browser/search/instant_service.h"
|
||||
#include "chrome/browser/search/instant_service_factory.h"
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_dialogs.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
#include "chrome/browser/ui/chrome_pages.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
||||
#include "chrome/browser/ui/waap/waap_utils.h"
|
||||
#include "chrome/browser/ui/webui/chrome_content_browser_client_webui_part.h"
|
||||
#include "chrome/browser/ui/webui/webui_util_desktop.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h"
|
||||
@@ -553,6 +549,7 @@
|
||||
#include "components/keep_alive_registry/keep_alive_registry.h"
|
||||
#include "components/password_manager/content/common/web_ui_constants.h"
|
||||
#include "components/password_manager/core/common/password_manager_features.h"
|
||||
#include "components/soda/soda_util.h"
|
||||
#include "components/webapps/isolated_web_apps/url_loading/url_loader_factory.h"
|
||||
#include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom.h"
|
||||
#include "third_party/blink/public/mojom/installedapp/related_application.mojom.h"
|
||||
@@ -587,26 +584,12 @@
|
||||
#include "components/crash/content/browser/crash_handler_host_linux.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
#include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
BUILDFLAG(IS_CHROMEOS)
|
||||
#include "components/webapps/isolated_web_apps/scheme.h"
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
|
||||
// BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#include "chrome/browser/chrome_browser_main_extra_parts_linux.h"
|
||||
#elif BUILDFLAG(IS_OZONE)
|
||||
#include "chrome/browser/chrome_browser_main_extra_parts_ozone.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#include "components/captive_portal/content/captive_portal_url_loader_throttle.h"
|
||||
@@ -786,23 +769,6 @@ BASE_FEATURE(kSkipPagehideInCommitForDSENavigation,
|
||||
BASE_FEATURE(kPrewarmServiceWorkerRegistrationForDSE,
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// A small ChromeBrowserMainExtraParts that invokes a callback when threads are
|
||||
// ready. Used to initialize ChromeContentBrowserClient data that needs the UI
|
||||
// thread.
|
||||
class ChromeBrowserMainExtraPartsThreadNotifier final
|
||||
: public ChromeBrowserMainExtraParts {
|
||||
public:
|
||||
explicit ChromeBrowserMainExtraPartsThreadNotifier(
|
||||
base::OnceClosure threads_ready_closure)
|
||||
: threads_ready_closure_(std::move(threads_ready_closure)) {}
|
||||
|
||||
// ChromeBrowserMainExtraParts:
|
||||
void PostCreateThreads() final { std::move(threads_ready_closure_).Run(); }
|
||||
|
||||
private:
|
||||
base::OnceClosure threads_ready_closure_;
|
||||
};
|
||||
|
||||
// Cached version of the locale so we can return the locale on the I/O
|
||||
// thread.
|
||||
std::string& GetIOThreadApplicationLocale() {
|
||||
@@ -826,7 +792,7 @@ bool HandleNewTabPageLocationOverride(
|
||||
GURL* url,
|
||||
content::BrowserContext* browser_context) {
|
||||
if (!url->SchemeIs(content::kChromeUIScheme) ||
|
||||
url->host() != chrome::kChromeUINewTabHost) {
|
||||
url->GetHost() != chrome::kChromeUINewTabHost) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1069,7 +1035,7 @@ void LaunchURL(
|
||||
ProtocolHandlerRegistryFactory::GetForBrowserContext(
|
||||
web_contents->GetBrowserContext());
|
||||
if (protocol_handler_registry &&
|
||||
protocol_handler_registry->IsHandledProtocol(url.scheme())) {
|
||||
protocol_handler_registry->IsHandledProtocol(url.GetScheme())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1145,8 +1111,8 @@ void LaunchURL(
|
||||
|
||||
bool is_allowlisted = false;
|
||||
PolicyBlocklistService* service =
|
||||
PolicyBlocklistFactory::GetForBrowserContext(
|
||||
web_contents->GetBrowserContext());
|
||||
ChromePolicyBlocklistServiceFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext()));
|
||||
if (ShouldHonorPolicies() && service) {
|
||||
const policy::URLBlocklist::URLBlocklistState url_state =
|
||||
service->GetURLBlocklistState(url);
|
||||
@@ -1368,6 +1334,20 @@ bool IsDefaultSearchEngine(Profile* profile, const GURL& url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool IsActorActingOnWebContents(WebContents* web_contents) {
|
||||
auto* actor_service =
|
||||
actor::ActorKeyedService::Get(web_contents->GetBrowserContext());
|
||||
if (!actor_service) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto* tab_interface =
|
||||
tabs::TabInterface::MaybeGetFromContents(web_contents);
|
||||
return tab_interface && actor_service->IsActiveOnTab(*tab_interface);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
@@ -1638,103 +1618,10 @@ void ChromeContentBrowserClient::MaybeProxyNetworkBoundRequest(
|
||||
|
||||
std::unique_ptr<content::BrowserMainParts>
|
||||
ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) {
|
||||
std::unique_ptr<ChromeBrowserMainParts> main_parts;
|
||||
// Construct the Main browser parts based on the OS type.
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
main_parts = std::make_unique<ChromeBrowserMainPartsWin>(is_integration_test,
|
||||
&startup_data_);
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
main_parts = std::make_unique<ChromeBrowserMainPartsMac>(is_integration_test,
|
||||
&startup_data_);
|
||||
#elif BUILDFLAG(IS_CHROMEOS)
|
||||
main_parts = std::make_unique<ash::ChromeBrowserMainPartsAsh>(
|
||||
is_integration_test, &startup_data_);
|
||||
#elif BUILDFLAG(IS_LINUX)
|
||||
main_parts = std::make_unique<ChromeBrowserMainPartsLinux>(
|
||||
is_integration_test, &startup_data_);
|
||||
#elif BUILDFLAG(IS_ANDROID)
|
||||
main_parts = std::make_unique<ChromeBrowserMainPartsAndroid>(
|
||||
is_integration_test, &startup_data_);
|
||||
#elif BUILDFLAG(IS_POSIX)
|
||||
main_parts = std::make_unique<ChromeBrowserMainPartsPosix>(
|
||||
is_integration_test, &startup_data_);
|
||||
#else
|
||||
#error "Unimplemented platform"
|
||||
#endif
|
||||
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsThreadNotifier>(
|
||||
base::BindOnce(&ChromeContentBrowserClient::InitOnUIThread,
|
||||
weak_factory_.GetWeakPtr())));
|
||||
|
||||
bool add_profiles_extra_parts = true;
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (startup_data_.HasBuiltProfilePrefService()) {
|
||||
add_profiles_extra_parts = false;
|
||||
}
|
||||
#endif
|
||||
if (add_profiles_extra_parts) {
|
||||
AddProfilesExtraParts(main_parts.get());
|
||||
}
|
||||
|
||||
// Construct additional browser parts. Stages are called in the order in
|
||||
// which they are added.
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsViewsLinux>());
|
||||
#else
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsViews>());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsMac>());
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// TODO(jamescook): Combine with `ChromeBrowserMainPartsAsh`.
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsAsh>());
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsLinux>());
|
||||
#elif BUILDFLAG(IS_OZONE)
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsOzone>());
|
||||
#endif
|
||||
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsPerformanceMonitor>());
|
||||
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsPerformanceManager>());
|
||||
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsProfiling>());
|
||||
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsMemory>());
|
||||
|
||||
chrome::AddMetricsExtraParts(main_parts.get());
|
||||
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
main_parts->AddParts(
|
||||
std::make_unique<
|
||||
enterprise_util::ChromeBrowserMainExtraPartsEnterprise>());
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
main_parts->AddParts(
|
||||
std::make_unique<headless::ChromeBrowserMainExtraPartsHeadless>());
|
||||
#endif
|
||||
|
||||
// Always add ChromeBrowserMainExtraPartsGpu last to make sure
|
||||
// GpuDataManager initialization could pick up about:flags settings.
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsGpu>());
|
||||
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsSegmentationPlatform>());
|
||||
|
||||
return main_parts;
|
||||
return ChromeBrowserMainParts::Create(
|
||||
is_integration_test, &startup_data_,
|
||||
base::BindOnce(&ChromeContentBrowserClient::InitOnUIThread,
|
||||
weak_factory_.GetWeakPtr()));
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::PostAfterStartupTask(
|
||||
@@ -1783,7 +1670,7 @@ ChromeContentBrowserClient::GetStoragePartitionConfigForSite(
|
||||
// The host in an extension site URL is the extension_id.
|
||||
CHECK(site.has_host());
|
||||
return extensions::util::GetStoragePartitionConfigForExtensionId(
|
||||
site.host(), browser_context);
|
||||
site.GetHost(), browser_context);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2103,7 +1990,7 @@ bool ChromeContentBrowserClient::DoesWebUIUrlRequireProcessLock(
|
||||
// embeds those tiles, should be locked. This allows most visited tiles to
|
||||
// stay in their parent (i.e., third-party NTP's) process.
|
||||
if (url.SchemeIs(chrome::kChromeSearchScheme) &&
|
||||
url.host() == chrome::kChromeSearchMostVisitedHost) {
|
||||
url.GetHost() == chrome::kChromeSearchMostVisitedHost) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2323,7 +2210,7 @@ bool ChromeContentBrowserClient::ShouldStayInParentProcessForNTP(
|
||||
//
|
||||
// TODO(crbug.com/41261582): clean up the logic for detecting NTP.
|
||||
return url.SchemeIs(chrome::kChromeSearchScheme) &&
|
||||
url.host() == chrome::kChromeSearchMostVisitedHost &&
|
||||
url.GetHost() == chrome::kChromeSearchMostVisitedHost &&
|
||||
search::IsNTPURL(parent_site_url);
|
||||
}
|
||||
|
||||
@@ -2680,6 +2567,12 @@ bool ChromeContentBrowserClient::ShouldUrlUseApplicationIsolationLevel(
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool ChromeContentBrowserClient::IsInitialWebUIScheme(const GURL& url) {
|
||||
return IsForInitialWebUI(url);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
bool ChromeContentBrowserClient::IsIsolatedContextAllowedForUrl(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& lock_url) {
|
||||
@@ -4190,6 +4083,7 @@ std::optional<SkColor> GetRootScrollbarThemeColor(WebContents* web_contents) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (ThemeService* theme_service = ThemeServiceFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext()));
|
||||
!theme_service || (theme_service->UsingDefaultTheme() &&
|
||||
@@ -4197,6 +4091,7 @@ std::optional<SkColor> GetRootScrollbarThemeColor(WebContents* web_contents) {
|
||||
!theme_service->UsingDeviceTheme())) {
|
||||
return std::nullopt;
|
||||
}
|
||||
#endif
|
||||
|
||||
color_utils::HSL hsl;
|
||||
color_utils::SkColorToHSL(
|
||||
@@ -4433,6 +4328,24 @@ bool ChromeContentBrowserClient::CanCreateWindow(
|
||||
DCHECK(profile);
|
||||
*no_javascript_access = false;
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// This block gives the Contextual Tasks feature the opportunity to intercept
|
||||
// tab creation in the event it doesn't go directly through the feature's
|
||||
// navigation throttle. When a new tab/window is created, it is done before
|
||||
// the WebContents is created, so if we only let the navigation throttle
|
||||
// handle it, we would end up with an empty tab or window.
|
||||
contextual_tasks::ContextualTasksUiService* contextual_tasks_ui_service =
|
||||
contextual_tasks::ContextualTasksUiServiceFactory::GetForBrowserContext(
|
||||
profile);
|
||||
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks) &&
|
||||
contextual_tasks_ui_service &&
|
||||
contextual_tasks_ui_service->HandleNavigation(
|
||||
target_url, web_contents->GetLastCommittedURL(), web_contents,
|
||||
/*is_to_new_tab=*/true)) {
|
||||
return false;
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// If the opener is trying to create a background window but doesn't have
|
||||
// the appropriate permission, fail the attempt.
|
||||
if (container_type == content::mojom::WindowContainerType::BACKGROUND) {
|
||||
@@ -4503,6 +4416,22 @@ ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
|
||||
return new speech::ChromeSpeechRecognitionManagerDelegate();
|
||||
}
|
||||
|
||||
std::unique_ptr<optimization_guide::ModelBrokerClient>
|
||||
ChromeContentBrowserClient::CreateModelBrokerClient(
|
||||
content::BrowserContext* browser_context) {
|
||||
auto* service = OptimizationGuideKeyedServiceFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(browser_context));
|
||||
return service ? service->CreateModelBrokerClient() : nullptr;
|
||||
}
|
||||
|
||||
media::mojom::AvailabilityStatus
|
||||
ChromeContentBrowserClient::GetOnDeviceSpeechRecognitionAvailabilityStatus(
|
||||
content::BrowserContext* context,
|
||||
const std::string& language) {
|
||||
return speech::GetOnDeviceSpeechRecognitionAvailabilityStatus(context,
|
||||
language);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
content::TtsControllerDelegate*
|
||||
ChromeContentBrowserClient::GetTtsControllerDelegate() {
|
||||
@@ -4853,12 +4782,6 @@ void ChromeContentBrowserClient::OverrideWebPreferences(
|
||||
base::FeatureList::IsEnabled(::features::kContextMenuEmptySpace);
|
||||
#endif
|
||||
|
||||
web_prefs->api_based_fingerprinting_interventions_enabled =
|
||||
base::FeatureList::IsEnabled(
|
||||
features::kIncognitoFingerprintingInterventions) &&
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext())
|
||||
->IsIncognitoProfile();
|
||||
|
||||
web_prefs->content_based_fingerprinting_protection_enabled =
|
||||
fingerprinting_protection_filter::features::
|
||||
IsFingerprintingProtectionEnabledForIncognitoState(
|
||||
@@ -5034,6 +4957,13 @@ base::FilePath ChromeContentBrowserClient::GetGraphiteDawnDiskCacheDirectory() {
|
||||
return user_data_dir.Append(FILE_PATH_LITERAL("GraphiteDawnCache"));
|
||||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetGPUPersistentCacheDirectory() {
|
||||
base::FilePath user_data_dir;
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
||||
DCHECK(!user_data_dir.empty());
|
||||
return user_data_dir.Append(FILE_PATH_LITERAL("GPUPersistentCache"));
|
||||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetNetLogDefaultDirectory() {
|
||||
base::FilePath user_data_dir;
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
||||
@@ -6168,7 +6098,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) &&
|
||||
url.path() != "/pwa.html") {
|
||||
url.GetPath() != "/pwa.html") {
|
||||
return IsSystemFeatureDisabled(policy::SystemFeature::kOsSettings);
|
||||
}
|
||||
|
||||
@@ -6921,18 +6851,10 @@ bool ChromeContentBrowserClient::HandleExternalProtocol(
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
content::WebContents* web_contents = web_contents_getter.Run();
|
||||
if (web_contents) {
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
||||
const auto* tab_interface =
|
||||
tabs::TabInterface::MaybeGetFromContents(web_contents);
|
||||
auto* actor_service = actor::ActorKeyedService::Get(profile);
|
||||
if (web_contents && IsActorActingOnWebContents(web_contents)) {
|
||||
// If actor is active, bail out early to prevent it from launching external
|
||||
// applications.
|
||||
if (tab_interface && actor_service &&
|
||||
actor_service->IsActiveOnTab(*tab_interface)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif //! BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -7027,15 +6949,32 @@ bool ChromeContentBrowserClient::HandleWebUI(
|
||||
|
||||
// Rewrite chrome://help to chrome://settings/help.
|
||||
if (url->SchemeIs(content::kChromeUIScheme) &&
|
||||
url->host() == chrome::kChromeUIHelpHost) {
|
||||
url->GetHost() == chrome::kChromeUIHelpHost) {
|
||||
*url = ReplaceURLHostAndPath(*url, chrome::kChromeUISettingsHost,
|
||||
chrome::kChromeUIHelpHost);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
// Rewrite chrome://settings/autofill to chrome://settings/yourSavedInfo.
|
||||
if (url->SchemeIs(content::kChromeUIScheme) &&
|
||||
url->GetHost() == chrome::kChromeUISettingsHost &&
|
||||
url->GetPath() == chrome::kChromeUIAutofillPath &&
|
||||
base::FeatureList::IsEnabled(
|
||||
autofill::features::kYourSavedInfoSettingsPage)) {
|
||||
GURL::Replacements replacements;
|
||||
replacements.SetPathStr(chrome::kChromeUIYourSavedInfoPath);
|
||||
*url = url->ReplaceComponents(replacements);
|
||||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
|
||||
// BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI)
|
||||
if (url->SchemeIs(content::kChromeUIScheme) &&
|
||||
url->host() == chrome::kChromeUISettingsHost &&
|
||||
url->path() == chrome::kChromeUICertificateRedirectPath) {
|
||||
url->GetHost() == chrome::kChromeUISettingsHost &&
|
||||
url->GetPath() == chrome::kChromeUICertificateRedirectPath) {
|
||||
*url = GURL(chrome::kChromeUICertificateManagerDialogURL);
|
||||
return true;
|
||||
}
|
||||
@@ -7044,14 +6983,14 @@ bool ChromeContentBrowserClient::HandleWebUI(
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Redirect from deprecated trackingProtection subpage to cookies.
|
||||
if (url->SchemeIs(content::kChromeUIScheme) &&
|
||||
url->host() == chrome::kChromeUISettingsHost &&
|
||||
url->path() == chrome::kTrackingProtectionSubPagePath) {
|
||||
url->GetHost() == chrome::kChromeUISettingsHost &&
|
||||
url->GetPath() == chrome::kTrackingProtectionSubPagePath) {
|
||||
GURL::Replacements replacements;
|
||||
replacements.SetPathStr(chrome::kCookiesSubPagePath);
|
||||
*url = url->ReplaceComponents(replacements);
|
||||
base::UmaHistogramBoolean("Settings.Cookies.TrackingProtectionRedirect",
|
||||
true);
|
||||
} else if (url->path() == chrome::kCookiesSubPagePath) {
|
||||
} else if (url->GetPath() == chrome::kCookiesSubPagePath) {
|
||||
base::UmaHistogramBoolean("Settings.Cookies.TrackingProtectionRedirect",
|
||||
false);
|
||||
}
|
||||
@@ -7126,7 +7065,7 @@ bool ChromeContentBrowserClient::HandleWebUIReverse(
|
||||
// displayed URL when rewriting chrome://settings/certificates to
|
||||
// chrome://certificate-manager
|
||||
if (url->SchemeIs(content::kChromeUIScheme) &&
|
||||
url->host() == chrome::kChromeUICertificateManagerHost) {
|
||||
url->GetHost() == chrome::kChromeUICertificateManagerHost) {
|
||||
return true;
|
||||
}
|
||||
#endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI)
|
||||
@@ -7134,7 +7073,7 @@ bool ChromeContentBrowserClient::HandleWebUIReverse(
|
||||
// No need to actually reverse-rewrite the URL, but return true to update the
|
||||
// displayed URL when rewriting chrome://help to chrome://settings/help.
|
||||
return url->SchemeIs(content::kChromeUIScheme) &&
|
||||
url->host() == chrome::kChromeUISettingsHost;
|
||||
url->GetHost() == chrome::kChromeUISettingsHost;
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::AddExtraPart(
|
||||
@@ -7355,8 +7294,7 @@ std::string ChromeContentBrowserClient::GetUserAgentBasedOnPolicy(
|
||||
|
||||
blink::UserAgentMetadata ChromeContentBrowserClient::GetUserAgentMetadata() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
return embedder_support::GetUserAgentMetadata(
|
||||
g_browser_process->local_state());
|
||||
return embedder_support::GetUserAgentMetadata();
|
||||
}
|
||||
|
||||
std::optional<gfx::ImageSkia> ChromeContentBrowserClient::GetProductLogo() {
|
||||
@@ -7400,7 +7338,8 @@ bool ChromeContentBrowserClient::ShouldBlockRendererDebugURL(
|
||||
// If the debug URL being visited is listed in the URLBlocklist policy it
|
||||
// should be blocked.
|
||||
PolicyBlocklistService* service =
|
||||
PolicyBlocklistFactory::GetForBrowserContext(context);
|
||||
ChromePolicyBlocklistServiceFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(context));
|
||||
using URLBlocklistState = policy::URLBlocklist::URLBlocklistState;
|
||||
URLBlocklistState blocklist_state = service->GetURLBlocklistState(url);
|
||||
return blocklist_state == URLBlocklistState::URL_IN_BLOCKLIST;
|
||||
@@ -7579,6 +7518,22 @@ base::OnceClosure ChromeContentBrowserClient::FetchRemoteSms(
|
||||
}
|
||||
#endif
|
||||
|
||||
std::optional<GURL>
|
||||
ChromeContentBrowserClient::MaybeOverrideSourceURLForClipboardAccess(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& original_url) {
|
||||
DCHECK(render_frame_host);
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
if (printing::PrintPreviewDialogController::IsPrintPreviewURL(original_url)) {
|
||||
return printing::PrintPreviewDialogController::GetInstance()
|
||||
->GetInitiator(WebContents::FromRenderFrameHost(render_frame_host))
|
||||
->GetPrimaryMainFrame()
|
||||
->GetLastCommittedURL();
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::IsClipboardPasteAllowed(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
DCHECK(render_frame_host);
|
||||
@@ -7792,7 +7747,7 @@ bool ChromeContentBrowserClient::AreV8OptimizationsDisabledForSite(
|
||||
// Only disable optimizations for schemes that might actually load web
|
||||
// content.
|
||||
auto* policy = ChildProcessSecurityPolicy::GetInstance();
|
||||
if (!site_url.is_empty() && !policy->IsWebSafeScheme(site_url.scheme())) {
|
||||
if (!site_url.is_empty() && !policy->IsWebSafeScheme(site_url.GetScheme())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8839,3 +8794,44 @@ bool ChromeContentBrowserClient::UsePrefetchPrerenderIntegration() {
|
||||
bool ChromeContentBrowserClient::UsePreloadServingMetrics() {
|
||||
return features::kDsePreload2UsePreloadServingMetrics.Get();
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool ChromeContentBrowserClient::ShouldDisallowCredentialRequest(
|
||||
content::WebContents* web_contents) {
|
||||
if (!base::FeatureList::IsEnabled(password_manager::features::kActorLogin)) {
|
||||
return false;
|
||||
}
|
||||
return IsActorActingOnWebContents(web_contents);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
bool ChromeContentBrowserClient::IsFileSystemAccessApiFilePickerAllowed(
|
||||
WebContents* web_contents) {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(
|
||||
actor::kGlicBlockFileSystemAccessApiFilePicker)) {
|
||||
return !IsActorActingOnWebContents(web_contents);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::ShouldSkipBeforeUnloadDialog(
|
||||
content::RenderFrameHost* rfh) {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (!base::FeatureList::IsEnabled(
|
||||
actor::kGlicSkipBeforeUnloadDialogAndNavigate)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto* web_contents = content::WebContents::FromRenderFrameHost(rfh);
|
||||
if (!web_contents) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return IsActorActingOnWebContents(web_contents);
|
||||
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
+25
-6
@@ -10,11 +10,13 @@
|
||||
#include "build/buildflag.h"
|
||||
#include "chrome/browser/browser_process.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/history/history_service_factory.h"
|
||||
#include "chrome/browser/interstitials/enterprise_util.h"
|
||||
#include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h"
|
||||
#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h"
|
||||
#include "chrome/browser/policy/chrome_policy_blocklist_service_factory.h"
|
||||
#include "chrome/browser/policy/policy_util.h"
|
||||
#include "chrome/browser/preloading/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h"
|
||||
#include "chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_navigation_throttle.h"
|
||||
@@ -35,6 +37,7 @@
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/captive_portal/content/captive_portal_service.h"
|
||||
#include "components/captive_portal/core/buildflags.h"
|
||||
#include "components/contextual_tasks/public/features.h"
|
||||
#include "components/dom_distiller/content/browser/distiller_page_web_contents.h"
|
||||
#include "components/error_page/content/browser/net_error_auto_reloader.h"
|
||||
#include "components/fingerprinting_protection_filter/browser/throttle_manager.h"
|
||||
@@ -47,6 +50,7 @@
|
||||
#include "components/page_load_metrics/browser/metrics_navigation_throttle.h"
|
||||
#include "components/payments/content/payment_handler_navigation_throttle.h"
|
||||
#include "components/policy/content/policy_blocklist_navigation_throttle.h"
|
||||
#include "components/policy/content/safe_search_service.h"
|
||||
#include "components/privacy_sandbox/privacy_sandbox_settings.h"
|
||||
#include "components/safe_browsing/buildflags.h"
|
||||
#include "components/security_interstitials/content/insecure_form_navigation_throttle.h"
|
||||
@@ -54,6 +58,7 @@
|
||||
#include "components/security_interstitials/content/ssl_error_navigation_throttle.h"
|
||||
#include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h"
|
||||
#include "components/tabs/public/tab_interface.h"
|
||||
#include "components/user_prefs/user_prefs.h"
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
#include "content/public/browser/navigation_throttle_registry.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -76,6 +81,7 @@
|
||||
#include "chrome/browser/actor/actor_navigation_throttle.h"
|
||||
#include "chrome/browser/apps/link_capturing/link_capturing_navigation_throttle.h"
|
||||
#include "chrome/browser/apps/link_capturing/web_app_link_capturing_delegate.h"
|
||||
#include "chrome/browser/contextual_tasks/contextual_tasks_navigation_throttle.h"
|
||||
#include "chrome/browser/devtools/devtools_window.h"
|
||||
#include "chrome/browser/page_info/web_view_side_panel_throttle.h"
|
||||
#include "chrome/browser/preloading/preview/preview_navigation_throttle.h"
|
||||
@@ -105,12 +111,8 @@
|
||||
#endif // BUILDFLAG(ENABLE_PLATFORM_APPS)
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
||||
#include "chrome/browser/extensions/user_script_listener.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
|
||||
#include "extensions/browser/extension_navigation_throttle.h"
|
||||
#include "extensions/browser/extensions_browser_client.h"
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
@@ -160,7 +162,12 @@
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#include "chrome/browser/enterprise/incognito/incognito_navigation_throttle.h"
|
||||
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
||||
#include "chrome/browser/extensions/user_script_listener.h"
|
||||
#include "extensions/browser/extension_navigation_throttle.h"
|
||||
#include "extensions/browser/extensions_browser_client.h"
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
namespace {
|
||||
@@ -341,7 +348,7 @@ void CreateAndAddChromeThrottlesForNavigation(
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(handle.GetWebContents()->GetBrowserContext());
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
if (!extensions::ChromeContentBrowserClientExtensionsPart::
|
||||
AreExtensionsDisabledForProfile(profile)) {
|
||||
registry.AddThrottle(
|
||||
@@ -390,8 +397,13 @@ void CreateAndAddChromeThrottlesForNavigation(
|
||||
|
||||
PasswordManagerNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
|
||||
content::BrowserContext* context =
|
||||
handle.GetWebContents()->GetBrowserContext();
|
||||
registry.AddThrottle(std::make_unique<PolicyBlocklistNavigationThrottle>(
|
||||
registry, handle.GetWebContents()->GetBrowserContext()));
|
||||
registry, user_prefs::UserPrefs::Get(context),
|
||||
ChromePolicyBlocklistServiceFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(context)),
|
||||
SafeSearchFactory::GetForBrowserContext(context)));
|
||||
|
||||
// Before setting up SSL error detection, configure SSLErrorHandler to invoke
|
||||
// the relevant extension API whenever an SSL interstitial is shown.
|
||||
@@ -434,6 +446,11 @@ void CreateAndAddChromeThrottlesForNavigation(
|
||||
// BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks)) {
|
||||
contextual_tasks::ContextualTasksNavigationThrottle::MaybeCreateAndAdd(
|
||||
registry);
|
||||
}
|
||||
|
||||
DevToolsWindow::MaybeCreateAndAddNavigationThrottle(registry);
|
||||
|
||||
NewTabPageNavigationThrottle::MaybeCreateAndAdd(registry);
|
||||
@@ -457,6 +474,8 @@ void CreateAndAddChromeThrottlesForNavigation(
|
||||
std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>(
|
||||
registry));
|
||||
}
|
||||
enterprise_data_protection::ViewSourceNavigationThrottle::MaybeCreateAndAdd(
|
||||
registry, ui_manager);
|
||||
#endif // BUILDFLAG(SAFE_BROWSING_AVAILABLE)
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
|
||||
+138
-126
@@ -10,6 +10,7 @@ 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.build.BuildConfig;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.components.cached_flags.BooleanCachedFeatureParam;
|
||||
@@ -153,6 +154,7 @@ public abstract class ChromeFeatureList {
|
||||
}
|
||||
|
||||
// Feature names.
|
||||
// LINT.IfChange(FeaturesExposedToJava)
|
||||
// keep-sorted start group_prefixes=["public static final String"]
|
||||
public static final String ACCESSIBILITY_MAGNIFICATION_FOLLOWS_INPUT_FOCUS =
|
||||
"AccessibilityMagnificationFollowsInputFocus";
|
||||
@@ -162,8 +164,6 @@ public abstract class ChromeFeatureList {
|
||||
"AdaptiveButtonInTopToolbarCustomizationV2";
|
||||
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_PAGE_SUMMARY =
|
||||
"AdaptiveButtonInTopToolbarPageSummary";
|
||||
public static final String ALLOW_TAB_CLOSING_UPON_MINIMIZATION =
|
||||
"AllowTabClosingUponMinimization";
|
||||
public static final String ANDROID_ANIMATED_PROGRESS_BAR_IN_BROWSER =
|
||||
"AndroidAnimatedProgressBarInBrowser";
|
||||
public static final String ANDROID_ANIMATED_PROGRESS_BAR_IN_VIZ =
|
||||
@@ -175,13 +175,18 @@ public abstract class ChromeFeatureList {
|
||||
public static final String ANDROID_AUTOFILL_SUPPORT_FOR_HTTP_AUTH =
|
||||
"AndroidAutofillSupportForHttpAuth";
|
||||
public static final String ANDROID_BOOKMARK_BAR = "AndroidBookmarkBar";
|
||||
public static final String ANDROID_BOOKMARK_BAR_FAST_FOLLOW = "AndroidBookmarkBarFastFollow";
|
||||
public static final String ANDROID_BOTTOM_TOOLBAR = "AndroidBottomToolbar";
|
||||
public static final String ANDROID_BOTTOM_TOOLBAR_V2 = "AndroidBottomToolbarV2";
|
||||
public static final String ANDROID_COMPOSEPLATE = "AndroidComposeplate";
|
||||
public static final String ANDROID_COMPOSEPLATE_LFF = "AndroidComposeplateLFF";
|
||||
public static final String ANDROID_CONTEXT_MENU_DUPLICATE_TABS =
|
||||
"AndroidContextMenuDuplicateTabs";
|
||||
public static final String ANDROID_DATA_IMPORTER_SERVICE = "AndroidDataImporterService";
|
||||
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_MINIMAL_UI_LARGE_SCREEN = "AndroidMinimalUiLargeScreen";
|
||||
public static final String ANDROID_NO_VISIBLE_HINT_FOR_DIFFERENT_TLD =
|
||||
"AndroidNoVisibleHintForDifferentTLD";
|
||||
@@ -231,8 +236,7 @@ public abstract class ChromeFeatureList {
|
||||
"AndroidWindowPopupPredictFinalBounds";
|
||||
public static final String ANDROID_WINDOW_POPUP_RESIZE_AFTER_SPAWN =
|
||||
"AndroidWindowPopupResizeAfterSpawn";
|
||||
public static final String ANDROID_XR_USES_SURFACE_CONTROL =
|
||||
"AndroidWindowPopupResizeAfterSpawn";
|
||||
public static final String ANDROID_XR_USES_SURFACE_CONTROL = "AndroidXRUsesSurfaceControl";
|
||||
public static final String ANDROID_ZOOM_INDICATOR = "AndroidZoomIndicator";
|
||||
public static final String ANIMATED_GIF_REFACTOR = "AnimatedGifRefactor";
|
||||
public static final String ANIMATED_IMAGE_DRAG_SHADOW = "AnimatedImageDragShadow";
|
||||
@@ -251,6 +255,7 @@ public abstract class ChromeFeatureList {
|
||||
"AutofillAndroidDesktopSuppressAccessoryOnEmpty";
|
||||
public static final String AUTOFILL_DEEP_LINK_AUTOFILL_OPTIONS =
|
||||
"AutofillDeepLinkAutofillOptions";
|
||||
public static final String AUTOFILL_ENABLE_BUY_NOW_PAY_LATER = "AutofillEnableBuyNowPayLater";
|
||||
public static final String AUTOFILL_ENABLE_CARD_BENEFITS_FOR_AMERICAN_EXPRESS =
|
||||
"AutofillEnableCardBenefitsForAmericanExpress";
|
||||
public static final String AUTOFILL_ENABLE_CARD_BENEFITS_FOR_BMO =
|
||||
@@ -260,6 +265,8 @@ public abstract class ChromeFeatureList {
|
||||
"AutofillEnableFlatRateCardBenefitsFromCurinos";
|
||||
public static final String AUTOFILL_ENABLE_KEYBOARD_ACCESSORY_CHIP_REDESIGN =
|
||||
"AutofillEnableKeyboardAccessoryChipRedesign";
|
||||
public static final String AUTOFILL_ENABLE_KEYBOARD_ACCESSORY_CHIP_WIDTH_ADJUSTMENT =
|
||||
"AutofillEnableKeyboardAccessoryChipWidthAdjustment";
|
||||
public static final String AUTOFILL_ENABLE_LOCAL_IBAN = "AutofillEnableLocalIban";
|
||||
public static final String AUTOFILL_ENABLE_LOYALTY_CARDS_FILLING =
|
||||
"AutofillEnableLoyaltyCardsFilling";
|
||||
@@ -274,8 +281,6 @@ public abstract class ChromeFeatureList {
|
||||
"AutofillEnableSupportForHomeAndWork";
|
||||
public static final String AUTOFILL_ENABLE_SYNCING_OF_PIX_BANK_ACCOUNTS =
|
||||
"AutofillEnableSyncingOfPixBankAccounts";
|
||||
public static final String AUTOFILL_ENABLE_VERVE_CARD_SUPPORT =
|
||||
"AutofillEnableVerveCardSupport";
|
||||
public static final String AUTOFILL_RETRY_IMAGE_FETCH_ON_FAILURE =
|
||||
"AutofillRetryImageFetchOnFailure";
|
||||
public static final String AUTOFILL_SYNC_EWALLET_ACCOUNTS = "AutofillSyncEwalletAccounts";
|
||||
@@ -284,13 +289,13 @@ public abstract class ChromeFeatureList {
|
||||
public static final String AUTOMOTIVE_BACK_BUTTON_BAR_STREAMLINE =
|
||||
"AutomotiveBackButtonBarStreamline";
|
||||
public static final String AUTO_PICTURE_IN_PICTURE_ANDROID = "AutoPictureInPictureAndroid";
|
||||
public static final String AUTO_REVOKE_SUSPICIOUS_NOTIFICATION =
|
||||
"AutoRevokeSuspiciousNotification";
|
||||
public static final String AVOID_RELAYOUT_DURING_FOCUS_ANIMATION =
|
||||
"AvoidRelayoutDuringFocusAnimation";
|
||||
public static final String BACKGROUND_THREAD_POOL_FIELD_TRIAL =
|
||||
"BackgroundThreadPoolFieldTrial";
|
||||
public static final String BACK_FORWARD_CACHE = "BackForwardCache";
|
||||
public static final String BACK_FORWARD_TRANSITIONS = "BackForwardTransitions";
|
||||
public static final String BATCH_TAB_RESTORE = "BatchTabRestore";
|
||||
public static final String BCIV_BOTTOM_CONTROLS = "AndroidBcivBottomControls";
|
||||
public static final String BIOMETRIC_AUTH_IDENTITY_CHECK = "BiometricAuthIdentityCheck";
|
||||
public static final String BLOCK_INTENTS_WHILE_LOCKED = "BlockIntentsWhileLocked";
|
||||
@@ -299,6 +304,8 @@ public abstract class ChromeFeatureList {
|
||||
public static final String BROWSER_CONTROLS_DEBUGGING = "BrowserControlsDebugging";
|
||||
public static final String BROWSER_CONTROLS_EARLY_RESIZE = "BrowserControlsEarlyResize";
|
||||
public static final String BROWSER_CONTROLS_IN_VIZ = "AndroidBrowserControlsInViz";
|
||||
public static final String BROWSER_CONTROLS_RENDER_DRIVEN_SHOW_CONSTRAINT =
|
||||
"BrowserControlsRenderDrivenShowConstraint";
|
||||
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 =
|
||||
@@ -318,7 +325,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String CCT_CONTEXTUAL_MENU_ITEMS = "CCTContextualMenuItems";
|
||||
public static final String CCT_DESTROY_TAB_WHEN_MODEL_IS_EMPTY =
|
||||
"CCTDestroyTabWhenModelIsEmpty";
|
||||
public static final String CCT_EARLY_NAV = "CCTEarlyNav";
|
||||
public static final String CCT_EXTEND_TRUSTED_CDN_PUBLISHER = "CCTExtendTrustedCdnPublisher";
|
||||
public static final String CCT_FIX_WARMUP = "CCTFixWarmup";
|
||||
public static final String CCT_FRE_IN_SAME_TASK = "CCTFreInSameTask";
|
||||
@@ -335,7 +341,6 @@ public abstract class ChromeFeatureList {
|
||||
"CCTOpenInBrowserButtonIfAllowedByEmbedder";
|
||||
public static final String CCT_OPEN_IN_BROWSER_BUTTON_IF_ENABLED_BY_EMBEDDER =
|
||||
"CCTOpenInBrowserButtonIfEnabledByEmbedder";
|
||||
public static final String CCT_PREDICTIVE_BACK_GESTURE = "CCTPredictiveBackGesture";
|
||||
public static final String CCT_REALTIME_ENGAGEMENT_EVENTS_IN_BACKGROUND =
|
||||
"CCTRealtimeEngagementEventsInBackground";
|
||||
public static final String CCT_REPORT_PARALLEL_REQUEST_STATUS =
|
||||
@@ -343,7 +348,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String CCT_REPORT_PRERENDER_EVENTS = "CCTReportPrerenderEvents";
|
||||
public static final String CCT_RESET_TIMEOUT_ENABLED = "CCTResetTimeoutEnabled";
|
||||
public static final String CCT_RESIZABLE_FOR_THIRD_PARTIES = "CCTResizableForThirdParties";
|
||||
public static final String CCT_REVAMPED_BRANDING = "CCTRevampedBranding";
|
||||
public static final String CCT_SHOW_TAB_FIX = "CCTShowTabFix";
|
||||
public static final String CCT_TAB_MODAL_DIALOG = "CCTTabModalDialog";
|
||||
public static final String CCT_TOOLBAR_REFACTOR = "CCTToolbarRefactor";
|
||||
@@ -454,6 +458,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final String HISTORY_PANE_ANDROID = "HistoryPaneAndroid";
|
||||
public static final String HOMEPAGE_IS_NEW_TAB_PAGE_POLICY_ANDROID =
|
||||
"HomepageIsNewTabPagePolicyAndroid";
|
||||
public static final String HOME_MODULE_PREF_REFACTOR = "HomeModulePrefRefactor";
|
||||
public static final String HTTPS_FIRST_BALANCED_MODE = "HttpsFirstBalancedMode";
|
||||
public static final String HUB_BACK_BUTTON = "HubBackButton";
|
||||
public static final String HUB_SLIDE_ANIMATION = "HubSlideAnimation";
|
||||
@@ -465,9 +470,9 @@ public abstract class ChromeFeatureList {
|
||||
public static final String KEYBOARD_ESC_BACK_NAVIGATION = "KeyboardEscBackNavigation";
|
||||
public static final String LEGACY_TAB_STATE_DEPRECATION = "LegacyTabStateDeprecation";
|
||||
public static final String LENS_ON_QUICK_ACTION_SEARCH_WIDGET = "LensOnQuickActionSearchWidget";
|
||||
public static final String LINKED_SERVICES_SETTING = "LinkedServicesSetting";
|
||||
public static final String LOADING_PREDICTOR_LIMIT_PRECONNECT_SOCKET_COUNT =
|
||||
"LoadingPredictorLimitPreconnectSocketCount";
|
||||
public static final String LOAD_ALL_TABS_AT_STARTUP = "LoadAllTabsAtStartup";
|
||||
public static final String LOAD_NATIVE_EARLY = "LoadNativeEarly";
|
||||
public static final String LOCAL_NETWORK_ACCESS = "LocalNetworkAccessChecks";
|
||||
public static final String LOCK_BACK_PRESS_HANDLER_AT_START = "LockBackPressHandlerAtStart";
|
||||
@@ -476,6 +481,7 @@ public abstract class ChromeFeatureList {
|
||||
"LockTopControlsOnLargeTabletsV2";
|
||||
public static final String LOOKALIKE_NAVIGATION_URL_SUGGESTIONS_UI =
|
||||
"LookalikeUrlNavigationSuggestionsUI";
|
||||
public static final String LOW_END_MEMORY_EXPERIMENT = BaseFeatures.LOW_END_MEMORY_EXPERIMENT;
|
||||
public static final String MAGIC_STACK_ANDROID = "MagicStackAndroid";
|
||||
public static final String MALICIOUS_APK_DOWNLOAD_CHECK = "MaliciousApkDownloadCheck";
|
||||
public static final String MAYLAUNCHURL_USES_SEPARATE_STORAGE_PARTITION =
|
||||
@@ -489,20 +495,19 @@ public abstract class ChromeFeatureList {
|
||||
public static final String MULTI_INSTANCE_APPLICATION_STATUS_CLEANUP =
|
||||
"MultiInstanceApplicationStatusCleanup";
|
||||
public static final String MVC_UPDATE_VIEW_WHEN_MODEL_CHANGED = "MvcUpdateViewWhenModelChanged";
|
||||
public static final String NATIVE_PAGE_TRANSITION_HARDWARE_CAPTURE =
|
||||
"NativePageTransitionHardwareCapture";
|
||||
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_V2 = "NewTabPageCustomizationV2";
|
||||
public static final String NOTIFICATION_ONE_TAP_UNSUBSCRIBE = "NotificationOneTapUnsubscribe";
|
||||
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 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 OPTIMIZATION_GUIDE_PUSH_NOTIFICATIONS =
|
||||
@@ -588,7 +593,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String SAFETY_HUB_ANDROID_SURVEY_V2 = "SafetyHubAndroidSurveyV2";
|
||||
public static final String SAFETY_HUB_DISRUPTIVE_NOTIFICATION_REVOCATION =
|
||||
"SafetyHubDisruptiveNotificationRevocation";
|
||||
public static final String SAFETY_HUB_FOLLOWUP = "SafetyHubFollowup";
|
||||
public static final String SAFETY_HUB_LOCAL_PASSWORDS_MODULE = "SafetyHubLocalPasswordsModule";
|
||||
public static final String SAFETY_HUB_MAGIC_STACK = "SafetyHubMagicStack";
|
||||
public static final String SAFETY_HUB_UNIFIED_PASSWORDS_MODULE =
|
||||
@@ -635,19 +639,20 @@ public abstract class ChromeFeatureList {
|
||||
"SplitCacheByNetworkIsolationKey";
|
||||
public static final String START_SURFACE_RETURN_TIME = "StartSurfaceReturnTime";
|
||||
public static final String STOP_APP_INDEXING_REPORT = "StopAppIndexingReport";
|
||||
public static final String SUBMENUS_IN_APP_MENU = "SubmenusInAppMenu";
|
||||
public static final String SUBMENUS_TAB_CONTEXT_MENU_LFF_TAB_STRIP =
|
||||
"SubmenusTabContextMenuLffTabStrip";
|
||||
public static final String SUGGESTION_ANSWERS_COLOR_REVERSE = "SuggestionAnswersColorReverse";
|
||||
public static final String SUPPRESS_TOOLBAR_CAPTURES_AT_GESTURE_END =
|
||||
"SuppressToolbarCapturesAtGestureEnd";
|
||||
public static final String SYNC_ENABLE_NEW_SYNC_DASHBOARD_URL = "SyncEnableNewSyncDashboardUrl";
|
||||
public static final String SYNC_ENABLE_PASSWORDS_SYNC_ERROR_MESSAGE_ALTERNATIVE =
|
||||
"SyncEnablePasswordsSyncErrorMessageAlternative";
|
||||
public static final String TABLET_TAB_STRIP_ANIMATION = "TabletTabStripAnimation";
|
||||
public static final String TAB_ARCHIVAL_DRAG_DROP_ANDROID = "TabArchivalDragDropAndroid";
|
||||
public static final String TAB_CLOSURE_METHOD_REFACTOR = "TabClosureMethodRefactor";
|
||||
public static final String TAB_COLLECTION_ANDROID = "TabCollectionAndroid";
|
||||
public static final String TAB_FREEZE_ON_UNDOABLE_CLOSURE_KILL_SWITCH =
|
||||
"TabFreezeOnUndoableClosureKillSwitch";
|
||||
public static final String TAB_FREEZING_USES_DISCARD = "TabFreezingUsesDiscard";
|
||||
public static final String TAB_GROUP_ANDROID_VISUAL_DATA_CLEANUP =
|
||||
"TabGroupAndroidVisualDataCleanup";
|
||||
public static final String TAB_GROUP_ENTRY_POINTS_ANDROID = "TabGroupEntryPointsAndroid";
|
||||
@@ -662,11 +667,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final String TAB_STRIP_INCOGNITO_MIGRATION = "TabStripIncognitoMigration";
|
||||
public static final String TAB_STRIP_LAYOUT_OPTIMIZATION = "TabStripLayoutOptimization";
|
||||
public static final String TAB_STRIP_MOUSE_CLOSE_RESIZE_DELAY = "TabStripMouseCloseResizeDelay";
|
||||
public static final String TAB_STRIP_TRANSITION_IN_DESKTOP_WINDOW =
|
||||
"TabStripTransitionInDesktopWindow";
|
||||
public static final String TAB_SWITCHER_DRAG_DROP_ANDROID = "TabSwitcherDragDropAndroid";
|
||||
public static final String TAB_SWITCHER_FOREIGN_FAVICON_SUPPORT =
|
||||
"TabSwitcherForeignFaviconSupport";
|
||||
public static final String TAB_SWITCHER_GROUP_SUGGESTIONS_ANDROID =
|
||||
"TabSwitcherGroupSuggestionsAndroid";
|
||||
public static final String TAB_SWITCHER_GROUP_SUGGESTIONS_TEST_MODE_ANDROID =
|
||||
@@ -685,15 +686,13 @@ public abstract class ChromeFeatureList {
|
||||
public static final String TOOLBAR_STALE_CAPTURE_BUG_FIX = "ToolbarStaleCaptureBugFix";
|
||||
public static final String TOOLBAR_TABLET_RESIZE_REFACTOR = "ToolbarTabletResizeRefactor";
|
||||
public static final String TOP_CONTROLS_REFACTOR = "TopControlsRefactor";
|
||||
public static final String TOP_CONTROLS_REFACTOR_V2 = "TopControlsRefactorV2";
|
||||
public static final String TOUCH_TO_SEARCH_CALLOUT = "TouchToSearchCallout";
|
||||
public static final String TRACE_BINDER_IPC = "TraceBinderIpc";
|
||||
public static final String TRACKING_PROTECTION_3PCD = "TrackingProtection3pcd";
|
||||
public static final String TRACKING_PROTECTION_USER_BYPASS_PWA =
|
||||
"TrackingProtectionUserBypassPwa";
|
||||
public static final String TRACKING_PROTECTION_USER_BYPASS_PWA_TRIGGER =
|
||||
"TrackingProtectionUserBypassPwaTrigger";
|
||||
public static final String TRANSLATE_MESSAGE_UI = "TranslateMessageUI";
|
||||
public static final String TRANSLATE_TFLITE = "TFLiteLanguageDetectionEnabled";
|
||||
public static final String TRUSTED_WEB_ACTIVITY_CONTACTS_DELEGATION =
|
||||
"TrustedWebActivityContactsDelegation";
|
||||
public static final String UMA_SESSION_CORRECTNESS_FIXES = "UmaSessionCorrectnessFixes";
|
||||
public static final String UNO_PHASE_2_FOLLOW_UP = "UnoPhase2FollowUp";
|
||||
public static final String UPDATE_COMPOSTIROR_FOR_SURFACE_CONTROL =
|
||||
@@ -707,6 +706,7 @@ public abstract class ChromeFeatureList {
|
||||
"UseInitialNetworkStateAtStartup";
|
||||
public static final String USE_LIBUNWINDSTACK_NATIVE_UNWINDER_ANDROID =
|
||||
"UseLibunwindstackNativeUnwinderAndroid";
|
||||
public static final String VERIFY_QWACS = "VerifyQWACs";
|
||||
public static final String VISITED_URL_RANKING_SERVICE = "VisitedURLRankingService";
|
||||
public static final String WEB_APK_BACKUP_AND_RESTORE_BACKEND = "WebApkBackupAndRestoreBackend";
|
||||
public static final String WEB_APK_INSTALL_FAILURE_NOTIFICATION =
|
||||
@@ -718,15 +718,12 @@ public abstract class ChromeFeatureList {
|
||||
public static final String WEB_OTP_CROSS_DEVICE_SIMPLE_STRING = "WebOtpCrossDeviceSimpleString";
|
||||
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
|
||||
// keep-sorted end
|
||||
// LINT.ThenChange(//chrome/browser/flags/android/chrome_feature_list.cc:FeaturesExposedToJava)
|
||||
|
||||
// keep-sorted start group_prefixes=["public static final CachedFlag"]
|
||||
|
||||
public static final CachedFlag sAccountForSuppressedKeyboardInsets =
|
||||
newCachedFlag(ACCOUNT_FOR_SUPPRESSED_KEYBOARD_INSETS, /* defaultValue= */ true);
|
||||
public static final CachedFlag sAllowTabClosingUponMinimization =
|
||||
newCachedFlag(
|
||||
ALLOW_TAB_CLOSING_UPON_MINIMIZATION,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sAndroidAnimatedProgressBarInBrowser =
|
||||
newCachedFlag(ANDROID_ANIMATED_PROGRESS_BAR_IN_BROWSER, true);
|
||||
public static final CachedFlag sAndroidAnimatedProgressBarInViz =
|
||||
@@ -739,14 +736,20 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(ANDROID_BOTTOM_TOOLBAR, true, true);
|
||||
public static final CachedFlag sAndroidBottomToolbarV2 =
|
||||
newCachedFlag(ANDROID_BOTTOM_TOOLBAR_V2, false, true);
|
||||
public static final CachedFlag sAndroidComposeplate =
|
||||
newCachedFlag(ANDROID_COMPOSEPLATE, false, true);
|
||||
public static final CachedFlag sAndroidComposeplate = newCachedFlag(ANDROID_COMPOSEPLATE, true);
|
||||
public static final CachedFlag sAndroidComposeplateLFF =
|
||||
newCachedFlag(
|
||||
ANDROID_COMPOSEPLATE_LFF,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sAndroidDataImporterService =
|
||||
newCachedFlag(ANDROID_DATA_IMPORTER_SERVICE, true);
|
||||
public static final CachedFlag sAndroidDesktopDensity =
|
||||
newCachedFlag(ANDROID_DESKTOP_DENSITY, false);
|
||||
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 sAndroidMinimalUiLargeScreen =
|
||||
newCachedFlag(ANDROID_MINIMAL_UI_LARGE_SCREEN, true);
|
||||
public static final CachedFlag sAndroidOpenIncognitoAsWindow =
|
||||
@@ -766,19 +769,14 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sAndroidTabDeclutterDedupeTabIdsKillSwitch =
|
||||
newCachedFlag(ANDROID_TAB_DECLUTTER_DEDUPE_TAB_IDS_KILL_SWITCH, true);
|
||||
public static final CachedFlag sAndroidTabGroupsColorUpdateGm3 =
|
||||
newCachedFlag(
|
||||
ANDROID_TAB_GROUPS_COLOR_UPDATE_GM3, false, /* defaultValueInTests= */ true);
|
||||
newCachedFlag(ANDROID_TAB_GROUPS_COLOR_UPDATE_GM3, true);
|
||||
public static final CachedFlag sAndroidTabSkipSaveTabsKillswitch =
|
||||
newCachedFlag(ANDROID_TAB_SKIP_SAVE_TABS_TASK_KILLSWITCH, true, true);
|
||||
public static final CachedFlag sAndroidThemeModule =
|
||||
newCachedFlag(ANDROID_THEME_MODULE, false, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sAndroidThemeModule = newCachedFlag(ANDROID_THEME_MODULE, true);
|
||||
public static final CachedFlag sAndroidThemeResourceProvider =
|
||||
newCachedFlag(ANDROID_THEME_RESOURCE_PROVIDER, false, /* defaultValueInTests= */ false);
|
||||
public static final CachedFlag sAndroidUseAdminsForEnterpriseInfo =
|
||||
newCachedFlag(
|
||||
ANDROID_USE_ADMINS_FOR_ENTERPRISE_INFO,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
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 sAndroidWebAppMenuButton =
|
||||
@@ -804,16 +802,12 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sAsyncNotificationManagerForDownload =
|
||||
newCachedFlag(ASYNC_NOTIFICATION_MANAGER_FOR_DOWNLOAD, true);
|
||||
public static final CachedFlag sAutomotiveBackButtonBarStreamline =
|
||||
newCachedFlag(
|
||||
AUTOMOTIVE_BACK_BUTTON_BAR_STREAMLINE,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
newCachedFlag(AUTOMOTIVE_BACK_BUTTON_BAR_STREAMLINE, /* defaultValue= */ true);
|
||||
public static final CachedFlag sBackgroundThreadPoolFieldTrial =
|
||||
newCachedFlag(
|
||||
BACKGROUND_THREAD_POOL_FIELD_TRIAL,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sBatchTabRestore = newCachedFlag(BATCH_TAB_RESTORE, true);
|
||||
public static final CachedFlag sBlockIntentsWhileLocked =
|
||||
newCachedFlag(BLOCK_INTENTS_WHILE_LOCKED, false);
|
||||
public static final CachedFlag sBookmarkPaneAndroid =
|
||||
@@ -862,24 +856,19 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(CCT_OPEN_IN_BROWSER_BUTTON_IF_ALLOWED_BY_EMBEDDER, false);
|
||||
public static final CachedFlag sCctOpenInBrowserButtonIfEnabledByEmbedder =
|
||||
newCachedFlag(CCT_OPEN_IN_BROWSER_BUTTON_IF_ENABLED_BY_EMBEDDER, true);
|
||||
public static final CachedFlag sCctPredictiveBackGesture =
|
||||
newCachedFlag(
|
||||
CCT_PREDICTIVE_BACK_GESTURE,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sCctRealtimeEngagementEventsInBackground =
|
||||
newCachedFlag(CCT_REALTIME_ENGAGEMENT_EVENTS_IN_BACKGROUND, true);
|
||||
public static final CachedFlag sCctResetTimeoutEnabled =
|
||||
newCachedFlag(CCT_RESET_TIMEOUT_ENABLED, false);
|
||||
public static final CachedFlag sCctResizableForThirdParties =
|
||||
newCachedFlag(CCT_RESIZABLE_FOR_THIRD_PARTIES, true);
|
||||
public static final CachedFlag sCctRevampedBranding =
|
||||
newCachedFlag(CCT_REVAMPED_BRANDING, 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 sChromeItemPickerUi =
|
||||
newCachedFlag(CHROME_ITEM_PICKER_UI, /* defaultValue= */ false);
|
||||
public static final CachedFlag sChromeNativeUrlOverriding =
|
||||
newCachedFlag(CHROME_NATIVE_URL_OVERRIDING, /* defaultValue= */ false);
|
||||
public static final CachedFlag sClampAutomotiveScaling =
|
||||
newCachedFlag(CLAMP_AUTOMOTIVE_SCALING, true);
|
||||
public static final CachedFlag sClankStartupLatencyInjection =
|
||||
@@ -893,9 +882,7 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(COMMAND_LINE_ON_NON_ROOTED, false);
|
||||
public static final CachedFlag sContextMenuPictureInPictureAndroid =
|
||||
newCachedFlag(CONTEXT_MENU_PICTURE_IN_PICTURE_ANDROID, false);
|
||||
public static final CachedFlag sCpaSpecUpdate =
|
||||
newCachedFlag(
|
||||
CPA_SPEC_UPDATE, /* defaultValue= */ false, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sCpaSpecUpdate = newCachedFlag(CPA_SPEC_UPDATE, true);
|
||||
public static final CachedFlag sCpaTabGroupingButton =
|
||||
newCachedFlag(
|
||||
CONTEXTUAL_PAGE_ACTION_TAB_GROUPING,
|
||||
@@ -915,9 +902,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sEdgeToEdgeBottomChin =
|
||||
newCachedFlag(EDGE_TO_EDGE_BOTTOM_CHIN, /* defaultValue= */ true);
|
||||
public static final CachedFlag sEdgeToEdgeEverywhere =
|
||||
newCachedFlag(
|
||||
EDGE_TO_EDGE_EVERYWHERE,
|
||||
/* defaultValue= */ true);
|
||||
newCachedFlag(EDGE_TO_EDGE_EVERYWHERE, /* defaultValue= */ true);
|
||||
public static final CachedFlag sEdgeToEdgeMonitorConfigurations =
|
||||
newCachedFlag(EDGE_TO_EDGE_MONITOR_CONFIGURATIONS, /* defaultValue= */ true);
|
||||
public static final CachedFlag sEdgeToEdgeTablet =
|
||||
@@ -929,9 +914,9 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sEducationalTipModule =
|
||||
newCachedFlag(EDUCATIONAL_TIP_MODULE, true);
|
||||
public static final CachedFlag sEnableExclusiveAccessManager =
|
||||
newCachedFlag(ENABLE_EXCLUSIVE_ACCESS_MANAGER, false);
|
||||
newCachedFlag(ENABLE_EXCLUSIVE_ACCESS_MANAGER, false, false);
|
||||
public static final CachedFlag sEnableFullscreenToAnyScreenAndroid =
|
||||
newCachedFlag(ENABLE_FULLSCREEN_TO_ANY_SCREEN_ANDROID, false);
|
||||
newCachedFlag(ENABLE_FULLSCREEN_TO_ANY_SCREEN_ANDROID, false, true);
|
||||
public static final CachedFlag sEnableXAxisActivityTransition =
|
||||
newCachedFlag(ENABLE_X_AXIS_ACTIVITY_TRANSITION, false);
|
||||
public static final CachedFlag sFloatingSnackbar = newCachedFlag(FLOATING_SNACKBAR, true);
|
||||
@@ -947,7 +932,7 @@ public abstract class ChromeFeatureList {
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ false);
|
||||
public static final CachedFlag sGridTabSwitcherUpdate =
|
||||
newCachedFlag(GRID_TAB_SWITCHER_UPDATE, false, /* defaultValueInTests= */ true);
|
||||
newCachedFlag(GRID_TAB_SWITCHER_UPDATE, true);
|
||||
public static final CachedFlag sHistoryPaneAndroid =
|
||||
newCachedFlag(
|
||||
HISTORY_PANE_ANDROID,
|
||||
@@ -964,14 +949,18 @@ public abstract class ChromeFeatureList {
|
||||
LEGACY_TAB_STATE_DEPRECATION,
|
||||
/* defaultValue= */ true,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sLoadAllTabsAtStartup =
|
||||
newCachedFlag(
|
||||
LOAD_ALL_TABS_AT_STARTUP,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ false);
|
||||
public static final CachedFlag sLoadNativeEarly =
|
||||
newCachedFlag(
|
||||
LOAD_NATIVE_EARLY, /* defaultValue= */ false, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sLockBackPressHandlerAtStart =
|
||||
newCachedFlag(LOCK_BACK_PRESS_HANDLER_AT_START, true);
|
||||
// TODO(https://crbug.com/438970923): Remove the use of BuildConfig by 2025 EoY.
|
||||
public static final CachedFlag sLockTopControlsOnLargeTabletsV2 =
|
||||
newCachedFlag(LOCK_TOP_CONTROLS_ON_LARGE_TABLETS_V2, BuildConfig.IS_DESKTOP_ANDROID);
|
||||
newCachedFlag(LOCK_TOP_CONTROLS_ON_LARGE_TABLETS_V2, false);
|
||||
public static final CachedFlag sMagicStackAndroid = newCachedFlag(MAGIC_STACK_ANDROID, true);
|
||||
public static final CachedFlag sMaliciousApkDownloadCheck =
|
||||
newCachedFlag(
|
||||
@@ -980,7 +969,7 @@ public abstract class ChromeFeatureList {
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sMiniOriginBar = newCachedFlag(MINI_ORIGIN_BAR, true, true);
|
||||
public static final CachedFlag sMitigateLegacySearchEnginePromoOverlap =
|
||||
newCachedFlag(MITIGATE_LEGACY_SEARCH_ENGINE_PROMO_OVERLAP, false, true);
|
||||
newCachedFlag(MITIGATE_LEGACY_SEARCH_ENGINE_PROMO_OVERLAP, true, true);
|
||||
public static final CachedFlag sMostVisitedTilesCustomization =
|
||||
newCachedFlag(
|
||||
MOST_VISITED_TILES_CUSTOMIZATION,
|
||||
@@ -993,7 +982,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sMvcUpdateViewWhenModelChanged =
|
||||
newCachedFlag(
|
||||
MVC_UPDATE_VIEW_WHEN_MODEL_CHANGED,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValue= */ true,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sNavBarColorAnimation =
|
||||
newCachedFlag(NAV_BAR_COLOR_ANIMATION, /* defaultValue= */ true);
|
||||
@@ -1055,9 +1044,18 @@ public abstract class ChromeFeatureList {
|
||||
newCachedFlag(START_SURFACE_RETURN_TIME, true);
|
||||
public static final CachedFlag sTabClosureMethodRefactor =
|
||||
newCachedFlag(TAB_CLOSURE_METHOD_REFACTOR, false);
|
||||
public static final CachedFlag sTabCollectionAndroid =
|
||||
newCachedFlag(TAB_COLLECTION_ANDROID, true);
|
||||
public static final CachedFlag sTabGroupAndroidVisualDataCleanup =
|
||||
newCachedFlag(TAB_GROUP_ANDROID_VISUAL_DATA_CLEANUP, true);
|
||||
public static final CachedFlag sTabModelInitFixes =
|
||||
newCachedFlag(
|
||||
TAB_MODEL_INIT_FIXES,
|
||||
/* defaultValue= */ true,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sTabStorageSqlitePrototype =
|
||||
newCachedFlag(
|
||||
TAB_STORAGE_SQLITE_PROTOTYPE,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sTabStripDensityChangeAndroid =
|
||||
@@ -1067,10 +1065,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final CachedFlag sTabWindowManagerReportIndicesMismatch =
|
||||
newCachedFlag(TAB_WINDOW_MANAGER_REPORT_INDICES_MISMATCH, true);
|
||||
public static final CachedFlag sTabletTabStripAnimation =
|
||||
newCachedFlag(
|
||||
TABLET_TAB_STRIP_ANIMATION,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
newCachedFlag(TABLET_TAB_STRIP_ANIMATION, true);
|
||||
public static final CachedFlag sTestDefaultDisabled =
|
||||
newCachedFlag(TEST_DEFAULT_DISABLED, false);
|
||||
public static final CachedFlag sTestDefaultEnabled = newCachedFlag(TEST_DEFAULT_ENABLED, true);
|
||||
@@ -1084,6 +1079,11 @@ public abstract class ChromeFeatureList {
|
||||
TOOLBAR_SNAPSHOT_REFACTOR,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sToolbarStaleCaptureBugFix =
|
||||
newCachedFlag(
|
||||
TOOLBAR_STALE_CAPTURE_BUG_FIX,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sToolbarTabletResizeRefactor =
|
||||
newCachedFlag(TOOLBAR_TABLET_RESIZE_REFACTOR, /* defaultValue= */ false);
|
||||
public static final CachedFlag sTopControlsRefactor =
|
||||
@@ -1091,14 +1091,13 @@ public abstract class ChromeFeatureList {
|
||||
TOP_CONTROLS_REFACTOR,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sTopControlsRefactorV2 =
|
||||
newCachedFlag(TOP_CONTROLS_REFACTOR_V2, /* defaultValue= */ false);
|
||||
public static final CachedFlag sTouchToSearchCallout =
|
||||
newCachedFlag(
|
||||
TOUCH_TO_SEARCH_CALLOUT,
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sTraceBinderIpc =
|
||||
newCachedFlag(
|
||||
TRACE_BINDER_IPC, /* defaultValue= */ false, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sUseActivityManagerForTabActivation =
|
||||
newCachedFlag(USE_ACTIVITY_MANAGER_FOR_TAB_ACTIVATION, true);
|
||||
public static final CachedFlag sUseChimeAndroidSdk =
|
||||
@@ -1115,7 +1114,6 @@ public abstract class ChromeFeatureList {
|
||||
List.of(
|
||||
// keep-sorted start
|
||||
sAccountForSuppressedKeyboardInsets,
|
||||
sAllowTabClosingUponMinimization,
|
||||
sAndroidAnimatedProgressBarInBrowser,
|
||||
sAndroidAnimatedProgressBarInViz,
|
||||
sAndroidAppIntegrationModule,
|
||||
@@ -1123,9 +1121,11 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidBottomToolbar,
|
||||
sAndroidBottomToolbarV2,
|
||||
sAndroidComposeplate,
|
||||
sAndroidComposeplateLFF,
|
||||
sAndroidDataImporterService,
|
||||
sAndroidDesktopDensity,
|
||||
sAndroidElegantTextHeight,
|
||||
sAndroidLogoViewRefactor,
|
||||
sAndroidMinimalUiLargeScreen,
|
||||
sAndroidOpenIncognitoAsWindow,
|
||||
sAndroidProgressBarVisualUpdate,
|
||||
@@ -1149,7 +1149,6 @@ public abstract class ChromeFeatureList {
|
||||
sAsyncNotificationManager,
|
||||
sAutomotiveBackButtonBarStreamline,
|
||||
sBackgroundThreadPoolFieldTrial,
|
||||
sBatchTabRestore,
|
||||
sBlockIntentsWhileLocked,
|
||||
sBookmarkPaneAndroid,
|
||||
sBrowserControlsDebugging,
|
||||
@@ -1171,14 +1170,13 @@ public abstract class ChromeFeatureList {
|
||||
sCctNestedSecurityIcon,
|
||||
sCctOpenInBrowserButtonIfAllowedByEmbedder,
|
||||
sCctOpenInBrowserButtonIfEnabledByEmbedder,
|
||||
sCctPredictiveBackGesture,
|
||||
sCctRealtimeEngagementEventsInBackground,
|
||||
sCctResetTimeoutEnabled,
|
||||
sCctResizableForThirdParties,
|
||||
sCctRevampedBranding,
|
||||
sCctTabModalDialog,
|
||||
sCctToolbarRefactor,
|
||||
sChromeItemPickerUi,
|
||||
sChromeNativeUrlOverriding,
|
||||
sClampAutomotiveScaling,
|
||||
sClankStartupLatencyInjection,
|
||||
sCleanupLegacyTabState,
|
||||
@@ -1211,6 +1209,7 @@ public abstract class ChromeFeatureList {
|
||||
sIncognitoThemeOverlayTesting,
|
||||
sKeyboardEscBackNavigation,
|
||||
sLegacyTabStateDeprecation,
|
||||
sLoadAllTabsAtStartup,
|
||||
sLoadNativeEarly,
|
||||
sLockBackPressHandlerAtStart,
|
||||
sLockTopControlsOnLargeTabletsV2,
|
||||
@@ -1249,17 +1248,21 @@ public abstract class ChromeFeatureList {
|
||||
sSmallerTabStripTitleLimit,
|
||||
sStartSurfaceReturnTime,
|
||||
sTabClosureMethodRefactor,
|
||||
sTabCollectionAndroid,
|
||||
sTabGroupAndroidVisualDataCleanup,
|
||||
sTabModelInitFixes,
|
||||
sTabStorageSqlitePrototype,
|
||||
sTabStripDensityChangeAndroid,
|
||||
sTabStripIncognitoMigration,
|
||||
sTabWindowManagerReportIndicesMismatch,
|
||||
sTabletTabStripAnimation,
|
||||
sToolbarPhoneAnimationRefactor,
|
||||
sToolbarSnapshotRefactor,
|
||||
sToolbarStaleCaptureBugFix,
|
||||
sToolbarTabletResizeRefactor,
|
||||
sTopControlsRefactor,
|
||||
sTopControlsRefactorV2,
|
||||
sTouchToSearchCallout,
|
||||
sTraceBinderIpc,
|
||||
sUseActivityManagerForTabActivation,
|
||||
sUseChimeAndroidSdk,
|
||||
sUseInitialNetworkStateAtStartup,
|
||||
@@ -1289,6 +1292,10 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(ANDROID_APPEARANCE_SETTINGS, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidBookmarkBar =
|
||||
newMutableFlagWithSafeDefault(ANDROID_BOOKMARK_BAR, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidBookmarkBarFastFollow =
|
||||
newMutableFlagWithSafeDefault(ANDROID_BOOKMARK_BAR_FAST_FOLLOW, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidContextMenuDuplicateTabs =
|
||||
newMutableFlagWithSafeDefault(ANDROID_CONTEXT_MENU_DUPLICATE_TABS, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidPinnedTabs =
|
||||
newMutableFlagWithSafeDefault(ANDROID_PINNED_TABS, false);
|
||||
public static final MutableFlagWithSafeDefault sAndroidPinnedTabsTabletTabStrip =
|
||||
@@ -1321,8 +1328,9 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(BROWSER_CONTROLS_EARLY_RESIZE, false);
|
||||
public static final MutableFlagWithSafeDefault sBrowserControlsInViz =
|
||||
newMutableFlagWithSafeDefault(BROWSER_CONTROLS_IN_VIZ, true);
|
||||
public static final MutableFlagWithSafeDefault sChromeNativeUrlOverriding =
|
||||
newMutableFlagWithSafeDefault(CHROME_NATIVE_URL_OVERRIDING, false);
|
||||
// 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 sClearBrowsingDataAndroidSurvey =
|
||||
newMutableFlagWithSafeDefault(CLEAR_BROWSING_DATA_ANDROID_SURVEY, false);
|
||||
public static final MutableFlagWithSafeDefault sControlsVisibilityFromNavigations =
|
||||
@@ -1347,6 +1355,8 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(MEDIA_INDICATORS_ANDROID, false);
|
||||
public static final MutableFlagWithSafeDefault sNoVisibleHintForDifferentTLD =
|
||||
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 sQuickDeleteAndroidSurvey =
|
||||
newMutableFlagWithSafeDefault(QUICK_DELETE_ANDROID_SURVEY, false);
|
||||
public static final MutableFlagWithSafeDefault sReadAloudTapToSeek =
|
||||
@@ -1359,8 +1369,6 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(SAFETY_HUB_ANDROID_SURVEY, false);
|
||||
public static final MutableFlagWithSafeDefault sSafetyHubAndroidSurveyV2 =
|
||||
newMutableFlagWithSafeDefault(SAFETY_HUB_ANDROID_SURVEY_V2, false);
|
||||
public static final MutableFlagWithSafeDefault sSafetyHubFollowup =
|
||||
newMutableFlagWithSafeDefault(SAFETY_HUB_FOLLOWUP, true);
|
||||
public static final MutableFlagWithSafeDefault sShowNewTabAnimations =
|
||||
newMutableFlagWithSafeDefault(SHOW_NEW_TAB_ANIMATIONS, false);
|
||||
public static final MutableFlagWithSafeDefault sShowTabListAnimations =
|
||||
@@ -1369,23 +1377,14 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(SUPPRESS_TOOLBAR_CAPTURES_AT_GESTURE_END, false);
|
||||
public static final MutableFlagWithSafeDefault sTabArchivalDragDropAndroid =
|
||||
newMutableFlagWithSafeDefault(TAB_ARCHIVAL_DRAG_DROP_ANDROID, true);
|
||||
public static final MutableFlagWithSafeDefault sTabCollectionAndroid =
|
||||
newMutableFlagWithSafeDefault(TAB_COLLECTION_ANDROID, false);
|
||||
// Default value will only ever be reached in tests.
|
||||
public static final MutableFlagWithSafeDefault sTabFreezeOnUndoableClosureKillSwitch =
|
||||
newMutableFlagWithSafeDefault(TAB_FREEZE_ON_UNDOABLE_CLOSURE_KILL_SWITCH, true);
|
||||
public static final MutableFlagWithSafeDefault sTabGroupAndroidVisualDataCleanup =
|
||||
newMutableFlagWithSafeDefault(TAB_GROUP_ANDROID_VISUAL_DATA_CLEANUP, false);
|
||||
public static final MutableFlagWithSafeDefault sTabFreezingUsesDiscard =
|
||||
newMutableFlagWithSafeDefault(TAB_FREEZING_USES_DISCARD, false);
|
||||
public static final MutableFlagWithSafeDefault sTabGroupEntryPointsAndroid =
|
||||
newMutableFlagWithSafeDefault(TAB_GROUP_ENTRY_POINTS_ANDROID, true);
|
||||
public static final MutableFlagWithSafeDefault sTabGroupParityBottomSheetAndroid =
|
||||
newMutableFlagWithSafeDefault(TAB_GROUP_PARITY_BOTTOM_SHEET_ANDROID, true);
|
||||
public static final MutableFlagWithSafeDefault sTabStorageSqlitePrototype =
|
||||
newMutableFlagWithSafeDefault(TAB_STORAGE_SQLITE_PROTOTYPE, false);
|
||||
public static final MutableFlagWithSafeDefault sTabStripLayoutOptimization =
|
||||
newMutableFlagWithSafeDefault(TAB_STRIP_LAYOUT_OPTIMIZATION, true);
|
||||
public static final MutableFlagWithSafeDefault sTabSwitcherForeignFaviconSupport =
|
||||
newMutableFlagWithSafeDefault(TAB_SWITCHER_FOREIGN_FAVICON_SUPPORT, true);
|
||||
public static final MutableFlagWithSafeDefault sTabSwitcherGroupSuggestionsAndroid =
|
||||
newMutableFlagWithSafeDefault(TAB_SWITCHER_GROUP_SUGGESTIONS_ANDROID, false);
|
||||
public static final MutableFlagWithSafeDefault sTabSwitcherGroupSuggestionsTestModeAndroid =
|
||||
@@ -1408,6 +1407,11 @@ public abstract class ChromeFeatureList {
|
||||
newBooleanCachedFeatureParam(CCT_ADAPTIVE_BUTTON, "contextual_only", false);
|
||||
public static final IntCachedFeatureParam sCctAdaptiveButtonDefaultVariant =
|
||||
newIntCachedFeatureParam(CCT_ADAPTIVE_BUTTON, "default_variant", 0);
|
||||
public static final IntCachedFeatureParam sLowMemoryDeviceThresholdMb =
|
||||
newIntCachedFeatureParam(
|
||||
LOW_END_MEMORY_EXPERIMENT,
|
||||
"LowMemoryDeviceThresholdMB",
|
||||
SysUtils.LOW_MEMORY_DEVICE_THRESHOLD_MB);
|
||||
public static final BooleanCachedFeatureParam sAndroidAppIntegrationModuleForceCardShow =
|
||||
newBooleanCachedFeatureParam(ANDROID_APP_INTEGRATION_MODULE, "force_card_shown", false);
|
||||
|
||||
@@ -1437,7 +1441,7 @@ public abstract class ChromeFeatureList {
|
||||
newBooleanCachedFeatureParam(ANDROID_COMPOSEPLATE, "hide_incognito_button", false);
|
||||
|
||||
public static final BooleanCachedFeatureParam sAndroidComposeplateV2Enabled =
|
||||
newBooleanCachedFeatureParam(ANDROID_COMPOSEPLATE, "v2_enabled", false);
|
||||
newBooleanCachedFeatureParam(ANDROID_COMPOSEPLATE, "v2_enabled", true);
|
||||
public static final BooleanCachedFeatureParam sAndroidBottomToolbarDefaultToTop =
|
||||
newBooleanCachedFeatureParam(ANDROID_BOTTOM_TOOLBAR, "default_to_top", true);
|
||||
|
||||
@@ -1453,9 +1457,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final IntCachedFeatureParam sBackgroundThreadPoolFieldTrialConfig =
|
||||
newIntCachedFeatureParam(BACKGROUND_THREAD_POOL_FIELD_TRIAL, "config", 4);
|
||||
|
||||
public static final IntCachedFeatureParam sBatchTabRestoreBatchSize =
|
||||
newIntCachedFeatureParam(BATCH_TAB_RESTORE, "batch_tab_restore_batch_size", 5);
|
||||
|
||||
public static final IntCachedFeatureParam sCctAuthTabEnableHttpsRedirectsVerificationTimeoutMs =
|
||||
newIntCachedFeatureParam(
|
||||
CCT_AUTH_TAB_ENABLE_HTTPS_REDIRECTS, "verification_timeout_ms", 10_000);
|
||||
@@ -1491,6 +1492,10 @@ public abstract class ChromeFeatureList {
|
||||
"manufacturer_exclude_list",
|
||||
"xiaomi");
|
||||
|
||||
public static final StringCachedFeatureParam sDesktopUAAllowedOnExternalDisplayForOem =
|
||||
newStringCachedFeatureParam(
|
||||
DESKTOP_UA_ON_CONNECTED_DISPLAY, "ext_display_desktop_ua_oem_allowlist", "");
|
||||
|
||||
/**
|
||||
* A cached parameter used for specifying the height of the Google Bottom Bar in DP, when its
|
||||
* variant is NO_VARIANT.
|
||||
@@ -1626,13 +1631,9 @@ public abstract class ChromeFeatureList {
|
||||
newStringCachedFeatureParam(
|
||||
EDGE_TO_EDGE_USE_BACKUP_NAVBAR_INSETS, "e2e_backup_navbar_insets_oem_list", "");
|
||||
|
||||
public static final BooleanCachedFeatureParam sEdgeToEdgeUseBackupNavbarInsetsUseTappable =
|
||||
newBooleanCachedFeatureParam(
|
||||
EDGE_TO_EDGE_USE_BACKUP_NAVBAR_INSETS, "use_tappable_element", true);
|
||||
|
||||
public static final BooleanCachedFeatureParam sEdgeToEdgeUseBackupNavbarInsetsUseGestures =
|
||||
newBooleanCachedFeatureParam(
|
||||
EDGE_TO_EDGE_USE_BACKUP_NAVBAR_INSETS, "use_gesture_insets", true);
|
||||
EDGE_TO_EDGE_USE_BACKUP_NAVBAR_INSETS, "use_gesture_insets", false);
|
||||
|
||||
public static final IntCachedFeatureParam sEdgeToEdgeTabletInvisibleBottomChinMinWidth =
|
||||
newIntCachedFeatureParam(
|
||||
@@ -1641,9 +1642,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final IntCachedFeatureParam sEdgeToEdgeTabletMinWidthThreshold =
|
||||
newIntCachedFeatureParam(EDGE_TO_EDGE_TABLET, "e2e_tablet_width_threshold", -1);
|
||||
|
||||
public static final BooleanCachedFeatureParam sLoadNativeEarlyConcurrentLoad =
|
||||
newBooleanCachedFeatureParam(LOAD_NATIVE_EARLY, "concurrent_load", true);
|
||||
|
||||
public static final BooleanCachedFeatureParam sTabGroupListContainment =
|
||||
newBooleanCachedFeatureParam(
|
||||
GRID_TAB_SWITCHER_SURFACE_COLOR_UPDATE, "tab_group_list_containment", true);
|
||||
@@ -1691,39 +1689,33 @@ public abstract class ChromeFeatureList {
|
||||
newIntCachedFeatureParam(
|
||||
READALOUD_AUDIO_OVERVIEWS,
|
||||
"read_aloud_audio_overviews_speed_addition_percentage",
|
||||
20);
|
||||
10);
|
||||
|
||||
public static final IntCachedFeatureParam sReadAloudReadabilityDelayMsAfterPageLoad =
|
||||
newIntCachedFeatureParam(
|
||||
READALOUD,
|
||||
"read_aloud_readability_delay_ms_after_page_load",
|
||||
3000);
|
||||
READALOUD, "read_aloud_readability_delay_ms_after_page_load", 3000);
|
||||
|
||||
public static final BooleanCachedFeatureParam sShouldConsiderLanguageInOverviewReadability =
|
||||
newBooleanCachedFeatureParam(
|
||||
READALOUD_AUDIO_OVERVIEWS,
|
||||
"read_aloud_audio_overviews_should_consider_language_in_overview_readability",
|
||||
false
|
||||
);
|
||||
READALOUD_AUDIO_OVERVIEWS,
|
||||
"read_aloud_audio_overviews_should_consider_language_in_overview_readability",
|
||||
true);
|
||||
|
||||
/** Controls whether Referrer App ID is passed to Search Results Page via client= param. */
|
||||
public static final BooleanCachedFeatureParam sSearchinCctApplyReferrerId =
|
||||
newBooleanCachedFeatureParam(SEARCH_IN_CCT, "apply_referrer_id", false);
|
||||
|
||||
/** Pipe ("|") separated list of package names allowed to use the interactive Omnibox. */
|
||||
// TODO(crbug.com/40239922): remove default value when no longer relevant.
|
||||
public static final StringCachedFeatureParam sSearchinCctOmniboxAllowedPackageNames =
|
||||
newStringCachedFeatureParam(
|
||||
SEARCH_IN_CCT,
|
||||
"omnibox_allowed_package_names",
|
||||
BuildConfig.ENABLE_DEBUG_LOGS ? "org.chromium.customtabsclient" : "");
|
||||
|
||||
public static final IntCachedFeatureParam sStartSurfaceReturnTimeTabletSecs =
|
||||
newIntCachedFeatureParam(
|
||||
START_SURFACE_RETURN_TIME,
|
||||
"start_surface_return_time_on_tablet_seconds",
|
||||
14400); // 4 hours
|
||||
|
||||
public static final BooleanCachedFeatureParam
|
||||
sTabStorageSqlitePrototypeAuthoritativeReadSource =
|
||||
newBooleanCachedFeatureParam(
|
||||
TAB_STORAGE_SQLITE_PROTOTYPE, "authoritative_read_source", false);
|
||||
|
||||
public static final StringCachedFeatureParam sTabStripLayoutOptimizationOemAllowlist =
|
||||
newStringCachedFeatureParam(
|
||||
TAB_STRIP_LAYOUT_OPTIMIZATION, "custom_headers_oem_allowlist", "");
|
||||
@@ -1781,7 +1773,6 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidThemeModuleForceDependencies,
|
||||
sAndroidThemeResourceProviderForceLight,
|
||||
sBackgroundThreadPoolFieldTrialConfig,
|
||||
sBatchTabRestoreBatchSize,
|
||||
sCctAdaptiveButtonContextualOnly,
|
||||
sCctAdaptiveButtonDefaultVariant,
|
||||
sCctAdaptiveButtonEnableVoice,
|
||||
@@ -1801,6 +1792,7 @@ public abstract class ChromeFeatureList {
|
||||
sClampAutomotiveScalingMaxScalingPercentage,
|
||||
sClankStartupLatencyInjectionAmountMs,
|
||||
sCleanupLegacyTabStateBatchSize,
|
||||
sDesktopUAAllowedOnExternalDisplayForOem,
|
||||
sEdgeToEdgeBottomChinOemList,
|
||||
sEdgeToEdgeBottomChinOemMinVersions,
|
||||
sEdgeToEdgeEverywhereOemList,
|
||||
@@ -1810,8 +1802,7 @@ public abstract class ChromeFeatureList {
|
||||
sEdgeToEdgeUseBackupNavbarInsetsOemList,
|
||||
sEdgeToEdgeUseBackupNavbarInsetsOemMinVersions,
|
||||
sEdgeToEdgeUseBackupNavbarInsetsUseGestures,
|
||||
sEdgeToEdgeUseBackupNavbarInsetsUseTappable,
|
||||
sLoadNativeEarlyConcurrentLoad,
|
||||
sLowMemoryDeviceThresholdMb,
|
||||
sMagicStackAndroidShowAllModules,
|
||||
sMaliciousApkDownloadCheckTelemetryOnly,
|
||||
sMaxLegacyTabStateFilesCleanedUpPerSession,
|
||||
@@ -1833,10 +1824,10 @@ public abstract class ChromeFeatureList {
|
||||
sReadAloudAudioOverviewsSpeedAdditionPercentage,
|
||||
sReadAloudReadabilityDelayMsAfterPageLoad,
|
||||
sSearchinCctApplyReferrerId,
|
||||
sSearchinCctOmniboxAllowedPackageNames,
|
||||
sShouldConsiderLanguageInOverviewReadability,
|
||||
sStartSurfaceReturnTimeTabletSecs,
|
||||
sTabGroupListContainment,
|
||||
sTabStorageSqlitePrototypeAuthoritativeReadSource,
|
||||
sTabStripLayoutOptimizationOemAllowlist,
|
||||
sTabStripLayoutOptimizationOemDenylist,
|
||||
sTabStripLayoutOptimizationOnExternalDisplay,
|
||||
@@ -1855,11 +1846,32 @@ public abstract class ChromeFeatureList {
|
||||
sAndroidTabDeclutterAutoDeleteTimeDeltaHours =
|
||||
sAndroidTabDeclutterAutoDelete.newIntParam(
|
||||
"android_tab_declutter_auto_delete_time_delta_hours", 90 * 24);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault sAndroidPinnedTabsSearchBoxMovement =
|
||||
sAndroidPinnedTabs.newBooleanParam("search_box_movement", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault
|
||||
sAndroidPinnedTabsSearchBoxSquishAnimation =
|
||||
sAndroidPinnedTabs.newBooleanParam("search_box_squish_animation", false);
|
||||
|
||||
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);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault
|
||||
sOmniboxAutofocusOnIncognitoNtpWithHardwareKeyboard =
|
||||
sOmniboxAutofocusOnIncognitoNtp.newBooleanParam(
|
||||
"with_hardware_keyboard", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault
|
||||
sOmniboxAutofocusOnIncognitoNtpWithPrediction =
|
||||
sOmniboxAutofocusOnIncognitoNtp.newBooleanParam("with_prediction", false);
|
||||
|
||||
public static final MutableBooleanParamWithSafeDefault sAndroidTabDeclutterAutoDeletePromoTest =
|
||||
sAndroidTabDeclutterAutoDelete.newBooleanParam(
|
||||
"android_tab_declutter_auto_delete_promo_test", false);
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include "chrome/browser/notifications/platform_notification_service_impl.h"
|
||||
#include "chrome/browser/permissions/quiet_notification_permission_ui_state.h"
|
||||
#include "chrome/browser/platform_experience/prefs.h"
|
||||
#include "chrome/browser/policy/developer_tools_policy_handler.h"
|
||||
#include "chrome/browser/prefs/chrome_pref_service_factory.h"
|
||||
#include "chrome/browser/prefs/incognito_mode_prefs.h"
|
||||
#include "chrome/browser/prefs/session_startup_pref.h"
|
||||
@@ -78,6 +77,7 @@
|
||||
#include "chrome/browser/sharing_hub/sharing_hub_features.h"
|
||||
#include "chrome/browser/signin/chrome_signin_client.h"
|
||||
#include "chrome/browser/ssl/ssl_config_service_manager.h"
|
||||
#include "chrome/browser/subscription_eligibility/subscription_eligibility_prefs.h"
|
||||
#include "chrome/browser/tracing/chrome_tracing_delegate.h"
|
||||
#include "chrome/browser/ui/browser_ui_prefs.h"
|
||||
#include "chrome/browser/ui/hats/hats_service_desktop.h"
|
||||
@@ -107,7 +107,7 @@
|
||||
#include "components/browsing_data/core/pref_names.h"
|
||||
#include "components/certificate_transparency/pref_names.h"
|
||||
#include "components/collaboration/public/pref_names.h"
|
||||
#include "components/commerce/core/pref_names.h"
|
||||
#include "components/commerce/core/prefs.h"
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
#include "components/content_settings/core/common/pref_names.h"
|
||||
#include "components/custom_handlers/protocol_handler_registry.h"
|
||||
@@ -115,6 +115,7 @@
|
||||
#include "components/domain_reliability/domain_reliability_prefs.h"
|
||||
#include "components/embedder_support/origin_trials/origin_trial_prefs.h"
|
||||
#include "components/enterprise/browser/identifiers/identifiers_prefs.h"
|
||||
#include "components/enterprise/browser/promotion/promotion_prefs.h"
|
||||
#include "components/enterprise/buildflags/buildflags.h"
|
||||
#include "components/enterprise/connectors/core/connectors_prefs.h"
|
||||
#include "components/feature_engagement/public/pref_names.h"
|
||||
@@ -135,6 +136,8 @@
|
||||
#include "components/ntp_tiles/custom_links_manager_impl.h"
|
||||
#include "components/ntp_tiles/enterprise/enterprise_shortcuts_manager_impl.h"
|
||||
#include "components/ntp_tiles/most_visited_sites.h"
|
||||
#include "components/ntp_tiles/pref_names.h"
|
||||
#include "components/ntp_tiles/tile_type.h"
|
||||
#include "components/offline_pages/buildflags/buildflags.h"
|
||||
#include "components/omnibox/browser/aim_eligibility_service.h"
|
||||
#include "components/omnibox/browser/document_provider.h"
|
||||
@@ -165,6 +168,7 @@
|
||||
#include "components/regional_capabilities/regional_capabilities_prefs.h"
|
||||
#include "components/safe_browsing/buildflags.h"
|
||||
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
|
||||
#include "components/safety_check/safety_check_prefs.h"
|
||||
#include "components/saved_tab_groups/public/pref_names.h"
|
||||
#include "components/search_engines/search_engine_choice/search_engine_choice_service.h"
|
||||
#include "components/search_engines/template_url_prepopulate_data.h"
|
||||
@@ -341,7 +345,6 @@
|
||||
#include "chrome/browser/apps/app_discovery_service/almanac_fetcher.h"
|
||||
#include "chrome/browser/apps/app_preload_service/app_preload_service.h"
|
||||
#include "chrome/browser/apps/app_service/metrics/app_platform_metrics_service.h"
|
||||
#include "chrome/browser/apps/app_service/webapk/webapk_prefs.h"
|
||||
#include "chrome/browser/ash/account_manager/account_apps_availability.h"
|
||||
#include "chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.h"
|
||||
#include "chrome/browser/ash/app_list/app_list_syncable_service.h"
|
||||
@@ -349,6 +352,7 @@
|
||||
#include "chrome/browser/ash/app_mode/kiosk_controller.h"
|
||||
#include "chrome/browser/ash/app_restore/full_restore_prefs.h"
|
||||
#include "chrome/browser/ash/apps/apk_web_app_service.h"
|
||||
#include "chrome/browser/ash/apps/webapk/webapk_prefs.h"
|
||||
#include "chrome/browser/ash/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.h"
|
||||
#include "chrome/browser/ash/arc/policy/arc_policy_bridge.h"
|
||||
#include "chrome/browser/ash/arc/session/arc_session_manager.h"
|
||||
@@ -459,7 +463,6 @@
|
||||
#include "chromeos/ash/components/settings/device_settings_cache.h"
|
||||
#include "chromeos/ash/components/timezone/timezone_resolver.h"
|
||||
#include "chromeos/ash/experiences/arc/arc_prefs.h"
|
||||
#include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h"
|
||||
#include "chromeos/ash/services/auth_factor_config/auth_factor_config.h"
|
||||
#include "chromeos/ash/services/bluetooth_config/bluetooth_power_controller_impl.h"
|
||||
#include "chromeos/ash/services/bluetooth_config/device_name_manager_impl.h"
|
||||
@@ -554,114 +557,6 @@ namespace {
|
||||
// Please keep the list of deprecated prefs in chronological order. i.e. Add to
|
||||
// the bottom of the list, not here at the top.
|
||||
|
||||
// Deprecated 07/2024
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
inline constexpr char kFirstRunStudyGroup[] = "browser.first_run_study_group";
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Deprecated 07/2024
|
||||
constexpr char kNtpRecipesDismissedTasks[] = "NewTabPage.DismissedRecipeTasks";
|
||||
constexpr char kNtpModulesFirstShownTime[] = "NewTabPage.ModulesFirstShownTime";
|
||||
constexpr char kNtpModulesFreVisible[] = "NewTabPage.ModulesFreVisible";
|
||||
constexpr char kNtpModulesShownCount[] = "NewTabPage.ModulesShownCount";
|
||||
constexpr char kNtpPhotosLastDismissedTimePrefName[] =
|
||||
"NewTabPage.Photos.LastDimissedTime";
|
||||
constexpr char kNtpPhotosOptInAcknowledgedPrefName[] =
|
||||
"NewTabPage.Photos.OptInAcknowledged";
|
||||
constexpr char kNtpPhotosLastMemoryOpenTimePrefName[] =
|
||||
"NewTabPage.Photos.LastMemoryOpenTime";
|
||||
constexpr char kNtpPhotosSoftOptOutCountPrefName[] =
|
||||
"NewTabPage.Photos.SoftOptOutCount";
|
||||
constexpr char kNtpPhotosLastSoftOptedOutTimePrefName[] =
|
||||
"NewTabPage.Photos.LastSoftOptedoutTime";
|
||||
// Deprecated 08/2024
|
||||
constexpr char kDismissedTabsPrefName[] =
|
||||
"NewTabPage.TabResumption.DismissedTabs";
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Deprecated 07/2024.
|
||||
constexpr char kAppDeduplicationServiceLastGetTimestamp[] =
|
||||
"apps.app_deduplication_service.last_get_data_from_server_timestamp";
|
||||
// Deprecated 07/2024.
|
||||
constexpr char kShowTunaScreenEnabled[] = "ash.tuna_screen_oobe_enabled";
|
||||
// Deprecated 08/2024.
|
||||
inline constexpr char kStandaloneWindowMigrationNudgeShown[] =
|
||||
"standalone_window_migration_nudge_shown";
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// All of these were deprecated 08/24.
|
||||
constexpr char kObsoleteUnenrolledFromGoogleMobileServicesAfterApiErrorCode[] =
|
||||
"unenrolled_from_google_mobile_services_after_api_error_code";
|
||||
constexpr char kObsoleteRequiresMigrationAfterSyncStatusChange[] =
|
||||
"requires_migration_after_sync_status_change";
|
||||
constexpr char
|
||||
kObsoleteUnenrolledFromGoogleMobileServicesWithErrorListVersion[] =
|
||||
"unenrolled_from_google_mobile_services_with_error_list_version";
|
||||
constexpr char kObsoleteTimesReenrolledToGoogleMobileServices[] =
|
||||
"times_reenrolled_to_google_mobile_services";
|
||||
constexpr char kObsoleteTimesAttemptedToReenrollToGoogleMobileServices[] =
|
||||
"times_attempted_to_reenroll_to_google_mobile_services";
|
||||
constexpr char kObsoleteUserReceivedGMSCoreError[] =
|
||||
"user_received_gmscore_error";
|
||||
#endif
|
||||
|
||||
// Deprecated 08/2024.
|
||||
constexpr char kSafeBrowsingEsbOptInWithFriendlierSettings[] =
|
||||
"safebrowsing.esb_opt_in_with_friendlier_settings";
|
||||
|
||||
// Deprecated 08/2024.
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
constexpr char kDeviceDMTokenV1[] = "device_dm_token";
|
||||
constexpr char kDeviceDMTokenV2[] = "device_dm_token_v2";
|
||||
#endif
|
||||
|
||||
// Deprecated 08/2024
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
constexpr char kBackoffEntryKey[] = "query_tiles.backoff_entry_key";
|
||||
constexpr char kFirstScheduleTimeKey[] = "query_tiles.first_schedule_time_key";
|
||||
#endif
|
||||
|
||||
// Deprecated 09/2024.
|
||||
constexpr char kContentSettingsWindowLastTabIndex[] =
|
||||
"content_settings_window.last_tab_index";
|
||||
constexpr char kSyncPasswordHash[] = "profile.sync_password_hash";
|
||||
constexpr char kSyncPasswordLengthAndHashSalt[] =
|
||||
"profile.sync_password_length_and_hash_salt";
|
||||
|
||||
// Deprecated 09/2024
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
constexpr char kDemoModeResourcesRemoved[] = "demo_mode_resources_removed";
|
||||
constexpr char kAccumulatedUsagePref[] =
|
||||
"demo_mode_resources_remover.accumulated_device_usage_s";
|
||||
#endif
|
||||
|
||||
// Deprecated 09/2024
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
constexpr char kPasswordGenerationNudgePasswordDismissCount[] =
|
||||
"password_generation_nudge_password_dismiss_count";
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 09/2024
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
const char kTranslateKitRootDir[] =
|
||||
"on_device_translation.translate_kit_root_dir";
|
||||
#endif
|
||||
|
||||
// Deprecated 09/2024
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
constexpr char kPrivacySandboxActivityTypeRecord[] =
|
||||
"privacy_sandbox.activity_type.record";
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 09/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
const char kTabResumeDismissedTabsPrefName[] =
|
||||
"NewTabPage.MostRelevantTabResumption.DismissedTabs";
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 10/2024.
|
||||
constexpr char kLiveCaptionBubblePinned[] =
|
||||
"accessibility.captions.live_caption_bubble_pinned";
|
||||
@@ -1177,21 +1072,12 @@ constexpr char kSessionRestoreTurnOffFromSessionInfoBarTimesShown[] =
|
||||
|
||||
constexpr char kSessionRestorePrefChanged[] = "session.restore_pref_changed";
|
||||
|
||||
constexpr char kLegacySyncSessionsGUID[] = "sync.session_sync_guid";
|
||||
|
||||
// Register local state used only for migration (clearing or moving to a new
|
||||
// key).
|
||||
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
// Deprecated 07/2024.
|
||||
registry->RegisterStringPref(kFirstRunStudyGroup, std::string());
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Deprecated 08/2024.
|
||||
registry->RegisterStringPref(kDeviceDMTokenV1, std::string());
|
||||
registry->RegisterStringPref(kDeviceDMTokenV2, std::string());
|
||||
registry->RegisterBooleanPref(kDemoModeResourcesRemoved, false);
|
||||
registry->RegisterIntegerPref(kAccumulatedUsagePref, 0);
|
||||
|
||||
// Deprecated 10/2024.
|
||||
registry->RegisterIntegerPref(kMigrationStep, 0);
|
||||
registry->RegisterDictionaryPref(kMoveMigrationResumeStepPref);
|
||||
@@ -1310,96 +1196,8 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
// Register prefs used only for migration (clearing or moving to a new key).
|
||||
void RegisterProfilePrefsForMigration(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
// Deprecated 05/28.
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticePromptShownTimeSync,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticePromptShownTime,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticeFirstSignInTime,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticeFirstSignOutTime,
|
||||
base::Time());
|
||||
|
||||
chrome_browser_net::secure_dns::RegisterProbesSettingBackupPref(registry);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Deprecated 07/2024
|
||||
registry->RegisterListPref(kNtpRecipesDismissedTasks);
|
||||
registry->RegisterBooleanPref(kNtpModulesFreVisible, true);
|
||||
registry->RegisterIntegerPref(kNtpModulesShownCount, 0);
|
||||
registry->RegisterTimePref(kNtpModulesFirstShownTime, base::Time());
|
||||
registry->RegisterTimePref(kNtpPhotosLastDismissedTimePrefName, base::Time());
|
||||
registry->RegisterBooleanPref(kNtpPhotosOptInAcknowledgedPrefName, false);
|
||||
registry->RegisterTimePref(kNtpPhotosLastMemoryOpenTimePrefName,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kNtpPhotosLastSoftOptedOutTimePrefName,
|
||||
base::Time());
|
||||
registry->RegisterIntegerPref(kNtpPhotosSoftOptOutCountPrefName, 0);
|
||||
// Deprecated 08/2024
|
||||
registry->RegisterListPref(kDismissedTabsPrefName);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Deprecated 07/2024.
|
||||
registry->RegisterTimePref(kAppDeduplicationServiceLastGetTimestamp,
|
||||
base::Time());
|
||||
registry->RegisterBooleanPref(kShowTunaScreenEnabled, true);
|
||||
|
||||
// Deprecated 08/2024
|
||||
registry->RegisterBooleanPref(kStandaloneWindowMigrationNudgeShown, false);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// All of these were deprecated 08/2024.
|
||||
registry->RegisterIntegerPref(
|
||||
kObsoleteUnenrolledFromGoogleMobileServicesAfterApiErrorCode, 0);
|
||||
registry->RegisterBooleanPref(kObsoleteRequiresMigrationAfterSyncStatusChange,
|
||||
false);
|
||||
registry->RegisterIntegerPref(
|
||||
kObsoleteUnenrolledFromGoogleMobileServicesWithErrorListVersion, 0);
|
||||
registry->RegisterIntegerPref(kObsoleteTimesReenrolledToGoogleMobileServices,
|
||||
0);
|
||||
registry->RegisterIntegerPref(
|
||||
kObsoleteTimesAttemptedToReenrollToGoogleMobileServices, 0);
|
||||
registry->RegisterBooleanPref(kObsoleteUserReceivedGMSCoreError, false);
|
||||
#endif
|
||||
// Deprecated 08/2024.
|
||||
registry->RegisterBooleanPref(kSafeBrowsingEsbOptInWithFriendlierSettings,
|
||||
false);
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// Deprecated 08/2024
|
||||
registry->RegisterListPref(kBackoffEntryKey);
|
||||
registry->RegisterTimePref(kFirstScheduleTimeKey, base::Time());
|
||||
#endif
|
||||
|
||||
// Deprecated 09/2024.
|
||||
registry->RegisterIntegerPref(kContentSettingsWindowLastTabIndex, 0);
|
||||
registry->RegisterStringPref(kSyncPasswordHash, std::string());
|
||||
registry->RegisterStringPref(kSyncPasswordLengthAndHashSalt, std::string());
|
||||
|
||||
// Deprecated 09/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterIntegerPref(kPasswordGenerationNudgePasswordDismissCount,
|
||||
0);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 09/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterFilePathPref(kTranslateKitRootDir, base::FilePath());
|
||||
#endif
|
||||
|
||||
// Deprecated 09/2024
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterListPref(kPrivacySandboxActivityTypeRecord);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 09/2024
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterListPref(kTabResumeDismissedTabsPrefName,
|
||||
base::Value::List());
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 10/2024.
|
||||
registry->RegisterIntegerPref(kModelExecutionMainToggleSettingState, 0);
|
||||
|
||||
@@ -1583,6 +1381,16 @@ void RegisterProfilePrefsForMigration(
|
||||
// Deprecated 04/2025.
|
||||
registry->RegisterDictionaryPref(kSuggestionGroupVisibility);
|
||||
|
||||
// Deprecated 05/2025.
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticePromptShownTimeSync,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticePromptShownTime,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticeFirstSignInTime,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kPrivacySandboxFakeNoticeFirstSignOutTime,
|
||||
base::Time());
|
||||
|
||||
// Deprecated 05/2025.
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterBooleanPref(kWipedWebAPkDataForMigration, false);
|
||||
@@ -1712,6 +1520,14 @@ void RegisterProfilePrefsForMigration(
|
||||
|
||||
// Deprecated 10/2025.
|
||||
registry->RegisterBooleanPref(kSessionRestorePrefChanged, false);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Deprecated 10/2025.
|
||||
registry->RegisterIntegerPref(ntp_prefs::kNtpShortcutsType, 0);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Deprecated 10/2025.
|
||||
registry->RegisterStringPref(kLegacySyncSessionsGUID, std::string());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -2021,6 +1837,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterStringPref(prefs::kNonMilestoneUpdateToastVersion, "");
|
||||
registry->RegisterBooleanPref(prefs::kSilentPrintingEnabled, false);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// This is intentionally last.
|
||||
@@ -2048,10 +1865,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
chrome_browser_net::NetErrorTabHelper::RegisterProfilePrefs(registry);
|
||||
chrome_prefs::RegisterProfilePrefs(registry);
|
||||
collaboration::prefs::RegisterProfilePrefs(registry);
|
||||
commerce::RegisterPrefs(registry);
|
||||
commerce::RegisterProfilePrefs(registry);
|
||||
cross_device::RegisterProfilePrefs(registry);
|
||||
enterprise::RegisterIdentifiersProfilePrefs(registry);
|
||||
enterprise_connectors::RegisterProfilePrefs(registry);
|
||||
enterprise_promotion::RegisterProfilePrefs(registry);
|
||||
enterprise_reporting::RegisterProfilePrefs(registry);
|
||||
dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
|
||||
DownloadPrefs::RegisterProfilePrefs(registry);
|
||||
@@ -2090,7 +1908,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry);
|
||||
PlatformNotificationServiceImpl::RegisterProfilePrefs(registry);
|
||||
plus_addresses::prefs::RegisterProfilePrefs(registry);
|
||||
policy::DeveloperToolsPolicyHandler::RegisterProfilePrefs(registry);
|
||||
policy::URLBlocklistManager::RegisterProfilePrefs(registry);
|
||||
PolicyUI::RegisterProfilePrefs(registry);
|
||||
PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
|
||||
@@ -2118,6 +1935,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
safe_browsing::file_type::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
safe_browsing::RegisterProfilePrefs(registry);
|
||||
safety_check::prefs::RegisterProfilePrefs(registry);
|
||||
SearchPrefetchService::RegisterProfilePrefs(registry);
|
||||
blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(
|
||||
registry);
|
||||
@@ -2131,6 +1949,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
SharingSyncPreference::RegisterProfilePrefs(registry);
|
||||
SigninPrefs::RegisterProfilePrefs(registry);
|
||||
site_engagement::SiteEngagementService::RegisterProfilePrefs(registry);
|
||||
subscription_eligibility::prefs::RegisterProfilePrefs(registry);
|
||||
supervised_user::RegisterProfilePrefs(registry);
|
||||
sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(registry);
|
||||
syncer::DeviceInfoPrefs::RegisterProfilePrefs(registry);
|
||||
@@ -2213,7 +2032,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
commerce::CommerceUiTabHelper::RegisterProfilePrefs(registry);
|
||||
contextual_cueing::prefs::RegisterProfilePrefs(registry);
|
||||
DriveService::RegisterProfilePrefs(registry);
|
||||
extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
|
||||
first_run::RegisterProfilePrefs(registry);
|
||||
gcm::RegisterProfilePrefs(registry);
|
||||
GoogleCalendarPageHandler::RegisterProfilePrefs(registry);
|
||||
@@ -2407,6 +2225,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
registry->RegisterBooleanPref(prefs::kLensDesktopNTPSearchEnabled, true);
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
|
||||
registry->RegisterListPref(
|
||||
webauthn::pref_names::kRemoteDesktopAllowedOrigins);
|
||||
|
||||
@@ -2480,6 +2299,14 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
// the policies logic is implemented.
|
||||
registry->RegisterListPref(policy::policy_prefs::kIncognitoModeBlocklist);
|
||||
registry->RegisterListPref(policy::policy_prefs::kIncognitoModeAllowlist);
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
ntp_tiles::prefs::kTabResumptionHomeModuleEnabled, true);
|
||||
|
||||
registry->RegisterBooleanPref(ntp_tiles::prefs::kMagicStackHomeModuleEnabled,
|
||||
true);
|
||||
|
||||
registry->RegisterBooleanPref(ntp_tiles::prefs::kTipsHomeModuleEnabled, true);
|
||||
}
|
||||
|
||||
void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -2530,18 +2357,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
|
||||
// BEGIN_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
|
||||
// Please don't delete the preceding line. It is used by PRESUBMIT.py.
|
||||
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
// Added 07/2024.
|
||||
local_state->ClearPref(kFirstRunStudyGroup);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Added 08/2024.
|
||||
local_state->ClearPref(kDeviceDMTokenV1);
|
||||
local_state->ClearPref(kDeviceDMTokenV2);
|
||||
local_state->ClearPref(kDemoModeResourcesRemoved);
|
||||
local_state->ClearPref(kAccumulatedUsagePref);
|
||||
|
||||
// Added 10/2024.
|
||||
local_state->ClearPref(kMigrationStep);
|
||||
local_state->ClearPref(kMoveMigrationResumeStepPref);
|
||||
@@ -2655,6 +2471,11 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
|
||||
// Added 09/2025
|
||||
local_state->ClearPref(kRendererCodeIntegrityEnabledNeedsDeletion);
|
||||
|
||||
// Added 10/2025
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
local_state->ClearPref(prefs::kDefaultBrowserFirstShownTime);
|
||||
#endif
|
||||
|
||||
// Please don't delete the following line. It is used by PRESUBMIT.py.
|
||||
// END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
|
||||
|
||||
@@ -2680,6 +2501,13 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
// BEGIN_MIGRATE_OBSOLETE_PROFILE_PREFS
|
||||
// Please don't delete the preceding line. It is used by PRESUBMIT.py.
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Added 08/2024, but DO NOT REMOVE after the usual year.
|
||||
// TODO(crbug.com/356148174): Remove once kMoveThemePrefsToSpecifics has been
|
||||
// enabled for an year.
|
||||
MigrateSyncingThemePrefsToNonSyncingIfNeeded(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Added 10/2025.
|
||||
profile_prefs->ClearPref(kSessionRestoreTurnOffFromRestartInfoBarTimesShown);
|
||||
profile_prefs->ClearPref(kSessionRestoreTurnOffFromSessionInfoBarTimesShown);
|
||||
@@ -2709,83 +2537,6 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
MigrateDefaultBrowserLastDeclinedPref(profile_prefs);
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Added 07/2024.
|
||||
profile_prefs->ClearPref(kNtpRecipesDismissedTasks);
|
||||
profile_prefs->ClearPref(kNtpModulesFirstShownTime);
|
||||
profile_prefs->ClearPref(kNtpModulesFreVisible);
|
||||
profile_prefs->ClearPref(kNtpModulesShownCount);
|
||||
profile_prefs->ClearPref(kNtpPhotosLastDismissedTimePrefName);
|
||||
profile_prefs->ClearPref(kNtpPhotosOptInAcknowledgedPrefName);
|
||||
profile_prefs->ClearPref(kNtpPhotosLastMemoryOpenTimePrefName);
|
||||
profile_prefs->ClearPref(kNtpPhotosLastSoftOptedOutTimePrefName);
|
||||
profile_prefs->ClearPref(kNtpPhotosSoftOptOutCountPrefName);
|
||||
// Added 08/2024
|
||||
profile_prefs->ClearPref(kDismissedTabsPrefName);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Added 07/2024.
|
||||
profile_prefs->ClearPref(kAppDeduplicationServiceLastGetTimestamp);
|
||||
profile_prefs->ClearPref(kShowTunaScreenEnabled);
|
||||
|
||||
// Added 08/2024.
|
||||
profile_prefs->ClearPref(kStandaloneWindowMigrationNudgeShown);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// All of these were added 08/2024.
|
||||
profile_prefs->ClearPref(
|
||||
kObsoleteUnenrolledFromGoogleMobileServicesAfterApiErrorCode);
|
||||
profile_prefs->ClearPref(kObsoleteRequiresMigrationAfterSyncStatusChange);
|
||||
profile_prefs->ClearPref(
|
||||
kObsoleteUnenrolledFromGoogleMobileServicesWithErrorListVersion);
|
||||
profile_prefs->ClearPref(kObsoleteTimesReenrolledToGoogleMobileServices);
|
||||
profile_prefs->ClearPref(
|
||||
kObsoleteTimesAttemptedToReenrollToGoogleMobileServices);
|
||||
profile_prefs->ClearPref(kObsoleteUserReceivedGMSCoreError);
|
||||
#endif
|
||||
// Added 08/2024.
|
||||
profile_prefs->ClearPref(kSafeBrowsingEsbOptInWithFriendlierSettings);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Added 08/2024, but DO NOT REMOVE after the usual year.
|
||||
// TODO(crbug.com/356148174): Remove once kMoveThemePrefsToSpecifics has been
|
||||
// enabled for an year.
|
||||
MigrateSyncingThemePrefsToNonSyncingIfNeeded(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Added 08/2024.
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
profile_prefs->ClearPref(kBackoffEntryKey);
|
||||
profile_prefs->ClearPref(kFirstScheduleTimeKey);
|
||||
#endif
|
||||
|
||||
// Added 09/2024.
|
||||
profile_prefs->ClearPref(kContentSettingsWindowLastTabIndex);
|
||||
profile_prefs->ClearPref(kSyncPasswordHash);
|
||||
profile_prefs->ClearPref(kSyncPasswordLengthAndHashSalt);
|
||||
|
||||
// Added 09/2024
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
profile_prefs->ClearPref(kPasswordGenerationNudgePasswordDismissCount);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Added 09/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
profile_prefs->ClearPref(kTranslateKitRootDir);
|
||||
#endif
|
||||
|
||||
// Added 09/2024
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
profile_prefs->ClearPref(kPrivacySandboxActivityTypeRecord);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Added 09/2024
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
profile_prefs->ClearPref(kTabResumeDismissedTabsPrefName);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Added 10/2024.
|
||||
profile_prefs->ClearPref(kModelExecutionMainToggleSettingState);
|
||||
|
||||
@@ -3082,6 +2833,14 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
|
||||
SigninPrefs(*profile_prefs).MigrateObsoleteSigninPrefs();
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Added 10/2025
|
||||
NewTabPageUI::MigrateDeprecatedShortcutsTypePref(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Added 10/2025.
|
||||
profile_prefs->ClearPref(kLegacySyncSessionsGUID);
|
||||
|
||||
// Please don't delete the following line. It is used by PRESUBMIT.py.
|
||||
// END_MIGRATE_OBSOLETE_PROFILE_PREFS
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/captive_portal/captive_portal_service_factory.h"
|
||||
#include "chrome/browser/chained_back_navigation_tracker.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/commerce/shopping_service_factory.h"
|
||||
@@ -180,7 +179,7 @@
|
||||
#include "chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_android.h"
|
||||
#include "components/facilitated_payments/core/features/features.h"
|
||||
#include "components/fingerprinting_protection_filter/common/fingerprinting_protection_filter_features.h"
|
||||
#include "components/fingerprinting_protection_filter/interventions/browser/interventions_web_contents_helper.h"
|
||||
#include "components/fingerprinting_protection_filter/interventions/browser/canvas_interventions_web_contents_helper.h"
|
||||
#include "components/fingerprinting_protection_filter/interventions/common/interventions_features.h"
|
||||
#include "components/ip_protection/common/ip_protection_status.h"
|
||||
#include "components/page_load_metrics/browser/features.h"
|
||||
@@ -234,6 +233,7 @@
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
|
||||
#include "chrome/browser/captive_portal/captive_portal_service_factory.h"
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
@@ -383,9 +383,15 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
|
||||
if (fingerprinting_protection_interventions::features::
|
||||
ShouldBlockCanvasReadbackForIncognitoState(
|
||||
profile->IsIncognitoProfile()) ||
|
||||
fingerprinting_protection_interventions::features::
|
||||
IsCanvasInterventionsEnabledForIncognitoState(
|
||||
profile->IsIncognitoProfile())) {
|
||||
fingerprinting_protection_interventions::InterventionsWebContentsHelper::
|
||||
CreateForWebContents(web_contents, profile->IsIncognitoProfile());
|
||||
fingerprinting_protection_interventions::
|
||||
CanvasInterventionsWebContentsHelper::CreateForWebContents(
|
||||
web_contents,
|
||||
TrackingProtectionSettingsFactory::GetForProfile(profile),
|
||||
profile->IsIncognitoProfile());
|
||||
}
|
||||
|
||||
// Only create the IpProtectionStatus if the User Bypass feature is enabled.
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ void ChromeContentBrowserClientWebUiPart::OverrideWebPreferences(
|
||||
// Set some non-font prefs for webui tabstrip. The tabstrip renderer is never
|
||||
// navigated to or from, so we don't need to replicate this logic in
|
||||
// OverrideWebPreferencesAfterNavigation.
|
||||
if (url.host_piece() == chrome::kChromeUITabStripHost) {
|
||||
if (url.host() == chrome::kChromeUITabStripHost) {
|
||||
web_prefs->touch_drag_drop_enabled = true;
|
||||
web_prefs->touch_dragend_context_menu = true;
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ namespace autofillPrivate {
|
||||
FLIGHT_RESERVATION_PASSENGER_NAME,
|
||||
FLIGHT_RESERVATION_DEPARTURE_AIRPORT,
|
||||
FLIGHT_RESERVATION_ARRIVAL_AIRPORT,
|
||||
FLIGHT_RESERVATION_DEPARTURE_DATE,
|
||||
MAX_VALID_FIELD_TYPE
|
||||
};
|
||||
|
||||
@@ -375,6 +376,10 @@ namespace autofillPrivate {
|
||||
// dynamically, because the "<entity type>" string might need declension in
|
||||
// some languages.
|
||||
DOMString deleteEntityTypeString;
|
||||
// Whether the entity type can be stored on Google Wallet servers.
|
||||
// Note that an entity type might support Wallet and local storage
|
||||
// as well. (e.g. Vehicle).
|
||||
boolean supportsWalletStorage;
|
||||
};
|
||||
|
||||
// Contains date information: month, day and year.
|
||||
@@ -419,10 +424,15 @@ namespace autofillPrivate {
|
||||
dictionary EntityInstanceWithLabels {
|
||||
// The guid of the entity instance.
|
||||
DOMString guid;
|
||||
// The enitity instance label.
|
||||
// Contains the entity type name and other relevant information about the
|
||||
// entity type.
|
||||
EntityType type;
|
||||
// The entity instance label.
|
||||
DOMString entityInstanceLabel;
|
||||
// The enitity instance sublabel.
|
||||
// The entity instance sublabel.
|
||||
DOMString entityInstanceSubLabel;
|
||||
// Whether the entity is stored on Google Wallet servers.
|
||||
boolean storedInWallet;
|
||||
};
|
||||
|
||||
// A Pay Over Time Issuer entry which can be displayed in the autofill
|
||||
@@ -457,7 +467,7 @@ namespace autofillPrivate {
|
||||
callback CheckForDeviceAuthCallback = void(boolean isDeviceAuthAvailable);
|
||||
callback LoadEntityInstancesCallback = void(EntityInstanceWithLabels[] entries);
|
||||
callback GetEntityInstanceByGuid = void(EntityInstance entityInstance);
|
||||
callback GetAllEntityTypesCallback = void(EntityType[] entityTypes);
|
||||
callback GetWritableEntityTypesCallback = void(EntityType[] entityTypes);
|
||||
callback GetAllAttributeTypesForEntityTypeNameCallback =
|
||||
void(AttributeType[] attributeTypes);
|
||||
callback GetAutofillAiOptInStatusCallback = void(boolean optedIn);
|
||||
@@ -595,9 +605,9 @@ namespace autofillPrivate {
|
||||
static void getEntityInstanceByGuid(
|
||||
DOMString guid, GetEntityInstanceByGuid callback);
|
||||
|
||||
// Returns a list of all possible entity types. Used for the user to decide
|
||||
// Returns a list of writable entity types. Used for the user to decide
|
||||
// what entity instance to add.
|
||||
static void getAllEntityTypes(GetAllEntityTypesCallback callback);
|
||||
static void getWritableEntityTypes(GetWritableEntityTypesCallback callback);
|
||||
|
||||
// Returns a list of all possible attribute types that can be set on an
|
||||
// entity instance with the respective entity type name. Used for
|
||||
|
||||
@@ -8,27 +8,21 @@ namespace enterprise.reportingPrivate {
|
||||
// Invoked by <code>UploadChromeDesktopReport</code> when the upload is
|
||||
// finished.
|
||||
// Also Invoked by <code>setDeviceData</code> when data is stored.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
callback DoneCallback = void();
|
||||
|
||||
// Invoked by <code>getDeviceId</code> to return the ID.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
callback GetDeviceIdCallback = void(DOMString id);
|
||||
|
||||
// Invoked by <code>getPersistentSecret</code> to return the secret.
|
||||
[platforms = ("win", "mac")]
|
||||
callback GetPersistentSecretCallback = void(ArrayBuffer secret);
|
||||
|
||||
// Invoked by <code>getDeviceDataCallback</code> to return the device data.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
callback GetDeviceDataCallback = void(ArrayBuffer data);
|
||||
|
||||
// Possible states a particular device setting can be in.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
enum SettingValue { UNKNOWN, DISABLED, ENABLED };
|
||||
|
||||
// Device info fields returned by the getDeviceInfo API.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
dictionary DeviceInfo {
|
||||
DOMString osName;
|
||||
DOMString osVersion;
|
||||
@@ -47,7 +41,6 @@ namespace enterprise.reportingPrivate {
|
||||
};
|
||||
|
||||
// Invoked by <code>getDeviceInfo</code> to return device information.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
callback GetDeviceInfoCallback = void(DeviceInfo deviceInfo);
|
||||
|
||||
// Possible states for the EnterpriseRealTimeUrlCheckMode policy.
|
||||
@@ -106,14 +99,12 @@ namespace enterprise.reportingPrivate {
|
||||
|
||||
// Captures the type of event so it can be associated with user or device in
|
||||
// Chrome for reporting purposes
|
||||
[platforms = ("chromeos")]
|
||||
enum EventType { DEVICE, USER };
|
||||
|
||||
// Composite object that captures the information we need to report events.
|
||||
// Some fields like the record and priority are serialized to avoid any
|
||||
// dependency on proto definitions here, given the fact that they will likely
|
||||
// change in the future. These will be deserialized and validated in Chrome.
|
||||
[platforms = ("chromeos")]
|
||||
dictionary EnqueueRecordRequest {
|
||||
// Serialized record data binary based on the proto definition in
|
||||
// //components/reporting/proto/synced/record.proto.
|
||||
@@ -129,17 +120,14 @@ namespace enterprise.reportingPrivate {
|
||||
// collection request is for. This will be used to identify the organization
|
||||
// in which the user is, and can then be used to determine their affiliation
|
||||
// with the current browser management state.
|
||||
[platforms = ("win")]
|
||||
dictionary UserContext {
|
||||
DOMString userId;
|
||||
};
|
||||
|
||||
// Enumeration of the various states an AntiVirus software product can be in.
|
||||
[platforms = ("win")]
|
||||
enum AntiVirusProductState { ON, OFF, SNOOZED, EXPIRED };
|
||||
|
||||
// Metadata about a specific AntiVirus software product.
|
||||
[platforms = ("win")]
|
||||
dictionary AntiVirusSignal {
|
||||
DOMString displayName;
|
||||
DOMString productId;
|
||||
@@ -148,23 +136,19 @@ namespace enterprise.reportingPrivate {
|
||||
|
||||
// Invoked by <code>getAvInfo</code> to return information about installed
|
||||
// AntiVirus software.
|
||||
[platforms = ("win")]
|
||||
callback AvInfoCallback = void(AntiVirusSignal[] avSignals);
|
||||
|
||||
// ID of an installed hotfix system update.
|
||||
[platforms = ("win")]
|
||||
dictionary HotfixSignal {
|
||||
DOMString hotfixId;
|
||||
};
|
||||
|
||||
// Invoked by <code>getHotfixes</code> to return the IDs of installed hotfix
|
||||
// system updates.
|
||||
[platforms = ("win")]
|
||||
callback HotfixesCallback = void(HotfixSignal[] hotfixSignals);
|
||||
|
||||
// Used to indicate whether a given signal was correctly found or not, or
|
||||
// indicate a reason for not being able to find it.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
enum PresenceValue {
|
||||
// Was unable to determine whether the signal source exists or not. This
|
||||
// typically indicates that a failure occurred before even trying to assess
|
||||
@@ -183,14 +167,12 @@ namespace enterprise.reportingPrivate {
|
||||
|
||||
// Parameter used to collect information about a specific file system
|
||||
// resource.
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
dictionary GetFileSystemInfoOptions {
|
||||
DOMString path;
|
||||
boolean computeSha256;
|
||||
boolean computeExecutableMetadata;
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
dictionary GetFileSystemInfoRequest {
|
||||
// Information about the for whom the signal collection request is for.
|
||||
UserContext userContext;
|
||||
@@ -200,7 +182,6 @@ namespace enterprise.reportingPrivate {
|
||||
GetFileSystemInfoOptions[] options;
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
dictionary GetFileSystemInfoResponse {
|
||||
// Path to the file system object for whom those signals were collected.
|
||||
DOMString path;
|
||||
@@ -232,18 +213,15 @@ namespace enterprise.reportingPrivate {
|
||||
DOMString? version;
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac", "linux")]
|
||||
callback FileSystemInfoCallback =
|
||||
void(GetFileSystemInfoResponse[] fileSystemSignals);
|
||||
|
||||
[platforms = ("win")]
|
||||
enum RegistryHive {
|
||||
HKEY_CLASSES_ROOT,
|
||||
HKEY_LOCAL_MACHINE,
|
||||
HKEY_CURRENT_USER
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac")]
|
||||
dictionary GetSettingsOptions {
|
||||
// Path to a collection of settings.
|
||||
// On Windows it would be the path to the reg key inside the hive.
|
||||
@@ -273,7 +251,6 @@ namespace enterprise.reportingPrivate {
|
||||
RegistryHive? hive;
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac")]
|
||||
dictionary GetSettingsRequest {
|
||||
// Information about the for whom the signal collection request is for.
|
||||
UserContext userContext;
|
||||
@@ -283,7 +260,6 @@ namespace enterprise.reportingPrivate {
|
||||
GetSettingsOptions[] options;
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac")]
|
||||
dictionary GetSettingsResponse {
|
||||
// Path as given in the corresponding <code>GetSettingsOptions</code>
|
||||
// request.
|
||||
@@ -307,7 +283,6 @@ namespace enterprise.reportingPrivate {
|
||||
DOMString? value;
|
||||
};
|
||||
|
||||
[platforms = ("win", "mac")]
|
||||
callback SettingsCallback =
|
||||
void(GetSettingsResponse[] settings);
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@ namespace loginState {
|
||||
SIGNIN_PROFILE,
|
||||
|
||||
// Specifies that the extension is in the user profile.
|
||||
USER_PROFILE
|
||||
USER_PROFILE,
|
||||
|
||||
// Specifies that the extension is in the lock screen profile.
|
||||
[nodoc] LOCK_PROFILE
|
||||
};
|
||||
|
||||
enum SessionState {
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace quickUnlockPrivate {
|
||||
// policy information). This API must be used to change the pref.
|
||||
// |token|: The token returned by $(ref:getAuthToken).
|
||||
// |enabled|: Whether to enable the lock screen.
|
||||
[platforms=("chromeos")] static void setLockScreenEnabled(
|
||||
static void setLockScreenEnabled(
|
||||
DOMString token,
|
||||
boolean enabled,
|
||||
optional VoidResultCallback onComplete);
|
||||
@@ -88,7 +88,6 @@ namespace quickUnlockPrivate {
|
||||
// |enabled|: Whether to enable PIN auto submit.
|
||||
// |onComplete|: Called with true if the quick unlock state was updated,
|
||||
// false otherwise. The update is treated as a single atomic operation.
|
||||
[platforms=("chromeos")]
|
||||
static void setPinAutosubmitEnabled(
|
||||
DOMString token,
|
||||
DOMString pin,
|
||||
@@ -96,17 +95,16 @@ namespace quickUnlockPrivate {
|
||||
BooleanResultCallback onComplete);
|
||||
|
||||
// Tests wether it is currently possible to authenticate using PIN.
|
||||
[platforms=("chromeos")] static void canAuthenticatePin(
|
||||
static void canAuthenticatePin(
|
||||
BooleanResultCallback onComplete);
|
||||
|
||||
// Returns the set of quick unlock modes that are available for the user to
|
||||
// use. Some quick unlock modes may be disabled by policy.
|
||||
[platforms=("chromeos")] static void getAvailableModes(
|
||||
static void getAvailableModes(
|
||||
ModesCallback onComplete);
|
||||
|
||||
// Returns the quick unlock modes that are currently enabled and usable on
|
||||
// the lock screen.
|
||||
[platforms=("chromeos")]
|
||||
static void getActiveModes(ModesCallback onComplete);
|
||||
|
||||
|
||||
@@ -116,7 +114,7 @@ namespace quickUnlockPrivate {
|
||||
// |credential|: The given credential.
|
||||
// |onComplete|: Called with a list of warnings and errors the given
|
||||
// |credential| has (or an empty list if there are none).
|
||||
[platforms=("chromeos")] static void checkCredential(
|
||||
static void checkCredential(
|
||||
QuickUnlockMode mode,
|
||||
DOMString credential,
|
||||
CredentialCheckCallback onComplete);
|
||||
@@ -125,7 +123,6 @@ namespace quickUnlockPrivate {
|
||||
// |mode|: The quick unlock mode that is used.
|
||||
// |onComplete|: Called with the credential requirements of the given
|
||||
// |mode|.
|
||||
[platforms=("chromeos")]
|
||||
static void getCredentialRequirements(
|
||||
QuickUnlockMode mode,
|
||||
CredentialRequirementsCallback onComplete);
|
||||
@@ -137,7 +134,6 @@ namespace quickUnlockPrivate {
|
||||
// credential the same for the associated mode, pass an empty string.
|
||||
// |onComplete|: Called with true if the quick unlock state was updated,
|
||||
// false otherwise. The update is treated as a single atomic operation.
|
||||
[platforms=("chromeos")]
|
||||
static void setModes(
|
||||
DOMString token,
|
||||
QuickUnlockMode[] modes,
|
||||
|
||||
@@ -20,7 +20,10 @@ namespace settingsPrivate {
|
||||
|
||||
// Preferences are controlled neither by parent nor the child user.
|
||||
// Preference values are hard-coded values and can not be changed.
|
||||
CHILD_RESTRICTION
|
||||
CHILD_RESTRICTION,
|
||||
|
||||
// Preferences are controlled by "Safe Browsing" off setting.
|
||||
SAFE_BROWSING_OFF
|
||||
};
|
||||
|
||||
enum Enforcement {
|
||||
|
||||
@@ -1318,8 +1318,9 @@ void ChromeContentRendererClient::WillSendRequest(
|
||||
if (search_box) {
|
||||
// Note: this GURL copy could be avoided if host() were added to WebURL.
|
||||
GURL gurl(target_url);
|
||||
if (gurl.host_piece() == chrome::kChromeUIFaviconHost)
|
||||
if (gurl.host() == chrome::kChromeUIFaviconHost) {
|
||||
search_box->GenerateImageURLFromTransientURL(target_url, new_url);
|
||||
}
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
}
|
||||
@@ -1620,7 +1621,7 @@ bool ChromeContentRendererClient::IsSafeRedirectTarget(
|
||||
if (target_url.SchemeIs(extensions::kExtensionScheme)) {
|
||||
const extensions::Extension* extension =
|
||||
extensions::RendererExtensionRegistry::Get()->GetByID(
|
||||
target_url.host());
|
||||
target_url.GetHost());
|
||||
if (!extension) {
|
||||
return false;
|
||||
}
|
||||
@@ -1628,7 +1629,7 @@ bool ChromeContentRendererClient::IsSafeRedirectTarget(
|
||||
extension, target_url, request_initiator, upstream_url)) {
|
||||
return true;
|
||||
}
|
||||
return extension->guid() == upstream_url.host();
|
||||
return extension->guid() == upstream_url.GetHost();
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
return true;
|
||||
@@ -1667,7 +1668,7 @@ void ChromeContentRendererClient::AppendContentSecurityPolicy(
|
||||
// Append a minimum CSP to ensure the extension can't relax the default
|
||||
// applied CSP through means like Service Worker.
|
||||
const std::string* default_csp =
|
||||
extensions::CSPInfo::GetMinimumCSPToAppend(*extension, gurl.path());
|
||||
extensions::CSPInfo::GetMinimumCSPToAppend(*extension, gurl.GetPath());
|
||||
if (!default_csp)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1400,6 +1400,9 @@ policies:
|
||||
1399: DeveloperToolsAvailabilityAllowlist
|
||||
1400: DeveloperToolsAvailabilityBlocklist
|
||||
1401: LocalNetworkAccessRestrictionsTemporaryOptOut
|
||||
1402: GeminiActOnWebSettings
|
||||
1403: LocalAuthFactorsComplexity
|
||||
1404: ProxyOverrideRules
|
||||
atomic_groups:
|
||||
1: Homepage
|
||||
2: RemoteAccess
|
||||
|
||||
+1
-1
@@ -18,10 +18,10 @@ features:
|
||||
supported_on:
|
||||
- chrome.*:130-
|
||||
- android:130-
|
||||
- ios:143-
|
||||
future_on:
|
||||
- chrome_os
|
||||
- fuchsia
|
||||
- ios
|
||||
items:
|
||||
- caption: Enable managed profile cloud reporting
|
||||
value: true
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
caption: Automatically select client certificates for these sites
|
||||
desc: |-
|
||||
Setting the policy lets you make a list of URL patterns that specify sites for which Chrome can automatically select a client certificate. The value is an array of stringified JSON dictionaries, each with the form <ph name="AUTO_SELECT_CERTIFICATE_FOR_URLS_EXAMPLE">{ "pattern": "$URL_PATTERN", "filter" : $FILTER }</ph>, where <ph name="URL_PATTERN_PLACEHOLDER">$URL_PATTERN</ph> is a content setting pattern. <ph name="FILTER_PLACEHOLDER">$FILTER</ph> restricts the client certificates the browser automatically selects from. Independent of the filter, only certificates that match the server's certificate request are selected.
|
||||
Setting the policy lets you make a list of URL patterns that specify sites for which Chrome can automatically select a client certificate. The value is an array of stringified JSON dictionaries, each with the form <ph name="AUTO_SELECT_CERTIFICATE_FOR_URLS_EXAMPLE">{ "pattern": "$URL_PATTERN", "filter" : $FILTER }</ph>, where <ph name="URL_PATTERN_PLACEHOLDER">$URL_PATTERN</ph> is a content setting pattern. <ph name="FILTER_PLACEHOLDER">$FILTER</ph> restricts the client certificates the browser automatically selects from. Independent of the filter, only certificates that match the server's certificate request are selected. On Android, Chrome can only select client certificates that it has provisioned itself; it cannot access certificates installed at the operating system level.
|
||||
|
||||
Examples for the usage of the <ph name="FILTER_PLACEHOLDER">$FILTER</ph> section:
|
||||
|
||||
@@ -26,7 +26,6 @@ features:
|
||||
per_profile: true
|
||||
future_on:
|
||||
- fuchsia
|
||||
- android
|
||||
owners:
|
||||
- chromeos-commercial-networking-team@google.com
|
||||
- miersh@google.com
|
||||
@@ -37,6 +36,7 @@ schema:
|
||||
supported_on:
|
||||
- chrome.*:15-
|
||||
- chrome_os:15-
|
||||
- android:143-
|
||||
tags:
|
||||
- website-sharing
|
||||
type: list
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ example_value: 3
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
future_on:
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome_os:143-
|
||||
items:
|
||||
- caption: Do not allow Isolated Web App origins to connect to smart card readers
|
||||
name: BlockSmartCardConnect
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
caption: Control use of the WebPrinting API
|
||||
default: null
|
||||
desc: |-
|
||||
Setting the policy to 2 automatically blocks sites from using the WebPrinting API.
|
||||
Setting the policy to 2 automatically blocks Isolated Web App origins from using the WebPrinting API.
|
||||
|
||||
Setting the policy to 3 will prompt the user when a site wants to use the WebPrinting API.
|
||||
Setting the policy to 3 will prompt the user when an Isolated Web App origin wants to use the WebPrinting API.
|
||||
|
||||
Leaving it unset lets websites ask for local printer access, but users can change this setting.
|
||||
Leaving it unset lets Isolated Web App origins ask for local printer access, but users can change this setting.
|
||||
example_value: 2
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
@@ -13,10 +13,10 @@ features:
|
||||
future_on:
|
||||
- chrome_os
|
||||
items:
|
||||
- caption: Do not allow any site to request access to local printers via the WebPrinting API
|
||||
- caption: Do not allow Isolated Web App origins to request access to local printers via the WebPrinting API
|
||||
name: BlockWebPrinting
|
||||
value: 2
|
||||
- caption: Allow sites to ask the user to grant access to local printers via the WebPrinting API
|
||||
- caption: Allow Isolated Web App origins to ask the user to grant access to local printers via the WebPrinting API
|
||||
name: AskWebPrinting
|
||||
value: 3
|
||||
owners:
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ desc: |-
|
||||
If you must use the policy, please file a bug at
|
||||
<ph name="BUG_URL">$1<ex>https://crbug.com/new?component=1779870&cc=awillia@chromium.org&priority=p1&type=bug&noWizard=true</ex></ph>
|
||||
explaining your use case. The policy is scheduled to be offered through
|
||||
<ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> version 143, after which
|
||||
<ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> version 146, after which
|
||||
the old implementation will be removed.
|
||||
|
||||
NOTE: Only newly-started renderer processes will reflect changes to this
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ example_value:
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
future_on:
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome_os:143-
|
||||
owners:
|
||||
- file://content/browser/smart_card/OWNERS
|
||||
schema:
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ example_value:
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
future_on:
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome_os:143-
|
||||
owners:
|
||||
- file://content/browser/smart_card/OWNERS
|
||||
schema:
|
||||
|
||||
+2
-2
@@ -1,6 +1,7 @@
|
||||
caption: Allow WebPrinting API on these sites
|
||||
desc: |-
|
||||
Setting the policy lets you list the URL patterns that specify which sites are automatically granted access to local printers via the WebPrinting API.
|
||||
Valid patterns are limited to Isolated Web Apps.
|
||||
|
||||
Leaving the policy unset means <ph name="DEFAULT_WEB_PRINTING_SETTING_POLICY_NAME">DefaultWebPrintingSetting</ph> applies for all sites, if it's set. If not, users' personal settings apply.
|
||||
|
||||
@@ -8,8 +9,7 @@ desc: |-
|
||||
|
||||
For detailed information on valid url patterns, please see https://cloud.google.com/docs/chrome-enterprise/policies/url-patterns. <ph name="WILDCARD_VALUE">*</ph> is not an accepted value for this policy.
|
||||
example_value:
|
||||
- https://www.example.com
|
||||
- '[*.]example.edu'
|
||||
- isolated-app://aerugqztij5biqquuk3mfwpsaibuegaqcitgfchwuosuofdjabzqaaic
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
+2
-2
@@ -1,6 +1,7 @@
|
||||
caption: Block WebPrinting API on these sites
|
||||
desc: |-
|
||||
Setting the policy lets you list the URL patterns that specify which sites are automatically denied access to local printers via the WebPrinting API.
|
||||
Valid patterns are limited to Isolated Web Apps.
|
||||
|
||||
Leaving the policy unset means <ph name="DEFAULT_WEB_PRINTING_SETTING_POLICY_NAME">DefaultWebPrintingSetting</ph> applies for all sites, if it's set. If not, users' personal settings apply.
|
||||
|
||||
@@ -8,8 +9,7 @@ desc: |-
|
||||
|
||||
For detailed information on valid url patterns, please see https://cloud.google.com/docs/chrome-enterprise/policies/url-patterns. <ph name="WILDCARD_VALUE">*</ph> is not an accepted value for this policy.
|
||||
example_value:
|
||||
- https://www.example.com
|
||||
- '[*.]example.edu'
|
||||
- isolated-app://aerugqztij5biqquuk3mfwpsaibuegaqcitgfchwuosuofdjabzqaaic
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
+4
-3
@@ -22,6 +22,7 @@ features:
|
||||
cloud_only: true
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
internal_only: true
|
||||
items:
|
||||
- caption: Validate whether an extension can be installed or not with a cloud service.
|
||||
value: true
|
||||
@@ -33,8 +34,8 @@ owners:
|
||||
- file://extensions/OWNERS
|
||||
schema:
|
||||
type: boolean
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
supported_on:
|
||||
- chrome.*:142-
|
||||
- chrome_os:142-
|
||||
type: main
|
||||
tags: []
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
caption: Allows Gemini app integrations to directly act on web pages
|
||||
desc: |-
|
||||
Controls if the Gemini app is allowed to take action on the web pages on behalf of the user.
|
||||
|
||||
0/unset = Gemini app is allowed to take action on the web pages.
|
||||
|
||||
1 = Gemini app is not allowed to take action on the web pages.
|
||||
|
||||
This policy has no effect when the Gemini app is disabled. For example, the Gemini app can be disabled by <ph name="GEMINI_SETTINGS_POLICY_NAME">GeminiSettings</ph> policy.
|
||||
|
||||
For more information on Gemini in Chrome, please see https://support.google.com/chrome/a/answer/16291696.
|
||||
|
||||
Gemini's actuation is not available in all countries or all languages. Setting this policy does not guarantee the feature will be enabled; it remains subject to availability. For more info on the roll-out, check the Enterprise Release Notes: https://support.google.com/chrome/a/answer/7679408?hl=en
|
||||
|
||||
owners:
|
||||
- liuwilliam@chromium.org
|
||||
- file://chrome/browser/glic/OWNERS
|
||||
example_value: 0
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
type: int-enum
|
||||
schema:
|
||||
type: integer
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
items:
|
||||
- caption: Allow the Gemini app to take action on the web pages.
|
||||
name: Enabled
|
||||
value: 0
|
||||
- caption: Disallow the Gemini app to take action on the web pages.
|
||||
name: Disabled
|
||||
value: 1
|
||||
default: 0
|
||||
supported_on:
|
||||
- chrome.*:143-
|
||||
tags: []
|
||||
+1
@@ -10,6 +10,7 @@ features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
future_on:
|
||||
- android
|
||||
- fuchsia
|
||||
items:
|
||||
- caption: Enable bookmark bar
|
||||
|
||||
+3
-3
@@ -1,12 +1,10 @@
|
||||
caption: This policy allows administrators to encrypt http cache on disk.
|
||||
desc: |-
|
||||
This policy allows the administrators to encrypt browser http cache on disk.
|
||||
http cache on supported platforms.
|
||||
|
||||
When this policy is Enabled, browser cache will be encrypted.
|
||||
|
||||
When this policy is Disabled or not set, browser cache
|
||||
will not be encrypted.
|
||||
When this policy is Disabled or not set, browser cache will not be encrypted.
|
||||
|
||||
Browser cache encryption may result in a performance impact.
|
||||
owners:
|
||||
@@ -15,6 +13,8 @@ owners:
|
||||
- cbe-cep-eng@google.com
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
- android
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
+1
@@ -25,5 +25,6 @@ schema:
|
||||
supported_on:
|
||||
- chrome_os:22-
|
||||
- chrome.*:22-
|
||||
- android:143-
|
||||
tags: []
|
||||
type: main
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
owners:
|
||||
- fjacky@chromium.org
|
||||
- msramek@chromium.org
|
||||
- permissions-core@google.com
|
||||
- file://components/policy/OWNERS
|
||||
caption: Specifies whether in-product <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> surveys are shown to users.
|
||||
|
||||
+2
-4
@@ -1,10 +1,8 @@
|
||||
caption: Setting shortcuts on the New Tab Page (Beta)
|
||||
caption: Setting shortcuts on the New Tab Page
|
||||
desc: |-
|
||||
In development: for early preview only.
|
||||
|
||||
Setting the policy pre-configures up to 10 custom shortcuts on the <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> New Tab page.
|
||||
|
||||
If set, users will see these shortcuts by default and users can toggle between “My shortcuts," "Most visited sites" or "My organization's shortcuts" on the "Customize Chrome" panel. If empty or unset, the user will only be able to toggle between “My shortcuts" or "Most visited sites" on the "Customize Chrome" panel.
|
||||
If set, users will see these shortcuts by default, in addition to their personal shortcuts. Users can control visibility of their organization's shortcuts on the "Customize Chrome" panel.
|
||||
|
||||
Shortcut URLs must be unique.
|
||||
|
||||
|
||||
+1
-2
@@ -10,8 +10,7 @@ desc: |-
|
||||
|
||||
supported_on:
|
||||
- chrome.*:136-
|
||||
future_on:
|
||||
- android
|
||||
- android:143-
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: false
|
||||
|
||||
+1
-2
@@ -11,8 +11,7 @@ supported_on:
|
||||
- chrome.win:126-
|
||||
- chrome.mac:126-
|
||||
- chrome.linux:128-
|
||||
future_on:
|
||||
- android
|
||||
- android:143-
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
+1
@@ -26,5 +26,6 @@ schema:
|
||||
type: boolean
|
||||
future_on:
|
||||
- chrome_os
|
||||
- chrome.*
|
||||
tags: []
|
||||
type: main
|
||||
|
||||
+4
@@ -98,6 +98,9 @@ items:
|
||||
- caption: Text Editor (supported since version 136)
|
||||
name: text_editor
|
||||
value: text_editor
|
||||
- caption: Vids (supported since version 143)
|
||||
name: vids
|
||||
value: vids
|
||||
owners:
|
||||
- file://components/policy/OWNERS
|
||||
- ayaelattar@chromium.org
|
||||
@@ -130,6 +133,7 @@ schema:
|
||||
- google_maps
|
||||
- calculator
|
||||
- text_editor
|
||||
- vids
|
||||
type: string
|
||||
type: array
|
||||
supported_on:
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
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.
|
||||
|
||||
Leaving the policy unset has no effect on other proxy policies or user settings.
|
||||
|
||||
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 has a match for at least one of the URL hosts in <ph name="PROXY_OVERRIDE_RULES_DESTINATION_MATCHERS">DestinationMatchers</ph> and if all entries in <ph name="PROXY_OVERRIDE_RULES_CONDITIONS">Conditions</ph> are met. The value in <ph name="PROXY_OVERRIDE_RULES_PROXY_CHAIN">ProxyChain</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 <ph name="PROXY_OVERRIDE_RULES_PROXY_CHAIN">ProxyChain</ph> field entries correspond to string values of PAC files such as:
|
||||
* DIRECT
|
||||
* PROXY host:port
|
||||
* HTTPS host:port
|
||||
The first reachable entry will be used as a proxy.
|
||||
|
||||
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 the provided DNS <ph name="PROXY_OVERRIDE_RULES_HOST">Host</ph> is able to resolve to an IP address. If the value of <ph name="PROXY_OVERRIDE_RULES_RESULT">Result</ph> is "<ph name="PROXY_OVERRIDE_RULES_RESOLVES">resolves</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.
|
||||
|
||||
example_value:
|
||||
- DestinationMatchers:
|
||||
- 'https://some.app.com'
|
||||
- 'https://other.app.org'
|
||||
ProxyChain:
|
||||
- 'HTTPS proxy.app:443'
|
||||
- 'DIRECT'
|
||||
Conditions:
|
||||
- DnsProbe:
|
||||
Host: 'corp.ads'
|
||||
Result: "resolves"
|
||||
features:
|
||||
cloud_only: true
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
future_on:
|
||||
- chrome.*
|
||||
- chrome_os
|
||||
- android
|
||||
owners:
|
||||
- seblalancette@chromium.org
|
||||
- domfc@chromium.org
|
||||
- cbe-eng@google.com
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
DestinationMatchers:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
ProxyChain:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
Conditions:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
DnsProbe:
|
||||
type: object
|
||||
properties:
|
||||
Host:
|
||||
type: string
|
||||
Result:
|
||||
type: string
|
||||
enum:
|
||||
- resolves
|
||||
- not_found
|
||||
type: dict
|
||||
tags:
|
||||
- system-security
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
owners:
|
||||
- ghostbusters@google.com
|
||||
|
||||
caption: Set minimum complexity for local PINs and passwords
|
||||
|
||||
desc: |-
|
||||
This policy configures the minimum complexity requirements for local authentication factors (PINs and local passwords) set by users on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph>.
|
||||
|
||||
If this policy is not set, default to complexity level None.
|
||||
|
||||
This policy's requirements are enforced when a user sets up a new local PIN/password or changes an existing one.
|
||||
|
||||
The complexity levels are based on Android's password quality metrics (https://developers.google.com/android/management/reference/rest/v1/PasswordRequirements), adapted for <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph>:
|
||||
- 1 = None: A PIN/password is required, but there are no restrictions on its content or length.
|
||||
- 2 = Low: Basic complexity requirements.
|
||||
- 3 = Medium: Stricter length and character-type requirements.
|
||||
- 4 = High: Strongest complexity requirements, demanding multiple character types.
|
||||
|
||||
See the help center article for detailed explanations of what each level entails for both PINs and passwords.
|
||||
|
||||
future_on:
|
||||
- chrome_os
|
||||
|
||||
features:
|
||||
dynamic_refresh: true
|
||||
per_profile: true
|
||||
|
||||
type: int-enum
|
||||
|
||||
schema:
|
||||
type: integer
|
||||
enum:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
|
||||
items:
|
||||
- caption: No Complexity
|
||||
name: None
|
||||
value: 1
|
||||
- caption: Low Complexity
|
||||
name: Low
|
||||
value: 2
|
||||
- caption: Medium Complexity
|
||||
name: Medium
|
||||
value: 3
|
||||
- caption: High Complexity
|
||||
name: High
|
||||
value: 4
|
||||
|
||||
default: 1
|
||||
example_value: 1
|
||||
tags: []
|
||||
@@ -87,6 +87,7 @@
|
||||
#include "content/browser/fenced_frame/fenced_frame.h"
|
||||
#include "content/browser/find_request_manager.h"
|
||||
#include "content/browser/gpu/gpu_data_manager_impl.h"
|
||||
#include "content/browser/gpu/gpu_process_host.h"
|
||||
#include "content/browser/guest_page_holder_impl.h"
|
||||
#include "content/browser/host_zoom_map_impl.h"
|
||||
#include "content/browser/media/audio_stream_monitor.h"
|
||||
@@ -98,6 +99,7 @@
|
||||
#include "content/browser/preloading/prefetch/prefetch_type.h"
|
||||
#include "content/browser/preloading/preloading.h"
|
||||
#include "content/browser/preloading/prerender/prerender_final_status.h"
|
||||
#include "content/browser/preloading/prerender/prerender_handle_impl.h"
|
||||
#include "content/browser/preloading/prerender/prerender_host_registry.h"
|
||||
#include "content/browser/preloading/prerender/prerender_metrics.h"
|
||||
#include "content/browser/preloading/prerender/prerender_new_tab_handle.h"
|
||||
@@ -129,6 +131,7 @@
|
||||
#include "content/browser/tpcd_heuristics/opener_heuristic_tab_helper.h"
|
||||
#include "content/browser/tpcd_heuristics/redirect_heuristic_tab_helper.h"
|
||||
#include "content/browser/wake_lock/wake_lock_context_host.h"
|
||||
#include "content/browser/web_contents/file_chooser_impl.h"
|
||||
#include "content/browser/web_contents/java_script_dialog_commit_deferring_condition.h"
|
||||
#include "content/browser/web_contents/partitioned_popins_controller.h"
|
||||
#include "content/browser/web_contents/slow_web_preference_cache.h"
|
||||
@@ -236,6 +239,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#include "base/android/device_info.h"
|
||||
#include "base/android/scoped_service_binding_batch.h"
|
||||
#include "base/check.h"
|
||||
#include "content/browser/android/java_interfaces_impl.h"
|
||||
#include "content/browser/android/nfc_host.h"
|
||||
@@ -718,7 +722,7 @@ void RecordRendererUnresponsiveMetrics(
|
||||
"Renderer.Unresponsive.PageVisible.RenderProcessHostPriority",
|
||||
rph_priority);
|
||||
|
||||
bool widget_visible = !render_widget_host->is_hidden();
|
||||
bool widget_visible = !render_widget_host->IsHidden();
|
||||
base::UmaHistogramBoolean(
|
||||
"Renderer.Unresponsive.PageVisible.WidgetVisibility", widget_visible);
|
||||
|
||||
@@ -1724,20 +1728,6 @@ WebContentsImpl* WebContentsImpl::FromOuterFrameTreeNode(
|
||||
->node_.GetInnerWebContentsInFrame(frame_tree_node);
|
||||
}
|
||||
|
||||
bool WebContentsImpl::OnMessageReceived(RenderFrameHostImpl* render_frame_host,
|
||||
const IPC::Message& message) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::OnMessageReceived",
|
||||
"render_frame_host", render_frame_host);
|
||||
|
||||
for (auto& observer : observers_.observer_list()) {
|
||||
if (observer.OnMessageReceived(message, render_frame_host)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string WebContentsImpl::GetTitleForMediaControls() {
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::GetTitleForMediaControls");
|
||||
|
||||
@@ -2047,6 +2037,14 @@ std::vector<RenderFrameHostImpl*> WebContentsImpl::GetOutermostMainFrames() {
|
||||
return result;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
void WebContentsImpl::DecrementForbidExternalPopupMenus() {
|
||||
DCHECK_GE(external_popup_menus_forbid_counter_, 1);
|
||||
external_popup_menus_forbid_counter_--;
|
||||
NotifyPreferencesChanged();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
|
||||
void WebContentsImpl::ExecutePageBroadcastMethod(
|
||||
PageBroadcastMethodCallback callback) {
|
||||
OPTIONAL_TRACE_EVENT0("content",
|
||||
@@ -2735,6 +2733,17 @@ bool WebContentsImpl::IsBeingVisiblyCaptured() {
|
||||
return visible_capturer_count_ > 0;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
base::ScopedClosureRunner WebContentsImpl::ForbidExternalPopupMenus() {
|
||||
// Disable external popups when forbidden, and re-enable them after.
|
||||
external_popup_menus_forbid_counter_++;
|
||||
NotifyPreferencesChanged();
|
||||
return base::ScopedClosureRunner(
|
||||
base::BindOnce(&WebContentsImpl::DecrementForbidExternalPopupMenus,
|
||||
weak_factory_.GetWeakPtr()));
|
||||
}
|
||||
#endif // BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
|
||||
bool WebContentsImpl::IsAudioMuted() {
|
||||
return audio_stream_factory_ && audio_stream_factory_->IsMuted();
|
||||
}
|
||||
@@ -3038,7 +3047,8 @@ base::TimeTicks WebContentsImpl::GetLastInteractionTimeTicks() {
|
||||
}
|
||||
|
||||
WebContents::ScopedIgnoreInputEvents WebContentsImpl::IgnoreInputEvents(
|
||||
std::optional<WebInputEventAuditCallback> audit_callback) {
|
||||
std::optional<WebInputEventAuditCallback> audit_callback,
|
||||
bool should_ignore_a11y_input) {
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::IgnoreInputEvents");
|
||||
|
||||
uint64_t callback_id = 0;
|
||||
@@ -3061,18 +3071,22 @@ WebContents::ScopedIgnoreInputEvents WebContentsImpl::IgnoreInputEvents(
|
||||
}
|
||||
#endif
|
||||
++ignore_input_events_count_;
|
||||
if (should_ignore_a11y_input) {
|
||||
++ignore_a11y_input_count_;
|
||||
}
|
||||
}
|
||||
|
||||
// Bind weakly, since the token might outlive us.
|
||||
return ScopedIgnoreInputEvents(base::BindOnce(
|
||||
[](base::WeakPtr<WebContentsImpl> wc,
|
||||
[](base::WeakPtr<WebContentsImpl> wc, bool should_ignore_a11y_input,
|
||||
std::optional<uint64_t> callback_id) {
|
||||
if (wc) {
|
||||
OPTIONAL_TRACE_EVENT0("content",
|
||||
"WebContentsImpl::IgnoreInputEvents.Release");
|
||||
if (callback_id.has_value()) {
|
||||
CHECK(wc->web_input_event_audit_callbacks_.contains(*callback_id));
|
||||
wc->web_input_event_audit_callbacks_.erase(*callback_id);
|
||||
auto it = wc->web_input_event_audit_callbacks_.find(*callback_id);
|
||||
CHECK(it != wc->web_input_event_audit_callbacks_.end());
|
||||
wc->web_input_event_audit_callbacks_.erase(it);
|
||||
} else {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// Reset gesture detection so that we don't continue to generate new
|
||||
@@ -3091,10 +3105,13 @@ WebContents::ScopedIgnoreInputEvents WebContentsImpl::IgnoreInputEvents(
|
||||
}
|
||||
#endif
|
||||
--wc->ignore_input_events_count_;
|
||||
if (should_ignore_a11y_input) {
|
||||
--wc->ignore_a11y_input_count_;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
weak_factory_.GetWeakPtr(),
|
||||
weak_factory_.GetWeakPtr(), should_ignore_a11y_input,
|
||||
audit_callback.has_value() ? std::make_optional<uint64_t>(callback_id)
|
||||
: std::nullopt));
|
||||
}
|
||||
@@ -3103,6 +3120,10 @@ bool WebContentsImpl::ShouldIgnoreInputEventsForTesting() {
|
||||
return ShouldIgnoreInputEvents();
|
||||
}
|
||||
|
||||
bool WebContentsImpl::ShouldIgnoreA11yInputEventsForTesting() {
|
||||
return ShouldIgnoreA11yInputEvents();
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HasActiveEffectivelyFullscreenVideo() {
|
||||
return IsFullscreen() &&
|
||||
media_web_contents_observer_->HasActiveEffectivelyFullscreenVideo();
|
||||
@@ -3149,6 +3170,10 @@ void WebContentsImpl::SetPrimaryPageImportance(
|
||||
"IsPerceptibleImportanceSupported() is false";
|
||||
CHECK(main_frame_importance >= subframe_importance);
|
||||
|
||||
// Batch service binding updates for the renderer processes of the main frame
|
||||
// and the subframes.
|
||||
base::android::ScopedServiceBindingBatch scoped_service_binding_batch;
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kSubframeImportance)) {
|
||||
CHECK(
|
||||
base::FeatureList::IsEnabled(features::kSubframePriorityContribution));
|
||||
@@ -3297,6 +3322,11 @@ void WebContentsImpl::AttachInnerWebContentsImpl(
|
||||
inner_render_manager->current_frame_host();
|
||||
RenderViewHostImpl* inner_render_view_host =
|
||||
inner_main_frame->render_view_host();
|
||||
RenderFrameHostImpl* inner_speculative_frame =
|
||||
inner_render_manager->speculative_frame_host();
|
||||
RenderViewHostImpl* inner_speculative_render_view_host =
|
||||
inner_speculative_frame ? inner_speculative_frame->render_view_host()
|
||||
: nullptr;
|
||||
auto* outer_render_manager =
|
||||
render_frame_host_impl->frame_tree_node()->render_manager();
|
||||
|
||||
@@ -3321,6 +3351,16 @@ void WebContentsImpl::AttachInnerWebContentsImpl(
|
||||
prev_rwhv->Destroy();
|
||||
}
|
||||
}
|
||||
// Do the same for speculative render frame host's view.
|
||||
if (inner_speculative_frame) {
|
||||
RenderWidgetHostViewBase* prev_speculative_rwhv =
|
||||
static_cast<RenderWidgetHostViewBase*>(
|
||||
inner_speculative_frame->GetView());
|
||||
if (prev_speculative_rwhv &&
|
||||
!prev_speculative_rwhv->IsRenderWidgetHostViewChildFrame()) {
|
||||
prev_speculative_rwhv->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// When the WebContents being initialized has not already navigated, the
|
||||
// browser side Render{View,Frame}Host must be initialized and the
|
||||
@@ -3335,6 +3375,20 @@ void WebContentsImpl::AttachInnerWebContentsImpl(
|
||||
inner_web_contents_impl->CreateRenderWidgetHostViewForRenderManager(
|
||||
inner_render_view_host);
|
||||
}
|
||||
// Do the same for speculative render frame host.
|
||||
if (inner_speculative_render_view_host) {
|
||||
inner_render_manager->InitRenderView(
|
||||
inner_speculative_frame->GetSiteInstance()->group(),
|
||||
inner_speculative_render_view_host,
|
||||
/*proxy=*/nullptr, /*navigation_metrics_token=*/std::nullopt);
|
||||
RenderWidgetHostViewBase* speculative_rwhv =
|
||||
static_cast<RenderWidgetHostViewBase*>(
|
||||
inner_speculative_frame->GetView());
|
||||
if (!speculative_rwhv) {
|
||||
inner_web_contents_impl->CreateRenderWidgetHostViewForRenderManager(
|
||||
inner_speculative_render_view_host);
|
||||
}
|
||||
}
|
||||
|
||||
inner_web_contents_impl->RecursivelyUnregisterRenderWidgetHostViews();
|
||||
|
||||
@@ -3898,6 +3952,11 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences(
|
||||
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
prefs.should_disable_external_popups =
|
||||
external_popup_menus_forbid_counter_ != 0;
|
||||
#endif // BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
|
||||
GetContentClient()->browser()->OverrideWebPreferences(
|
||||
this, *main_frame->GetSiteInstance(), &prefs);
|
||||
return prefs;
|
||||
@@ -3920,13 +3979,11 @@ void WebContentsImpl::OnWebPreferencesChanged() {
|
||||
(force_enable_zoom_ != web_preferences_->force_enable_zoom);
|
||||
force_enable_zoom_ = web_preferences_->force_enable_zoom;
|
||||
if (force_enable_zoom_changed) {
|
||||
std::vector<viz::FrameSinkId> frame_sink_ids;
|
||||
for (FrameTreeNode* node : primary_frame_tree_.Nodes()) {
|
||||
RenderFrameHostImpl* rfh = node->current_frame_host();
|
||||
if (rfh->is_local_root()) {
|
||||
if (auto* rwh = rfh->GetRenderWidgetHost()) {
|
||||
rwh->SetForceEnableZoom(force_enable_zoom_);
|
||||
frame_sink_ids.push_back(rwh->GetFrameSinkId());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4738,8 +4795,8 @@ void WebContentsImpl::FullscreenStateChanged(
|
||||
delegate_->FullscreenStateChangedForTab(rfh, *options);
|
||||
}
|
||||
|
||||
if (!base::Contains(fullscreen_frames_, rfh)) {
|
||||
fullscreen_frames_.insert(rfh);
|
||||
if (bool was_inserted = fullscreen_frames_.insert(rfh).second;
|
||||
was_inserted) {
|
||||
FullscreenFrameSetUpdated();
|
||||
}
|
||||
return;
|
||||
@@ -7320,15 +7377,29 @@ void WebContentsImpl::ReadyToCommitNavigation(
|
||||
NavigationHandle* navigation_handle) {
|
||||
TRACE_EVENT1("navigation", "WebContentsImpl::ReadyToCommitNavigation",
|
||||
"navigation_handle", navigation_handle);
|
||||
CHECK(!navigation_handle->IsSameDocument());
|
||||
|
||||
// Cross-document navigation of the top-level frame resets the capture
|
||||
// handle config. Using IsInPrimaryMainFrame is valid here since the browser
|
||||
// caches this state for the active main frame only.
|
||||
if (!navigation_handle->IsSameDocument() &&
|
||||
navigation_handle->IsInPrimaryMainFrame()) {
|
||||
if (navigation_handle->IsInPrimaryMainFrame()) {
|
||||
SetCaptureHandleConfig(blink::mojom::CaptureHandleConfig::New());
|
||||
}
|
||||
|
||||
// Notify the OS that the workload is about to increase for main frame
|
||||
// navigations only. This a trade off between latency and power - we don't
|
||||
// want to do it for every navigation.
|
||||
if (navigation_handle->IsInMainFrame()) {
|
||||
auto* gpu_process_host =
|
||||
GpuProcessHost::Get(GPU_PROCESS_KIND_SANDBOXED, /*force_create=*/false);
|
||||
if (gpu_process_host) {
|
||||
auto* host = gpu_process_host->gpu_host();
|
||||
if (host) {
|
||||
host->NotifyWorkloadIncrease();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
observers_.NotifyObservers(&WebContentsObserver::ReadyToCommitNavigation,
|
||||
navigation_handle);
|
||||
|
||||
@@ -7352,10 +7423,6 @@ void WebContentsImpl::ReadyToCommitNavigation(
|
||||
navigation_handle->GetURL());
|
||||
}
|
||||
|
||||
if (navigation_handle->IsSameDocument()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// SSLInfo is not needed on subframe navigations since the main-frame
|
||||
// certificate is the only one that can be inspected (using the info
|
||||
// bubble) without refreshing the page with DevTools open.
|
||||
@@ -9038,11 +9105,11 @@ double WebContentsImpl::GetPendingZoomLevel(RenderWidgetHostImpl* rwh) {
|
||||
}
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
return HostZoomMapForRenderFrameHost(rfh)
|
||||
->GetZoomLevelForHostAndSchemeAndroid(url.scheme(),
|
||||
->GetZoomLevelForHostAndSchemeAndroid(url.GetScheme(),
|
||||
net::GetHostOrSpecFromURL(url));
|
||||
#else
|
||||
return HostZoomMapForRenderFrameHost(rfh)->GetZoomLevelForHostAndScheme(
|
||||
url.scheme(), net::GetHostOrSpecFromURL(url));
|
||||
url.GetScheme(), net::GetHostOrSpecFromURL(url));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -10200,6 +10267,17 @@ bool WebContentsImpl::ShouldIgnoreInputEvents() {
|
||||
return web_contents->ShouldIgnoreInputEvents();
|
||||
}
|
||||
|
||||
bool WebContentsImpl::ShouldIgnoreA11yInputEvents() {
|
||||
if (ignore_a11y_input_count_ > 0) {
|
||||
return true;
|
||||
}
|
||||
WebContentsImpl* web_contents = GetOuterWebContents();
|
||||
if (!web_contents) {
|
||||
return false;
|
||||
}
|
||||
return web_contents->ShouldIgnoreA11yInputEvents();
|
||||
}
|
||||
|
||||
void WebContentsImpl::FocusOwningWebContents(
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::FocusOwningWebContents",
|
||||
@@ -11319,8 +11397,11 @@ int WebContentsImpl::GetCurrentlyPlayingVideoCount() const {
|
||||
std::optional<gfx::Size> WebContentsImpl::GetFullscreenVideoSize() {
|
||||
std::optional<MediaPlayerId> id =
|
||||
media_web_contents_observer_->GetFullscreenVideoMediaPlayerId();
|
||||
if (id && base::Contains(cached_video_sizes_, id.value())) {
|
||||
return std::optional<gfx::Size>(cached_video_sizes_[id.value()]);
|
||||
if (id) {
|
||||
if (auto it = cached_video_sizes_.find(id.value());
|
||||
it != cached_video_sizes_.end()) {
|
||||
return std::optional<gfx::Size>(it->second);
|
||||
}
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -11796,6 +11877,10 @@ void WebContentsImpl::NotifyPageBecamePrimary(PageImpl& page) {
|
||||
save_package_->ClearPage();
|
||||
save_package_.reset();
|
||||
}
|
||||
|
||||
// Sync draggable regions.
|
||||
SetSupportsDraggableRegions(supports_draggable_regions_);
|
||||
|
||||
observers_.NotifyObservers(&WebContentsObserver::PrimaryPageChanged, page);
|
||||
}
|
||||
|
||||
@@ -11926,6 +12011,17 @@ void WebContentsImpl::UpdateBrowserControlsState(
|
||||
offset_tag_modifications);
|
||||
}
|
||||
|
||||
void WebContentsImpl::SetSupportsDraggableRegions(
|
||||
bool supports_draggable_regions) {
|
||||
supports_draggable_regions_ = supports_draggable_regions;
|
||||
ExecutePageBroadcastMethod(
|
||||
[supports_draggable_regions](RenderViewHostImpl* rvh) {
|
||||
if (auto& broadcast = rvh->GetAssociatedPageBroadcast()) {
|
||||
broadcast->SetSupportsDraggableRegions(supports_draggable_regions);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void WebContentsImpl::SetV8CompileHints(base::ReadOnlySharedMemoryRegion data) {
|
||||
GetPrimaryMainFrame()->GetAssociatedLocalMainFrame()->SetV8CompileHints(
|
||||
std::move(data));
|
||||
@@ -12061,7 +12157,7 @@ std::unique_ptr<PrerenderHandle> WebContentsImpl::StartPrerendering(
|
||||
no_vary_search_hint,
|
||||
/*initiator_render_frame_host=*/nullptr, GetWeakPtr(), page_transition,
|
||||
should_warm_up_compositor, should_prepare_paint_tree,
|
||||
/*should_pause_javascript_execution=*/false,
|
||||
blink::mojom::SpeculationAction::kPrerender,
|
||||
std::move(url_match_predicate),
|
||||
std::move(prerender_navigation_handle_callback),
|
||||
base::WrapRefCounted(
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "cc/base/features.h"
|
||||
#include "components/attribution_reporting/features.h"
|
||||
#include "components/content_settings/core/common/features.h"
|
||||
#include "content/common/content_navigation_policy.h"
|
||||
#include "content/common/content_switches_internal.h"
|
||||
#include "content/common/features.h"
|
||||
@@ -220,6 +221,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
raw_ref(features::kFedCmLightweightMode), kDefault},
|
||||
{wf::EnableFedCmErrorAttribute,
|
||||
raw_ref(features::kFedCmErrorAttribute), kDefault},
|
||||
{wf::EnableFedCmNonStringToken,
|
||||
raw_ref(features::kFedCmNonStringToken), kDefault},
|
||||
{wf::EnableGamepadMultitouch,
|
||||
raw_ref(features::kEnableGamepadMultitouch)},
|
||||
{wf::EnableSharedStorageAPI,
|
||||
@@ -250,13 +253,9 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
{wf::EnableInstalledApp, raw_ref(features::kInstalledApp)},
|
||||
{wf::EnableIntegrityPolicyScript,
|
||||
raw_ref(network::features::kIntegrityPolicyScript)},
|
||||
{wf::EnableLazyInitializeMediaControls,
|
||||
raw_ref(features::kLazyInitializeMediaControls)},
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
{wf::EnableLockedMode, raw_ref(blink::features::kLockedMode)},
|
||||
#endif
|
||||
{wf::EnableMediaCastOverlayButton,
|
||||
raw_ref(media::kMediaCastOverlayButton)},
|
||||
{wf::EnableMediaEngagementBypassAutoplayPolicies,
|
||||
raw_ref(media::kMediaEngagementBypassAutoplayPolicies)},
|
||||
{wf::EnablePaymentApp, raw_ref(features::kServiceWorkerPaymentApps)},
|
||||
@@ -302,20 +301,20 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
{wf::EnableWebXR, raw_ref(features::kWebXr)},
|
||||
#if BUILDFLAG(ENABLE_VR)
|
||||
{wf::EnableWebXRFrontFacing,
|
||||
raw_ref(device::features::kWebXrIncubations)},
|
||||
raw_ref(device::features::kWebXRIncubations)},
|
||||
{wf::EnableWebXRFrameRate,
|
||||
raw_ref(device::features::kWebXrIncubations)},
|
||||
raw_ref(device::features::kWebXRIncubations)},
|
||||
{wf::EnableWebXRGPUBinding,
|
||||
raw_ref(device::features::kWebXrWebGpuBinding)},
|
||||
raw_ref(device::features::kWebXRWebGPUBinding)},
|
||||
{wf::EnableWebXRImageTracking,
|
||||
raw_ref(device::features::kWebXrIncubations)},
|
||||
{wf::EnableWebXRLayers, raw_ref(device::features::kWebXrLayers)},
|
||||
raw_ref(device::features::kWebXRIncubations)},
|
||||
{wf::EnableWebXRLayers, raw_ref(device::features::kWebXRLayers)},
|
||||
{wf::EnableWebXRPlaneDetection,
|
||||
raw_ref(device::features::kWebXrIncubations)},
|
||||
raw_ref(device::features::kWebXRIncubations)},
|
||||
{wf::EnableWebXRPoseMotionData,
|
||||
raw_ref(device::features::kWebXrIncubations)},
|
||||
raw_ref(device::features::kWebXRIncubations)},
|
||||
{wf::EnableWebXRSpecParity,
|
||||
raw_ref(device::features::kWebXrIncubations)},
|
||||
raw_ref(device::features::kWebXRIncubations)},
|
||||
#endif
|
||||
{wf::EnablePermissions, raw_ref(features::kWebPermissionsApi),
|
||||
kSetOnlyIfOverridden},
|
||||
@@ -349,6 +348,9 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
kSetOnlyIfOverridden},
|
||||
{"AttributionReporting",
|
||||
raw_ref(features::kPrivacySandboxAdsAPIsM1Override)},
|
||||
{"ApproximateGeolocationPermission",
|
||||
raw_ref(
|
||||
content_settings::features::kApproximateGeolocationPermission)},
|
||||
{"AndroidDownloadableFontsMatching",
|
||||
raw_ref(features::kAndroidDownloadableFontsMatching)},
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "media/audio/audio_manager.h"
|
||||
#include "media/capture/content/screen_enumerator.h"
|
||||
#include "media/mojo/mojom/media_service.mojom.h"
|
||||
#include "media/mojo/mojom/speech_recognizer.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/message.h"
|
||||
#include "net/base/isolation_info.h"
|
||||
#include "net/cookies/cookie_setting_override.h"
|
||||
@@ -96,6 +97,7 @@
|
||||
#include "url/origin.h"
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#include "content/browser/renderer_host/navigation_transitions/navigation_transition_config.h"
|
||||
#include "content/public/browser/tts_environment_android.h"
|
||||
#else
|
||||
#include "content/public/browser/authenticator_request_client_delegate.h"
|
||||
@@ -410,6 +412,12 @@ bool ContentBrowserClient::ShouldUrlUseApplicationIsolationLevel(
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool ContentBrowserClient::IsInitialWebUIScheme(const GURL& url) {
|
||||
return false;
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
bool ContentBrowserClient::IsIsolatedContextAllowedForUrl(
|
||||
BrowserContext* browser_context,
|
||||
const GURL& lock_url) {
|
||||
@@ -887,6 +895,18 @@ ContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<optimization_guide::ModelBrokerClient>
|
||||
ContentBrowserClient::CreateModelBrokerClient(BrowserContext* browser_context) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
media::mojom::AvailabilityStatus
|
||||
ContentBrowserClient::GetOnDeviceSpeechRecognitionAvailabilityStatus(
|
||||
BrowserContext* context,
|
||||
const std::string& language) {
|
||||
return media::mojom::AvailabilityStatus::kUnavailable;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
TtsControllerDelegate* ContentBrowserClient::GetTtsControllerDelegate() {
|
||||
return nullptr;
|
||||
@@ -923,6 +943,10 @@ base::FilePath ContentBrowserClient::GetGraphiteDawnDiskCacheDirectory() {
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
base::FilePath ContentBrowserClient::GetGPUPersistentCacheDirectory() {
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
base::FilePath ContentBrowserClient::GetNetLogDefaultDirectory() {
|
||||
return base::FilePath();
|
||||
}
|
||||
@@ -1538,6 +1562,14 @@ void ContentBrowserClient::ReportLegacyTechEvent(
|
||||
uint64_t column,
|
||||
std::optional<LegacyTechCookieIssueDetails> cookie_issue_details) {}
|
||||
|
||||
std::optional<GURL>
|
||||
ContentBrowserClient::MaybeOverrideSourceURLForClipboardAccess(
|
||||
RenderFrameHost* render_frame_host,
|
||||
const GURL& original_url) {
|
||||
DCHECK(render_frame_host);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::IsClipboardPasteAllowed(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
return true;
|
||||
@@ -1760,11 +1792,21 @@ bool ContentBrowserClient::
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::IsFileSystemAccessApiFilePickerAllowed(
|
||||
WebContents* web_contents) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldUseFirstPartyStorageKey(
|
||||
const url::Origin& origin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldSkipBeforeUnloadDialog(
|
||||
content::RenderFrameHost* rfh) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<ResponsivenessCalculatorDelegate>
|
||||
ContentBrowserClient::CreateResponsivenessCalculatorDelegate() {
|
||||
return nullptr;
|
||||
@@ -1981,4 +2023,19 @@ bool ContentBrowserClient::UsePreloadServingMetrics() {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
bool ContentBrowserClient::ShouldDisallowCredentialRequest(
|
||||
WebContents* web_contents) {
|
||||
return false;
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
bool ContentBrowserClient::ShouldAnimateBackForwardTransitions() {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
return NavigationTransitionConfig::SupportsBackForwardTransitions({});
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace content
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace chrome_url_overrides {
|
||||
// Override for the chrome://history page.
|
||||
DOMString? history;
|
||||
|
||||
[nodoc, platforms=("chromeos")] DOMString? activationmessage;
|
||||
[nodoc, platforms=("chromeos")] DOMString? keyboard;
|
||||
[nodoc] DOMString? activationmessage;
|
||||
[nodoc] DOMString? keyboard;
|
||||
};
|
||||
|
||||
dictionary ManifestKeys {
|
||||
|
||||
@@ -52,8 +52,9 @@ namespace declarativeNetRequest {
|
||||
|
||||
// This describes the possible operations for a "modifyHeaders" rule.
|
||||
enum HeaderOperation {
|
||||
// Adds a new entry for the specified header. This operation is not
|
||||
// supported for request headers.
|
||||
// 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.
|
||||
|
||||
@@ -831,7 +831,8 @@ NetworkContext::NetworkContext(
|
||||
}
|
||||
|
||||
device_bound_session_manager_ = DeviceBoundSessionManager::Create(
|
||||
url_request_context_->device_bound_session_service());
|
||||
url_request_context_->device_bound_session_service(),
|
||||
cookie_manager_.get());
|
||||
}
|
||||
|
||||
NetworkContext::NetworkContext(
|
||||
@@ -1993,7 +1994,10 @@ void NetworkContext::CreateWebTransport(
|
||||
std::vector<mojom::WebTransportCertificateFingerprintPtr> fingerprints,
|
||||
const std::vector<std::string>& application_protocols,
|
||||
mojo::PendingRemote<mojom::WebTransportHandshakeClient>
|
||||
pending_handshake_client) {
|
||||
pending_handshake_client,
|
||||
mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
|
||||
url_loader_network_observer,
|
||||
mojom::ClientSecurityStatePtr client_security_state) {
|
||||
if (!IsNetworkForNonceAndUrlAllowed(
|
||||
key.GetNonce().value_or(base::UnguessableToken::Null()), url)) {
|
||||
mojo::Remote<mojom::WebTransportHandshakeClient> remote_handshake_client(
|
||||
@@ -2004,7 +2008,9 @@ void NetworkContext::CreateWebTransport(
|
||||
}
|
||||
web_transports_.insert(std::make_unique<WebTransport>(
|
||||
url, origin, key, fingerprints, application_protocols, this,
|
||||
std::move(pending_handshake_client)));
|
||||
std::move(pending_handshake_client),
|
||||
std::move(url_loader_network_observer),
|
||||
std::move(client_security_state)));
|
||||
}
|
||||
|
||||
void NetworkContext::CreateNetLogExporter(
|
||||
@@ -2422,7 +2428,8 @@ void NetworkContext::PreconnectSockets(
|
||||
net::HttpNetworkSession* session = factory->GetSession();
|
||||
net::HttpStreamFactory* http_stream_factory = session->http_stream_factory();
|
||||
http_stream_factory->PreconnectStreams(
|
||||
base::saturated_cast<int32_t>(num_streams), request_info);
|
||||
base::saturated_cast<int32_t>(num_streams), request_info,
|
||||
base::OnceClosure());
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_P2P_ENABLED)
|
||||
@@ -2796,9 +2803,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (params_->windows_system_proxy_resolver) {
|
||||
if (params_->system_proxy_resolver) {
|
||||
builder.SetMojoWindowsSystemProxyResolver(
|
||||
std::move(params_->windows_system_proxy_resolver));
|
||||
std::move(params_->system_proxy_resolver));
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -2830,6 +2837,14 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
params_->file_paths->no_vary_search_directory->path();
|
||||
}
|
||||
cache_params.type = network_session_configurator::ChooseCacheType();
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// For enterprise users, we always use simple backend when encryption is
|
||||
// enabled.
|
||||
if (params_->enable_encrypted_http_cache) {
|
||||
cache_params.type =
|
||||
net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE;
|
||||
}
|
||||
#endif
|
||||
if (params_->http_cache_file_operations_factory) {
|
||||
cache_params.file_operations_factory =
|
||||
base::MakeRefCounted<MojoBackendFileOperationsFactory>(
|
||||
@@ -3156,7 +3171,12 @@ NetworkContext::MakeSessionCleanupCookieStore() const {
|
||||
crypto_delegate = std::make_unique<CookieOSCryptAsyncDelegate>(
|
||||
std::move(params_->cookie_encryption_provider));
|
||||
} else {
|
||||
crypto_delegate = cookie_config::GetCookieCryptoDelegate();
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// A cookie crypto delegate should not be created on Android to
|
||||
// match the behavior of cookie_config::GetCookieCryptoDelegate().
|
||||
// See https://crbug.com/449652881
|
||||
NOTREACHED();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3239,7 +3259,7 @@ GURL NetworkContext::GetHSTSRedirectForPreconnect(const GURL& original_url) {
|
||||
// top-level navigation so we need to disallow HSTS upgrades for every
|
||||
// preconnect.
|
||||
if (!url_request_context_->transport_security_state()->ShouldUpgradeToSSL(
|
||||
original_url.host(), /*is_top_level_nav=*/false)) {
|
||||
original_url.GetHost(), /*is_top_level_nav=*/false)) {
|
||||
RecordHSTSPreconnectUpgradeReason(
|
||||
HSTSRedirectUpgradeReason::kNotUpgradedNoHSTSPin);
|
||||
return original_url;
|
||||
@@ -3263,6 +3283,14 @@ void NetworkContext::DestroySocketManager(P2PSocketManager* socket_manager) {
|
||||
void NetworkContext::CanUploadDomainReliability(
|
||||
const url::Origin& origin,
|
||||
base::OnceCallback<void(bool)> callback) {
|
||||
// If the NetworkContextClient hasn't been set yet or has disconnected for
|
||||
// some reason, just return `false`. This could occur in the case of CCT for
|
||||
// captive portal -- see crbug.com/446496025 for more details, do the similar
|
||||
// check to CanSendSCTAuditingReport().
|
||||
if (!client_) {
|
||||
std::move(callback).Run(false);
|
||||
return;
|
||||
}
|
||||
client_->OnCanSendDomainReliabilityUpload(
|
||||
origin,
|
||||
base::BindOnce([](base::OnceCallback<void(bool)> callback,
|
||||
@@ -3548,6 +3576,34 @@ void NetworkContext::GetDeviceBoundSessionManager(
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkContext::AddQuicHints(
|
||||
const std::vector<url::SchemeHostPort>& origins,
|
||||
const net::NetworkAnonymizationKey& network_anonymization_key) {
|
||||
CHECK(url_request_context_);
|
||||
|
||||
for (const auto& origin : origins) {
|
||||
url::CanonHostInfo host_info;
|
||||
std::string canonical_host(
|
||||
net::CanonicalizeHost(origin.host(), &host_info));
|
||||
if (!host_info.IsIPAddress() &&
|
||||
!net::IsCanonicalizedHostCompliant(canonical_host)) {
|
||||
LOG(ERROR) << "Invalid QUIC hint host: " << origin.host();
|
||||
continue;
|
||||
}
|
||||
|
||||
// The AlternativeService hostname can be used to signal a change of host.
|
||||
// By passing in an empty host, the origin's host will be used.
|
||||
net::AlternativeService alternative_service(net::NextProto::kProtoQUIC, "",
|
||||
origin.port());
|
||||
|
||||
url::SchemeHostPort canonical_origin(url::kHttpsScheme, canonical_host,
|
||||
origin.port());
|
||||
url_request_context_->http_server_properties()->SetQuicAlternativeService(
|
||||
canonical_origin, network_anonymization_key, alternative_service,
|
||||
base::Time::Max(), quic::ParsedQuicVersionVector());
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkContext::GetIpProxyStatus(GetIpProxyStatusCallback callback) {
|
||||
ip_protection::IpProxyStatus status =
|
||||
ip_protection::IpProxyStatus::kUnavailable;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+52
-6
@@ -1397,8 +1397,8 @@ enum WebFeature {
|
||||
kAnchorClickDispatchForNonConnectedNode = 1971,
|
||||
kHTMLParseErrorNestedForm = 1972,
|
||||
kFontShapingNotDefGlyphObserved = 1973,
|
||||
kPostMessageOutgoingWouldBeBlockedByConnectSrc = 1974,
|
||||
kPostMessageIncomingWouldBeBlockedByConnectSrc = 1975,
|
||||
kOBSOLETE_PostMessageOutgoingWouldBeBlockedByConnectSrc = 1974,
|
||||
kOBSOLETE_PostMessageIncomingWouldBeBlockedByConnectSrc = 1975,
|
||||
kCrossOriginPropertyAccess = 1977,
|
||||
kCrossOriginPropertyAccessFromOpener = 1978,
|
||||
kCredentialManagerCreate = 1979,
|
||||
@@ -2202,7 +2202,7 @@ enum WebFeature {
|
||||
kV8XRSession_End_Method = 2911,
|
||||
kV8XRWebGLLayer_Constructor = 2912,
|
||||
kFetchKeepalive = 2913,
|
||||
kCSSTransitionCancelledByRemovingStyle = 2914,
|
||||
kOBSOLETE_CSSTransitionCancelledByRemovingStyle = 2914,
|
||||
kV8RTCRtpSender_SetStreams_Method = 2915,
|
||||
kCookieNoSameSite = 2916,
|
||||
kCookieInsecureAndSameSiteNone = 2917,
|
||||
@@ -3615,7 +3615,7 @@ enum WebFeature {
|
||||
kOBSOLETE_DeferredShaping2ReshapedByInspector = 4342,
|
||||
kOBSOLETE_DeferredShaping2ReshapedByPrinting = 4343,
|
||||
kOBSOLETE_DeferredShaping2ReshapedByScrolling = 4344,
|
||||
kLCPCandidateImageFromOriginDirtyStyle = 4345,
|
||||
kOBSOLETE_LCPCandidateImageFromOriginDirtyStyle = 4345,
|
||||
kV8TurboFanOsrCompileStarted = 4346,
|
||||
kV8Document_HasRedemptionRecord_Method = 4347,
|
||||
kOBSOLETE_DeferredShaping2ReshapedByLastResort = 4348,
|
||||
@@ -4682,7 +4682,7 @@ enum WebFeature {
|
||||
kInterestFor = 5373,
|
||||
kTextAutoSizingDisabledOnFlexbox = 5374,
|
||||
kAriaLabeledByAlternativeSpelling = 5375,
|
||||
kCanvasTextNg = 5376,
|
||||
kOBSOLETE_CanvasTextNg = 5376,
|
||||
kDOMWindowOpenPopup = 5377,
|
||||
kFencedFrameDisableUntrustedNetwork = 5378,
|
||||
kFencedFrameNotifyEvent = 5379,
|
||||
@@ -4697,7 +4697,8 @@ enum WebFeature {
|
||||
kOBSOLETE_V8AILanguageModel_MeasureInputUsage_Method = 5388,
|
||||
kCredentialsGetImmediateMediationWithWebAuthnOnly = 5389,
|
||||
kCredentialsGetImmediateMediationWithWebAuthnAndPasswords = 5390,
|
||||
kOBSOLETENonNoneTouchActionWouldLoseEditableHandwritingRestoredByScroller = 5391,
|
||||
kOBSOLETENonNoneTouchActionWouldLoseEditableHandwritingRestoredByScroller =
|
||||
5391,
|
||||
kTranslator_Create = 5392,
|
||||
kTranslator_Availability = 5393,
|
||||
kTranslator_SourceLanguage = 5394,
|
||||
@@ -4985,6 +4986,51 @@ enum WebFeature {
|
||||
kResolvedColumnRuleWidthWithNoneOrHiddenStyle = 5670,
|
||||
kResolvedOutlineWidthWithNoneOrHiddenStyle = 5671,
|
||||
kContextMenuEventDefaultPrevented = 5672,
|
||||
kSmartCardEstablishContext = 5673,
|
||||
kSmartCardConnect = 5674,
|
||||
kNavigatorCPUPerformance = 5675,
|
||||
kSelectionRemoveRangeNotFoundWouldThrow = 5676,
|
||||
kNestedSvgCssSizingProperties = 5677,
|
||||
kCryptoAlgorithmChaCha20Poly1305 = 5678,
|
||||
kCryptoAlgorithmMlDsa44 = 5679,
|
||||
kCryptoAlgorithmMlDsa65 = 5680,
|
||||
kCryptoAlgorithmMlDsa87 = 5681,
|
||||
kCryptoAlgorithmMlKem768 = 5682,
|
||||
kCryptoAlgorithmMlKem1024 = 5683,
|
||||
kClipboardChangedBetweenReadAndGetType = 5684,
|
||||
kClipboardChangedBetweenGetTypes = 5685,
|
||||
kClipboardReadAndGetTypeTimeDiffIsBetween5SecAnd1Min = 5686,
|
||||
kClipboardReadAndGetTypeTimeDiffIsBetween1MinAnd10Min = 5687,
|
||||
kClipboardReadAndGetTypeTimeDiffIsMoreThan10Min = 5688,
|
||||
kClipboardGetTypeTimeDiffOfSameTypeIsBetween5SecAnd1Min = 5689,
|
||||
kClipboardGetTypeTimeDiffOfSameTypeIsBetween1MinAnd10Min = 5690,
|
||||
kClipboardGetTypeTimeDiffOfSameTypeIsMoreThan10Min = 5691,
|
||||
kClipboardGetTypeWindowNotInFocus = 5692,
|
||||
kReportBodyToJSON = 5693,
|
||||
kCSPViolationReportBodyToJSON = 5694,
|
||||
kDeprecationReportBodyToJSON = 5695,
|
||||
kInterventionReportBodyToJSON = 5696,
|
||||
kDocumentPolicyViolationReportBodyToJSON = 5697,
|
||||
kIntegrityViolationReportBodyToJSON = 5698,
|
||||
kPermissionsPolicyViolationReportBodyToJSON = 5699,
|
||||
kCoopAccessViolationReportBodyToJSON = 5700,
|
||||
kTestReportBodyToJSON = 5701,
|
||||
kSpeculationRulesPrerenderUntilScript = 5702,
|
||||
kClipboardChangeEventChangeIdAttribute = 5703,
|
||||
kWebRTCLocalNetworkAccessCheck = 5704,
|
||||
kWebRTCLocalNetworkAccessPublicToLocal = 5705,
|
||||
kWebRTCLocalNetworkAccessPublicToLoopback = 5706,
|
||||
kWebRTCLocalNetworkAccessLocalToLoopback = 5707,
|
||||
kIdentityDigitalCredentialsCreation = 5708,
|
||||
kIdentityDigitalCredentialsCreationSuccess = 5709,
|
||||
kFedCmErrorCodeAttribute = 5710,
|
||||
kFedCmErrorErrorAttribute = 5711,
|
||||
kAnimationAllTypes = 5712,
|
||||
kAnimationSvgTypes = 5713,
|
||||
kAnimationNonCompositedTypes = 5714,
|
||||
kAnimationCompositedTypes = 5715,
|
||||
kAnimationSvgNonCompositedTypes = 5716,
|
||||
kAnimationSvgCompositedTypes = 5717,
|
||||
|
||||
// Add new features immediately above this line. Don't change assigned
|
||||
// numbers of any item, and don't reuse removed slots. Also don't add extra
|
||||
|
||||
Vendored
+35
-22
@@ -4,33 +4,34 @@
|
||||
|
||||
module blink.mojom;
|
||||
|
||||
import "mojo/public/mojom/base/string16.mojom";
|
||||
import "skia/public/mojom/skcolor.mojom";
|
||||
import "third_party/blink/public/mojom/css/preferred_color_scheme.mojom";
|
||||
import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
import "third_party/blink/public/mojom/v8_cache_options.mojom";
|
||||
import "url/mojom/url.mojom";
|
||||
import "mojo/public/mojom/base/string16.mojom";
|
||||
import "skia/public/mojom/skcolor.mojom";
|
||||
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
kPointerFirstType = kPointerNone,
|
||||
kPointerCoarseType = 2, // 1 << 1
|
||||
kPointerFineType = 4 // 1 << 2
|
||||
kPointerNone = 1, // 1 << 0
|
||||
kPointerFirstType = kPointerNone,
|
||||
kPointerCoarseType = 2, // 1 << 1
|
||||
kPointerFineType = 4, // 1 << 2
|
||||
};
|
||||
|
||||
enum HoverType {
|
||||
kHoverNone = 1, // 1 << 0
|
||||
kHoverFirstType = kHoverNone,
|
||||
kHoverHoverType = 2 // 1 << 1
|
||||
kHoverNone = 1, // 1 << 0
|
||||
kHoverFirstType = kHoverNone,
|
||||
kHoverHoverType = 2, // 1 << 1
|
||||
};
|
||||
|
||||
// For media feature update, indicating the update ability of the output display,
|
||||
// For media feature update, indicating the update ability of the output
|
||||
// display,
|
||||
// once renering is done:
|
||||
// Slow - e-ink screens, underpowered devices.
|
||||
// Fast - regular computer screen.
|
||||
enum OutputDeviceUpdateAbilityType {
|
||||
kSlowType,
|
||||
kFastType
|
||||
kFastType,
|
||||
};
|
||||
|
||||
// There are multiple editing details that are different on Windows than
|
||||
@@ -52,7 +53,7 @@ enum EditingBehavior {
|
||||
kEditingWindowsBehavior,
|
||||
kEditingUnixBehavior,
|
||||
kEditingAndroidBehavior,
|
||||
kEditingChromeOSBehavior
|
||||
kEditingChromeOSBehavior,
|
||||
};
|
||||
|
||||
// ImageAnimationPolicy is used for controlling image animation
|
||||
@@ -62,10 +63,15 @@ enum EditingBehavior {
|
||||
enum ImageAnimationPolicy {
|
||||
kImageAnimationPolicyAllowed,
|
||||
kImageAnimationPolicyAnimateOnce,
|
||||
kImageAnimationPolicyNoAnimation
|
||||
kImageAnimationPolicyNoAnimation,
|
||||
};
|
||||
|
||||
enum ViewportStyle { kDefault, kMobile, kTelevision, kLast = kTelevision };
|
||||
enum ViewportStyle {
|
||||
kDefault,
|
||||
kMobile,
|
||||
kTelevision,
|
||||
kLast = kTelevision,
|
||||
};
|
||||
|
||||
// Defines the autoplay policy to be used. Should match the class in
|
||||
// WebSettings.h.
|
||||
@@ -321,7 +327,7 @@ struct WebPreferences {
|
||||
[EnableIf=is_android]
|
||||
bool report_screen_size_in_physical_pixels_quirk;
|
||||
|
||||
// Used by Android_WebView only to support legacy apps that inject script int32o
|
||||
// Used by Android_WebView only to support legacy apps that inject script into
|
||||
// a top-level initial empty document and expect it to persist on navigation.
|
||||
[EnableIf=is_android]
|
||||
bool reuse_global_for_unowned_main_frame;
|
||||
@@ -354,12 +360,12 @@ struct WebPreferences {
|
||||
[EnableIf=is_android]
|
||||
bool scroll_top_left_interop_enabled;
|
||||
|
||||
[EnableIf=is_android]
|
||||
// Don't accelerate small canvases to avoid crashes TODO(crbug.com/1004304)
|
||||
[EnableIf=is_android]
|
||||
bool disable_accelerated_small_canvases;
|
||||
|
||||
[EnableIf=is_android]
|
||||
// Long press on links selects text instead of triggering context menu.
|
||||
[EnableIf=is_android]
|
||||
bool long_press_link_select_text;
|
||||
|
||||
// Disable the Web Authentication (WebAuthn) API.
|
||||
@@ -498,20 +504,27 @@ struct WebPreferences {
|
||||
bool modal_context_menu = true;
|
||||
|
||||
// Whether the safe-area-insets should be changed dynamically based on
|
||||
// browser controls shown ratio. This value is used in web settings only
|
||||
// when feature DynamicSafeAreaInsets is enabled.
|
||||
// browser controls shown ratio on Android.
|
||||
[EnableIf=is_android]
|
||||
bool dynamic_safe_area_insets_enabled = false;
|
||||
|
||||
// Whether PaymentRequest is enabled. Controlled by WebView settings on
|
||||
// WebView and by `kWebPayments` feature flag everywhere.
|
||||
bool payment_request_enabled = false;
|
||||
|
||||
bool api_based_fingerprinting_interventions_enabled = false;
|
||||
|
||||
bool content_based_fingerprinting_protection_enabled = false;
|
||||
|
||||
bool ai_prompt_api_enabled = false;
|
||||
|
||||
[EnableIf=is_android]
|
||||
bool increment_local_surface_id_for_mainframe_same_doc_navigation = true;
|
||||
bool should_screenshot_on_mainframe_same_doc_navigation = true;
|
||||
|
||||
// On macOS, the popup UI for <select> elements is rendered with native
|
||||
// (external) popup controls, but these are not visible to
|
||||
// RenderWidgetHostView::CopyFromSurface().
|
||||
//
|
||||
// This property allows disabling the external popups to use the internal
|
||||
// Chrome-rendered popups instead.
|
||||
[EnableIf=is_mac]
|
||||
bool should_disable_external_popups = false;
|
||||
};
|
||||
|
||||
+2
-1
@@ -15,12 +15,13 @@ enum AnimationTriggerBehavior {
|
||||
"play-backwards",
|
||||
"play-pause",
|
||||
"replay",
|
||||
"none",
|
||||
};
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=AnimationTrigger
|
||||
] interface AnimationTrigger {
|
||||
[RaisesException] void addAnimation(Animation animation, DOMString action, AnimationTriggerBehavior behavior);
|
||||
[RaisesException] void addAnimation(Animation animation, AnimationTriggerBehavior activateBehavior, optional AnimationTriggerBehavior deactivateBehavior = "none");
|
||||
void removeAnimation(Animation animation);
|
||||
};
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=AnimationTrigger
|
||||
RuntimeEnabled=EventTrigger
|
||||
] interface EventTrigger : AnimationTrigger {
|
||||
[CallWith=ExecutionContext, RaisesException] constructor(optional EventTriggerOptions options = {});
|
||||
readonly attribute DOMString eventType;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=AnimationTrigger
|
||||
RuntimeEnabled=TimelineTrigger
|
||||
] interface TimelineTrigger : AnimationTrigger {
|
||||
[CallWith=ExecutionContext, MeasureAs=V8AnimationTrigger_Constructor, RaisesException] constructor(optional TimelineTriggerOptions options = {});
|
||||
readonly attribute AnimationTimeline? timeline;
|
||||
|
||||
-3
@@ -9,9 +9,6 @@
|
||||
Exposed=(Window,LayoutWorklet,PaintWorklet),
|
||||
RuntimeEnabled=CSSColorTypedOM
|
||||
] interface CSSColorValue {
|
||||
CSSRGB toRGB();
|
||||
CSSHSL toHSL();
|
||||
CSSHWB toHWB();
|
||||
|
||||
[RaisesException, NewObject, Exposed=Window, CallWith=ExecutionContext] static (CSSColorValue or CSSStyleValue) parse(USVString cssText);
|
||||
};
|
||||
|
||||
+40
-25
@@ -6,7 +6,10 @@
|
||||
|
||||
#include "third_party/blink/renderer/core/css/css_unparsed_declaration_value.h"
|
||||
#include "third_party/blink/renderer/core/css/media_feature_names.h"
|
||||
#include "third_party/blink/renderer/core/css/media_list.h"
|
||||
#include "third_party/blink/renderer/core/css/media_query_exp.h"
|
||||
#include "third_party/blink/renderer/core/css/parser/css_parser_context.h"
|
||||
#include "third_party/blink/renderer/core/css/parser/css_parser_token_stream.h"
|
||||
#include "third_party/blink/renderer/core/css/parser/css_tokenizer.h"
|
||||
#include "third_party/blink/renderer/core/css/parser/css_variable_parser.h"
|
||||
#include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h"
|
||||
@@ -35,13 +38,15 @@ bool MediaQueryParser::MediaQueryFeatureSet::IsAllowed(
|
||||
feature == media_feature_names::kStuckMediaFeature ||
|
||||
feature == media_feature_names::kSnappedMediaFeature ||
|
||||
feature == media_feature_names::kScrollableMediaFeature ||
|
||||
(feature == media_feature_names::kDirectionMediaFeature &&
|
||||
RuntimeEnabledFeatures::CSSScrollDirectionContainerQueriesEnabled()) ||
|
||||
CSSVariableParser::IsValidVariableName(feature)) {
|
||||
(feature == media_feature_names::kScrolledMediaFeature &&
|
||||
RuntimeEnabledFeatures::CSSScrolledContainerQueriesEnabled()) ||
|
||||
(CSSVariableParser::IsValidVariableName(feature) &&
|
||||
!RuntimeEnabledFeatures::CSSCustomMediaEnabled())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MediaQueryParser::MediaQueryFeatureSet::IsAllowedWithoutValue(
|
||||
const AtomicString& feature,
|
||||
const ExecutionContext* execution_context) const {
|
||||
@@ -107,6 +112,12 @@ bool MediaQueryParser::MediaQueryFeatureSet::IsAllowedWithoutValue(
|
||||
feature == media_feature_names::kResizableMediaFeature);
|
||||
}
|
||||
|
||||
bool MediaQueryParser::MediaQueryFeatureSet::IsAllowedWithValue(
|
||||
const AtomicString& feature) const {
|
||||
return (!RuntimeEnabledFeatures::CSSCustomMediaEnabled() ||
|
||||
!CSSVariableParser::IsValidVariableName(feature));
|
||||
}
|
||||
|
||||
MediaQuerySet* MediaQueryParser::ParseMediaQuerySet(
|
||||
StringView query_string,
|
||||
ExecutionContext* execution_context) {
|
||||
@@ -117,35 +128,28 @@ MediaQuerySet* MediaQueryParser::ParseMediaQuerySet(
|
||||
MediaQuerySet* MediaQueryParser::ParseMediaQuerySet(
|
||||
CSSParserTokenStream& stream,
|
||||
ExecutionContext* execution_context) {
|
||||
return MediaQueryParser(kMediaQuerySetParser, kHTMLStandardMode,
|
||||
execution_context)
|
||||
.ParseImpl(stream);
|
||||
}
|
||||
|
||||
MediaQuerySet* MediaQueryParser::ParseMediaQuerySetInMode(
|
||||
CSSParserTokenStream& stream,
|
||||
CSSParserMode mode,
|
||||
ExecutionContext* execution_context) {
|
||||
return MediaQueryParser(kMediaQuerySetParser, mode, execution_context)
|
||||
return MediaQueryParser(kMediaQuerySetParser, execution_context)
|
||||
.ParseImpl(stream);
|
||||
}
|
||||
|
||||
MediaQuerySet* MediaQueryParser::ParseMediaCondition(
|
||||
CSSParserTokenStream& stream,
|
||||
ExecutionContext* execution_context) {
|
||||
return MediaQueryParser(kMediaConditionParser, kHTMLStandardMode,
|
||||
execution_context)
|
||||
return MediaQueryParser(kMediaConditionParser, execution_context)
|
||||
.ParseImpl(stream);
|
||||
}
|
||||
|
||||
MediaQuerySet* MediaQueryParser::ParseCustomMediaDefinition(
|
||||
CSSParserTokenStream& stream,
|
||||
ExecutionContext* execution_context) {
|
||||
CSSParserTokenStream::Boundary boundary(stream, kSemicolonToken);
|
||||
return ParseMediaQuerySet(stream, execution_context);
|
||||
}
|
||||
|
||||
MediaQueryParser::MediaQueryParser(ParserType parser_type,
|
||||
CSSParserMode mode,
|
||||
ExecutionContext* execution_context,
|
||||
SyntaxLevel syntax_level)
|
||||
ExecutionContext* execution_context)
|
||||
: parser_type_(parser_type),
|
||||
mode_(mode),
|
||||
execution_context_(execution_context),
|
||||
syntax_level_(syntax_level),
|
||||
fake_context_(*MakeGarbageCollected<CSSParserContext>(
|
||||
kHTMLStandardMode,
|
||||
SecureContextMode::kInsecureContext,
|
||||
@@ -308,14 +312,15 @@ AtomicString MediaQueryParser::ConsumeAllowedName(
|
||||
return name;
|
||||
}
|
||||
|
||||
AtomicString MediaQueryParser::ConsumeUnprefixedName(
|
||||
AtomicString MediaQueryParser::ConsumeRangeContextFeatureName(
|
||||
CSSParserTokenStream& stream,
|
||||
const FeatureSet& feature_set) {
|
||||
AtomicString name = ConsumeAllowedName(stream, feature_set);
|
||||
if (name.IsNull()) {
|
||||
return name;
|
||||
}
|
||||
if (name.StartsWith("min-") || name.StartsWith("max-")) {
|
||||
if (name.StartsWith("min-") || name.StartsWith("max-") ||
|
||||
name.StartsWith("--")) {
|
||||
return g_null_atom;
|
||||
}
|
||||
return name;
|
||||
@@ -393,12 +398,20 @@ const MediaQueryExpNode* MediaQueryParser::ConsumeFeature(
|
||||
// <mf-boolean> = <mf-name>
|
||||
if (!feature_name.IsNull() && stream.AtEnd() &&
|
||||
feature_set.IsAllowedWithoutValue(feature_name, execution_context_)) {
|
||||
if (RuntimeEnabledFeatures::CSSCustomMediaEnabled() &&
|
||||
CSSVariableParser::IsValidVariableName(feature_name) &&
|
||||
!feature_set.IsAllowedWithValue(feature_name)) {
|
||||
// custom media query
|
||||
return MakeGarbageCollected<MediaQueryFeatureExpNode>(
|
||||
MediaQueryExp::Create(feature_name));
|
||||
}
|
||||
return MakeGarbageCollected<MediaQueryFeatureExpNode>(
|
||||
MediaQueryExp::Create(feature_name, MediaQueryExpBounds()));
|
||||
}
|
||||
|
||||
// <mf-plain> = <mf-name> : <mf-value>
|
||||
if (!feature_name.IsNull() && stream.Peek().GetType() == kColonToken) {
|
||||
if (!feature_name.IsNull() && stream.Peek().GetType() == kColonToken &&
|
||||
feature_set.IsAllowedWithValue(feature_name)) {
|
||||
stream.ConsumeIncludingWhitespace();
|
||||
|
||||
// NOTE: We do not check for stream.AtEnd() here, as an empty mf-value is
|
||||
@@ -433,7 +446,8 @@ const MediaQueryExpNode* MediaQueryParser::ConsumeFeature(
|
||||
|
||||
{
|
||||
// Try: <mf-name> <mf-comparison> <mf-value> (e.g., “width <= 10px”)
|
||||
AtomicString feature_name = ConsumeUnprefixedName(stream, feature_set);
|
||||
AtomicString feature_name =
|
||||
ConsumeRangeContextFeatureName(stream, feature_set);
|
||||
if (!feature_name.IsNull() && !stream.AtEnd()) {
|
||||
MediaQueryOperator op = ConsumeComparison(stream);
|
||||
if (op != MediaQueryOperator::kNone) {
|
||||
@@ -480,7 +494,8 @@ const MediaQueryExpNode* MediaQueryParser::ConsumeFeature(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AtomicString feature_name = ConsumeUnprefixedName(stream, feature_set);
|
||||
AtomicString feature_name =
|
||||
ConsumeRangeContextFeatureName(stream, feature_set);
|
||||
if (feature_name.IsNull()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@
|
||||
[CallWith=ScriptState, Measure] constructor();
|
||||
[SameObject] readonly attribute AbortSignal signal;
|
||||
|
||||
[CallWith=ScriptState] void abort(optional any reason);
|
||||
[CallWith=ScriptState] undefined abort(optional any reason);
|
||||
};
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
[
|
||||
CallWith=Isolate,
|
||||
MeasureAs=AbortSignalThrowIfAborted
|
||||
] void throwIfAborted();
|
||||
] undefined throwIfAborted();
|
||||
|
||||
attribute EventHandler onabort;
|
||||
};
|
||||
|
||||
+4
-4
@@ -24,10 +24,10 @@
|
||||
attribute [LegacyNullToEmptyString] DOMString data;
|
||||
readonly attribute unsigned long length;
|
||||
[RaisesException] DOMString substringData(unsigned long offset, unsigned long count);
|
||||
void appendData(DOMString data);
|
||||
[RaisesException] void insertData(unsigned long offset, DOMString data);
|
||||
[RaisesException] void deleteData(unsigned long offset, unsigned long count);
|
||||
[RaisesException] void replaceData(unsigned long offset, unsigned long count, DOMString data);
|
||||
undefined appendData(DOMString data);
|
||||
[RaisesException] undefined insertData(unsigned long offset, DOMString data);
|
||||
[RaisesException] undefined deleteData(unsigned long offset, unsigned long count);
|
||||
[RaisesException] undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
|
||||
};
|
||||
|
||||
CharacterData includes ChildNode;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
// https://dom.spec.whatwg.org/#interface-childnode
|
||||
interface mixin ChildNode {
|
||||
[Unscopable, RaisesException, CEReactions] void before((Node or DOMString or TrustedScript) ... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] void after((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] void replaceWith((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] void remove();
|
||||
[Unscopable, RaisesException, CEReactions] undefined before((Node or DOMString or TrustedScript) ... nodes);
|
||||
[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();
|
||||
};
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
RuntimeEnabled=CSSPseudoElementInterface,
|
||||
Exposed=Window
|
||||
]
|
||||
interface CSSPseudoElement : EventTarget {
|
||||
interface CSSPseudoElement {
|
||||
readonly attribute CSSOMString type;
|
||||
readonly attribute Element element;
|
||||
readonly attribute (Element or CSSPseudoElement) parent;
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@
|
||||
readonly attribute unsigned long length;
|
||||
[Affects=Nothing] getter DOMString? item(unsigned long index);
|
||||
[Affects=Nothing] boolean contains(DOMString token);
|
||||
[RaisesException, CEReactions] void add(DOMString... tokens);
|
||||
[RaisesException, CEReactions] void remove(DOMString... tokens);
|
||||
[RaisesException, CEReactions] undefined add(DOMString... tokens);
|
||||
[RaisesException, CEReactions] undefined remove(DOMString... tokens);
|
||||
[RaisesException, CEReactions] boolean toggle(DOMString token, optional boolean force);
|
||||
[RaisesException, CEReactions] boolean replace(DOMString token, DOMString newToken);
|
||||
[RaisesException] boolean supports(DOMString token);
|
||||
|
||||
@@ -57,12 +57,12 @@ dictionary SetHTMLUnsafeOptions {
|
||||
[Affects=Nothing, ImplementedAs=getAttributeNamesForBindings] sequence<DOMString> getAttributeNames();
|
||||
[Affects=Nothing] DOMString? getAttribute(DOMString name);
|
||||
[Affects=Nothing] DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
|
||||
[RaisesException, CEReactions] void setAttribute(DOMString name, DOMString value);
|
||||
[RaisesException, CEReactions] void setAttribute(DOMString name, TrustedType value);
|
||||
[RaisesException, CEReactions] void setAttributeNS(DOMString? namespaceURI, DOMString name, DOMString value);
|
||||
[RaisesException, CEReactions] void setAttributeNS(DOMString? namespaceURI, DOMString name, TrustedType value);
|
||||
[CEReactions] void removeAttribute(DOMString name);
|
||||
[CEReactions] void removeAttributeNS(DOMString? namespaceURI, DOMString localName);
|
||||
[RaisesException, CEReactions] undefined setAttribute(DOMString name, DOMString value);
|
||||
[RaisesException, CEReactions] undefined setAttribute(DOMString name, TrustedType value);
|
||||
[RaisesException, CEReactions] undefined setAttributeNS(DOMString? namespaceURI, DOMString name, DOMString value);
|
||||
[RaisesException, CEReactions] undefined setAttributeNS(DOMString? namespaceURI, DOMString name, TrustedType value);
|
||||
[CEReactions] undefined removeAttribute(DOMString name);
|
||||
[CEReactions] undefined removeAttributeNS(DOMString? namespaceURI, DOMString localName);
|
||||
[RaisesException, CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
|
||||
[Affects=Nothing] boolean hasAttribute(DOMString name);
|
||||
[Affects=Nothing] boolean hasAttributeNS(DOMString? namespaceURI, DOMString localName);
|
||||
@@ -87,7 +87,7 @@ dictionary SetHTMLUnsafeOptions {
|
||||
[Affects=Nothing] HTMLCollection getElementsByClassName(DOMString classNames);
|
||||
|
||||
[RaisesException, CEReactions] Element? insertAdjacentElement(DOMString where, Element element);
|
||||
[RaisesException] void insertAdjacentText(DOMString where, DOMString data);
|
||||
[RaisesException] undefined insertAdjacentText(DOMString where, DOMString data);
|
||||
|
||||
// CSS Shadow Parts
|
||||
// https://drafts.csswg.org/css-shadow-parts/#idl
|
||||
|
||||
+1
-1
@@ -31,5 +31,5 @@
|
||||
[CallWith=ScriptState] constructor(DOMString type, optional CustomEventInit eventInitDict = {});
|
||||
[CallWith=ScriptState] readonly attribute any detail;
|
||||
|
||||
[Measure, CallWith=ScriptState] void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null);
|
||||
[Measure, CallWith=ScriptState] undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null);
|
||||
};
|
||||
|
||||
+6
-4
@@ -27,6 +27,8 @@
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute EventTarget? target;
|
||||
readonly attribute EventTarget? currentTarget;
|
||||
[RuntimeEnabled=EventPseudoTargetProperty, Exposed=Window]
|
||||
readonly attribute CSSPseudoElement? pseudoTarget;
|
||||
[MeasureAs=EventComposedPath, CallWith=ScriptState] sequence<EventTarget> composedPath();
|
||||
|
||||
const unsigned short NONE = 0;
|
||||
@@ -35,12 +37,12 @@
|
||||
const unsigned short BUBBLING_PHASE = 3;
|
||||
readonly attribute unsigned short eventPhase;
|
||||
|
||||
[Measure] void stopPropagation();
|
||||
[Measure] void stopImmediatePropagation();
|
||||
[Measure] undefined stopPropagation();
|
||||
[Measure] undefined stopImmediatePropagation();
|
||||
|
||||
readonly attribute boolean bubbles;
|
||||
readonly attribute boolean cancelable;
|
||||
void preventDefault();
|
||||
undefined preventDefault();
|
||||
readonly attribute boolean defaultPrevented;
|
||||
|
||||
[MeasureAs=EventComposed] readonly attribute boolean composed;
|
||||
@@ -49,7 +51,7 @@
|
||||
|
||||
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp timeStamp;
|
||||
|
||||
[Measure] void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false);
|
||||
[Measure] undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false);
|
||||
|
||||
[MeasureAs=EventSrcElement] readonly attribute EventTarget srcElement;
|
||||
[MeasureAs=EventReturnValue, CallWith=ScriptState, ImplementedAs=legacyReturnValue] attribute boolean returnValue;
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@
|
||||
// https://dom.spec.whatwg.org/#callbackdef-eventlistener
|
||||
|
||||
callback interface EventListener {
|
||||
void handleEvent(Event event);
|
||||
undefined handleEvent(Event event);
|
||||
};
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ dictionary ObservableEventListenerOptions {
|
||||
Exposed=(Window,Worker,AudioWorklet,ShadowRealm) // TODO(crbug.com/41480387): This should be Exposed=*
|
||||
] interface EventTarget {
|
||||
[CallWith=ScriptState] constructor();
|
||||
void addEventListener(DOMString type, EventListener? listener, optional (AddEventListenerOptions or boolean) options);
|
||||
void removeEventListener(DOMString type, EventListener? listener, optional (EventListenerOptions or boolean) options);
|
||||
undefined addEventListener(DOMString type, EventListener? listener, optional (AddEventListenerOptions or boolean) options);
|
||||
undefined removeEventListener(DOMString type, EventListener? listener, optional (EventListenerOptions or boolean) options);
|
||||
[ImplementedAs=dispatchEventForBindings, RaisesException, RuntimeCallStatsCounter=EventTargetDispatchEvent] boolean dispatchEvent(Event event);
|
||||
[MeasureAs=EventTargetOnObservable] Observable when(DOMString type, optional ObservableEventListenerOptions options = {});
|
||||
};
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@
|
||||
|
||||
// https://dom.spec.whatwg.org/#interface-mutationobserver
|
||||
|
||||
callback MutationCallback = void (sequence<MutationRecord> mutations,
|
||||
callback MutationCallback = undefined (sequence<MutationRecord> mutations,
|
||||
MutationObserver observer);
|
||||
|
||||
[
|
||||
@@ -40,7 +40,7 @@ callback MutationCallback = void (sequence<MutationRecord> mutations,
|
||||
LegacyWindowAlias_MeasureAs=PrefixedMutationObserverConstructor
|
||||
] interface MutationObserver {
|
||||
[CallWith=ScriptState] constructor(MutationCallback callback);
|
||||
[RaisesException] void observe(Node target, optional MutationObserverInit options = {});
|
||||
void disconnect();
|
||||
[RaisesException] undefined observe(Node target, optional MutationObserverInit options = {});
|
||||
undefined disconnect();
|
||||
sequence<MutationRecord> takeRecords();
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
[CEReactions, RaisesException=Setter] attribute DOMString? nodeValue;
|
||||
|
||||
[CEReactions, ImplementedAs=textContentForBinding, RaisesException=Setter] attribute (DOMString or TrustedScript)? textContent;
|
||||
[CEReactions] void normalize();
|
||||
[CEReactions] undefined normalize();
|
||||
|
||||
[NewObject, CEReactions, RaisesException] Node cloneNode(optional boolean deep = false);
|
||||
boolean isEqualNode(Node? otherNode);
|
||||
|
||||
+1
-1
@@ -32,5 +32,5 @@
|
||||
[NodeWrapInOwnContext, RaisesException] Node? nextNode();
|
||||
[NodeWrapInOwnContext, RaisesException] Node? previousNode();
|
||||
|
||||
[MeasureAs=NodeIteratorDetach] void detach();
|
||||
[MeasureAs=NodeIteratorDetach] undefined detach();
|
||||
};
|
||||
|
||||
+4
-4
@@ -35,10 +35,10 @@ interface mixin ParentNode {
|
||||
[PerWorldBindings] readonly attribute Element? lastElementChild;
|
||||
readonly attribute unsigned long childElementCount;
|
||||
|
||||
[Unscopable, RaisesException, CEReactions] void prepend((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] void append((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] void replaceChildren((Node or DOMString or TrustedScript)... nodes);
|
||||
[CEReactions, PerWorldBindings, RaisesException, MeasureAs="WebDXFeature::kMoveBefore"] void moveBefore(Node node, Node? child);
|
||||
[Unscopable, RaisesException, CEReactions] undefined prepend((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] undefined append((Node or DOMString or TrustedScript)... nodes);
|
||||
[Unscopable, RaisesException, CEReactions] undefined replaceChildren((Node or DOMString or TrustedScript)... nodes);
|
||||
[CEReactions, PerWorldBindings, RaisesException, MeasureAs="WebDXFeature::kMoveBefore"] undefined moveBefore(Node node, Node? child);
|
||||
|
||||
[Affects=Nothing, RaisesException] Element? querySelector(DOMString selectors);
|
||||
[Affects=Nothing, NewObject, RaisesException] NodeList querySelectorAll(DOMString selectors);
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
[CallWith=Document] constructor();
|
||||
readonly attribute Node commonAncestorContainer;
|
||||
|
||||
[RaisesException] void setStart(Node node, unsigned long offset);
|
||||
[RaisesException] void setEnd(Node node, unsigned long offset);
|
||||
[RaisesException] void setStartBefore(Node node);
|
||||
[RaisesException] void setStartAfter(Node node);
|
||||
[RaisesException] void setEndBefore(Node node);
|
||||
[RaisesException] void setEndAfter(Node node);
|
||||
void collapse(optional boolean toStart = false);
|
||||
[RaisesException] void selectNode(Node node);
|
||||
[RaisesException] void selectNodeContents(Node node);
|
||||
[RaisesException] undefined setStart(Node node, unsigned long offset);
|
||||
[RaisesException] undefined setEnd(Node node, unsigned long offset);
|
||||
[RaisesException] undefined setStartBefore(Node node);
|
||||
[RaisesException] undefined setStartAfter(Node node);
|
||||
[RaisesException] undefined setEndBefore(Node node);
|
||||
[RaisesException] undefined setEndAfter(Node node);
|
||||
undefined collapse(optional boolean toStart = false);
|
||||
[RaisesException] undefined selectNode(Node node);
|
||||
[RaisesException] undefined selectNodeContents(Node node);
|
||||
|
||||
const unsigned short START_TO_START = 0;
|
||||
const unsigned short START_TO_END = 1;
|
||||
@@ -41,14 +41,14 @@
|
||||
const unsigned short END_TO_START = 3;
|
||||
[RaisesException] short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
|
||||
[RaisesException, CEReactions] void deleteContents();
|
||||
[RaisesException, CEReactions] undefined deleteContents();
|
||||
[NewObject, RaisesException, CEReactions] DocumentFragment extractContents();
|
||||
[NewObject, RaisesException, CEReactions] DocumentFragment cloneContents();
|
||||
[RaisesException, CEReactions] void insertNode(Node node);
|
||||
[RaisesException, CEReactions] void surroundContents(Node newParent);
|
||||
[RaisesException, CEReactions] undefined insertNode(Node node);
|
||||
[RaisesException, CEReactions] undefined surroundContents(Node newParent);
|
||||
|
||||
[NewObject] Range cloneRange();
|
||||
[MeasureAs=RangeDetach] void detach();
|
||||
[MeasureAs=RangeDetach] undefined detach();
|
||||
|
||||
[RaisesException] boolean isPointInRange(Node node, unsigned long offset);
|
||||
[RaisesException] short comparePoint(Node node, unsigned long offset);
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
[MeasureAs=SelectionType] readonly attribute DOMString type;
|
||||
[MeasureAs=SelectionGetRangeAt, RaisesException] Range getRangeAt(unsigned long index);
|
||||
[MeasureAs=SelectionAddRange] void addRange(Range range);
|
||||
void removeRange(Range range);
|
||||
[RaisesException] void removeRange(Range range);
|
||||
[MeasureAs=SelectionRemoveAllRanges] void removeAllRanges();
|
||||
[MeasureAs=SelectionEmpty] void empty();
|
||||
[MeasureAs=SelectionCollapse, RaisesException] void collapse(Node? node, optional unsigned long offset = 0);
|
||||
|
||||
+1
@@ -352,6 +352,7 @@
|
||||
"validationstatuschange",
|
||||
"versionchange",
|
||||
"visibilitychange",
|
||||
"visibilitymaskchange",
|
||||
"voiceschanged",
|
||||
"volumechange",
|
||||
"vrdisplayactivate",
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@
|
||||
constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
|
||||
readonly attribute DOMString oldState;
|
||||
readonly attribute DOMString newState;
|
||||
[RuntimeEnabled=ToggleEventSource] readonly attribute Element? source;
|
||||
readonly attribute Element? source;
|
||||
};
|
||||
|
||||
+1
@@ -5,4 +5,5 @@
|
||||
dictionary ToggleEventInit : EventInit {
|
||||
DOMString oldState = "";
|
||||
DOMString newState = "";
|
||||
Element? source = null;
|
||||
};
|
||||
|
||||
+28
-17
@@ -83,6 +83,7 @@
|
||||
#include "third_party/blink/public/web/web_meaningful_layout.h"
|
||||
#include "third_party/blink/public/web/web_navigation_type.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
#include "third_party/blink/public/web/web_performance_metrics_for_reporting.h"
|
||||
#include "third_party/blink/public/web/web_plugin.h"
|
||||
#include "third_party/blink/public/web/web_range.h"
|
||||
#include "third_party/blink/public/web/web_render_theme.h"
|
||||
@@ -721,11 +722,10 @@ bool WebViewImpl::StartPageScaleAnimation(const gfx::Point& target_position,
|
||||
|
||||
LocalFrameView* view = MainFrameImpl()->GetFrameView();
|
||||
if (view && view->GetScrollableArea()) {
|
||||
// TODO(crbug.com/414556050): Pass the correct `ScrollSourceType`.
|
||||
view->GetScrollableArea()->SetScrollOffset(
|
||||
ScrollOffset(gfx::Vector2dF(clamped_point.OffsetFromOrigin())),
|
||||
mojom::blink::ScrollType::kProgrammatic,
|
||||
cc::ScrollSourceType::kNone);
|
||||
cc::ScrollSourceType::kAbsoluteScroll);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1252,8 +1252,8 @@ void WebViewImpl::DidFirstVisuallyNonEmptyPaint() {
|
||||
local_main_frame_host_remote_->DidFirstVisuallyNonEmptyPaint();
|
||||
}
|
||||
|
||||
void WebViewImpl::OnFirstContentfulPaint() {
|
||||
local_main_frame_host_remote_->OnFirstContentfulPaint();
|
||||
void WebViewImpl::OnFirstContentfulPaint(const base::TimeDelta& duration) {
|
||||
local_main_frame_host_remote_->OnFirstContentfulPaint(duration);
|
||||
}
|
||||
|
||||
void WebViewImpl::UpdateICBAndResizeViewport(
|
||||
@@ -1838,6 +1838,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
!prefs.disable_accelerated_small_canvases);
|
||||
RuntimeEnabledFeatures::SetLongPressLinkSelectTextEnabled(
|
||||
prefs.long_press_link_select_text);
|
||||
settings->SetDynamicSafeAreaInsetsEnabled(
|
||||
prefs.dynamic_safe_area_insets_enabled);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
|
||||
@@ -1895,10 +1897,6 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
settings->SetModalContextMenu(prefs.modal_context_menu);
|
||||
settings->SetRequireTransientActivationAndAuthorizationForSubAppsAPIs(
|
||||
prefs.subapps_apis_require_user_gesture_and_authorization);
|
||||
if (RuntimeEnabledFeatures::DynamicSafeAreaInsetsEnabled()) {
|
||||
settings->SetDynamicSafeAreaInsetsEnabled(
|
||||
prefs.dynamic_safe_area_insets_enabled);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
@@ -1934,15 +1932,21 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
RuntimeEnabledFeatures::SetPaymentRequestEnabled(
|
||||
prefs.payment_request_enabled);
|
||||
|
||||
if (prefs.api_based_fingerprinting_interventions_enabled) {
|
||||
RuntimeEnabledFeatures::SetReduceDeviceMemoryEnabled(true);
|
||||
RuntimeEnabledFeatures::SetReduceHardwareConcurrencyEnabled(true);
|
||||
RuntimeEnabledFeatures::SetReduceScreenSizeEnabled(true);
|
||||
}
|
||||
|
||||
if (prefs.ai_prompt_api_enabled) {
|
||||
RuntimeEnabledFeatures::SetAIPromptAPIEnabled(true);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
const bool use_external_popups = !prefs.should_disable_external_popups;
|
||||
if (web_view_impl->GetChromeClient().UseExternalPopupMenus() !=
|
||||
use_external_popups) {
|
||||
// Switching between internal and external popups -- first, cancel any
|
||||
// popups that are open.
|
||||
web_view_impl->CancelPagePopup();
|
||||
}
|
||||
web_view_impl->GetChromeClient().SetUseExternalPopupMenus(
|
||||
use_external_popups);
|
||||
#endif // BUILDFLAG(IS_MAC) && BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
|
||||
}
|
||||
|
||||
void WebViewImpl::ThemeChanged() {
|
||||
@@ -2462,6 +2466,8 @@ void WebViewImpl::SetPageLifecycleStateFromNewPageCommit(
|
||||
mojom::blink::PagehideDispatch pagehide_dispatch) {
|
||||
TRACE_EVENT0("navigation",
|
||||
"WebViewImpl::SetPageLifecycleStateFromNewPageCommit");
|
||||
base::ScopedUmaHistogramTimer timer(
|
||||
"Navigation.PageLifecycleStateFromNewPageCommit.Duration");
|
||||
mojom::blink::PageLifecycleStatePtr state =
|
||||
GetPage()->GetPageLifecycleState().Clone();
|
||||
state->visibility = visibility;
|
||||
@@ -2626,10 +2632,16 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
GetPage()->SetPageLifecycleState(std::move(new_state));
|
||||
|
||||
// Notify all local frames that we've updated the page lifecycle state.
|
||||
BFCacheStateChange bfcache_change = BFCacheStateChange::kNoChange;
|
||||
if (restoring_from_bfcache) {
|
||||
bfcache_change = BFCacheStateChange::kRestoredFromBFCache;
|
||||
} else if (storing_in_bfcache) {
|
||||
bfcache_change = BFCacheStateChange::kStoredToBFCache;
|
||||
}
|
||||
for (WebFrame* frame = MainFrame(); frame; frame = frame->TraverseNext()) {
|
||||
if (frame->IsWebLocalFrame()) {
|
||||
frame->ToWebLocalFrame()->Client()->DidSetPageLifecycleState(
|
||||
restoring_from_bfcache);
|
||||
bfcache_change);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3252,10 +3264,9 @@ void WebViewImpl::ResetScrollAndScaleState() {
|
||||
ScrollableArea* scrollable_area = frame_view->LayoutViewport();
|
||||
|
||||
if (!scrollable_area->GetScrollOffset().IsZero()) {
|
||||
// TODO(crbug.com/414556050): Pass the correct `ScrollSourceType`.
|
||||
scrollable_area->SetScrollOffset(ScrollOffset(),
|
||||
mojom::blink::ScrollType::kProgrammatic,
|
||||
cc::ScrollSourceType::kNone);
|
||||
cc::ScrollSourceType::kAbsoluteScroll);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@
|
||||
|
||||
[
|
||||
ImplementedAs=GlobalFetch
|
||||
] partial interface Window {
|
||||
] partial interface mixin WindowOrWorkerGlobalScope {
|
||||
[CallWith=ScriptState, NewObject, RaisesException] Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
|
||||
};
|
||||
-11
@@ -1,11 +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.
|
||||
|
||||
// https://fetch.spec.whatwg.org/#fetch-method
|
||||
|
||||
[
|
||||
ImplementedAs=GlobalFetch
|
||||
] partial interface WorkerGlobalScope {
|
||||
[CallWith=ScriptState, NewObject, RaisesException] Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
|
||||
};
|
||||
Vendored
+1
-1
@@ -15,5 +15,5 @@
|
||||
readonly attribute DOMString? openeeURL;
|
||||
readonly attribute DOMString? openerURL;
|
||||
readonly attribute DOMString? otherDocumentURL;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -18,5 +18,5 @@
|
||||
readonly attribute unsigned short statusCode;
|
||||
readonly attribute unsigned long? lineNumber;
|
||||
readonly attribute unsigned long? columnNumber;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
+1
-1
@@ -13,5 +13,5 @@
|
||||
readonly attribute DOMString? sourceFile;
|
||||
readonly attribute unsigned long? lineNumber;
|
||||
readonly attribute unsigned long? columnNumber;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
+1
-1
@@ -13,5 +13,5 @@
|
||||
readonly attribute unsigned long? columnNumber;
|
||||
readonly attribute DOMString disposition;
|
||||
readonly attribute DOMString? message;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -12,5 +12,5 @@
|
||||
readonly attribute USVString? blockedURL;
|
||||
readonly attribute USVString? destination;
|
||||
readonly attribute boolean reportOnly;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
+1
-1
@@ -12,5 +12,5 @@
|
||||
readonly attribute DOMString? sourceFile;
|
||||
readonly attribute unsigned long? lineNumber;
|
||||
readonly attribute unsigned long? columnNumber;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
Vendored
Executable
+14
@@ -0,0 +1,14 @@
|
||||
// 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,
|
||||
ImplementedAs=NavigatorCPUPerformance,
|
||||
RuntimeEnabled=CpuPerformance,
|
||||
SameObject,
|
||||
SecureContext
|
||||
] partial interface Navigator {
|
||||
[HighEntropy=Direct, MeasureAs=NavigatorCPUPerformance]
|
||||
readonly attribute unsigned short cpuPerformance;
|
||||
};
|
||||
+1
-1
@@ -15,5 +15,5 @@
|
||||
readonly attribute DOMString? message;
|
||||
[RuntimeEnabled=PotentialPermissionsPolicyReporting] readonly attribute DOMString? allowAttribute;
|
||||
[RuntimeEnabled=PotentialPermissionsPolicyReporting] readonly attribute DOMString? srcAttribute;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@
|
||||
[
|
||||
Exposed=(Window, Worker)
|
||||
] interface ReportBody {
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@
|
||||
LegacyNoInterfaceObject
|
||||
] interface TestReportBody : ReportBody {
|
||||
readonly attribute DOMString message;
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
[CallWith=ScriptState] object toJSON(optional DOMString key);
|
||||
};
|
||||
|
||||
@@ -206,9 +206,6 @@
|
||||
// Event handler attributes
|
||||
attribute EventHandler onsearch;
|
||||
|
||||
// TrustedTypes API: http://github.com/w3c/trusted-types
|
||||
[CallWith=ScriptState] readonly attribute TrustedTypePolicyFactory trustedTypes;
|
||||
|
||||
// Anonymous iframe:
|
||||
// https://github.com/WICG/anonymous-iframe
|
||||
[RuntimeEnabled=AnonymousIframe] readonly attribute boolean credentialless;
|
||||
@@ -220,6 +217,9 @@
|
||||
// See
|
||||
// https://github.com/WICG/crash-reporting/blob/gh-pages/crashStorage-explainer.md.
|
||||
[RuntimeEnabled=CrashReportingStorageAPI] readonly attribute CrashReportStorage? crashReport;
|
||||
|
||||
// Responsively-sized iframes
|
||||
[RuntimeEnabled=ResponsiveIframes, RaisesException] void requestResize();
|
||||
};
|
||||
|
||||
Window includes GlobalEventHandlers;
|
||||
|
||||
+4
-2
@@ -30,7 +30,8 @@
|
||||
] interface Geolocation {
|
||||
[
|
||||
LogActivity,
|
||||
MeasureAs=GeolocationGetCurrentPosition
|
||||
MeasureAs=GeolocationGetCurrentPosition,
|
||||
ImplementedAs=getCurrentPositionForBindings
|
||||
] void getCurrentPosition(
|
||||
PositionCallback successCallback,
|
||||
optional PositionErrorCallback? errorCallback = null,
|
||||
@@ -38,7 +39,8 @@
|
||||
|
||||
[
|
||||
LogActivity,
|
||||
MeasureAs=GeolocationWatchPosition
|
||||
MeasureAs=GeolocationWatchPosition,
|
||||
ImplementedAs=watchPositionForBindings
|
||||
] long watchPosition(
|
||||
PositionCallback successCallback,
|
||||
optional PositionErrorCallback? errorCallback = null,
|
||||
|
||||
Vendored
+2
-1
@@ -8,7 +8,8 @@ enum PredefinedColorSpace {
|
||||
"display-p3",
|
||||
"rec2100-hlg", // Enabled only in CanvasHDR
|
||||
"rec2100-pq", // Enabled only in CanvasHDR
|
||||
"srgb-linear", // Enabled only in CanvasHDR
|
||||
"srgb-linear", // Enabled in ColorSpacePredefinedLinearSpaces
|
||||
"display-p3-linear", // Enabled in ColorSpacePredefinedLinearSpaces
|
||||
"rec2100-linear", // Enabled in ColorSpaceRec2100Linear
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ interface HTMLGeolocationElement : HTMLPermissionElement {
|
||||
readonly attribute GeolocationPosition position;
|
||||
readonly attribute GeolocationPositionError error;
|
||||
|
||||
[CEReactions] attribute boolean precise;
|
||||
[CEReactions, Reflect] attribute DOMString accuracymode;
|
||||
[CEReactions] attribute boolean autolocate;
|
||||
[CEReactions] attribute boolean watch;
|
||||
};
|
||||
|
||||
+9
@@ -52,6 +52,15 @@
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/scripting.html#dom-script-blocking
|
||||
[SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
|
||||
|
||||
// https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts
|
||||
//
|
||||
// TODO(vogelheim): We use non-standard ImplementedAs= names to avoid a
|
||||
// collision with the names defined by super classes. This can be cleaned
|
||||
// up once the TrustedTypesHTML flag is removed.
|
||||
[CEReactions, RuntimeEnabled=TrustedTypesHTML, ImplementedAs=scriptTextContentForBinding, RaisesException=Setter] attribute (DOMString or TrustedScript)? textContent;
|
||||
[CEReactions, RuntimeEnabled=TrustedTypesHTML, ImplementedAs=scriptInnerTextForBinding, RaisesException=Setter] attribute ([LegacyNullToEmptyString] DOMString or TrustedScript) innerText;
|
||||
|
||||
};
|
||||
|
||||
// https://wicg.github.io/attribution-reporting-api
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry
|
||||
[CallWith=ScriptState, RaisesException, MeasureAs=IntersectionObserver_Constructor] constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
|
||||
readonly attribute Node? root;
|
||||
readonly attribute DOMString rootMargin;
|
||||
[RuntimeEnabled=IntersectionObserverScrollMargin]
|
||||
readonly attribute DOMString scrollMargin;
|
||||
// https://github.com/WICG/IntersectionObserver/issues/114
|
||||
readonly attribute FrozenArray<double> thresholds;
|
||||
|
||||
Vendored
+9
@@ -569,6 +569,15 @@ bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) {
|
||||
if (trial_name == "AIProofreadingAPI") {
|
||||
return base::FeatureList::IsEnabled(features::kAIProofreadingAPI);
|
||||
}
|
||||
|
||||
if (trial_name == "WebAppInstallation") {
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
BUILDFLAG(IS_CHROMEOS)
|
||||
return base::FeatureList::IsEnabled(blink::features::kWebAppInstallation);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
-10
@@ -1,10 +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.
|
||||
|
||||
[
|
||||
RuntimeEnabled=ScriptTools,
|
||||
ImplementedAs=AutomationDelegateSupplement
|
||||
] partial interface Window {
|
||||
[Replaceable] readonly attribute AutomationDelegate automationDelegate;
|
||||
};
|
||||
+3
-3
@@ -4,9 +4,9 @@
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
ImplementedAs=AutomationDelegate,
|
||||
RuntimeEnabled=ScriptTools
|
||||
] interface AutomationDelegate {
|
||||
ImplementedAs=ModelContext,
|
||||
RuntimeEnabled=WebMCP
|
||||
] interface ModelContext {
|
||||
[CallWith=ScriptState, RaisesException] undefined registerTool(ToolRegistrationParams params);
|
||||
[CallWith=ScriptState, RaisesException] undefined unregisterTool(DOMString tool_name);
|
||||
|
||||
Vendored
Executable
+11
@@ -0,0 +1,11 @@
|
||||
// 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.
|
||||
|
||||
[
|
||||
RuntimeEnabled=WebMCP,
|
||||
ImplementedAs=ModelContextSupplement
|
||||
] partial interface Navigator {
|
||||
[Replaceable] readonly attribute ModelContext modelContext;
|
||||
[Replaceable, RuntimeEnabled=WebMCPTesting] readonly attribute ModelContextTesting modelContextTesting;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user