Merge pull request #1006 from uazo/create-pull-request/patch-132e13d

New files under control 124.0.6367.60
This commit is contained in:
uazo
2024-04-18 01:54:51 +07:00
committed by GitHub
262 changed files with 3309 additions and 4098 deletions
+1 -1
View File
@@ -1 +1 @@
123.0.6312.122
124.0.6367.60
@@ -44,6 +44,8 @@
#include "chrome/browser/downgrade/user_data_downgrade.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
#include "chrome/browser/file_system_access/chrome_file_system_access_permission_context.h"
#include "chrome/browser/file_system_access/file_system_access_permission_context_factory.h"
#include "chrome/browser/heavy_ad_intervention/heavy_ad_service_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/web_history_service_factory.h"
@@ -77,8 +79,8 @@
#include "chrome/browser/translate/chrome_translate_client.h"
#include "chrome/browser/ui/find_bar/find_bar_state.h"
#include "chrome/browser/ui/find_bar/find_bar_state_factory.h"
#include "chrome/browser/web_data_service_factory.h"
#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
#include "chrome/browser/webdata_services/web_data_service_factory.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/core/browser/personal_data_manager.h"
@@ -716,6 +718,16 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
browsing_data::RemoveSiteSettingsData(delete_begin, delete_end,
host_content_settings_map_);
#if !BUILDFLAG(IS_ANDROID)
// The active permission does not have timestamps, so the all active grants
// will be revoked regardless of the time range because all the are expected
// to be recent.
if (auto* permission_context =
FileSystemAccessPermissionContextFactory::GetForProfile(profile_)) {
permission_context->RevokeAllActiveGrants();
}
#endif
auto* handler_registry =
ProtocolHandlerRegistryFactory::GetForBrowserContext(profile_);
if (handler_registry)
@@ -1455,8 +1467,6 @@ const char* ChromeBrowsingDataRemoverDelegate::GetHistogramSuffix(
return "Synchronous";
case TracingDataType::kHistory:
return "History";
case TracingDataType::kHostNameResolution:
return "HostNameResolution";
case TracingDataType::kNaclCache:
return "NaclCache";
case TracingDataType::kPnaclCache:
@@ -1465,8 +1475,6 @@ const char* ChromeBrowsingDataRemoverDelegate::GetHistogramSuffix(
return "AutofillData";
case TracingDataType::kAutofillOrigins:
return "AutofillOrigins";
case TracingDataType::kPluginData:
return "PluginData";
case TracingDataType::kDomainReliability:
return "DomainReliability";
case TracingDataType::kWebrtcLogs:
@@ -1485,20 +1493,12 @@ const char* ChromeBrowsingDataRemoverDelegate::GetHistogramSuffix(
return "DisableAutoSigninForAccountPasswords";
case TracingDataType::kPasswordsStatistics:
return "PasswordsStatistics";
case TracingDataType::kKeywordsModel:
return "KeywordsModel";
case TracingDataType::kReportingCache:
return "ReportingCache";
case TracingDataType::kNetworkErrorLogging:
return "NetworkErrorLogging";
case TracingDataType::kFlashDeauthorization:
return "FlashDeauthorization";
case TracingDataType::kOfflinePages:
return "OfflinePages";
case TracingDataType::kExploreSites:
return "ExploreSites";
case TracingDataType::kLegacyStrikes:
return "LegacyStrikes";
case TracingDataType::kWebrtcEventLogs:
return "WebrtcEventLogs";
case TracingDataType::kCdmLicenses:
@@ -1507,20 +1507,12 @@ const char* ChromeBrowsingDataRemoverDelegate::GetHistogramSuffix(
return "HostCache";
case TracingDataType::kTpmAttestationKeys:
return "TpmAttestationKeys";
case TracingDataType::kStrikes:
return "Strikes";
case TracingDataType::kCompromisedCredentials:
return "CompromisedCredentials";
case TracingDataType::kUserDataSnapshot:
return "UserDataSnapshot";
case TracingDataType::kMediaFeeds:
return "MediaFeeds";
case TracingDataType::kAccountPasswords:
return "AccountPasswords";
case TracingDataType::kAccountPasswordsSynced:
return "AccountPasswordsSynced";
case TracingDataType::kAccountCompromisedCredentials:
return "AccountCompromisedCredentials";
case TracingDataType::kFaviconCacheExpiration:
return "FaviconCacheExpiration";
case TracingDataType::kSecurePaymentConfirmationCredentials:
@@ -67,10 +67,11 @@
#include "components/dom_distiller/content/common/mojom/distiller_javascript_service.mojom.h"
#include "components/dom_distiller/core/dom_distiller_service.h"
#include "components/feed/buildflags.h"
#include "components/feed/feed_feature_list.h"
#include "components/history_clusters/core/features.h"
#include "components/history_clusters/core/history_clusters_service.h"
#include "components/history_clusters/history_clusters_internals/webui/history_clusters_internals_ui.h"
#include "components/history_embeddings/history_embeddings_features.h"
#include "components/lens/lens_features.h"
#include "components/live_caption/caption_util.h"
#include "components/live_caption/pref_names.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_contents.h"
@@ -85,7 +86,6 @@
#include "components/search_engines/search_engine_choice_utils.h"
#include "components/security_state/content/content_utils.h"
#include "components/security_state/core/security_state.h"
#include "components/services/screen_ai/buildflags/buildflags.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/site_engagement/core/mojom/site_engagement_details.mojom.h"
#include "components/translate/content/common/translate.mojom.h"
@@ -101,6 +101,7 @@
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/image_annotation/public/mojom/image_annotation.mojom.h"
#include "services/screen_ai/buildflags/buildflags.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom.h"
#include "third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom.h"
@@ -167,8 +168,6 @@
#include "chrome/browser/ui/webui/app_service_internals/app_service_internals_ui.h"
#include "chrome/browser/ui/webui/downloads/downloads.mojom.h"
#include "chrome/browser/ui/webui/downloads/downloads_ui.h"
#include "chrome/browser/ui/webui/feed/feed.mojom.h"
#include "chrome/browser/ui/webui/feed/feed_ui.h"
#include "chrome/browser/ui/webui/on_device_internals/on_device_internals_ui.h"
#include "chrome/browser/ui/webui/web_app_internals/web_app_internals.mojom.h"
#include "chrome/browser/ui/webui/web_app_internals/web_app_internals_ui.h"
@@ -177,10 +176,12 @@
#include "chrome/browser/ui/webui/new_tab_page/foo/foo.mojom.h" // nogncheck crbug.com/1125897
#endif
#include "chrome/browser/ui/side_panel/customize_chrome/customize_chrome_utils.h"
#include "chrome/browser/ui/webui/commerce/product_specifications_ui.h"
#include "chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h"
#include "chrome/browser/ui/webui/hats/hats_ui.h"
#include "chrome/browser/ui/webui/history/history_ui.h"
#include "chrome/browser/ui/webui/internals/user_education/user_education_internals.mojom.h"
#include "chrome/browser/ui/webui/lens/lens_untrusted_ui.h"
#include "chrome/browser/ui/webui/new_tab_page/new_tab_page.mojom.h"
#include "chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h"
#include "chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.h"
@@ -215,6 +216,7 @@
#include "ui/webui/resources/cr_components/customize_themes/customize_themes.mojom.h"
#include "ui/webui/resources/cr_components/help_bubble/help_bubble.mojom.h"
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom.h"
#include "ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom.h"
#include "ui/webui/resources/cr_components/most_visited/most_visited.mojom.h"
#include "ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom.h"
#include "ui/webui/resources/js/browser_command/browser_command.mojom.h"
@@ -246,6 +248,7 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#include "ash/public/mojom/hid_preserving_bluetooth_state_controller.mojom.h"
#include "ash/webui/camera_app_ui/camera_app_helper.mojom.h"
#include "ash/webui/camera_app_ui/camera_app_ui.h"
#include "ash/webui/color_internals/color_internals_ui.h"
@@ -1154,6 +1157,11 @@ void PopulateChromeWebUIFrameBinders(
new_tab_page_third_party::mojom::PageHandlerFactory,
NewTabPageThirdPartyUI>(map);
if (lens::features::IsLensOverlayEnabled()) {
RegisterWebUIControllerInterfaceBinder<lens::mojom::LensPageHandlerFactory,
lens::LensUntrustedUI>(map);
}
RegisterWebUIControllerInterfaceBinder<
color_change_listener::mojom::PageHandler,
#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
@@ -1176,7 +1184,8 @@ void PopulateChromeWebUIFrameBinders(
NewTabPageUI, OmniboxPopupUI, BookmarksSidePanelUI, CustomizeChromeUI,
InternalsUI, ReadingListUI, TabSearchUI, WebuiGalleryUI,
HistoryClustersSidePanelUI, PerformanceSidePanelUI,
ShoppingInsightsSidePanelUI, media_router::AccessCodeCastUI>(map);
ShoppingInsightsSidePanelUI, media_router::AccessCodeCastUI,
commerce::ProductSpecificationsUI>(map);
RegisterWebUIControllerInterfaceBinder<
new_tab_page::mojom::PageHandlerFactory, NewTabPageUI>(map);
@@ -1199,6 +1208,10 @@ void PopulateChromeWebUIFrameBinders(
history_clusters::mojom::PageHandler, HistoryUI>(map);
}
}
if (base::FeatureList::IsEnabled(history_embeddings::kHistoryEmbeddings)) {
RegisterWebUIControllerInterfaceBinder<
history_embeddings::mojom::PageHandler, HistoryUI>(map);
}
RegisterWebUIControllerInterfaceBinder<
page_image_service::mojom::PageImageServiceHandler, HistoryUI,
@@ -1292,6 +1305,14 @@ void PopulateChromeWebUIFrameBinders(
ntp::tab_resumption::mojom::PageHandler, NewTabPageUI>(map);
}
#if BUILDFLAG(IS_CHROMEOS_ASH)
if (ash::features::IsBluetoothDisconnectWarningEnabled()) {
RegisterWebUIControllerInterfaceBinder<
ash::mojom::HidPreservingBluetoothStateController,
ash::settings::OSSettingsUI>(map);
}
#endif // defined(IS_CHROMEOS_ASH)
RegisterWebUIControllerInterfaceBinder<
reading_list::mojom::PageHandlerFactory, ReadingListUI>(map);
RegisterWebUIControllerInterfaceBinder<
@@ -1300,7 +1321,8 @@ void PopulateChromeWebUIFrameBinders(
RegisterWebUIControllerInterfaceBinder<
shopping_service::mojom::ShoppingServiceHandlerFactory,
BookmarksSidePanelUI, ShoppingInsightsSidePanelUI>(map);
BookmarksSidePanelUI, commerce::ProductSpecificationsUI,
ShoppingInsightsSidePanelUI>(map);
if (base::FeatureList::IsEnabled(
performance_manager::features::kPerformanceControlsSidePanel)) {
@@ -1338,15 +1360,9 @@ void PopulateChromeWebUIFrameBinders(
RegisterWebUIControllerInterfaceBinder<tab_search::mojom::PageHandlerFactory,
TabSearchUI>(map);
if (base::FeatureList::IsEnabled(features::kTabSearchUseMetricsReporter)) {
RegisterWebUIControllerInterfaceBinder<
metrics_reporter::mojom::PageMetricsHost, TabSearchUI, NewTabPageUI,
OmniboxPopupUI>(map);
} else {
RegisterWebUIControllerInterfaceBinder<
metrics_reporter::mojom::PageMetricsHost, NewTabPageUI, OmniboxPopupUI>(
map);
}
RegisterWebUIControllerInterfaceBinder<
metrics_reporter::mojom::PageMetricsHost, TabSearchUI, NewTabPageUI,
OmniboxPopupUI>(map);
RegisterWebUIControllerInterfaceBinder<
::mojom::user_education_internals::UserEducationInternalsPageHandler,
@@ -1414,6 +1430,9 @@ void PopulateChromeWebUIFrameBinders(
ash::cellular_setup::mojom::CellularSetup, ash::settings::OSSettingsUI>(
map);
RegisterWebUIControllerInterfaceBinder<chromeos::auth::mojom::InSessionAuth,
ash::settings::OSSettingsUI>(map);
RegisterWebUIControllerInterfaceBinder<ash::auth::mojom::AuthFactorConfig,
ash::settings::OSSettingsUI,
ash::OobeUI>(map);
@@ -1567,15 +1586,13 @@ void PopulateChromeWebUIFrameBinders(
ash::shimless_rma::mojom::ShimlessRmaService, ash::ShimlessRMADialogUI>(
map);
if (base::FeatureList::IsEnabled(features::kShortcutCustomizationApp)) {
RegisterWebUIControllerInterfaceBinder<
ash::shortcut_customization::mojom::AcceleratorConfigurationProvider,
ash::ShortcutCustomizationAppUI>(map);
RegisterWebUIControllerInterfaceBinder<
ash::shortcut_customization::mojom::AcceleratorConfigurationProvider,
ash::ShortcutCustomizationAppUI>(map);
RegisterWebUIControllerInterfaceBinder<
ash::shortcut_customization::mojom::SearchHandler,
ash::ShortcutCustomizationAppUI>(map);
}
RegisterWebUIControllerInterfaceBinder<
ash::shortcut_customization::mojom::SearchHandler,
ash::ShortcutCustomizationAppUI>(map);
RegisterWebUIControllerInterfaceBinder<
emoji_picker::mojom::PageHandlerFactory, ash::EmojiUI>(map);
@@ -1654,14 +1671,14 @@ void PopulateChromeWebUIFrameBinders(
RegisterWebUIControllerInterfaceBinder<
ash::cloud_upload::mojom::PageHandlerFactory,
ash::cloud_upload::CloudUploadUI>(map);
RegisterWebUIControllerInterfaceBinder<
ash::office_fallback::mojom::PageHandlerFactory,
ash::office_fallback::OfficeFallbackUI>(map);
}
if (ash::cloud_upload::
IsMicrosoftOfficeOneDriveIntegrationAllowedAndOdfsInstalled(
profile)) {
RegisterWebUIControllerInterfaceBinder<
ash::office_fallback::mojom::PageHandlerFactory,
ash::office_fallback::OfficeFallbackUI>(map);
RegisterWebUIControllerInterfaceBinder<
ash::settings::one_drive::mojom::PageHandlerFactory,
ash::settings::OSSettingsUI>(map);
@@ -1810,6 +1827,7 @@ void PopulateChromeWebUIFrameInterfaceBrokers(
.Add<ash::annotator::mojom::UntrustedAnnotatorPageHandlerFactory>();
registry.ForWebUI<ash::UntrustedProjectorUI>()
.Add<color_change_listener::mojom::PageHandler>()
.Add<ash::projector::mojom::UntrustedProjectorPageHandlerFactory>();
registry.ForWebUI<ash::feedback::OsFeedbackUntrustedUI>()
@@ -1828,16 +1846,16 @@ void PopulateChromeWebUIFrameInterfaceBrokers(
.Add<ash::mojom::sample_swa::UntrustedPageInterfacesFactory>();
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OFFICIAL_BUILD)
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_FEED_V2)
registry.ForWebUI<feed::FeedUI>()
.Add<feed::mojom::FeedSidePanelHandlerFactory>();
#endif // !BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(ENABLE_COMPOSE)
registry.ForWebUI<ComposeUntrustedUI>()
.Add<color_change_listener::mojom::PageHandler>()
.Add<compose::mojom::ComposeSessionUntrustedPageHandlerFactory>();
#endif // BUILDFLAG(ENABLE_COMPOSE)
#if !BUILDFLAG(IS_ANDROID)
if (lens::features::IsLensOverlayEnabled()) {
registry.ForWebUI<lens::LensUntrustedUI>()
.Add<lens::mojom::LensPageHandlerFactory>();
}
if (companion::IsCompanionFeatureEnabled()) {
registry.ForWebUI<CompanionSidePanelUntrustedUI>()
.Add<side_panel::mojom::CompanionPageHandlerFactory>();
@@ -104,6 +104,7 @@
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/blocked_content/safe_browsing_triggered_popup_blocker.h"
#include "components/breadcrumbs/core/breadcrumbs_status.h"
#include "components/browser_sync/sync_to_signin_migration.h"
#include "components/browsing_data/core/pref_names.h"
#include "components/certificate_transparency/pref_names.h"
#include "components/commerce/core/pref_names.h"
@@ -111,8 +112,6 @@
#include "components/content_settings/core/common/pref_names.h"
#include "components/custom_handlers/protocol_handler_registry.h"
#include "components/dom_distiller/core/distilled_page_prefs.h"
#include "components/dom_distiller/core/dom_distiller_features.h"
#include "components/dom_distiller/core/pref_names.h"
#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"
@@ -164,13 +163,13 @@
#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
#include "components/segmentation_platform/embedder/default_model/device_switcher_result_dispatcher.h"
#include "components/segmentation_platform/public/segmentation_platform_service.h"
#include "components/services/screen_ai/buildflags/buildflags.h"
#include "components/services/storage/public/cpp/storage_prefs.h"
#include "components/sessions/core/session_id_generator.h"
#include "components/signin/public/base/signin_pref_names.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/site_engagement/content/site_engagement_service.h"
#include "components/subresource_filter/content/browser/ruleset_service.h"
#include "components/subresource_filter/core/browser/subresource_filter_constants.h"
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
#include "components/supervised_user/core/common/buildflags.h"
#include "components/sync/base/pref_names.h"
@@ -190,6 +189,7 @@
#include "ppapi/buildflags/buildflags.h"
#include "printing/buildflags/buildflags.h"
#include "rlz/buildflags/buildflags.h"
#include "services/screen_ai/buildflags/buildflags.h"
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
#include "chrome/browser/background/background_mode_manager.h"
@@ -334,7 +334,6 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/components/arc/arc_prefs.h"
#include "ash/constants/ash_pref_names.h"
#include "ash/public/cpp/ambient/ambient_prefs.h"
#include "ash/public/cpp/ash_prefs.h"
#include "chrome/browser/apps/app_deduplication_service/app_deduplication_service.h"
#include "chrome/browser/apps/app_discovery_service/almanac_fetcher.h"
@@ -552,34 +551,7 @@ 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 03/2023.
const char kGoogleSearchDomainMixingMetricsEmitterLastMetricsTime[] =
"browser.last_google_search_domain_mixing_metrics_time";
// Deprecated 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kGlanceablesSignoutScreenshotDuration[] =
"ash.signout_screenshot.duration";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kEasyUnlockLocalStateUserPrefs[] = "easy_unlock.user_prefs";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kDarkLightModeNudgeLeftToShowCount[] =
"ash.dark_light_mode.educational_nudge";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2023.
#if BUILDFLAG(IS_WIN)
const char kWebAuthnLastOperationWasNativeAPI[] =
"webauthn.last_op_used_native_api";
#endif
// Deprecated 03/2023.
// Deprecated 04/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kEasyUnlockHardlockState[] = "easy_unlock.hardlock_state";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -991,25 +963,59 @@ constexpr std::array<const char*, 6u>
"ash.welcome_tour.interaction_time.Search.first_time_bucket",
"ash.welcome_tour.interaction_time.SettingsApp.first_time_bucket",
};
// Deprecated 02/2024.
constexpr char kDiscoverTabSuggestionChipTimesLeftToShow[] =
"times_left_to_show_discover_tab_suggestion_chip";
#endif
// Deprecated 02/2024
constexpr char kSearchEnginesChoiceProfile[] = "search_engines.choice_profile";
// Deprecated 02/2024.
#if BUILDFLAG(IS_CHROMEOS_ASH)
constexpr char kHatsUnlockSurveyCycleEndTs[] =
"hats_unlock_cycle_end_timestamp";
constexpr char kHatsUnlockDeviceIsSelected[] = "hats_unlock_device_is_selected";
constexpr char kHatsSmartLockSurveyCycleEndTs[] =
"hats_smartlock_cycle_end_timestamp";
constexpr char kHatsSmartLockDeviceIsSelected[] =
"hats_smartlock_device_is_selected";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 02/2024
constexpr char kResetCheckDefaultBrowser[] =
"browser.should_reset_check_default_browser";
#if BUILDFLAG(IS_WIN)
// Deprecated 02/2024
constexpr char kOsCryptAppBoundFixedDataPrefName[] =
"os_crypt.app_bound_fixed_data";
#endif // BUILDFLAG(IS_WIN)
// Deprecated 02/2024.
constexpr char kOfferReaderMode[] = "dom_distiller.offer_reader_mode";
// Deprecated 03/2024.
constexpr char kPlusAddressLastFetchedTime[] = "plus_address.last_fetched_time";
// Deprecated 03/2024.
constexpr char kPrivacySandboxApisEnabled[] = "privacy_sandbox.apis_enabled";
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2024
constexpr char kOobeGuestAcceptedTos[] = "oobe.guest_accepted_tos";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2024.
// A `kDefaultSearchProviderChoicePending` pref persists (migrated to a new
// pref name to reset the data), so the variable name has been changed here.
constexpr char kDefaultSearchProviderChoicePendingDeprecated[] =
"default_search_provider.choice_pending";
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
// Deprecated 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterTimeDeltaPref(kGlanceablesSignoutScreenshotDuration,
base::TimeDelta());
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterDictionaryPref(kEasyUnlockLocalStateUserPrefs);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 04/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterDictionaryPref(kEasyUnlockHardlockState);
@@ -1112,6 +1118,17 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
// Deprecated 02/2024.
registry->RegisterFilePathPref(kSearchEnginesChoiceProfile, base::FilePath());
#if BUILDFLAG(IS_WIN)
// Deprecated 02/2024.
registry->RegisterStringPref(kOsCryptAppBoundFixedDataPrefName,
std::string());
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2024.
registry->RegisterBooleanPref(kOobeGuestAcceptedTos, false);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
}
// Register prefs used only for migration (clearing or moving to a new key).
@@ -1119,21 +1136,6 @@ void RegisterProfilePrefsForMigration(
user_prefs::PrefRegistrySyncable* registry) {
chrome_browser_net::secure_dns::RegisterProbesSettingBackupPref(registry);
// Deprecated 03/2023.
registry->RegisterTimePref(
kGoogleSearchDomainMixingMetricsEmitterLastMetricsTime, base::Time());
// Deprecated 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterIntegerPref(kDarkLightModeNudgeLeftToShowCount,
ash::kDarkLightModeNudgeMaxShownCount);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 03/2023.
#if BUILDFLAG(IS_WIN)
registry->RegisterBooleanPref(kWebAuthnLastOperationWasNativeAPI, false);
#endif
// Deprecated 04/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterBooleanPref(kBentoBarEnabled, false);
@@ -1400,7 +1402,34 @@ void RegisterProfilePrefsForMigration(
for (const char* pref : kWelcomeTourTimeBucketsOfFirstInteractions) {
registry->RegisterIntegerPref(pref, -1);
}
// Deprecated 02/2024.
registry->RegisterIntegerPref(kDiscoverTabSuggestionChipTimesLeftToShow, 0);
#endif
// Deprecated 02/2024.
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterInt64Pref(kHatsSmartLockSurveyCycleEndTs, 0);
registry->RegisterBooleanPref(kHatsSmartLockDeviceIsSelected, false);
registry->RegisterInt64Pref(kHatsUnlockSurveyCycleEndTs, 0);
registry->RegisterBooleanPref(kHatsUnlockDeviceIsSelected, false);
#endif
// Deprecated 02/2024
registry->RegisterBooleanPref(kResetCheckDefaultBrowser, false);
// Deprecated 02/2024.
registry->RegisterBooleanPref(kOfferReaderMode, false);
// Deprecated 03/2024.
registry->RegisterTimePref(kPlusAddressLastFetchedTime, base::Time());
// Deprecated 03/2024.
registry->RegisterBooleanPref(kPrivacySandboxApisEnabled, true);
// Deprecated 03/2024.
registry->RegisterBooleanPref(kDefaultSearchProviderChoicePendingDeprecated,
false);
}
void ClearSyncRequestedPrefAndMaybeMigrate(PrefService* profile_prefs) {
@@ -1484,7 +1513,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#endif
sessions::SessionIdGenerator::RegisterPrefs(registry);
SSLConfigServiceManager::RegisterPrefs(registry);
subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry);
subresource_filter::IndexedRulesetVersion::RegisterPrefs(
registry, subresource_filter::kSafeBrowsingFilterTag);
SystemNetworkContextManager::RegisterPrefs(registry);
tpcd::experiment::RegisterLocalStatePrefs(registry);
tracing::RegisterPrefs(registry);
@@ -1717,7 +1747,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
enterprise::RegisterIdentifiersProfilePrefs(registry);
enterprise_reporting::RegisterProfilePrefs(registry);
dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
dom_distiller::RegisterProfilePrefs(registry);
DownloadPrefs::RegisterProfilePrefs(registry);
permissions::PermissionHatsTriggerHelper::RegisterProfilePrefs(registry);
history_clusters::prefs::RegisterProfilePrefs(registry);
@@ -2161,16 +2190,6 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
// BEGIN_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
// Please don't delete the preceding line. It is used by PRESUBMIT.py.
// Added 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
local_state->ClearPref(kGlanceablesSignoutScreenshotDuration);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Added 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
local_state->ClearPref(kEasyUnlockLocalStateUserPrefs);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Added 04/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
local_state->ClearPref(kEasyUnlockHardlockState);
@@ -2272,6 +2291,16 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
// Added 02/2024
local_state->ClearPref(kSearchEnginesChoiceProfile);
#if BUILDFLAG(IS_WIN)
// Deprecated 02/2024.
local_state->ClearPref(kOsCryptAppBoundFixedDataPrefName);
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Added 03/2024.
local_state->ClearPref(kOobeGuestAcceptedTos);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
@@ -2321,23 +2350,10 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
}
}
// Added 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
ash::ambient::prefs::MigrateDeprecatedPrefs(*profile_prefs);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Added 03/2023.
profile_prefs->ClearPref(
kGoogleSearchDomainMixingMetricsEmitterLastMetricsTime);
// Added 03/2023.
#if BUILDFLAG(IS_CHROMEOS_ASH)
profile_prefs->ClearPref(kDarkLightModeNudgeLeftToShowCount);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Added 03/2023.
#if BUILDFLAG(IS_WIN)
profile_prefs->ClearPref(kWebAuthnLastOperationWasNativeAPI);
// TODO(326079444): After experiment is over, update the deprecated date and
// allow this to be cleaned up.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
MigrateDefaultBrowserLastDeclinedPref(profile_prefs);
#endif
// Added 04/2023.
@@ -2551,12 +2567,12 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
profile_path);
#endif
// Deprecated 11/2023.
// Added 11/2023.
profile_prefs->ClearPref(kPasswordChangeSuccessTrackerFlows);
profile_prefs->ClearPref(kPasswordChangeSuccessTrackerVersion);
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Deprecated 11/2023.
// Added 11/2023.
profile_prefs->ClearPref(kImageSearchPrivacyNotice);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -2580,10 +2596,10 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
profile_prefs->ClearPref(kDesktopSiteDisplaySettingEnabled);
#endif
// Deprecated 12/2023.
// Added 12/2023.
profile_prefs->ClearPref(kDownloadDuplicateFilePromptEnabled);
// Deprecated 12/2023.
// Added 12/2023.
profile_prefs->ClearPref(kModelQualityLoggingClientId);
// Added 12/2023.
@@ -2616,14 +2632,14 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
// Added 01/2024.
profile_prefs->ClearPref(kDownloadBubbleIphSuppression);
// Deprecated 01/2024.
// Added 01/2024.
#if BUILDFLAG(IS_CHROMEOS_ASH)
profile_prefs->ClearPref(kPersistedSystemExtensions);
profile_prefs->ClearPref(kBorealisVmTokenHash);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#if !BUILDFLAG(IS_ANDROID)
// Deprecated 1/2024.
// Added 1/2024.
performance_manager::user_tuning::prefs::MigrateTabDiscardingExceptionsPref(
profile_prefs);
#endif
@@ -2632,33 +2648,63 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
profile_prefs->ClearPref(kNtpShownPage);
profile_prefs->ClearPref(kNtpAppPageNames);
// Deprecated 01/2024.
// Added 01/2024.
#if BUILDFLAG(IS_WIN)
profile_prefs->ClearPref(kSearchResultsPagePrimaryFontsPref);
profile_prefs->ClearPref(kSearchResultsPageFallbackFontsPref);
#endif
// Deprecated 01/2024.
// Added 01/2024.
#if BUILDFLAG(IS_CHROMEOS_ASH)
profile_prefs->ClearPref(kUpdateNotificationLastShownMilestone);
#endif
// Deprecated 01/2024.
// Added 01/2024.
#if BUILDFLAG(IS_ANDROID)
profile_prefs->ClearPref(kSavePasswordsSuspendedByError);
#endif
// Deprecated 02/2024
// Added 02/2024
profile_prefs->ClearPref(kSafeBrowsingDeepScanPromptSeen);
profile_prefs->ClearPref(kSafeBrowsingEsbEnabledTimestamp);
// Deprecated 02/2024.
// Added 02/2024.
#if BUILDFLAG(IS_CHROMEOS_ASH)
for (const char* pref : kWelcomeTourTimeBucketsOfFirstInteractions) {
profile_prefs->ClearPref(pref);
}
// Added 02/2024.
profile_prefs->ClearPref(kDiscoverTabSuggestionChipTimesLeftToShow);
#endif
// Added 02/2024.
#if BUILDFLAG(IS_CHROMEOS_ASH)
profile_prefs->ClearPref(kHatsSmartLockSurveyCycleEndTs);
profile_prefs->ClearPref(kHatsSmartLockDeviceIsSelected);
profile_prefs->ClearPref(kHatsUnlockSurveyCycleEndTs);
profile_prefs->ClearPref(kHatsUnlockDeviceIsSelected);
#endif
// Added 02/2024
profile_prefs->ClearPref(kResetCheckDefaultBrowser);
// Added 02/2024
profile_prefs->ClearPref(kOfferReaderMode);
// Added 03/2024.
profile_prefs->ClearPref(kPlusAddressLastFetchedTime);
// Added 03/2024.
profile_prefs->ClearPref(kPrivacySandboxApisEnabled);
// Added 03/2024.
profile_prefs->ClearPref(kDefaultSearchProviderChoicePendingDeprecated);
// Added 02/2024, but DO NOT REMOVE after the usual year!
// TODO(crbug.com/40282890): Remove ~one year after full launch.
browser_sync::MaybeMigrateSyncingUserToSignedIn(profile_path, profile_prefs);
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_PROFILE_PREFS
@@ -30,7 +30,6 @@
#include "chrome/browser/dips/dips_service.h"
#include "chrome/browser/external_protocol/external_protocol_observer.h"
#include "chrome/browser/favicon/favicon_utils.h"
#include "chrome/browser/feed/web_feed_tab_helper.h"
#include "chrome/browser/file_system_access/file_system_access_features.h"
#include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
#include "chrome/browser/file_system_access/file_system_access_tab_helper.h"
@@ -47,7 +46,8 @@
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h"
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h"
#include "chrome/browser/optimization_guide/optimization_guide_web_contents_observer.h"
#include "chrome/browser/optimization_guide/page_content_annotations_service_factory.h"
#include "chrome/browser/page_content_annotations/page_content_annotations_service_factory.h"
#include "chrome/browser/page_content_annotations/page_content_annotations_web_contents_observer.h"
#include "chrome/browser/page_info/about_this_site_tab_helper.h"
#include "chrome/browser/page_info/page_info_features.h"
#include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h"
@@ -67,7 +67,6 @@
#include "chrome/browser/safe_browsing/tailored_security/tailored_security_service_factory.h"
#include "chrome/browser/safe_browsing/tailored_security/tailored_security_url_observer.h"
#include "chrome/browser/safe_browsing/trigger_creator.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sessions/session_tab_helper_factory.h"
#include "chrome/browser/ssl/chrome_security_blocking_page_factory.h"
#include "chrome/browser/ssl/connection_help_tab_helper.h"
@@ -81,12 +80,14 @@
#include "chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h"
#include "chrome/browser/tab_contents/navigation_metrics_recorder.h"
#include "chrome/browser/tpcd/heuristics/opener_heuristic_tab_helper.h"
#include "chrome/browser/tpcd/heuristics/redirect_heuristic_tab_helper.h"
#include "chrome/browser/tpcd/http_error_observer/http_error_tab_helper.h"
#include "chrome/browser/tpcd/metadata/devtools_observer.h"
#include "chrome/browser/tpcd/support/validity_service.h"
#include "chrome/browser/translate/chrome_translate_client.h"
#include "chrome/browser/trusted_vault/trusted_vault_encryption_keys_tab_helper.h"
#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
#include "chrome/browser/ui/autofill/autofill_client_provider.h"
#include "chrome/browser/ui/autofill/autofill_client_provider_factory.h"
#include "chrome/browser/ui/find_bar/find_bar_state.h"
#include "chrome/browser/ui/focus_tab_after_navigation_helper.h"
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
@@ -126,7 +127,6 @@
#include "components/download/content/factory/navigation_monitor_factory.h"
#include "components/download/content/public/download_navigation_observer.h"
#include "components/feed/buildflags.h"
#include "components/feed/feed_feature_list.h"
#include "components/history/content/browser/web_contents_top_sites_observer.h"
#include "components/history/core/browser/top_sites.h"
#include "components/infobars/content/content_infobar_manager.h"
@@ -135,7 +135,6 @@
#include "components/metrics_services_manager/metrics_services_manager.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_manager.h"
#include "components/offline_pages/buildflags/buildflags.h"
#include "components/optimization_guide/content/browser/page_content_annotations_web_contents_observer.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/page_info/core/features.h"
#include "components/password_manager/core/browser/password_manager.h"
@@ -174,12 +173,12 @@
#include "chrome/browser/android/policy/policy_auditor_bridge.h"
#include "chrome/browser/banners/android/chrome_app_banner_manager_android.h"
#include "chrome/browser/content_settings/request_desktop_site_web_contents_observer_android.h"
#include "chrome/browser/facilitated_payments/ui/chrome_facilitated_payments_client.h"
#include "chrome/browser/fast_checkout/fast_checkout_tab_helper.h"
#include "chrome/browser/flags/android/chrome_feature_list.h"
#include "chrome/browser/plugins/plugin_observer_android.h"
#include "chrome/browser/ui/android/context_menu_helper.h"
#include "chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_android.h"
#include "components/facilitated_payments/content/browser/content_facilitated_payments_driver_factory.h"
#include "components/facilitated_payments/core/features/features.h"
#include "components/webapps/browser/android/app_banner_manager_android.h"
#include "content/public/common/content_features.h"
@@ -363,13 +362,17 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
optimization_guide_decider);
}
}
autofill::ChromeAutofillClient::CreateForWebContents(web_contents);
autofill::AutofillClientProvider& autofill_client_provider =
autofill::AutofillClientProviderFactory::GetForProfile(profile);
autofill_client_provider.CreateClientForWebContents(web_contents);
if (breadcrumbs::IsEnabled(g_browser_process->local_state())) {
BreadcrumbManagerTabHelper::CreateForWebContents(web_contents);
}
chrome::ChainedBackNavigationTracker::CreateForWebContents(web_contents);
chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents);
ChromePasswordManagerClient::CreateForWebContents(web_contents);
if (!autofill_client_provider.uses_platform_autofill()) {
ChromePasswordManagerClient::CreateForWebContents(web_contents);
}
ChromePasswordReuseDetectionManagerClient::CreateForWebContents(web_contents);
CreateSubresourceFilterWebContentsHelper(web_contents);
#if BUILDFLAG(ENABLE_RLZ)
@@ -419,16 +422,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
if (optimization_guide::features::IsOptimizationHintsEnabled()) {
OptimizationGuideWebContentsObserver::CreateForWebContents(web_contents);
}
optimization_guide::PageContentAnnotationsService*
page_content_annotations::PageContentAnnotationsService*
page_content_annotations_service =
PageContentAnnotationsServiceFactory::GetForProfile(profile);
if (page_content_annotations_service) {
optimization_guide::PageContentAnnotationsWebContentsObserver::
CreateForWebContents(
web_contents, page_content_annotations_service,
TemplateURLServiceFactory::GetForProfile(profile),
prerender::NoStatePrefetchManagerFactory::GetForBrowserContext(
profile));
page_content_annotations::PageContentAnnotationsWebContentsObserver::
CreateForWebContents(web_contents);
#if BUILDFLAG(IS_ANDROID)
// If enabled, save sensitivity data for each non-incognito non-custom
@@ -441,7 +440,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
SensitivityPersistedTabDataAndroid::From(
tab,
base::BindOnce(
[](optimization_guide::PageContentAnnotationsService*
[](page_content_annotations::PageContentAnnotationsService*
page_content_annotations_service,
PersistedTabDataAndroid* persisted_tab_data) {
auto* sensitivity_persisted_tab_data_android =
@@ -475,6 +474,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
PrefsTabHelper::CreateForWebContents(web_contents);
prerender::NoStatePrefetchTabHelper::CreateForWebContents(web_contents);
RecentlyAudibleHelper::CreateForWebContents(web_contents);
RedirectHeuristicTabHelper::CreateForWebContents(web_contents);
#if BUILDFLAG(IS_ANDROID)
RequestDesktopSiteWebContentsObserverAndroid::CreateForWebContents(
web_contents);
@@ -564,8 +564,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
payments::facilitated::kEnablePixDetection)) {
if (auto* optimization_guide_decider =
OptimizationGuideKeyedServiceFactory::GetForProfile(profile)) {
payments::facilitated::ContentFacilitatedPaymentsDriverFactory::
CreateForWebContents(web_contents, optimization_guide_decider);
ChromeFacilitatedPaymentsClient::CreateForWebContents(
web_contents, optimization_guide_decider);
}
}
#else // BUILDFLAG(IS_ANDROID)
@@ -606,10 +606,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
CreateForWebContents(web_contents);
}
MemorySaverChipTabHelper::CreateForWebContents(web_contents);
if (base::FeatureList::IsEnabled(
performance_manager::features::kMemoryUsageInHovercards)) {
TabResourceUsageTabHelper::CreateForWebContents(web_contents);
}
TabResourceUsageTabHelper::CreateForWebContents(web_contents);
if (base::FeatureList::IsEnabled(features::kTabHoverCardImages) ||
base::FeatureList::IsEnabled(features::kWebUITabStrip)) {
ThumbnailTabHelper::CreateForWebContents(web_contents);
@@ -787,12 +784,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
}
#endif
#if BUILDFLAG(ENABLE_FEED_V2)
if (base::FeatureList::IsEnabled(feed::kWebUiFeed)) {
feed::WebFeedTabHelper::CreateForWebContents(web_contents);
}
#endif // BUILDFLAG(ENABLE_FEED_V2)
// --- Section 4: The warning ---
// NONO NO NONONO !
@@ -15,7 +15,7 @@ namespace accessibilityServicePrivate {
// Called when Select to Speak in ChromeOS should speak the current
// text selection; fired when the context menu option was clicked in
// a selection context.
[supportsPromises] static void speakSelectedText(
static void speakSelectedText(
optional VoidCallback callback);
};
@@ -308,7 +308,7 @@ namespace autofillPrivate {
// Gets currently signed-in user profile info, no value is returned if
// the user is not signed-in.
// |callback|: Callback which will be called with the info.
[supportsPromises] static void getAccountInfo(
static void getAccountInfo(
GetAccountInfoCallback callback);
// Saves the given address. If |address| has an empty string as its ID, it
@@ -318,7 +318,7 @@ namespace autofillPrivate {
// Gets the list of all countries.
// |callback|: Callback which will be called with the countries.
[supportsPromises] static void getCountryList(
static void getCountryList(
GetCountryListCallback callback);
// Gets the address components for a given country code.
@@ -326,13 +326,13 @@ namespace autofillPrivate {
// whose components should be returned. See autofill_country.cc for a
// list of valid codes.
// |callback|: Callback which will be called with components.
[supportsPromises] static void getAddressComponents(
static void getAddressComponents(
DOMString countryCode,
GetAddressComponentsCallback callback);
// Gets the list of addresses.
// |callback|: Callback which will be called with the list of addresses.
[supportsPromises] static void getAddressList(
static void getAddressList(
GetAddressListCallback callback);
// Saves the given credit card. If |card| has an empty string as its
@@ -351,26 +351,20 @@ namespace autofillPrivate {
// Gets the list of credit cards.
// |callback|: Callback which will be called with the list of credit cards.
[supportsPromises] static void getCreditCardList(
static void getCreditCardList(
GetCreditCardListCallback callback);
// Gets the list of IBANs.
// `callback`: Callback which will be called with the list of IBANs.
[supportsPromises] static void getIbanList(
static void getIbanList(
GetIbanListCallback callback);
// Returns true if the given `ibanValue` is a valid IBAN.
// `callback`: Callback which will be called with the result of IBAN
// validation.
[supportsPromises] static void isValidIban(
static void isValidIban(
DOMString ibanValue, IsValidIbanCallback callback);
// Clears the data associated with a wallet card which was saved
// locally so that the saved copy is masked (e.g., "Card ending
// in 1234").
// |guid|: GUID of the credit card to mask.
static void maskCreditCard(DOMString guid);
// Triggers local credit cards migration.
static void migrateCreditCards();
@@ -398,12 +392,12 @@ namespace autofillPrivate {
// Returns the local card based on the `guid` provided. The user could
// also be challenged with a reauth if that is enabled. For a successful
// auth, the local card is returned otherwise return a null object.
[supportsPromises] static void getLocalCard(
static void getLocalCard(
DOMString guid, GetCreditCardCallback callback);
// Returns true if there is authentication available on this device
// (biometric or screen lock), false otherwise.
[supportsPromises] static void checkIfDeviceAuthAvailable(
static void checkIfDeviceAuthAvailable(
CheckForDeviceAuthCallback callback);
// Bulk delete all the CVCs (server and local) from the local webdata
@@ -290,11 +290,11 @@ namespace autotestPrivate {
Unavailable,
Stopped,
PreparingForLaunch,
WaitingOwnerFetch,
PreLaunched,
Starting,
Running,
Terminating
WaitingForMojoDisconnected,
WaitingForProcessTerminated
};
// A mapping of crosapi::browser_util::LacrosMode
@@ -864,28 +864,28 @@ namespace autotestPrivate {
static void shutdown(boolean force);
// Get login status.
[supportsPromises] static void loginStatus(LoginStatusCallback callback);
static void loginStatus(LoginStatusCallback callback);
// Locks the screen.
static void lockScreen();
// Get info about installed extensions.
[supportsPromises] static void getExtensionsInfo(
static void getExtensionsInfo(
ExtensionsInfoCallback callback);
// Get state of the policies.
// Will contain device policies and policies from the active profile.
// The policy values are formatted as they would be for exporting in
// chrome://policy.
[supportsPromises] static void getAllEnterprisePolicies(
static void getAllEnterprisePolicies(
AllEnterprisePoliciesCallback callback);
// Refreshes the Enterprise Policies.
[supportsPromises] static void refreshEnterprisePolicies(
static void refreshEnterprisePolicies(
VoidCallback callback);
// Refreshes the remote commands.
[supportsPromises] static void refreshRemoteCommands(VoidCallback callback);
static void refreshRemoteCommands(VoidCallback callback);
// Simulates a memory access bug for asan testing.
static void simulateAsanMemoryBug();
@@ -923,93 +923,98 @@ namespace autotestPrivate {
static void setMouseReverseScroll(boolean enabled);
// Get visible notifications on the system.
[supportsPromises] static void getVisibleNotifications(
static void getVisibleNotifications(
NotificationArrayCallback callback);
// Remove all notifications.
[supportsPromises] static void removeAllNotifications(
static void removeAllNotifications(
VoidCallback callback);
// Get ARC start time in ticks.
[supportsPromises] static void getArcStartTime(
static void getArcStartTime(
ArcStartTimeCallback callback);
// Get state of the ARC session.
[supportsPromises] static void getArcState(
static void getArcState(
ArcStateCallback callback);
// Get state of the Play Store.
[supportsPromises] static void getPlayStoreState(
static void getPlayStoreState(
PlayStoreStateCallback callback);
// Get list of available printers
[supportsPromises] static void getPrinterList(
static void getPrinterList(
PrinterArrayCallback callback);
// Returns true if requested app is shown in Chrome.
[supportsPromises] static void isAppShown(DOMString appId,
IsAppShownCallback callback);
static void isAppShown(
DOMString appId,
IsAppShownCallback callback);
// Returns true if ARC is provisioned.
// [deprecated="Use getArcState()"]
[supportsPromises] static void isArcProvisioned(
static void isArcProvisioned(
IsArcProvisionedCallback callback);
// Gets various information about the state of lacros on the system.
[supportsPromises] static void getLacrosInfo(
static void getLacrosInfo(
GetLacrosInfoCallback callback);
// Gets information about the requested ARC app.
[supportsPromises] static void getArcApp(DOMString appId,
GetArcAppCallback callback);
static void getArcApp(
DOMString appId,
GetArcAppCallback callback);
// Gets counts of how many ARC apps have been killed, by priority.
[supportsPromises] static void getArcAppKills(
static void getArcAppKills(
GetArcAppKillsCallback callback);
// Gets information about requested ARC package.
[supportsPromises] static void getArcPackage(
static void getArcPackage(
DOMString packageName,
GetArcPackageCallback callback);
// Waits for system web apps to complete the installation.
[supportsPromises] static void waitForSystemWebAppsInstall(
static void waitForSystemWebAppsInstall(
VoidCallback callback);
// Gets all the default pinned shelf app IDs, these may not be installed.
[supportsPromises] static void getDefaultPinnedAppIds(
static void getDefaultPinnedAppIds(
GetDefaultPinnedAppIdsCallback callback);
// Returns the number of system web apps that should be installed.
[supportsPromises] static void getRegisteredSystemWebApps(
static void getRegisteredSystemWebApps(
GetRegisteredSystemWebAppsCallback callback);
// Returns whether the system web app is currently open or not.
[supportsPromises] static void isSystemWebAppOpen(
static void isSystemWebAppOpen(
DOMString appId,
IsSystemWebAppOpenCallback callback);
// Launches an application from the launcher with the given appId.
[supportsPromises] static void launchApp(DOMString appId,
VoidCallback callback);
static void launchApp(
DOMString appId,
VoidCallback callback);
// Launches an system web app from the launcher with the given app name and
// url.
[supportsPromises] static void launchSystemWebApp(DOMString appName,
DOMString url,
VoidCallback callback);
static void launchSystemWebApp(
DOMString appName,
DOMString url,
VoidCallback callback);
// Launches Files app directly to absolutePath, if the path does not
// exist, it will launch to the default opening location (i.e. My files).
// If the supplied path is a file (and it exists) it will open Files app
// to the parent folder instead.
[supportsPromises] static void launchFilesAppToPath(
static void launchFilesAppToPath(
DOMString absolutePath,
VoidCallback callback);
// Closes an application the given appId in case it was running.
[supportsPromises] static void closeApp(DOMString appId,
VoidCallback callback);
static void closeApp(
DOMString appId,
VoidCallback callback);
// Update printer. Printer with empty ID is considered new.
static void updatePrinter(Printer printer);
@@ -1020,63 +1025,68 @@ namespace autotestPrivate {
// Start ARC directly, note this differs from |setPlayStoreEnabled|. It is
// used to restart ARC in tests.
// |callback|: Called when the operation has completed.
[supportsPromises] static void startArc(VoidCallback callback);
static void startArc(VoidCallback callback);
// Stop ARC directly, note this differs from |setPlayStoreEnabled|. It is
// used to restart ARC in tests. Note, this preserves ARC data.
// |callback|: Called when the operation has completed.
[supportsPromises] static void stopArc(VoidCallback callback);
static void stopArc(VoidCallback callback);
// Enable/disable the Play Store.
// |enabled|: if set, enable the Play Store.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setPlayStoreEnabled(boolean enabled,
VoidCallback callback);
static void setPlayStoreEnabled(
boolean enabled,
VoidCallback callback);
// Get text from ui::Clipboard.
// |callback|: Called with result.
[supportsPromises] static void getClipboardTextData(
static void getClipboardTextData(
DOMStringCallback callback);
// Set text in ui::Clipbaord.
// |callback|: Called when operation is complete.
[supportsPromises] static void setClipboardTextData(DOMString data,
VoidCallback callback);
static void setClipboardTextData(
DOMString data,
VoidCallback callback);
// Run the crostini installer GUI to install the default crostini
// vm / container and create sshfs mount. The installer launches the
// crostini terminal app on completion. The installer expects that
// crostini is not already installed.
// |callback|: Called when the operation has completed.
[supportsPromises] static void runCrostiniInstaller(VoidCallback callback);
static void runCrostiniInstaller(VoidCallback callback);
// Run the crostini uninstaller GUI to remove the default crostini
// vm / container. The callback is invoked upon completion.
[supportsPromises] static void runCrostiniUninstaller(
static void runCrostiniUninstaller(
VoidCallback callback);
// Enable/disable Crostini in preferences.
// |enabled|: Enable Crostini.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setCrostiniEnabled(boolean enabled,
VoidCallback callback);
static void setCrostiniEnabled(
boolean enabled,
VoidCallback callback);
// Export the crostini container.
// |path|: The path in Downloads to save the export.
// |callback|: Called when the operation has completed.
[supportsPromises] static void exportCrostini(DOMString path,
VoidCallback callback);
static void exportCrostini(
DOMString path,
VoidCallback callback);
// Import the crostini container.
// |path|: The path in Downloads to read the import.
// |callback|: Called when the operation has completed.
[supportsPromises] static void importCrostini(DOMString path,
VoidCallback callback);
static void importCrostini(
DOMString path,
VoidCallback callback);
// Returns whether crostini could ever be allowed.
// |callback|: Called with a boolean indicating if crostini can ever be
// allowed in the current profile.
[supportsPromises] static void couldAllowCrostini(
static void couldAllowCrostini(
CouldAllowCrostiniCallback callback);
// Sets mock Plugin VM policy.
@@ -1092,7 +1102,7 @@ namespace autotestPrivate {
// Installs Borealis without showing the normal installer UI.
// |callback|: Called when the operation has completed.
[supportsPromises] static void installBorealis(VoidCallback callback);
static void installBorealis(VoidCallback callback);
// Register a component with CrOSComponentManager.
// |name|: The name of the component.
@@ -1100,35 +1110,36 @@ namespace autotestPrivate {
static void registerComponent(DOMString name, DOMString path);
// Takes a screenshot and returns the data in base64 encoded PNG format.
[supportsPromises] static void takeScreenshot(
static void takeScreenshot(
TakeScreenshotCallback callback);
// Tasks a screenshot for a display.
// |display_id|: the display id of the display.
// |callback|: called when the operation has completed.
[supportsPromises] static void takeScreenshotForDisplay(
static void takeScreenshotForDisplay(
DOMString display_id,
TakeScreenshotCallback callback);
// Triggers an on-demand update of smart dim component and checks whether
// it's successfully loaded by smart dim ml_agent.
// |callback|: Called when the operation has completed.
[supportsPromises] static void loadSmartDimComponent(VoidCallback callback);
static void loadSmartDimComponent(VoidCallback callback);
// Enables/disables the Google Assistant.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setAssistantEnabled(boolean enabled,
long timeout_ms,
VoidCallback callback);
static void setAssistantEnabled(
boolean enabled,
long timeout_ms,
VoidCallback callback);
// Bring up the Assistant service, and wait for the ready signal.
// |callback|: Called when the operation has completed.
[supportsPromises] static void enableAssistantAndWaitForReady(
static void enableAssistantAndWaitForReady(
VoidCallback callback);
// Sends a text query via Google Assistant.
// |callback|: Called when response has been received.
[supportsPromises] static void sendAssistantTextQuery(
static void sendAssistantTextQuery(
DOMString query,
long timeout_ms,
AssistantQueryStatusCallback callback);
@@ -1152,47 +1163,51 @@ namespace autotestPrivate {
// return of this API when launching Assistant via hotkey.
// TODO(meilinw@): update the comment above to use Tast instead after
// adding API to enable hotword in Tast.
[supportsPromises] static void waitForAssistantQueryStatus(
static void waitForAssistantQueryStatus(
long timeout_s,
AssistantQueryStatusCallback callback);
// Whether the local list of installed ARC packages has been refreshed for
// the first time after user login.
[supportsPromises] static void isArcPackageListInitialRefreshed(
static void isArcPackageListInitialRefreshed(
IsArcPackageListInitialRefreshedCallback callback);
// Set value for the specified user pref in the pref tree.
[supportsPromises] static void setAllowedPref(DOMString pref_name,
any value,
VoidCallback callback);
static void setAllowedPref(
DOMString pref_name,
any value,
VoidCallback callback);
// Clears value for the specified user pref in the pref tree.
[supportsPromises] static void clearAllowedPref(DOMString pref_name,
VoidCallback callback);
static void clearAllowedPref(
DOMString pref_name,
VoidCallback callback);
// DEPRECATED: use SetAllowedPref instead, see crbug/1262034
// Set value for the specified user pref in the pref tree.
[supportsPromises] static void setWhitelistedPref(DOMString pref_name,
any value,
VoidCallback callback);
static void setWhitelistedPref(
DOMString pref_name,
any value,
VoidCallback callback);
// Enable/disable a Crostini app's "scaled" property.
// |appId|: The Crostini application ID.
// |scaled|: The app is "scaled" when shown, which means it uses low display
// density.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setCrostiniAppScaled(DOMString appId,
boolean scaled,
VoidCallback callback);
static void setCrostiniAppScaled(
DOMString appId,
boolean scaled,
VoidCallback callback);
// Get the primary display scale factor.
// |callback| is invoked with the scale factor.
[supportsPromises] static void getPrimaryDisplayScaleFactor(
static void getPrimaryDisplayScaleFactor(
GetPrimaryDisplayScaleFactorCallback callback);
// Get the tablet mode enabled status.
// |callback| is invoked with the tablet mode enablement status.
[supportsPromises] static void isTabletModeEnabled(
static void isTabletModeEnabled(
IsTabletModeEnabledCallback callback);
// Enable/disable tablet mode. After calling this function, it won't be
@@ -1200,27 +1215,27 @@ namespace autotestPrivate {
// functionality will be disabled.
// |enabled|: if set, enable tablet mode.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setTabletModeEnabled(
static void setTabletModeEnabled(
boolean enabled,
SetTabletModeEnabledCallback callback);
// Get the list of all installed applications
[supportsPromises] static void getAllInstalledApps(
static void getAllInstalledApps(
GetAllInstalledAppsCallback callback);
// Get the list of all shelf items
[supportsPromises] static void getShelfItems(
static void getShelfItems(
GetShelfItemsCallback callback);
// Get the launcher search box search state.
[supportsPromises] static void getLauncherSearchBoxState(
static void getLauncherSearchBoxState(
GetLauncherSearchBoxStateCallback callback);
// Get the shelf auto hide behavior.
// |displayId|: display that contains the shelf.
// |callback| is invoked with the shelf auto hide behavior. Possible
// behavior values are: "always", "never" or "hidden".
[supportsPromises] static void getShelfAutoHideBehavior(
static void getShelfAutoHideBehavior(
DOMString displayId,
GetShelfAutoHideBehaviorCallback callback);
@@ -1228,7 +1243,7 @@ namespace autotestPrivate {
// |displayId|: display that contains the shelf.
// |behavior|: an enum of "always", "never" or "hidden".
// |callback|: Called when the operation has completed.
[supportsPromises] static void setShelfAutoHideBehavior(
static void setShelfAutoHideBehavior(
DOMString displayId,
DOMString behavior,
VoidCallback callback);
@@ -1236,7 +1251,7 @@ namespace autotestPrivate {
// Get the shelf alignment.
// |displayId|: display that contains the shelf.
// |callback| is invoked with the shelf alignment type.
[supportsPromises] static void getShelfAlignment(
static void getShelfAlignment(
DOMString displayId,
GetShelfAlignmentCallback callback);
@@ -1244,27 +1259,28 @@ namespace autotestPrivate {
// |displayId|: display that contains the shelf.
// |alignment|: the type of alignment to set.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setShelfAlignment(
static void setShelfAlignment(
DOMString displayId,
ShelfAlignmentType alignment,
VoidCallback callback);
// Create a pin on shelf for the app specified by |appId|.
// Deprecated. Use setShelfIconPin() instead.
[supportsPromises] static void pinShelfIcon(DOMString appId,
VoidCallback callback);
static void pinShelfIcon(
DOMString appId,
VoidCallback callback);
// Update pin states of the shelf apps based on |updateParams|. Return a
// list of app ids whose pin state changed. Pin states will not be changed
// if the method fails.
[supportsPromises] static void setShelfIconPin(
static void setShelfIconPin(
ShelfIconPinUpdateParam[] updateParams,
optional SetShelfIconPinCallback callback);
// Enter or exit the overview mode.
// |start|: whether entering to or exiting from the overview mode.
// |callback|: called after the overview mode switch finishes.
[supportsPromises] static void setOverviewModeState(
static void setOverviewModeState(
boolean start,
SetOverviewModeStateCallback callback);
@@ -1275,28 +1291,29 @@ namespace autotestPrivate {
// |color|: the int color of the system ui.
// |theme|: the theme of the system ui.
// |callback|: callback to deliver sendArcOverlayColor result.
[supportsPromises] static void sendArcOverlayColor(
static void sendArcOverlayColor(
long color, ThemeStyle theme, SendArcOverlayColorCallback callback);
// Start ARC performance tracing for the active ARC app window.
// |callback|: Called when the operation has completed.
[supportsPromises] static void arcAppTracingStart(VoidCallback callback);
static void arcAppTracingStart(VoidCallback callback);
// Stop ARC performance tracing if it was started and analyze results.
// |callback|: callback to deliver tracing results.
[supportsPromises] static void arcAppTracingStopAndAnalyze(
static void arcAppTracingStopAndAnalyze(
ArcAppTracingCallback callback);
// Swap the windows in the split view.
// |callback|: Called when the operation has completed.
[supportsPromises] static void swapWindowsInSplitView(
static void swapWindowsInSplitView(
VoidCallback callback);
// Set ARC app window focused.
// |packageName|: the package name of the ARC app window.
// |callback|: called when the operation has completed.
[supportsPromises] static void setArcAppWindowFocus(DOMString packageName,
VoidCallback callback);
static void setArcAppWindowFocus(
DOMString packageName,
VoidCallback callback);
// Invokes the callback when the display rotation animation is finished, or
// invokes it immediately if it is not animating. The callback argument
@@ -1304,7 +1321,7 @@ namespace autotestPrivate {
// |displayId|: display that contains the shelf.
// |rotation|: the target rotation.
// |callback|: called when the operation has completed.
[supportsPromises] static void waitForDisplayRotation(
static void waitForDisplayRotation(
DOMString displayId,
RotationType rotation,
WaitForDisplayRotationCallback callback);
@@ -1312,7 +1329,7 @@ namespace autotestPrivate {
// Get information on all application windows. Callback will be called
// with the list of |AppWindowInfo| dictionary.
// |callback|: called with window list.
[supportsPromises] static void getAppWindowList(
static void getAppWindowList(
GetAppWindowListCallback callback);
// Send WM event to change the app window's window state.
@@ -1321,7 +1338,7 @@ namespace autotestPrivate {
// |wait|: whether the method should wait for the window state to change before returning.
// |callback|: called when the window state is changed if |wait| is true.
// Otherwise, called right after the WM event is sent.
[supportsPromises] static void setAppWindowState(
static void setAppWindowState(
long id,
WindowStateChangeDict change,
optional boolean wait,
@@ -1330,27 +1347,29 @@ namespace autotestPrivate {
// Activate app window given by "id".
// |id|: the id of the window
// |callback|: called when the window is requested to activate.
[supportsPromises] static void activateAppWindow(long id,
VoidCallback callback);
static void activateAppWindow(
long id,
VoidCallback callback);
// Closes an app window given by "id".
// |id|: the id of the window
// |callback|: called when the window is requested to close.
[supportsPromises] static void closeAppWindow(long id,
VoidCallback callback);
static void closeAppWindow(
long id,
VoidCallback callback);
// Installs the Progressive Web App (PWA) that is in the current URL.
// |timeout_ms|: Timeout in milliseconds for the operation to complete.
// |callback|: called when the operation has completed. Passes the app Id
// of the recently installed PWA as argument.
[supportsPromises] static void installPWAForCurrentURL(
static void installPWAForCurrentURL(
long timeout_ms,
InstallPWAForCurrentURLCallback callback);
// Activates shortcut.
// |accelerator|: the accelerator to activate.
// |callback|: called when the operation has completed.
[supportsPromises] static void activateAccelerator(
static void activateAccelerator(
Accelerator accelerator,
AcceleratorCallback callback);
@@ -1358,7 +1377,7 @@ namespace autotestPrivate {
// in that state.
// |launcherState|: the target launcher state.
// |callback|: called when the operation has completed.
[supportsPromises] static void waitForLauncherState(
static void waitForLauncherState(
LauncherStateType launcherState,
VoidCallback callback);
@@ -1366,69 +1385,71 @@ namespace autotestPrivate {
// that state.
// |overviewState|: the target overview state.
// |callback|: called when overview has reached |overviewState|.
[supportsPromises] static void waitForOverviewState(
static void waitForOverviewState(
OverviewStateType overviewState,
VoidCallback callback);
// Creates a new desk if the maximum number of desks has not been reached.
// |callback|: called to indicate success or failure.
[supportsPromises] static void createNewDesk(DesksCallback callback);
static void createNewDesk(DesksCallback callback);
// Activates the desk at the given |index| triggering the activate-desk
// animation.
// |index|: the zero-based index of the desk desired to be activated.
// |callback|: called indicating success when the animation completes, or
// failure when the desk at |index| is already the active desk.
[supportsPromises] static void activateDeskAtIndex(long index,
DesksCallback callback);
static void activateDeskAtIndex(
long index,
DesksCallback callback);
// Removes the currently active desk and triggers the remove-desk animation.
// |callback|: called indicating success when the animation completes, or
// failure if the currently active desk is the last available desk which
// cannot be removed.
[supportsPromises] static void removeActiveDesk(DesksCallback callback);
static void removeActiveDesk(DesksCallback callback);
// Activates the desk at the given |index| by chaining multiple
// activate-desk animations.
// |index|: the zero-based index of the desk desired to be activated.
// |callback|: called indicating success when the animation completes, or
// failure when the desk at |index| is already the active desk.
[supportsPromises] static void activateAdjacentDesksToTargetIndex(
static void activateAdjacentDesksToTargetIndex(
long index,
DesksCallback callback);
// Fetches the number of open desks in the `DesksController` at the time of
// call.
// `callback`: callback that is passed the number of open desks.
[supportsPromises] static void getDeskCount(
GetDeskCountCallback callback
);
static void getDeskCount(
GetDeskCountCallback callback);
// Fetches info about the open desks at the time of the call.
// `callback`: callback that is passed desks information.
[supportsPromises] static void getDesksInfo(
GetDesksInfoCallback callback
);
static void getDesksInfo(
GetDesksInfoCallback callback);
// Create mouse events to cause a mouse click.
// |button|: the mouse button for the click event.
// |callback|: called after the mouse click finishes.
[supportsPromises] static void mouseClick(MouseButton button,
VoidCallback callback);
static void mouseClick(
MouseButton button,
VoidCallback callback);
// Create a mouse event to cause mouse pressing. The mouse button stays
// in the pressed state.
// |button|: the mouse button to be pressed.
// |callback|: called after the mouse pressed event is handled.
[supportsPromises] static void mousePress(MouseButton button,
VoidCallback callback);
static void mousePress(
MouseButton button,
VoidCallback callback);
// Create a mouse event to release a mouse button. This does nothing and
// returns immediately if the specified button is not pressed.
// |button|: the mouse button to be released.
// |callback|: called after the mouse is released.
[supportsPromises] static void mouseRelease(MouseButton button,
VoidCallback callback);
static void mouseRelease(
MouseButton button,
VoidCallback callback);
// Create mouse events to move a mouse cursor to the location. This can
// cause a dragging if a button is pressed. It starts from the last mouse
@@ -1437,33 +1458,36 @@ namespace autotestPrivate {
// |duration_in_ms|: the duration (in milliseconds) for the mouse movement.
// The mouse will move linearly. 0 means moving immediately.
// |callback|: called after the mouse move finishes.
[supportsPromises] static void mouseMove(Location location,
double duration_in_ms,
VoidCallback callback);
static void mouseMove(
Location location,
double duration_in_ms,
VoidCallback callback);
// Enable/disable metrics reporting in preferences.
// |enabled|: Enable metrics reporting.
// |callback|: Called when the operation has completed.
[supportsPromises] static void setMetricsEnabled(boolean enabled,
VoidCallback callback);
static void setMetricsEnabled(
boolean enabled,
VoidCallback callback);
// Sends ARC touch mode enabled or disabled.
// |enable|: whether enabled touch mode.
// |callback|: called when action performed.
[supportsPromises] static void setArcTouchMode(boolean enabled,
VoidCallback callback);
static void setArcTouchMode(
boolean enabled,
VoidCallback callback);
// Fetches ui information of scrollable shelf view for the given shelf
// state. This function does not change scrollable shelf.
// [deprecated="Use getShelfUIInfoForState()"]
[supportsPromises] static void getScrollableShelfInfoForState(
static void getScrollableShelfInfoForState(
ScrollableShelfState state,
GetScrollableShelfInfoForStateCallback callback);
// Fetches UI information of shelf (including scrollable shelf and hotseat)
// for the given shelf state. This function does not change any shelf
// component.
[supportsPromises] static void getShelfUIInfoForState(
static void getShelfUIInfoForState(
ShelfState state,
GetShelfUIInfoForStateCallback callback);
@@ -1472,7 +1496,7 @@ namespace autotestPrivate {
// |bounds|: bounds the window should be set to.
// |displayId|: id of display to move the window to.
// |callback|: called when the window bounds are changed.
[supportsPromises] static void setWindowBounds(
static void setWindowBounds(
long id,
Bounds bounds,
DOMString displayId,
@@ -1482,7 +1506,7 @@ namespace autotestPrivate {
// specified, the primary display is used. Otherwise, the display specified
// by the display id is used. If `throughputIntervalMs` is not specified,
// default 5 seconds interval is used to collect throughput data.
[supportsPromises] static void startSmoothnessTracking(
static void startSmoothnessTracking(
optional DOMString displayId,
optional long throughputIntervalMs,
VoidCallback callback);
@@ -1490,7 +1514,7 @@ namespace autotestPrivate {
// Stops smoothness tracking for a display and report the smoothness. If
// the display id is not specified, the primary display is used. Otherwise,
// the display specified by the display id is used.
[supportsPromises] static void stopSmoothnessTracking(
static void stopSmoothnessTracking(
optional DOMString displayId,
StopSmoothnessTrackingCallback callback);
@@ -1501,7 +1525,7 @@ namespace autotestPrivate {
// |numCompletions|: number of completions of the animation.
// |timeout|: the timeout in seconds.
// |callback|: Called when the operation has completed.
[supportsPromises] static void waitForAmbientPhotoAnimation(
static void waitForAmbientPhotoAnimation(
long numCompletions,
long timeout,
VoidCallback callback);
@@ -1509,7 +1533,7 @@ namespace autotestPrivate {
// Waits for ambient video to successfully start playback.
// |timeout|: the timeout in seconds.
// |callback|: Called when the operation has completed.
[supportsPromises] static void waitForAmbientVideo(
static void waitForAmbientVideo(
long timeout,
VoidCallback callback);
@@ -1518,118 +1542,119 @@ namespace autotestPrivate {
// automation.getDesktop will miss initialization. The caller should ensure
// invalidation of those information (i.e. reloading the entire background
// page).
[supportsPromises] static void disableAutomation(VoidCallback callback);
static void disableAutomation(VoidCallback callback);
// Starts to ui::ThroughputTracker data collection for tracked animations.
[supportsPromises] static void startThroughputTrackerDataCollection(
static void startThroughputTrackerDataCollection(
VoidCallback callback);
// Stops ui::ThroughputTracker data collection and reports the collected
// data since the start or the last GetThroughtputTrackerData call.
[supportsPromises] static void stopThroughputTrackerDataCollection(
static void stopThroughputTrackerDataCollection(
StopThroughputTrackerDataCollectionCallback callback);
// Reports the currently collected animation data.
[supportsPromises] static void getThroughputTrackerData(
static void getThroughputTrackerData(
GetThroughtputTrackerDataCallback callback);
// Gets the smoothness of a display. If the display id is not specified,
// the primary display is used.
[supportsPromises] static void getDisplaySmoothness(
static void getDisplaySmoothness(
optional DOMString displayId,
GetDisplaySmoothnessCallback callback);
// Resets the holding space by removing all items and clearing the prefs.
[supportsPromises] static void resetHoldingSpace(
static void resetHoldingSpace(
optional ResetHoldingSpaceOptions options,
VoidCallback callback);
// Starts collection of ui::LoginEventRecorder data.
[supportsPromises] static void startLoginEventRecorderDataCollection(
static void startLoginEventRecorderDataCollection(
VoidCallback callback);
// Stops ui::LoginEventRecorder data collection and reports all the
// collected data.
[supportsPromises] static void getLoginEventRecorderLoginEvents(
static void getLoginEventRecorderLoginEvents(
GetLoginEventRecorderLoginEventsCallback callback);
// Adds login event to test LoginEventRecorderDataCollection API.
[supportsPromises] static void addLoginEventForTesting(
static void addLoginEventForTesting(
VoidCallback callback);
// Force auto theme mode in dark mode or light mode for testing.
[supportsPromises] static void forceAutoThemeMode(boolean darkModeEnabled, VoidCallback callback);
static void forceAutoThemeMode(boolean darkModeEnabled, VoidCallback callback);
// Fetches an access token from Chrome.
[supportsPromises] static void getAccessToken(
static void getAccessToken(
GetAccessTokenParams accessTokenParams,
GetAccessTokenCallback callback);
// Returns whether the current input method is ready to accept key events.
[supportsPromises] static void isInputMethodReadyForTesting(
static void isInputMethodReadyForTesting(
IsInputMethodReadyForTestingCallback callback);
// Creates a temporary directory visible under the Fusebox mount point.
[supportsPromises] static void makeFuseboxTempDir(
static void makeFuseboxTempDir(
MakeFuseboxTempDirCallback callback);
// Removes a temporary directory visible under the Fusebox mount point. The
// fuseboxFilePath argument was returned by the MakeFuseboxTempDirCallback.
[supportsPromises] static void removeFuseboxTempDir(
static void removeFuseboxTempDir(
DOMString fuseboxFilePath,
RemoveFuseboxTempDirCallback callback);
// Remove the specified component extension.
[supportsPromises] static void removeComponentExtension(
static void removeComponentExtension(
DOMString extensionId, VoidCallback callback);
// Starts frame counting in viz. `bucketSizeInSeconds` decides the bucket
// size of the frame count records. If it is X seconds, each record is
// the number of presented frames in X seconds.
[supportsPromises] static void startFrameCounting(long bucketSizeInSeconds,
static void startFrameCounting(
long bucketSizeInSeconds,
VoidCallback callback);
// Ends frame counting in viz and return the collected data.
[supportsPromises] static void stopFrameCounting(
static void stopFrameCounting(
StopFrameCountingCallback callback);
// Install a bruschetta VM.
[supportsPromises] static void installBruschetta(
static void installBruschetta(
DOMString vm_name, VoidCallback callback);
// Delete a bruschetta VM.
[supportsPromises] static void removeBruschetta(
static void removeBruschetta(
DOMString vm_name, VoidCallback callback);
// Returns whether a base::Feature is enabled. The state may change because
// a Chrome uprev into ChromeOS changed the default feature state.
[supportsPromises] static void isFeatureEnabled(
static void isFeatureEnabled(
DOMString feature_name, IsFeatureEnabledCallback callback);
// Returns keyboard layout used for current input method.
[supportsPromises] static void getCurrentInputMethodDescriptor(
static void getCurrentInputMethodDescriptor(
GetCurrentInputMethodDescriptorCallback callback);
// Overrides the response from Orca Provider and returns the boolean value
// that indicates if the overriding is successful or not.
[supportsPromises] static void overrideOrcaResponseForTesting(
static void overrideOrcaResponseForTesting(
OrcaResponseArray array,
OverrideOrcaResponseForTestingCallback callback);
// ARC set interactive enable/disable state.
// |enabled|: Enable ARC interactive.
// |callback|: Called when the operation sent to ARC by mojo.
[supportsPromises] static void setArcInteractiveState(
static void setArcInteractiveState(
boolean enabled, VoidCallback callback);
// Returns whether a field trial exists and has been activated.
[supportsPromises] static void isFieldTrialActive(
static void isFieldTrialActive(
DOMString trial_name,
DOMString group_name,
IsFieldTrialActiveCallback callback);
// ARC get wakefulness mode.
[supportsPromises] static void getArcWakefulnessMode(
static void getArcWakefulnessMode(
WakefulnessModeCallback callback);
// Sets the default device language.
@@ -64,7 +64,7 @@ namespace brailleDisplayPrivate {
interface Functions {
// Gets the current display state.
[supportsPromises] static void getDisplayState(
static void getDisplayState(
DisplayStateCallback callback);
// Write the given dot patterns to the display. The buffer contains one
@@ -268,15 +268,16 @@ namespace certificateProvider {
// |callback|: Is called when the dialog is resolved with the user input, or
// when the dialog request finishes unsuccessfully (e.g. the dialog was
// canceled by the user or was not allowed to be shown).
[supportsPromises] static void requestPin(RequestPinDetails details,
RequestPinCallback callback);
static void requestPin(
RequestPinDetails details,
RequestPinCallback callback);
// Stops the pin request started by the $(ref:requestPin) function.
// |details|: Contains the details about the reason for stopping the
// request flow.
// |callback|: To be used by Chrome to send to the extension the status from
// their request to close PIN dialog for user.
[supportsPromises] static void stopPinRequest(
static void stopPinRequest(
StopPinRequestDetails details,
StopPinRequestCallback callback);
@@ -288,7 +289,7 @@ namespace certificateProvider {
// received.</p>
// |details|: The certificates to set. Invalid certificates will be ignored.
// |callback|: Called upon completion.
[supportsPromises] static void setCertificates(
static void setCertificates(
SetCertificatesDetails details,
optional SetCertificatesCallback callback);
@@ -297,7 +298,7 @@ namespace certificateProvider {
// $(ref:onSignatureRequested) event; the API implementation will stop
// waiting for this call after some time and respond with a timeout
// error when this function is called.</p>
[supportsPromises] static void reportSignature(
static void reportSignature(
ReportSignatureDetails details,
optional ReportSignatureCallback callback);
};
@@ -18,14 +18,14 @@ namespace certificateProviderInternal {
interface Functions {
// Matches certificateProvider.SignCallback. Must be called without the
// signature to report an error.
[supportsPromises] static void reportSignature(
static void reportSignature(
long requestId,
optional ArrayBuffer signature,
optional DoneCallback callback);
// Matches certificateProvider.CertificatesCallback. Must be called without
// the certificates argument to report an error.
[supportsPromises] static void reportCertificates(
static void reportCertificates(
long requestId,
optional certificateProvider.CertificateInfo[] certificates,
optional ResultCallback callback);
@@ -47,7 +47,8 @@ namespace crashReportPrivate {
// Report and upload an error to Crash.
// |info|: Information about the error.
// |callback|: Called when the error has been uploaded.
[supportsPromises] static void reportError(ErrorInfo info,
ReportCallback callback);
static void reportError(
ErrorInfo info,
ReportCallback callback);
};
};
@@ -650,62 +650,64 @@ namespace developerPrivate {
interface Functions {
// Runs auto update for extensions and apps immediately.
// |callback| : Called after update check completes.
[supportsPromises] static void autoUpdate(optional VoidCallback callback);
static void autoUpdate(optional VoidCallback callback);
// Returns information of all the extensions and apps installed.
// |options| : Options to restrict the items returned.
// |callback| : Called with extensions info.
[supportsPromises] static void getExtensionsInfo(
static void getExtensionsInfo(
optional GetExtensionsInfoOptions options,
optional ExtensionInfosCallback callback);
// Returns information of a particular extension.
// |id| : The id of the extension.
// |callback| : Called with the result.
[supportsPromises] static void getExtensionInfo(
static void getExtensionInfo(
DOMString id,
optional ExtensionInfoCallback callback);
// Returns the size of a particular extension on disk (already formatted).
// |id| : The id of the extension.
// |callback| : Called with the result.
[supportsPromises] static void getExtensionSize(DOMString id,
StringCallback callback);
static void getExtensionSize(
DOMString id,
StringCallback callback);
// Returns the current profile's configuration.
[supportsPromises] static void getProfileConfiguration(
static void getProfileConfiguration(
ProfileInfoCallback callback);
// Updates the active profile.
// |update| : The parameters for updating the profile's configuration. Any
// properties omitted from |update| will not be changed.
[supportsPromises] static void updateProfileConfiguration(
static void updateProfileConfiguration(
ProfileConfigurationUpdate update,
optional VoidCallback callback);
// Reloads a given extension.
// |extensionId| : The id of the extension to reload.
// |options| : Additional configuration parameters.
[supportsPromises] static void reload(DOMString extensionId,
optional ReloadOptions options,
optional LoadErrorCallback callback);
static void reload(
DOMString extensionId,
optional ReloadOptions options,
optional LoadErrorCallback callback);
// Modifies an extension's current configuration.
// |update| : The parameters for updating the extension's configuration.
// Any properties omitted from |update| will not be changed.
[supportsPromises] static void updateExtensionConfiguration(
static void updateExtensionConfiguration(
ExtensionConfigurationUpdate update,
optional VoidCallback callback);
// Loads a user-selected unpacked item.
// |options| : Additional configuration parameters.
[supportsPromises] static void loadUnpacked(
static void loadUnpacked(
optional LoadUnpackedOptions options,
optional LoadErrorCallback callback);
// Installs the file that was dragged and dropped onto the associated
// page.
[supportsPromises] static void installDroppedFile(
static void installDroppedFile(
optional VoidCallback callback);
// Notifies the browser that a user began a drag in order to install an
@@ -714,7 +716,7 @@ namespace developerPrivate {
// Loads an extension / app.
// |directory| : The directory to load the extension from.
[supportsPromises] static void loadDirectory(
static void loadDirectory(
[instanceOf=DirectoryEntry] object directory,
StringCallback callback);
@@ -723,66 +725,69 @@ namespace developerPrivate {
// |fileType| : Required file type. For example, pem type is for private
// key and load type is for an unpacked item.
// |callback| : called with selected item's path.
[supportsPromises] static void choosePath(SelectType selectType,
FileType fileType,
StringCallback callback);
static void choosePath(
SelectType selectType,
FileType fileType,
StringCallback callback);
// Pack an extension.
// |rootPath| : The path of the extension.
// |privateKeyPath| : The path of the private key, if one is given.
// |flags| : Special flags to apply to the loading process, if any.
// |callback| : called with the success result string.
[supportsPromises] static void packDirectory(
static void packDirectory(
DOMString path,
optional DOMString privateKeyPath,
optional long flags,
optional PackCallback callback);
// Returns true if the profile is managed.
[supportsPromises] static void isProfileManaged(BooleanCallback callback);
static void isProfileManaged(BooleanCallback callback);
// Reads and returns the contents of a file related to an extension which
// caused an error.
[supportsPromises] static void requestFileSource(
static void requestFileSource(
RequestFileSourceProperties properties,
RequestFileSourceCallback callback);
// Open the developer tools to focus on a particular error.
[supportsPromises] static void openDevTools(
static void openDevTools(
OpenDevToolsProperties properties,
optional VoidCallback callback);
// Delete reported extension errors.
// |properties| : The properties specifying the errors to remove.
[supportsPromises] static void deleteExtensionErrors(
static void deleteExtensionErrors(
DeleteExtensionErrorsProperties properties,
optional VoidCallback callback);
// Repairs the extension specified.
// |extensionId| : The id of the extension to repair.
[supportsPromises] static void repairExtension(
static void repairExtension(
DOMString extensionId,
optional VoidCallback callback);
// Shows the options page for the extension specified.
// |extensionId| : The id of the extension to show the options page for.
[supportsPromises] static void showOptions(DOMString extensionId,
optional VoidCallback callback);
static void showOptions(
DOMString extensionId,
optional VoidCallback callback);
// Shows the path of the extension specified.
// |extensionId| : The id of the extension to show the path for.
[supportsPromises] static void showPath(DOMString extensionId,
optional VoidCallback callback);
static void showPath(
DOMString extensionId,
optional VoidCallback callback);
// (Un)suspends global shortcut handling.
// |isSuspended| : Whether or not shortcut handling should be suspended.
[supportsPromises] static void setShortcutHandlingSuspended(
static void setShortcutHandlingSuspended(
boolean isSuspended,
optional VoidCallback callback);
// Updates an extension command.
// |update| : The parameters for updating the extension command.
[supportsPromises] static void updateExtensionCommand(
static void updateExtensionCommand(
ExtensionCommandUpdate update,
optional VoidCallback callback);
@@ -790,7 +795,7 @@ namespace developerPrivate {
// have access to the host if it is within the requested permissions.
// |extensionId|: The id of the extension to modify.
// |host|: The host to add.
[supportsPromises] static void addHostPermission(
static void addHostPermission(
DOMString extensionId,
DOMString host,
optional VoidCallback callback);
@@ -799,50 +804,50 @@ namespace developerPrivate {
// with a host that the extension has access to.
// |extensionId|: The id of the extension to modify.
// |host|: The host to remove.
[supportsPromises] static void removeHostPermission(
static void removeHostPermission(
DOMString extensionId,
DOMString host,
optional VoidCallback callback);
// Returns the user specified site settings (which origins can extensions
// always/never run on) for the current profile.
[supportsPromises] static void getUserSiteSettings(
static void getUserSiteSettings(
UserSiteSettingsCallback callback);
// Adds hosts to the set of user permitted or restricted sites. If any hosts
// are in the other set than what's specified in `options`, then they are
// removed from that set.
[supportsPromises] static void addUserSpecifiedSites(
static void addUserSpecifiedSites(
UserSiteSettingsOptions options,
optional VoidCallback callback);
// Removes hosts from the specified set of user permitted or restricted
// sites.
[supportsPromises] static void removeUserSpecifiedSites(
static void removeUserSpecifiedSites(
UserSiteSettingsOptions options,
optional VoidCallback callback);
// Returns all hosts specified by user site settings, grouped by each host's
// eTLD+1.
[supportsPromises] static void getUserAndExtensionSitesByEtld(
static void getUserAndExtensionSitesByEtld(
UserAndExtensionSitesByEtldCallback callback);
// Returns a list of extensions which have at least one matching site in
// common between its set of host permissions and `site`.
[supportsPromises] static void getMatchingExtensionsForSite(
static void getMatchingExtensionsForSite(
DOMString site,
GetMatchingExtensionsForSiteCallback callback);
// Updates the site access settings for multiple extensions for the given
// `site` and calls `callback` once all updates have been finished.
// Each update species an extension id an a new HostAccess setting.
[supportsPromises] static void updateSiteAccess(
static void updateSiteAccess(
DOMString site,
ExtensionSiteAccessUpdate[] updates,
optional VoidCallback callback);
// Removes multiple installed extensions.
[supportsPromises] static void removeMultipleExtensions(
static void removeMultipleExtensions(
DOMString[] extensionIds,
optional VoidCallback callback);
@@ -506,15 +506,16 @@ namespace documentScan {
// sent to the callback.
// |options| : Object containing scan parameters.
// |callback| : Called with the result and data from the scan.
[supportsPromises] static void scan(ScanOptions options,
ScanCallback callback);
static void scan(
ScanOptions options,
ScanCallback callback);
// Gets the list of available scanners. On success, the list will be
// sent to the callback.
// |filter| : <code>DeviceFilter</code> indicating which types of scanners
// should be returned.
// |callback| : Called with the result and list of scanners.
[nodoc, supportsPromises] static void getScannerList(
[nodoc] static void getScannerList(
DeviceFilter filter, GetScannerListCallback callback);
// Opens a scanner for exclusive access. On success, the response containing
@@ -522,7 +523,7 @@ namespace documentScan {
// |scannerId| : Scanner id previously returned from <code>getScannerList</code>
// indicating which scanner should be opened.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void openScanner(
[nodoc] static void openScanner(
DOMString scannerId, OpenScannerCallback callback);
// Gets the group names and member options from a scanner handle previously
@@ -530,7 +531,7 @@ namespace documentScan {
// |scannerHandle| : Open scanner handle previously returned from
// <code>openScanner</code>.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void getOptionGroups(
[nodoc] static void getOptionGroups(
DOMString scannerHandle, GetOptionGroupsCallback callback);
// Closes a previously opened scanner handle. A response indicating the
@@ -540,7 +541,7 @@ namespace documentScan {
// |scannerHandle| : Open scanner handle previously returned from
// <code>openScanner</code>.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void closeScanner(
[nodoc] static void closeScanner(
DOMString scannerHandle, CloseScannerCallback callback);
// Sends the list of new option values in <code>options</code> as a bundle
@@ -553,7 +554,7 @@ namespace documentScan {
// |options| : A list of <code>OptionSetting</code>s that will be applied to
// <code>scannerHandle</code>.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void setOptions(
[nodoc] static void setOptions(
DOMString scannerHandle, OptionSetting[] options,
SetOptionsCallback callback);
@@ -567,7 +568,7 @@ namespace documentScan {
// be used for the scan. <code>StartScanOptions.format</code> must match
// one of the entries returned in the scanner's <code>ScannerInfo</code>.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void startScan(
[nodoc] static void startScan(
DOMString scannerHandle, StartScanOptions options,
StartScanCallback callback);
@@ -576,7 +577,7 @@ namespace documentScan {
// |job| : An active scan job previously returned from
// <code>startScan</code>.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void cancelScan(
[nodoc] static void cancelScan(
DOMString job, CancelScanCallback callback);
// Reads the next chunk of available image data from an active job handle.
@@ -594,7 +595,7 @@ namespace documentScan {
// |job| : Active job handle previously returned from
// <code>startScan</code>.
// |callback| : Called with the result.
[nodoc, supportsPromises] static void readScanData(
[nodoc] static void readScanData(
DOMString job, ReadScanDataCallback callback);
};
};
@@ -143,7 +143,8 @@ namespace downloads {
deepScannedOpenedDangerous,
promptForScanning,
promptForLocalPasswordScanning,
accountCompromise
accountCompromise,
blockedScanFailed
};
// <dl><dt>in_progress</dt>
@@ -263,19 +264,19 @@ namespace downloads {
DOMString[]? query;
// Limits results to $(ref:DownloadItem) that
// started before the given ms since the epoch.
// started before the given ms in ISO 8601 format.
DOMString? startedBefore;
// Limits results to $(ref:DownloadItem) that
// started after the given ms since the epoch.
// started after the given ms in ISO 8601 format.
DOMString? startedAfter;
// Limits results to $(ref:DownloadItem) that ended before the given ms since the
// epoch.
// Limits results to $(ref:DownloadItem) that ended before the given ms in
// ISO 8601 format.
DOMString? endedBefore;
// Limits results to $(ref:DownloadItem) that ended after the given ms since the
// epoch.
// Limits results to $(ref:DownloadItem) that ended after the given ms in
// ISO 8601 format
DOMString? endedAfter;
// Limits results to $(ref:DownloadItem) whose
@@ -462,7 +463,7 @@ namespace downloads {
// backwards compatible between releases. Extensions must not parse it.
// |options|: What to download and how.
// |callback|: Called with the id of the new $(ref:DownloadItem).
[supportsPromises] static void download(
static void download(
DownloadOptions options,
optional DownloadCallback callback);
@@ -472,31 +473,35 @@ namespace downloads {
// <code>orderBy: ['-startTime']</code>, set <code>limit</code> to the
// number of items per page, and set <code>startedAfter</code> to the
// <code>startTime</code> of the last item from the last page.
[supportsPromises] static void search(DownloadQuery query,
SearchCallback callback);
static void search(
DownloadQuery query,
SearchCallback callback);
// Pause the download. If the request was successful the download is in a
// paused state. Otherwise $(ref:runtime.lastError) contains an error message.
// The request will fail if the download is not active.
// |downloadId|: The id of the download to pause.
// |callback|: Called when the pause request is completed.
[supportsPromises] static void pause(long downloadId,
optional NullCallback callback);
static void pause(
long downloadId,
optional NullCallback callback);
// Resume a paused download. If the request was successful the download is
// in progress and unpaused. Otherwise $(ref:runtime.lastError) contains an
// error message. The request will fail if the download is not active.
// |downloadId|: The id of the download to resume.
// |callback|: Called when the resume request is completed.
[supportsPromises] static void resume(long downloadId,
optional NullCallback callback);
static void resume(
long downloadId,
optional NullCallback callback);
// Cancel a download. When <code>callback</code> is run, the download is
// cancelled, completed, interrupted or doesn't exist anymore.
// |downloadId|: The id of the download to cancel.
// |callback|: Called when the cancel request is completed.
[supportsPromises] static void cancel(long downloadId,
optional NullCallback callback);
static void cancel(
long downloadId,
optional NullCallback callback);
// Retrieve an icon for the specified download. For new downloads, file
// icons are available after the $(ref:onCreated) event has been received. The
@@ -509,7 +514,7 @@ namespace downloads {
// determined, $(ref:runtime.lastError) will contain an error message.
// |downloadId|: The identifier for the download.
// |callback|: A URL to an image that represents the download.
[supportsPromises] static void getFileIcon(
static void getFileIcon(
long downloadId,
optional GetFileIconOptions options,
GetFileIconCallback callback);
@@ -535,13 +540,15 @@ namespace downloads {
// downloaded file. An $(ref:onErased) event will fire for each
// $(ref:DownloadItem) that matches <code>query</code>, then
// <code>callback</code> will be called.
[supportsPromises] static void erase(DownloadQuery query,
optional EraseCallback callback);
static void erase(
DownloadQuery query,
optional EraseCallback callback);
// Remove the downloaded file if it exists and the $(ref:DownloadItem) is
// complete; otherwise return an error through $(ref:runtime.lastError).
[supportsPromises] static void removeFile(long downloadId,
optional NullCallback callback);
static void removeFile(
long downloadId,
optional NullCallback callback);
// Prompt the user to accept a dangerous download. Can only be called from a
// visible context (tab, window, or page/browser action popup). Does not
@@ -553,8 +560,9 @@ namespace downloads {
// 'complete', and $(ref:onChanged) fires.
// |downloadId|: The identifier for the $(ref:DownloadItem).
// |callback|: Called when the danger prompt dialog closes.
[supportsPromises] static void acceptDanger(long downloadId,
optional NullCallback callback);
static void acceptDanger(
long downloadId,
optional NullCallback callback);
// Enable or disable the gray shelf at the bottom of every window associated
// with the current browser profile. The shelf will be disabled as long as
@@ -574,8 +582,9 @@ namespace downloads {
// permission in addition to the <code>"downloads"</code> permission.
// |options|: Encapsulate a change to the download UI.
// |callback|: Called when the UI update is completed.
[supportsPromises] static void setUiOptions(UiOptions options,
optional NullCallback callback);
static void setUiOptions(
UiOptions options,
optional NullCallback callback);
};
interface Events {
@@ -25,7 +25,7 @@ namespace enterprise.deviceAttributes {
// If the current user is not affiliated, returns an empty string.
// |callback| : Called with the device identifier of the directory API when
// received.
[supportsPromises] void getDirectoryDeviceId(
void getDirectoryDeviceId(
GetDirectoryDeviceIdCallback callback);
// Fetches the device's serial number. Please note the purpose of this API
@@ -34,27 +34,27 @@ namespace enterprise.deviceAttributes {
// devices without the consent of the device's administrator.
// If the current user is not affiliated, returns an empty string.
// |callback| : Called with the serial number of the device.
[supportsPromises] void getDeviceSerialNumber(
void getDeviceSerialNumber(
GetDeviceSerialNumberCallback callback);
// Fetches the administrator-annotated Asset Id.
// If the current user is not affiliated or no Asset Id has been set by the
// administrator, returns an empty string.
// |callback| : Called with the Asset ID of the device.
[supportsPromises] void getDeviceAssetId(GetDeviceAssetIdCallback callback);
void getDeviceAssetId(GetDeviceAssetIdCallback callback);
// Fetches the administrator-annotated Location.
// If the current user is not affiliated or no Annotated Location has been
// set by the administrator, returns an empty string.
// |callback| : Called with the Annotated Location of the device.
[supportsPromises] void getDeviceAnnotatedLocation(
void getDeviceAnnotatedLocation(
GetDeviceAnnotatedLocationCallback callback);
// Fetches the device's hostname as set by DeviceHostnameTemplate policy.
// If the current user is not affiliated or no hostname has been set by the
// enterprise policy, returns an empty string.
// |callback| : Called with hostname of the device.
[supportsPromises] void getDeviceHostname(
void getDeviceHostname(
GetDeviceHostnameCallback callback);
};
@@ -18,7 +18,7 @@ namespace enterprise.hardwarePlatform {
// Obtains the manufacturer and model for the hardware platform and, if
// the extension is authorized, returns it via |callback|.
// |callback|: Called with the hardware platform info.
[supportsPromises] static void getHardwarePlatformInfo(
static void getHardwarePlatformInfo(
HardwarePlatformInfoCallback callback);
};
};
@@ -28,7 +28,7 @@ namespace enterprise.kioskInput {
// $(ref:SetCurrentInputMethodOptions).
// |callback|: Called when the input method is changed or if
// there is an error.
[supportsPromises] static void setCurrentInputMethod(
static void setCurrentInputMethod(
SetCurrentInputMethodOptions options,
SetCurrentInputMethodCallback callback);
};
@@ -28,7 +28,7 @@ namespace enterprise.networkingAttributes {
// network, $(ref:runtime.lastError) will be set with a failure reason.
// |callback| : Called with the device's default network's
// $(ref:NetworkDetails).
[supportsPromises] void getNetworkDetails(
void getNetworkDetails(
GetNetworkDetailsCallback callback);
};
};
@@ -315,7 +315,7 @@ namespace enterprise.reportingPrivate {
interface Functions {
// Gets the identity of device that Chrome browser is running on. The ID is
// retrieved from the local device and used by the Google admin console.
[platforms = ("win", "mac", "linux"), supportsPromises]
[platforms = ("win", "mac", "linux")]
static void getDeviceId(optional GetDeviceIdCallback callback);
// Gets a randomly generated persistent secret (symmetric key) that
@@ -323,43 +323,45 @@ namespace enterprise.reportingPrivate {
// optional parameter |forceCreation| is set to true the secret is recreated
// in case of any failure to retrieve the currently stored one. Sets
// $(ref:runtime.lastError) on failure.
[platforms = ("win", "mac"), supportsPromises]
[platforms = ("win", "mac")]
static void getPersistentSecret(
optional boolean resetSecret,
GetPersistentSecretCallback callback);
// Gets the device data for |id|. Sets $(ref:runtime.lastError) on failure.
[platforms = ("win", "mac", "linux"), supportsPromises]
[platforms = ("win", "mac", "linux")]
static void getDeviceData(DOMString id, GetDeviceDataCallback callback);
// Sets the device data for |id|. Sets $(ref:runtime.lastError) on failure.
// If the |data| parameter is undefined and there is already data
// associated with |id| it will be cleared.
[platforms = ("win", "mac", "linux"), supportsPromises]
static void setDeviceData(DOMString id,
optional ArrayBuffer data,
optional DoneCallback callback);
[platforms = ("win", "mac", "linux")]
static void setDeviceData(
DOMString id,
optional ArrayBuffer data,
optional DoneCallback callback);
// Gets the device information (including disk encryption status,
// screen lock status, serial number, model).
[platforms = ("win", "mac", "linux"), supportsPromises]
[platforms = ("win", "mac", "linux")]
static void getDeviceInfo(GetDeviceInfoCallback callback);
// Gets the context information (including management status of the browser,
// state of key security policies, browser version).
[supportsPromises] static void getContextInfo(
static void getContextInfo(
GetContextInfoCallback callback);
// Returns the certificate that would be selected by the filters in the
// AutoSelectCertificateForUrls policy for <code>url</code>.
[supportsPromises] static void getCertificate(DOMString url,
CertificateCallback callback);
static void getCertificate(
DOMString url,
CertificateCallback callback);
// Enqueues a record for upload to the reporting service
// |request|: Composite object that captures everything
// we need for uploading records.
// |callback|: Callback that is triggered upon completion
[platforms = ("chromeos", "lacros"), supportsPromises]
[platforms = ("chromeos", "lacros")]
static void enqueueRecord(
EnqueueRecordRequest request,
optional DoneCallback callback);
@@ -370,7 +372,7 @@ namespace enterprise.reportingPrivate {
// user's organization and the organization managing the browser. If the
// management or affiliation states are not suitable, no results will be
// returned.
[platforms = ("win", "mac", "linux"), supportsPromises]
[platforms = ("win", "mac", "linux")]
static void getFileSystemInfo(
GetFileSystemInfoRequest request,
FileSystemInfoCallback callback);
@@ -380,7 +382,7 @@ namespace enterprise.reportingPrivate {
// used to verify the affiliation between the user's organization and the
// organization managing the browser. If the management or affiliation
// states are not suitable, no results will be returned.
[platforms = ("win", "mac"), supportsPromises]
[platforms = ("win", "mac")]
static void getSettings(
GetSettingsRequest request,
SettingsCallback callback);
@@ -390,7 +392,7 @@ namespace enterprise.reportingPrivate {
// between the user's organization and the organization managing the
// browser. If the management, or affiliation, state is not suitable, no
// results will be returned.
[platforms = ("win"), supportsPromises]
[platforms = ("win")]
static void getAvInfo(UserContext userContext, AvInfoCallback callback);
// Gets information about hotfix system updates installed on the current
@@ -398,7 +400,7 @@ namespace enterprise.reportingPrivate {
// between the user's organization and the organization managing the
// browser. If the management, or affiliation, state is not suitable, no
// results will be returned.
[platforms = ("win"), supportsPromises]
[platforms = ("win")]
static void getHotfixes(UserContext userContext, HotfixesCallback callback);
};
@@ -1521,7 +1521,6 @@ interface Functions {
// Gets the MIME type of an entry.
// |entry| The entry to be checked.
// |callback|
[supportsPromises]
static void getMimeType(DOMString url,
GetMimeTypeCallback callback);
@@ -1755,12 +1754,6 @@ interface Functions {
static void searchDriveMetadata(SearchMetadataParams searchParams,
SearchDriveMetadataCallback callback);
// Search files in the volume having |volumeId| by using |hashList|.
[doesNotSupportPromises]
static void searchFilesByHashes(DOMString volumeId,
DOMString[] hashList,
SearchFilesByHashesCallback callback);
// Search files in My Files.
[nocompile, doesNotSupportPromises]
static void searchFiles(SearchMetadataParams searchParams,
@@ -1802,13 +1795,6 @@ interface Functions {
// |subPage| Name of a subPage to show.
static void openSettingsSubpage(DOMString subPage);
// Computes an MD5 checksum for the given file.
// |entry| The entry of the file to checksum.
// |callback|
[nocompile, doesNotSupportPromises]
static void computeChecksum([instanceOf=Entry] object entry,
ComputeChecksumCallback callback);
// Returns list of available providers.
[doesNotSupportPromises]
static void getProviders(GetProvidersCallback callback);
@@ -1928,9 +1914,8 @@ interface Functions {
// |callback| is called with error in case of failure and with no arguments
// if successfully launched the Sharesheet dialog, but before user has
// finished the sharing.
[nocompile, doesNotSupportPromises]
static void sharesheetHasTargets([instanceOf=Entry] object[] entries,
BooleanCallback callback);
static void sharesheetHasTargets(DOMString[] fileUrls,
BooleanCallback callback);
// Invoke Sharesheet for selected files.
// |entries| Array of selected entries.
@@ -1938,8 +1923,7 @@ interface Functions {
// |dlpSourceUrls| Array of source URLs corresponding to the entries, used to
// check Data Leak Prevention (DLP) restrictions
// |callback|
[nocompile, doesNotSupportPromises]
static void invokeSharesheet([instanceOf=Entry] object[] entries,
static void invokeSharesheet(DOMString[] fileUrls,
SharesheetLaunchSource launchSource,
DOMString[] dlpSourceUrls,
SimpleCallback callback);
@@ -43,7 +43,6 @@ namespace fileManagerPrivateInternal {
callback AddFileWatchCallback = void(optional boolean success);
callback RemoveFileWatchCallback = void(optional boolean success);
callback GetCustomActionsCallback = void(fileSystemProvider.Action[] actions);
callback ComputeChecksumCallback = void(DOMString checksum);
callback GetMimeTypeCallback = void(DOMString result);
callback GetContentMimeTypeCallback = void(DOMString result);
callback GetContentMetadataCallback = void(
@@ -73,119 +72,108 @@ namespace fileManagerPrivateInternal {
callback SearchFilesCallback = void(EntryDescription[] entries);
interface Functions {
[supportsPromises] static void resolveIsolatedEntries(
static void resolveIsolatedEntries(
DOMString[] urls,
ResolveIsolatedEntriesCallback callback);
[supportsPromises] static void getEntryProperties(
static void getEntryProperties(
DOMString[] urls,
fileManagerPrivate.EntryPropertyName[] names,
GetEntryPropertiesCallback callback);
[supportsPromises] static void addFileWatch(
static void addFileWatch(
DOMString url,
AddFileWatchCallback callback);
[supportsPromises] static void removeFileWatch(
static void removeFileWatch(
DOMString url,
RemoveFileWatchCallback callback);
[supportsPromises] static void getCustomActions(
static void getCustomActions(
DOMString[] urls,
GetCustomActionsCallback callback);
[supportsPromises] static void executeCustomAction(
static void executeCustomAction(
DOMString[] urls,
DOMString actionId,
SimpleCallback callback);
[supportsPromises] static void computeChecksum(
DOMString url,
ComputeChecksumCallback callback);
[supportsPromises] static void getContentMimeType(
static void getContentMimeType(
DOMString blobUUID,
GetContentMimeTypeCallback callback);
[supportsPromises] static void getContentMetadata(
static void getContentMetadata(
DOMString blobUUID,
DOMString mimeType,
boolean includeImages,
GetContentMetadataCallback callback);
[supportsPromises] static void pinDriveFile(
static void pinDriveFile(
DOMString url,
boolean pin,
SimpleCallback callback);
[supportsPromises] static void executeTask(
static void executeTask(
fileManagerPrivate.FileTaskDescriptor descriptor,
DOMString[] urls,
ExecuteTaskCallback callback);
[supportsPromises] static void searchFiles(
static void searchFiles(
SearchFilesParams searchParams, SearchFilesCallback callback);
[supportsPromises] static void setDefaultTask(
static void setDefaultTask(
fileManagerPrivate.FileTaskDescriptor descriptor,
DOMString[] urls,
DOMString[] mimeTypes,
SimpleCallback callback);
[supportsPromises] static void getFileTasks(
static void getFileTasks(
DOMString[] urls,
DOMString[] dlpSourceUrls,
GetFileTasksCallback callback);
[supportsPromises] static void getDisallowedTransfers(
static void getDisallowedTransfers(
DOMString[] entries,
DOMString destinationEntry,
boolean isMove,
GetDisallowedTransfersCallback callback);
[supportsPromises] static void getDlpMetadata(
static void getDlpMetadata(
DOMString[] entries,
GetDlpMetadataCallback callback);
[supportsPromises] static void getDriveQuotaMetadata(
static void getDriveQuotaMetadata(
DOMString url,
GetDriveQuotaMetadataCallback callback);
[supportsPromises] static void validatePathNameLength(
static void validatePathNameLength(
DOMString parentUrl,
DOMString name,
ValidatePathNameLengthCallback callback);
[supportsPromises] static void getDirectorySize(
static void getDirectorySize(
DOMString url,
GetDirectorySizeCallback callback);
[supportsPromises] static void getVolumeRoot(
static void getVolumeRoot(
fileManagerPrivate.GetVolumeRootOptions options,
GetVolumeRootCallback callback);
[supportsPromises] static void getRecentFiles(
static void getRecentFiles(
fileManagerPrivate.SourceRestriction restriction,
DOMString query,
long cutoff_days,
fileManagerPrivate.FileCategory file_category,
boolean invalidate_cache,
GetRecentFilesCallback callback);
[supportsPromises] static void sharePathsWithCrostini(
static void sharePathsWithCrostini(
DOMString vmName, DOMString[] urls,
boolean persist,
SimpleCallback callback);
[supportsPromises] static void unsharePathWithCrostini(
static void unsharePathWithCrostini(
DOMString vmName, DOMString url,
SimpleCallback callback);
static void getCrostiniSharedPaths(
boolean observeFirstForSession,
DOMString vmName,
GetCrostiniSharedPathsCallback callback);
[supportsPromises] static void getLinuxPackageInfo(
static void getLinuxPackageInfo(
DOMString url,
GetLinuxPackageInfoCallback callback);
[supportsPromises] static void installLinuxPackage(
static void installLinuxPackage(
DOMString url,
InstallLinuxPackageCallback callback);
static void importCrostiniImage(DOMString url);
[supportsPromises] static void sharesheetHasTargets(
DOMString[] urls,
BooleanCallback callback);
[supportsPromises] static void invokeSharesheet(
DOMString[] urls,
fileManagerPrivate.SharesheetLaunchSource launchSource,
DOMString[] dlpSourceUrls,
SimpleCallback callback);
[supportsPromises] static void toggleAddedToHoldingSpace(
static void toggleAddedToHoldingSpace(
DOMString[] urls, boolean add,
optional SimpleCallback callback);
[supportsPromises] static void startIOTask(
static void startIOTask(
fileManagerPrivate.IoTaskType type,
DOMString[] urls,
IOTaskParams params,
optional IOTaskIdCallback callback);
[supportsPromises] static void parseTrashInfoFiles(
static void parseTrashInfoFiles(
DOMString[] urls,
ParseTrashInfoFilesCallback callback);
};
@@ -580,8 +580,9 @@ namespace fileSystemProvider {
//
// In case of an error, $(ref:runtime.lastError) will be set with a
// corresponding error code.
[supportsPromises] static void mount(MountOptions options,
optional ResultCallback callback);
static void mount(
MountOptions options,
optional ResultCallback callback);
// Unmounts a file system with the given <code>fileSystemId</code>. It
// must be called after $(ref:onUnmountRequested) is invoked. Also,
@@ -590,16 +591,18 @@ namespace fileSystemProvider {
//
// In case of an error, $(ref:runtime.lastError) will be set with a
// corresponding error code.
[supportsPromises] static void unmount(UnmountOptions options,
optional ResultCallback callback);
static void unmount(
UnmountOptions options,
optional ResultCallback callback);
// Returns all file systems mounted by the extension.
[supportsPromises] static void getAll(GetAllCallback callback);
static void getAll(GetAllCallback callback);
// Returns information about a file system with the passed
// <code>fileSystemId</code>.
[supportsPromises] static void get(DOMString fileSystemId,
GetCallback callback);
static void get(
DOMString fileSystemId,
GetCallback callback);
// Notifies about changes in the watched directory at
// <code>observedPath</code> in <code>recursive</code> mode. If the file
@@ -630,8 +633,9 @@ namespace fileSystemProvider {
//
// In case of an error, $(ref:runtime.lastError) will be set
// will a corresponding error code.
[supportsPromises] static void notify(NotifyOptions options,
optional ResultCallback callback);
static void notify(
NotifyOptions options,
optional ResultCallback callback);
};
interface Events {
@@ -131,7 +131,7 @@ namespace identity {
// present on the profile.
//
// <code>getAccounts</code> is only supported on dev channel.
[supportsPromises] static void getAccounts(GetAccountsCallback callback);
static void getAccounts(GetAccountsCallback callback);
// Gets an OAuth2 access token using the client ID and scopes
// specified in the <a
@@ -159,7 +159,7 @@ namespace identity {
// <code>grantedScopes</code> parameter is populated since Chrome 87. When
// available, this parameter contains the list of granted scopes
// corresponding with the returned token.
[supportsPromises] static void getAuthToken(
static void getAuthToken(
optional TokenDetails details,
optional GetAuthTokenCallback callback);
@@ -177,7 +177,7 @@ namespace identity {
// |callback|: Called with the <code>ProfileUserInfo</code> of the primary
// Chrome account, of an empty <code>ProfileUserInfo</code> if the account
// with given <code>details</code> doesn't exist.
[supportsPromises] static void getProfileUserInfo(
static void getProfileUserInfo(
optional ProfileDetails details,
GetProfileUserInfoCallback callback);
@@ -190,7 +190,7 @@ namespace identity {
//
// |details| : Token information.
// |callback| : Called when the token has been removed from the cache.
[supportsPromises] static void removeCachedAuthToken(
static void removeCachedAuthToken(
InvalidTokenDetails details,
optional InvalidateAuthTokenCallback callback);
@@ -202,7 +202,7 @@ namespace identity {
// </ul>
//
// |callback| : Called when the state has been cleared.
[supportsPromises] static void clearAllCachedAuthTokens(
static void clearAllCachedAuthTokens(
ClearAllCachedAuthTokensCallback callback);
// Starts an auth flow at the specified URL.
@@ -223,7 +223,7 @@ namespace identity {
//
// |details| : WebAuth flow options.
// |callback| : Called with the URL redirected back to your application.
[supportsPromises] static void launchWebAuthFlow(
static void launchWebAuthFlow(
WebAuthFlowDetails details,
LaunchWebAuthFlowCallback callback);
@@ -11,17 +11,18 @@ namespace idltest {
interface Functions {
// Functions for testing binary data request/response parameters. The first
// two just return back the bytes they were passed in an array.
[supportsPromises] static void sendArrayBuffer(ArrayBuffer input,
LongArrayCallback callback);
static void sendArrayBuffer(
ArrayBuffer input,
LongArrayCallback callback);
// TODO(asargent) - we currently can't have [instanceOf=ArrayBufferView],
// I think because ArrayBufferView isn't an instantiable type. The best
// we might be able to do is have a 'choices' list including all the
// typed array subclasses like Uint8Array, Uint16Array, Float32Array, etc.
[supportsPromises] static void sendArrayBufferView(
static void sendArrayBufferView(
[instanceOf=Uint8Array] ArrayBufferView input,
LongArrayCallback callback);
[supportsPromises] static void getArrayBuffer(ArrayBufferCallback callback);
static void getArrayBuffer(ArrayBufferCallback callback);
// This function should not have C++ code autogenerated (the variable name
// |switch| should cause compile errors if it does). But the name should
@@ -79,7 +79,7 @@ namespace imageWriterPrivate {
// temporary directory is desired
// |callback|: The callback which signifies that the write operation has
// been started by the system and provides a unique ID for this operation.
[supportsPromises] static void writeFromUrl(
static void writeFromUrl(
DOMString storageUnitId,
DOMString imageUrl,
optional UrlWriteOptions options,
@@ -93,7 +93,7 @@ namespace imageWriterPrivate {
// |fileEntry|: The FileEntry object of the image to be burned.
// |callback|: The callback which signifies that the write operation has
// been started by the system and provides a unique ID for this operation.
[supportsPromises] static void writeFromFile(
static void writeFromFile(
DOMString storageUnitId,
[instanceOf=FileEntry] object fileEntry,
WriteImageCallback callback);
@@ -103,7 +103,7 @@ namespace imageWriterPrivate {
// |callback|: The callback which is triggered with the write is
// successfully cancelled, passing the $(ref:ProgressInfo) of the operation at
// the time it was cancelled.
[supportsPromises] static void cancelWrite(WriteCancelCallback callback);
static void cancelWrite(WriteCancelCallback callback);
// Destroys the partition table of a disk, effectively erasing it. This is
// a fairly quick operation and so it does not have complex stages or
@@ -112,13 +112,13 @@ namespace imageWriterPrivate {
// |storageUnitId|: The identifier of the storage unit to wipe
// |callback|: A callback that triggers when the operation has been
// successfully started.
[supportsPromises] static void destroyPartitions(
static void destroyPartitions(
DOMString storageUnitId,
DestroyPartitionsCallback callback);
// List all the removable block devices currently attached to the system.
// |callback|: A callback called with a list of removable storage devices
[supportsPromises] static void listRemovableStorageDevices(
static void listRemovableStorageDevices(
ListRemovableStorageDevicesCallback callback);
};
@@ -96,7 +96,7 @@ namespace languageSettingsPrivate {
interface Functions {
// Gets languages available for translate, spell checking, input and locale.
[supportsPromises] static void getLanguageList(
static void getLanguageList(
GetLanguageListCallback callback);
// Enables a language, adding it to the Accept-Language list (used to decide
@@ -114,7 +114,7 @@ namespace languageSettingsPrivate {
static void moveLanguage(DOMString languageCode, MoveType moveType);
// Gets languages that should always be automatically translated.
[supportsPromises] static void getAlwaysTranslateLanguages(
static void getAlwaysTranslateLanguages(
GetAlwaysTranslateLanguagesCallback callback);
// Sets whether a given language should always be automatically translated.
@@ -122,15 +122,15 @@ namespace languageSettingsPrivate {
DOMString languageCode, boolean alwaysTranslate);
// Gets languages that should never be offered to translate.
[supportsPromises] static void getNeverTranslateLanguages(
static void getNeverTranslateLanguages(
GetNeverTranslateLanguagesCallback callback);
// Gets the current status of the chosen spell check dictionaries.
[supportsPromises] static void getSpellcheckDictionaryStatuses(
static void getSpellcheckDictionaryStatuses(
GetSpellcheckDictionaryStatusesCallback callback);
// Gets the custom spell check words, in sorted order.
[supportsPromises] static void getSpellcheckWords(
static void getSpellcheckWords(
GetSpellcheckWordsCallback callback);
// Adds a word to the custom dictionary.
@@ -140,7 +140,7 @@ namespace languageSettingsPrivate {
static void removeSpellcheckWord(DOMString word);
// Gets the translate target language (in most cases, the display locale).
[supportsPromises] static void getTranslateTargetLanguage(
static void getTranslateTargetLanguage(
GetTranslateTargetLanguageCallback callback);
// Sets the translate target language given a language code.
@@ -148,7 +148,7 @@ namespace languageSettingsPrivate {
// Gets all supported input methods, including third-party IMEs.
// Chrome OS only.
[supportsPromises] static void getInputMethodLists(
static void getInputMethodLists(
GetInputMethodListsCallback callback);
// Adds the input method to the current user's list of enabled input
@@ -33,7 +33,7 @@ namespace login {
// guaranteed to be invoked as the extension will be disabled when the
// session starts. Use this callback only to handle the failure case by
// checking $(ref:runtime.lastError).
[supportsPromises] static void launchManagedGuestSession(
static void launchManagedGuestSession(
optional DOMString password,
optional VoidCallback callback);
@@ -41,7 +41,7 @@ namespace login {
// |dataForNextLoginAttempt|: If set, stores data which can be read by
// $(ref:fetchDataForNextLoginAttempt) from the login screen. If unset, any
// currently stored data will be cleared.
[supportsPromises] static void exitCurrentSession(
static void exitCurrentSession(
optional DOMString dataForNextLoginAttempt,
optional VoidCallback callback);
@@ -50,21 +50,21 @@ namespace login {
// reading so it can only be read once.
// |callback|: Called with the stored data, or an empty string if there was
// no previously stored data.
[supportsPromises] static void fetchDataForNextLoginAttempt(
static void fetchDataForNextLoginAttempt(
StringCallback callback);
// Deprecated. Please use $(ref:lockCurrentSession) instead.
[supportsPromises, deprecated="Use $(ref:lockCurrentSession) instead."]
[deprecated="Use $(ref:lockCurrentSession) instead."]
static void lockManagedGuestSession(optional VoidCallback callback);
// Locks the current session. The session has to be either a user session or
// a Managed Guest Session launched by $(ref:launchManagedGuestSession) with
// a password.
[supportsPromises] static void lockCurrentSession(
static void lockCurrentSession(
optional VoidCallback callback);
// Deprecated. Please use $(ref:unlockCurrentSession) instead.
[supportsPromises, deprecated="Use $(ref:unlockCurrentSession) instead."]
[deprecated="Use $(ref:unlockCurrentSession) instead."]
static void unlockManagedGuestSession(
DOMString password,
optional VoidCallback callback);
@@ -78,7 +78,7 @@ namespace login {
// guaranteed to be invoked as the extension will be disabled when the
// session starts. Use this callback only to handle the failure case by
// checking $(ref:runtime.lastError).
[supportsPromises] static void unlockCurrentSession(
static void unlockCurrentSession(
DOMString password,
optional VoidCallback callback);
@@ -88,7 +88,7 @@ namespace login {
// guaranteed to be invoked as the extension will be disabled when the
// session starts. Use this callback only to handle the failure case by
// checking $(ref:runtime.lastError).
[supportsPromises] static void launchSamlUserSession(
static void launchSamlUserSession(
SamlUserSessionProperties properties,
optional VoidCallback callback);
@@ -104,7 +104,7 @@ namespace login {
// guaranteed to be invoked as the extension will be disabled when the
// session starts. Use this callback only to handle the failure case by
// checking $(ref:runtime.lastError).
[supportsPromises] static void launchSharedManagedGuestSession(
static void launchSharedManagedGuestSession(
DOMString password,
optional VoidCallback callback);
@@ -119,7 +119,7 @@ namespace login {
// guaranteed to be invoked as the extension will be disabled when the
// session starts. Use this callback only to handle the failure case by
// checking $(ref:runtime.lastError).
[supportsPromises] static void enterSharedSession(
static void enterSharedSession(
DOMString password,
optional VoidCallback callback);
@@ -134,7 +134,7 @@ namespace login {
// guaranteed to be invoked as the extension will be disabled when the
// session starts. Use this callback only to handle the failure case by
// checking $(ref:runtime.lastError).
[supportsPromises] static void unlockSharedSession(
static void unlockSharedSession(
DOMString password,
optional VoidCallback callback);
@@ -146,25 +146,25 @@ namespace login {
// Fails if there is no existing shared session.
// |callback|: Invoked after cleanup operations have finished and the
// session is locked.
[supportsPromises] static void endSharedSession(
static void endSharedSession(
optional VoidCallback callback);
// Sets data for the next login attempt. The data can be retrieved by
// calling $(ref:fetchDataForNextLoginAttempt). The data is cleared when
// it is fetched so it can only be read once.
// |dataForNextLoginAttempt|: The data to be set.
[supportsPromises] static void setDataForNextLoginAttempt(
static void setDataForNextLoginAttempt(
DOMString dataForNextLoginAttempt,
optional VoidCallback callback);
// Dispatches a $(ref:onRequestExternalLogout) event. Called from the login
// screen extension on the lock screen.
[supportsPromises] static void requestExternalLogout(
static void requestExternalLogout(
optional VoidCallback callback);
// Dispatches a $(ref:onExternalLogoutDone) event. Called from the
// in-session extension.
[supportsPromises] static void notifyExternalLogoutDone(
static void notifyExternalLogoutDone(
optional VoidCallback callback);
};
@@ -18,15 +18,16 @@ namespace loginScreenStorage {
// |extensionIds|: IDs of the extensions that should have access to the
// stored data.
// |data|: The data to store.
[supportsPromises] static void storePersistentData(DOMString[] extensionIds,
DOMString data,
StoreCallback callback);
static void storePersistentData(
DOMString[] extensionIds,
DOMString data,
StoreCallback callback);
// Retrieves persistent data that was previously stored using
// $(ref:storePersistentData) for the caller's extension ID.
// |ownerId|: ID of the extension that saved the data that the caller is
// trying to retrieve.
[supportsPromises] static void retrievePersistentData(
static void retrievePersistentData(
DOMString ownerId,
RetrieveCallback callback);
@@ -36,14 +37,15 @@ namespace loginScreenStorage {
// these credentials. Credentials stored using this method are deleted on
// session exit.
// |credentials|: The credentials to store.
[supportsPromises] static void storeCredentials(DOMString extensionId,
DOMString credentials,
StoreCallback callback);
static void storeCredentials(
DOMString extensionId,
DOMString credentials,
StoreCallback callback);
// Retrieves credentials that were previosly stored using
// $(ref:storeCredentials). The caller's extension ID should be the same as
// the extension id passed to the $(ref:storeCredentials).
[supportsPromises] static void retrieveCredentials(
static void retrieveCredentials(
RetrieveCallback callback);
};
};
@@ -22,11 +22,12 @@ namespace loginScreenUi {
interface Functions {
// Opens a window, which is visible on top of the login and lock screen.
// |options|: Options for the custom login UI window.
[supportsPromises] static void show(ShowOptions options,
optional SimpleCallback callback);
static void show(
ShowOptions options,
optional SimpleCallback callback);
// Closes the login/lock screen UI window previously opened by this
// extension.
[supportsPromises] static void close(optional SimpleCallback callback);
static void close(optional SimpleCallback callback);
};
};
@@ -40,10 +40,10 @@ namespace loginState {
interface Functions {
// Gets the type of the profile the extension is in.
[supportsPromises] static void getProfileType(ProfileTypeCallback callback);
static void getProfileType(ProfileTypeCallback callback);
// Gets the current session state.
[supportsPromises] static void getSessionState(
static void getSessionState(
SessionStateCallback callback);
};
@@ -30,7 +30,7 @@ namespace mdns {
// Immediately issues a multicast DNS query for all service types.
// |callback| is invoked immediately. At a later time, queries will be
// sent, and any service events will be fired.
[supportsPromises] static void forceDiscovery(VoidCallback callback);
static void forceDiscovery(VoidCallback callback);
};
interface Properties {
@@ -157,9 +157,10 @@ namespace notifications {
// that represents the created notification.
//
// The callback is required before Chrome 42.
[supportsPromises] static void create(optional DOMString notificationId,
NotificationOptions options,
optional CreateCallback callback);
static void create(
optional DOMString notificationId,
NotificationOptions options,
optional CreateCallback callback);
// Updates an existing notification.
// |notificationId|: The id of the notification to be updated. This is
@@ -168,9 +169,10 @@ namespace notifications {
// |callback|: Called to indicate whether a matching notification existed.
//
// The callback is required before Chrome 42.
[supportsPromises] static void update(DOMString notificationId,
NotificationOptions options,
optional UpdateCallback callback);
static void update(
DOMString notificationId,
NotificationOptions options,
optional UpdateCallback callback);
// Clears the specified notification.
// |notificationId|: The id of the notification to be cleared. This is
@@ -178,17 +180,18 @@ namespace notifications {
// |callback|: Called to indicate whether a matching notification existed.
//
// The callback is required before Chrome 42.
[supportsPromises] static void clear(DOMString notificationId,
optional ClearCallback callback);
static void clear(
DOMString notificationId,
optional ClearCallback callback);
// Retrieves all the notifications of this app or extension.
// |callback|: Returns the set of notification_ids currently in the system.
[supportsPromises] static void getAll(GetAllCallback callback);
static void getAll(GetAllCallback callback);
// Retrieves whether the user has enabled notifications from this app
// or extension.
// |callback|: Returns the current permission level.
[supportsPromises] static void getPermissionLevel(
static void getPermissionLevel(
PermissionLevelCallback callback);
};
@@ -26,6 +26,8 @@ namespace odfsConfigPrivate {
callback GetAccountRestrictionsCallback = void(
AccountRestrictionsInfo restrictions);
callback ShowAutomatedMountErrorCallback = void();
callback IsCloudFileSystemEnabled = void(
boolean isCloudFileSystemEnabled);
interface Functions {
// Returns the OneDrive mount mode from the admin policy.
@@ -41,6 +43,10 @@ namespace odfsConfigPrivate {
// Shows a notification that the automated mount failed.
static void showAutomatedMountError(
ShowAutomatedMountErrorCallback callback);
// Returns whether the FileSystemProviderCloudFileSystem feature flag is
// enabled.
static void isCloudFileSystemEnabled(IsCloudFileSystemEnabled callback);
};
interface Events {
@@ -367,7 +367,7 @@ namespace passwordsPrivate {
// Returns a promise that resolves if successful, and rejects otherwise.
// |credential|: The credential to update. This will be matched to the
// existing credential by id.
[supportsPromises] static void changeCredential(
static void changeCredential(
PasswordUiEntry credential,
optional VoidCallback callback);
@@ -393,7 +393,7 @@ namespace passwordsPrivate {
// |id|: The id for the password entry being being retrieved.
// |reason|: The reason why the plaintext password is requested.
// |callback|: The callback that gets invoked with the retrieved password.
[supportsPromises] static void requestPlaintextPassword(
static void requestPlaintextPassword(
long id,
PlaintextReason reason,
PlaintextPasswordCallback callback);
@@ -405,22 +405,22 @@ namespace passwordsPrivate {
// |ids|: Ids for the password entries being retrieved.
// |callback|: The callback that gets invoked with the retrieved
// PasswordUiEntries.
[supportsPromises] static void requestCredentialsDetails(
static void requestCredentialsDetails(
long[] ids,
PasswordListCallback callback);
// Returns the list of saved passwords.
// |callback|: Called with the list of saved passwords.
[supportsPromises] static void getSavedPasswordList(
static void getSavedPasswordList(
PasswordListCallback callback);
// Returns the list of Credential groups.
// |callback|: Called with the list of groups.
[supportsPromises] static void getCredentialGroups(CredentialsGroupCallback callback);
static void getCredentialGroups(CredentialsGroupCallback callback);
// Returns the list of password exceptions.
// |callback|: Called with the list of password exceptions.
[supportsPromises] static void getPasswordExceptionList(
static void getPasswordExceptionList(
ExceptionListCallback callback);
// Moves passwords currently stored on the device to being stored in the
@@ -432,27 +432,27 @@ namespace passwordsPrivate {
static void movePasswordsToAccount(long[] ids);
// Fetches family members (password share recipients).
[supportsPromises] static void fetchFamilyMembers(
static void fetchFamilyMembers(
FetchFamilyResultsCallback callback);
// Sends sharing invitations to the recipients.
// |id|: The id of the password entry to be shared.
// |recipients|: The list of selected recipients.
// |callback|: The callback that gets invoked on success.
[supportsPromises] static void sharePassword(
static void sharePassword(
long id,
RecipientInfo[] recipients,
optional VoidCallback callback);
// Triggers the Password Manager password import functionality.
[supportsPromises] static void importPasswords(
static void importPasswords(
PasswordStoreSet toStore,
ImportPasswordsCallback callback);
// Resumes the password import process when user has selected which
// passwords to replace.
// |selectedIds|: The ids of passwords that need to be replaced.
[supportsPromises] static void continueImport(
static void continueImport(
long[] selectedIds,
ImportPasswordsCallback callback);
@@ -460,7 +460,7 @@ namespace passwordsPrivate {
// and the user closes the dialog. Only when the PasswordImporter is in
// FINISHED state, |deleteFile| option is taken into account.
// |deleteFile|: Whether to trigger deletion of the last imported file.
[supportsPromises] static void resetImporter(
static void resetImporter(
boolean deleteFile,
optional VoidCallback callback);
@@ -469,59 +469,59 @@ namespace passwordsPrivate {
// |callback| will be called when the request is started or rejected. If
// rejected $(ref:runtime.lastError) will be set to
// <code>'in-progress'</code> or <code>'reauth-failed'</code>.
[supportsPromises] static void exportPasswords(VoidCallback callback);
static void exportPasswords(VoidCallback callback);
// Requests the export progress status. This is the same as the last value
// seen on the onPasswordsFileExportProgress event. This function is useful
// for checking if an export has already been initiated from an older tab,
// where we might have missed the original event.
[supportsPromises] static void requestExportProgressStatus(
static void requestExportProgressStatus(
ExportProgressStatusCallback callback);
// Requests the account-storage opt-in state of the current user.
[supportsPromises] static void isOptedInForAccountStorage(
static void isOptedInForAccountStorage(
OptInCallback callback);
// Triggers the opt-in or opt-out flow for the account storage.
static void optInForAccountStorage(boolean optIn);
// Requests the latest insecure credentials.
[supportsPromises] static void getInsecureCredentials(
static void getInsecureCredentials(
PasswordListCallback callback);
// Requests group of credentials which reuse passwords. Each group contains
// credentials with the same password value.
[supportsPromises] static void getCredentialsWithReusedPassword(
static void getCredentialsWithReusedPassword(
CredentialsWithReusedPasswordCallback callback);
// Requests to mute |credential| from the password store.
// Invokes |callback| on completion.
[supportsPromises] static void muteInsecureCredential(
static void muteInsecureCredential(
PasswordUiEntry credential, optional VoidCallback callback);
// Requests to unmute |credential| from the password store.
// Invokes |callback| on completion.
[supportsPromises] static void unmuteInsecureCredential(
static void unmuteInsecureCredential(
PasswordUiEntry credential, optional VoidCallback callback);
// Starts a check for insecure passwords. Invokes |callback| on completion.
[supportsPromises] static void startPasswordCheck(
static void startPasswordCheck(
optional VoidCallback callback);
// Returns the current status of the check via |callback|.
[supportsPromises] static void getPasswordCheckStatus(
static void getPasswordCheckStatus(
PasswordCheckStatusCallback callback);
// Requests whether the account store is a default location for saving
// passwords. False means the device store is a default one. Must be called
// when the current user has already opted-in for account storage.
[supportsPromises] static void isAccountStoreDefault(
static void isAccountStoreDefault(
IsAccountStoreDefaultCallback callback);
// Requests whether the given |url| meets the requirements to save a
// password for it (e.g. valid, has proper scheme etc.) and returns the
// corresponding URLCollection on success. Otherwise it raises an error.
[supportsPromises] static void getUrlCollection(
static void getUrlCollection(
DOMString url,
GetUrlCollectionCallback callback);
@@ -530,13 +530,13 @@ namespace passwordsPrivate {
// succeeded.
// |options|: Details about a new password and storage to be used.
// |callback|: The callback that gets invoked on success.
[supportsPromises] static void addPassword(
static void addPassword(
AddPasswordOptions options,
optional VoidCallback callback);
// Restarts the authentication timeout timer if the user is authenticated.
// |callback|: The callback that gets invoked on success.
[supportsPromises] static void extendAuthValidity(
static void extendAuthValidity(
optional VoidCallback callback);
// Switches Biometric authentication before filling state after
@@ -44,31 +44,36 @@ namespace pdfViewerPrivate {
interface Functions {
// Returns the StreamInfo for the stream for this context if there is one.
[supportsPromises] static void getStreamInfo(
static void getStreamInfo(
GetStreamInfoCallback callback);
// Determines if the given URL should be allowed to access local files from
// the PDF Viewer. |callback|: Called with true if URL should be allowed to
// access local files from the PDF Viewer, false otherwise.
[supportsPromises] static void isAllowedLocalFileAccess(
static void isAllowedLocalFileAccess(
DOMString url,
IsAllowedLocalFileAccessCallback callback);
// Determines if the preference for PDF OCR is set to run PDF OCR always.
// |callback|: Called with true if PDF OCR is set to be always active;
// false otherwise.
[supportsPromises] static void isPdfOcrAlwaysActive(
static void isPdfOcrAlwaysActive(
IsPdfOcrAlwaysActiveCallback callback);
// Sets the current tab title to `title` for a full-page PDF.
static void setPdfDocumentTitle(
DOMString title,
optional VoidCallback callback);
// Sets a pref value for PDF OCR.
// |value|: The new value of the pref.
// |callback|: The callback for whether the pref was set or not.
[supportsPromises] static void setPdfOcrPref(
static void setPdfOcrPref(
boolean value, OnPdfOcrPrefSetCallback callback);
// Sets PDF plugin attributes in the stream for this context if there is
// one.
[supportsPromises] static void setPdfPluginAttributes(
static void setPdfPluginAttributes(
PdfPluginAttributes attributes,
optional VoidCallback callback);
};
@@ -160,25 +160,27 @@ namespace printing {
// <code>PrintingAPIExtensionsAllowlist</code></a> policy,
// the user is prompted to accept the print job.<br/>
// Before Chrome 120, this function did not return a promise.
[supportsPromises] static void submitJob(SubmitJobRequest request,
SubmitJobCallback callback);
static void submitJob(
SubmitJobRequest request,
SubmitJobCallback callback);
// Cancels previously submitted job.
// |jobId|: The id of the print job to cancel. This should be the same id
// received in a $(ref:SubmitJobResponse).
[supportsPromises] static void cancelJob(DOMString jobId,
CancelJobCallback callback);
static void cancelJob(
DOMString jobId,
CancelJobCallback callback);
// Returns the list of available printers on the device. This includes
// manually added, enterprise and discovered printers.
[supportsPromises] static void getPrinters(GetPrintersCallback callback);
static void getPrinters(GetPrintersCallback callback);
// Returns the status and capabilities of the printer in
// <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">
// CDD format</a>.
// This call will fail with a runtime error if no printers with given id are
// installed.
[supportsPromises] static void getPrinterInfo(
static void getPrinterInfo(
DOMString printerId,
GetPrinterInfoCallback callback);
};
@@ -146,7 +146,7 @@ namespace printingMetrics {
interface Functions {
// Returns the list of the finished print jobs.
[supportsPromises] static void getPrintJobs(GetPrintJobsCallback callback);
static void getPrintJobs(GetPrintJobsCallback callback);
};
interface Events {
@@ -115,14 +115,14 @@ namespace processes {
// Returns the ID of the renderer process for the specified tab.
// |tabId|: The ID of the tab for which the renderer process ID is to be
// returned.
[supportsPromises] static void getProcessIdForTab(
static void getProcessIdForTab(
long tabId,
GetProcessIdForTabCallback callback);
// Terminates the specified renderer process. Equivalent to visiting
// about:crash, but without changing the tab's URL.
// |processId|: The ID of the process to be terminated.
[supportsPromises] static void terminate(
static void terminate(
long processId,
optional TerminateCallback callback);
@@ -133,7 +133,7 @@ namespace processes {
// |includeMemory|: True if detailed memory usage is required. Note,
// collecting memory usage information incurs extra CPU usage and should
// only be queried for when needed.
[supportsPromises] static void getProcessInfo(
static void getProcessInfo(
(long or long[]) processIds,
boolean includeMemory,
GetProcessInfoCallback callback);
@@ -64,8 +64,9 @@ namespace quickUnlockPrivate {
// Returns a token that can be used for future operations and the number
// of seconds until the token expires.
// |accountPassword|: The account password for the logged in user.
[supportsPromises] static void getAuthToken(DOMString accountPassword,
TokenResultCallback onComplete);
static void getAuthToken(
DOMString accountPassword,
TokenResultCallback onComplete);
// Sets the lock screen enabled state. NOTE: The lock enabled state is
// reflected in the settings.enable_screen_lock pref, which can be read
@@ -73,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"), supportsPromises] static void setLockScreenEnabled(
[platforms=("chromeos")] static void setLockScreenEnabled(
DOMString token,
boolean enabled,
optional VoidResultCallback onComplete);
@@ -87,7 +88,7 @@ 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"), supportsPromises]
[platforms=("chromeos")]
static void setPinAutosubmitEnabled(
DOMString token,
DOMString pin,
@@ -95,17 +96,17 @@ namespace quickUnlockPrivate {
BooleanResultCallback onComplete);
// Tests wether it is currently possible to authenticate using PIN.
[platforms=("chromeos"), supportsPromises] static void canAuthenticatePin(
[platforms=("chromeos")] 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"), supportsPromises] static void getAvailableModes(
[platforms=("chromeos")] static void getAvailableModes(
ModesCallback onComplete);
// Returns the quick unlock modes that are currently enabled and usable on
// the lock screen.
[platforms=("chromeos"), supportsPromises]
[platforms=("chromeos")]
static void getActiveModes(ModesCallback onComplete);
@@ -115,7 +116,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"), supportsPromises] static void checkCredential(
[platforms=("chromeos")] static void checkCredential(
QuickUnlockMode mode,
DOMString credential,
CredentialCheckCallback onComplete);
@@ -124,7 +125,7 @@ namespace quickUnlockPrivate {
// |mode|: The quick unlock mode that is used.
// |onComplete|: Called with the credential requirements of the given
// |mode|.
[platforms=("chromeos"), supportsPromises]
[platforms=("chromeos")]
static void getCredentialRequirements(
QuickUnlockMode mode,
CredentialRequirementsCallback onComplete);
@@ -136,11 +137,12 @@ 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"), supportsPromises]
static void setModes(DOMString token,
QuickUnlockMode[] modes,
DOMString[] credentials,
VoidResultCallback onComplete);
[platforms=("chromeos")]
static void setModes(
DOMString token,
QuickUnlockMode[] modes,
DOMString[] credentials,
VoidResultCallback onComplete);
};
interface Events {
@@ -74,30 +74,31 @@ namespace readingList{
// Adds an entry to the reading list if it does not exist.
// |entry|: The entry to add to the reading list.
// |callback|: Invoked once the entry has been added.
[supportsPromises] static void addEntry(
AddEntryOptions entry,
optional AddEntryCallback callback);
static void addEntry(
AddEntryOptions entry,
optional AddEntryCallback callback);
// Removes an entry from the reading list if it exists.
// |info|: The entry to remove from the reading list.
// |callback|: Invoked once the entry has been removed.
[supportsPromises] static void removeEntry(
RemoveOptions info,
optional RemoveEntryCallback callback);
static void removeEntry(
RemoveOptions info,
optional RemoveEntryCallback callback);
// Updates a reading list entry if it exists.
// |info|: The entry to update.
// |callback|: Invoked once the matched entries have been updated.
[supportsPromises] static void updateEntry(
UpdateEntryOptions info,
optional UpdateEntryCallback callback);
static void updateEntry(
UpdateEntryOptions info,
optional UpdateEntryCallback callback);
// Retrieves all entries that match the <code>QueryInfo</code> properties.
// Properties that are not provided will not be matched.
// |info|: The properties to search for.
// |callback|: Invoked once the entries have been matched.
[supportsPromises] static void query(QueryInfo info,
QueryCallback callback);
static void query(
QueryInfo info,
QueryCallback callback);
};
interface Events {
@@ -17,7 +17,8 @@ namespace resourcesPrivate {
//
// |component| : Internal Chrome component to get strings for.
// |callback| : Called with a dictionary mapping names to strings.
[supportsPromises] static void getStrings(Component component,
GetStringsCallback callback);
static void getStrings(
Component component,
GetStringsCallback callback);
};
};
@@ -143,7 +143,7 @@ namespace safeBrowsingPrivate {
// Gets referrer chain for the specified tab.
// |tabId|: Id of the tab from which to retrieve the referrer.
// |callback|: Called with the list of referrer chain entries.
[supportsPromises] static void getReferrerChain(
static void getReferrerChain(
long tabId,
GetReferrerChainCallback callback);
};
@@ -202,7 +202,7 @@ namespace scripting {
// |callback|: Invoked upon completion of the injection. The resulting
// array contains the result of execution for each frame where the
// injection succeeded.
[supportsPromises] static void executeScript(
static void executeScript(
ScriptInjection injection,
optional ScriptInjectionCallback callback);
@@ -210,7 +210,7 @@ namespace scripting {
// If multiple frames are specified, unsuccessful injections are ignored.
// |injection|: The details of the styles to insert.
// |callback|: Invoked upon completion of the insertion.
[supportsPromises] static void insertCSS(
static void insertCSS(
CSSInjection injection,
optional CSSInjectionCallback callback);
@@ -221,7 +221,7 @@ namespace scripting {
// must exactly match the stylesheet inserted through $(ref:insertCSS).
// Attempting to remove a non-existent stylesheet is a no-op.
// |callback|: A callback to be invoked upon the completion of the removal.
[supportsPromises] static void removeCSS(
static void removeCSS(
CSSInjection injection,
optional CSSInjectionCallback callback);
@@ -231,7 +231,7 @@ namespace scripting {
// already exist, then no scripts are registered.
// |callback|: A callback to be invoked once scripts have been fully
// registered or if an error has occurred.
[supportsPromises] static void registerContentScripts(
static void registerContentScripts(
RegisteredContentScript[] scripts,
optional RegisterContentScriptsCallback callback);
@@ -239,7 +239,7 @@ namespace scripting {
// that match the given filter.
// |filter|: An object to filter the extension's dynamically registered
// scripts.
[supportsPromises] static void getRegisteredContentScripts(
static void getRegisteredContentScripts(
optional ContentScriptFilter filter,
GetRegisteredContentScriptsCallback callback);
@@ -249,7 +249,7 @@ namespace scripting {
// scripts are unregistered.
// |callback|: A callback to be invoked once scripts have been unregistered
// or if an error has occurred.
[supportsPromises] static void unregisterContentScripts(
static void unregisterContentScripts(
optional ContentScriptFilter filter,
optional UnregisterContentScriptsCallback callback);
@@ -261,7 +261,7 @@ namespace scripting {
// are updated.
// |callback|: A callback to be invoked once scripts have been updated or
// if an error has occurred.
[supportsPromises] static void updateContentScripts(
static void updateContentScripts(
RegisteredContentScript[] scripts,
optional RegisterContentScriptsCallback callback);
};
@@ -35,7 +35,8 @@ namespace search {
// Used to query the default search provider.
// In case of an error,
// $(ref:runtime.lastError) will be set.
[supportsPromises] static void query(QueryInfo queryInfo,
optional QueryCallback callback);
static void query(
QueryInfo queryInfo,
optional QueryCallback callback);
};
};
@@ -91,26 +91,28 @@ namespace settingsPrivate {
// |value|: The new value of the pref.
// |pageId|: An optional user metrics identifier.
// |callback|: The callback for whether the pref was set or not.
[supportsPromises] static void setPref(DOMString name,
any value,
optional DOMString pageId,
optional OnPrefSetCallback callback);
static void setPref(
DOMString name,
any value,
optional DOMString pageId,
optional OnPrefSetCallback callback);
// Gets an array of all the prefs.
[supportsPromises] static void getAllPrefs(GetAllPrefsCallback callback);
static void getAllPrefs(GetAllPrefsCallback callback);
// Gets the value of a specific pref.
[supportsPromises] static void getPref(DOMString name,
GetPrefCallback callback);
static void getPref(
DOMString name,
GetPrefCallback callback);
// Gets the default page zoom factor. Possible values are currently between
// 0.25 and 5. For a full list, see zoom::kPresetZoomFactors.
[supportsPromises] static void getDefaultZoom(
static void getDefaultZoom(
GetDefaultZoomCallback callback);
// Sets the page zoom factor. Must be less than 0.001 different than a value
// in zoom::kPresetZoomFactors.
[supportsPromises] static void setDefaultZoom(
static void setDefaultZoom(
double zoom,
optional SetDefaultZoomCallback callback);
};
@@ -17,13 +17,13 @@ namespace sharedStoragePrivate {
interface Functions {
// Gets all items from shared extension local storage.
[supportsPromises] static void get(GetCallback callback);
static void get(GetCallback callback);
// Sets given items into shared extension local storage.
[supportsPromises] static void set(object items, SetCallback callback);
static void set(object items, SetCallback callback);
// Removes item from shared extension local storage.
[supportsPromises] static void remove(
static void remove(
DOMString[] keys, RemoveCallback callback);
};
};
@@ -74,33 +74,36 @@ namespace sidePanel {
// Configures the side panel.
// |options|: The configuration options to apply to the panel.
// |callback|: Invoked when the options have been set.
[supportsPromises] static void setOptions(PanelOptions options,
optional VoidCallback callback);
static void setOptions(
PanelOptions options,
optional VoidCallback callback);
// Returns the active panel configuration.
// |options|: Specifies the context to return the configuration for.
// |callback|: Called with the active panel configuration.
[supportsPromises] static void getOptions(GetPanelOptions options,
PanelOptionsCallback callback);
static void getOptions(
GetPanelOptions options,
PanelOptionsCallback callback);
// Configures the extension's side panel behavior. This is an upsert
// operation.
// |behavior|: The new behavior to be set.
// |callback|: Called when the new behavior has been set.
[supportsPromises] static void setPanelBehavior(
static void setPanelBehavior(
PanelBehavior behavior,
optional VoidCallback callback);
// Returns the extension's current side panel behavior.
// |callback|: Called with the extension's side panel behavior.
[supportsPromises] static void getPanelBehavior(
static void getPanelBehavior(
PanelBehaviorCallback callback);
// Opens the side panel for the extension.
// This may only be called in response to a user action.
// |options|: Specifies the context in which to open the side panel.
// |callback|: Called when the side panel has been opened.
[supportsPromises] static void open(OpenOptions options,
VoidCallback callback);
static void open(
OpenOptions options,
VoidCallback callback);
};
};
@@ -65,14 +65,16 @@ namespace speechRecognitionPrivate {
// Starts listening to audio from the user. The callback is invoked when
// speech recognition has started. If speech recognition is already active
// when calling start(), the callback is run with an error.
[supportsPromises] static void start(StartOptions options,
OnStartCallback callback);
static void start(
StartOptions options,
OnStartCallback callback);
// Stops listening to audio from the user. The callback is invoked when
// speech recognition has stopped. If speech recognition has already stopped
// when calling stop(), the callback is run with an error.
[supportsPromises] static void stop(StopOptions options,
OnStopCallback callback);
static void stop(
StopOptions options,
OnStopCallback callback);
};
interface Events {
@@ -19,8 +19,9 @@ namespace systemIndicator {
// objects. These objects should have multiple resolutions so that an
// appropriate size can be selected for the given icon size and DPI scaling
// settings. Only square ImageData objects are accepted.
[supportsPromises] static void setIcon(SetIconDetails details,
optional DoneCallback callback);
static void setIcon(
SetIconDetails details,
optional DoneCallback callback);
// Show the icon in the status tray.
static void enable();
@@ -19,7 +19,8 @@ namespace systemLog {
// Adds a new log record.
// |options|: The logging options.
// |callback|: A callback to invoke once the log has been added.
[supportsPromises] static void add(MessageOptions options,
optional VoidCallback callback);
static void add(
MessageOptions options,
optional VoidCallback callback);
};
};
@@ -101,7 +101,7 @@ namespace tabCapture {
// tab capture that would prevent a new tab capture from succeeding (or
// to prevent redundant requests for the same tab).
// |callback| : Callback invoked with CaptureInfo[] for captured tabs.
[supportsPromises] static void getCapturedTabs(
static void getCapturedTabs(
GetCapturedTabsCallback callback);
// Creates a stream ID to capture the target tab.
@@ -114,7 +114,7 @@ namespace tabCapture {
// <code>getUserMedia()</code> API to generate a media stream that
// corresponds to the target tab. The created <code>streamId</code> can
// only be used once and expires after a few seconds if it is not used.
[supportsPromises] static void getMediaStreamId(
static void getMediaStreamId(
optional GetMediaStreamOptions options,
GetMediaStreamIdCallback callback);
};
@@ -42,33 +42,36 @@ namespace usersPrivate {
interface Functions {
// Gets a list of known users.
[supportsPromises] static void getUsers(UsersCallback callback);
static void getUsers(UsersCallback callback);
// Checks to see if the user is already present in the user list.
[supportsPromises] static void isUserInList(DOMString email,
IsUserInListCallback callback);
static void isUserInList(
DOMString email,
IsUserInListCallback callback);
// Adds a new user with the given email to the user list.
// The callback is called with true if the user was added succesfully, or
// with false if not (e.g. because the user was already present, or the
// current user isn't the owner).
[supportsPromises] static void addUser(DOMString email,
UserAddedCallback callback);
static void addUser(
DOMString email,
UserAddedCallback callback);
// Removes the user with the given email from the user list.
// The callback is called with true if the user was removed succesfully, or
// with false if not (e.g. because the user was not already present, or
// the current user isn't the owner).
[supportsPromises] static void removeUser(DOMString email,
UserRemovedCallback callback);
static void removeUser(
DOMString email,
UserRemovedCallback callback);
// Whether the user list is managed by enterprise.
[supportsPromises] static void isUserListManaged(ManagedCallback callback);
static void isUserListManaged(ManagedCallback callback);
// Returns the current user.
[supportsPromises] static void getCurrentUser(UserCallback callback);
static void getCurrentUser(UserCallback callback);
// Get login status.
[supportsPromises] static void getLoginStatus(LoginStatusCallback callback);
static void getLoginStatus(LoginStatusCallback callback);
};
};
@@ -123,7 +123,7 @@ namespace vpnProvider {
// |name|: The name of the VPN configuration.
// |callback|: Called when the configuration is created or if there is an
// error.
[supportsPromises] static void createConfig(
static void createConfig(
DOMString name,
CreateConfigCompleteCallback callback);
@@ -131,7 +131,7 @@ namespace vpnProvider {
// |id|: ID of the VPN configuration to destroy.
// |callback|: Called when the configuration is destroyed or if there is an
// error.
[supportsPromises] static void destroyConfig(
static void destroyConfig(
DOMString id,
optional CallCompleteCallback callback);
@@ -140,14 +140,15 @@ namespace vpnProvider {
// This will succeed only when the VPN session is owned by the extension.
// |parameters|: The parameters for the VPN session.
// |callback|: Called when the parameters are set or if there is an error.
[supportsPromises] static void setParameters(Parameters parameters,
CallCompleteCallback callback);
static void setParameters(
Parameters parameters,
CallCompleteCallback callback);
// Sends an IP packet through the tunnel created for the VPN session.
// This will succeed only when the VPN session is owned by the extension.
// |data|: The IP packet to be sent to the platform.
// |callback|: Called when the packet is sent or if there is an error.
[supportsPromises] static void sendPacket(
static void sendPacket(
ArrayBuffer data,
optional CallCompleteCallback callback);
@@ -156,7 +157,7 @@ namespace vpnProvider {
// |state|: The VPN session state of the VPN client.
// |callback|: Called when the notification is complete or if there is an
// error.
[supportsPromises] static void notifyConnectionStateChanged(
static void notifyConnectionStateChanged(
VpnConnectionState state,
optional CallCompleteCallback callback);
};
@@ -141,7 +141,7 @@ namespace webAuthenticationProxy {
// <code>onCreateRequest</code> event it has received, unless the request
// was canceled (in which case, an <code>onRequestCanceled</code> event is
// fired).
[supportsPromises] static void completeCreateRequest(
static void completeCreateRequest(
CreateResponseDetails details,
VoidCallback callback);
@@ -149,7 +149,7 @@ namespace webAuthenticationProxy {
// The extension must call this for every <code>onGetRequest</code> event
// it has received, unless the request was canceled (in which case, an
// <code>onRequestCanceled</code> event is fired).
[supportsPromises] static void completeGetRequest(
static void completeGetRequest(
GetResponseDetails details,
VoidCallback callback);
@@ -157,7 +157,7 @@ namespace webAuthenticationProxy {
// <code>PublicKeyCredential.isUserVerifyingPlatformAuthenticator()</code>
// call. The extension must call this for every
// <code>onIsUvpaaRequest</code> event it has received.
[supportsPromises] static void completeIsUvpaaRequest(
static void completeIsUvpaaRequest(
IsUvpaaResponseDetails details,
VoidCallback callback);
@@ -179,7 +179,7 @@ namespace webAuthenticationProxy {
// Refer to the <code>onRemoteSessionStateChange</code> event for signaling
// a change of remote session attachment from a native application to to
// the (possibly suspended) extension.
[supportsPromises] static void attach(ErrorCallback callback);
static void attach(ErrorCallback callback);
// Removes this extension from being the active Web Authentication API
// request proxy.
@@ -191,6 +191,6 @@ namespace webAuthenticationProxy {
// Refer to the <code>onRemoteSessionStateChange</code> event for signaling
// a change of remote session attachment from a native application to to
// the (possibly suspended) extension.
[supportsPromises] static void detach(ErrorCallback callback);
static void detach(ErrorCallback callback);
};
};
@@ -41,7 +41,7 @@ namespace webrtcAudioPrivate {
interface Functions {
// Retrieves a list of available audio sink devices.
[supportsPromises] static void getSinks(GetSinksCallback callback);
static void getSinks(GetSinksCallback callback);
// Given a security origin and an input device ID valid for that
// security origin, retrieve an audio sink ID valid for the
@@ -51,9 +51,10 @@ namespace webrtcAudioPrivate {
// The associated sink ID can be used as a sink ID for
// setActiveSink. It is valid irrespective of which process you are
// setting the active sink for.
[supportsPromises] static void getAssociatedSink(DOMString securityOrigin,
DOMString sourceIdInOrigin,
SinkIdCallback callback);
static void getAssociatedSink(
DOMString securityOrigin,
DOMString sourceIdInOrigin,
SinkIdCallback callback);
};
interface Events {
@@ -67,20 +67,21 @@ namespace wmDesksPrivate {
interface Functions {
// Returns all available previously-saved desks.
[supportsPromises] static void getSavedDesks(
static void getSavedDesks(
GetSavedDesksCallback callback);
// Launches a desk, if `templateUuid` is present in the options, launches a
// desk template, otherwise launches an empty desk. If `deskName` is present
// in the options, using provided name as desk name, otherwise launches with
// auto generated name.
[supportsPromises] static void launchDesk(LaunchOptions launchOptions,
DeskIdCallback callback);
static void launchDesk(
LaunchOptions launchOptions,
DeskIdCallback callback);
// Gets the template associated with the templateUuid and returns its JSON
// representation. Returns an error if either the template could not be
// found or the user profile is not valid.
[supportsPromises] static void getDeskTemplateJson(
static void getDeskTemplateJson(
DOMString templateUuid,
GetDeskTemplateJsonCallback callback);
@@ -89,43 +90,44 @@ namespace wmDesksPrivate {
// combine windows to the active desk to the left. If `allowUndo` is
// present or set to true, prompt the user with a notification allowing for
// the desk to be retrieved. Otherwise close all windows on the desk.
[supportsPromises] static void removeDesk(
static void removeDesk(
DOMString deskId,
optional RemoveDeskOptions removeDeskOptions,
optional VoidCallback callback);
// Returns all available desks.
[supportsPromises] static void getAllDesks(GetAllDesksCallback callback);
static void getAllDesks(GetAllDesksCallback callback);
// Sets the window properties for window identified by the `windowId`.
[supportsPromises] static void setWindowProperties(
static void setWindowProperties(
long windowId,
WindowProperties windowProperties,
optional VoidCallback callback);
// Saves the current active desk to the library and remove it from the desk
// bar.
[supportsPromises] static void saveActiveDesk(
static void saveActiveDesk(
SaveActiveDeskCallback callback);
// Deletes the saved desk from the library.
[supportsPromises] static void deleteSavedDesk(
static void deleteSavedDesk(
DOMString savedDeskUuid,
optional VoidCallback callback);
// Launches a saved desk from the library back to active desk.
[supportsPromises] static void recallSavedDesk(DOMString savedDeskUuid,
DeskIdCallback callback);
static void recallSavedDesk(
DOMString savedDeskUuid,
DeskIdCallback callback);
// Retrieves the UUID of the current active desk.
[supportsPromises] static void getActiveDesk(DeskIdCallback callback);
static void getActiveDesk(DeskIdCallback callback);
// Switches to the target desk.
[supportsPromises] static void switchDesk(
static void switchDesk(
DOMString deskUuid, VoidCallback callback);
// Retrieves desk by the desk UUID.
[supportsPromises] static void getDeskByID(
static void getDeskByID(
DOMString deskUuid, GetDeskByIDCallback callback);
};
@@ -61,10 +61,10 @@
#include "chrome/renderer/net_benchmarking_extension.h"
#include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h"
#include "chrome/renderer/plugins/pdf_plugin_placeholder.h"
#include "chrome/renderer/plugins/plugin_uma.h"
#include "chrome/renderer/trusted_vault_encryption_keys_extension.h"
#include "chrome/renderer/url_loader_throttle_provider_impl.h"
#include "chrome/renderer/v8_unwinder.h"
#include "chrome/renderer/web_link_preview_triggerer_impl.h"
#include "chrome/renderer/websocket_handshake_throttle_provider_impl.h"
#include "chrome/renderer/worker_content_settings_client.h"
#include "chrome/services/speech/buildflags/buildflags.h"
@@ -96,6 +96,7 @@
#include "components/no_state_prefetch/renderer/no_state_prefetch_utils.h"
#include "components/no_state_prefetch/renderer/prerender_render_frame_observer.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/page_content_annotations/core/page_content_annotations_features.h"
#include "components/page_load_metrics/renderer/metrics_render_frame_observer.h"
#include "components/paint_preview/buildflags/buildflags.h"
#include "components/password_manager/core/common/password_manager_features.h"
@@ -201,6 +202,7 @@
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/common/controlled_frame/controlled_frame.h"
#include "chrome/common/initialize_extensions_client.h"
#include "chrome/renderer/extensions/api/chrome_extensions_renderer_api_provider.h"
#include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
#include "extensions/common/constants.h"
#include "extensions/common/context_data.h"
@@ -208,6 +210,7 @@
#include "extensions/common/manifest_handlers/csp_info.h"
#include "extensions/common/manifest_handlers/web_accessible_resources_info.h"
#include "extensions/common/switches.h"
#include "extensions/renderer/api/core_extensions_renderer_api_provider.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h"
#include "extensions/renderer/renderer_extension_registry.h"
@@ -293,6 +296,8 @@ using SecureContextRequired = autofill::AutofillAgent::SecureContextRequired;
using UserGestureRequired = autofill::AutofillAgent::UserGestureRequired;
using UsesKeyboardAccessoryForSuggestions =
autofill::AutofillAgent::UsesKeyboardAccessoryForSuggestions;
using EnableHeavyFormDataScraping =
autofill::PasswordAutofillAgent::EnableHeavyFormDataScraping;
namespace {
@@ -440,6 +445,10 @@ void ChromeContentRendererClient::RenderThreadStarted() {
#if BUILDFLAG(ENABLE_EXTENSIONS)
ChromeExtensionsRendererClient* chrome_extensions_renderer_client =
ChromeExtensionsRendererClient::GetInstance();
chrome_extensions_renderer_client->AddAPIProvider(
std::make_unique<extensions::CoreExtensionsRendererAPIProvider>());
chrome_extensions_renderer_client->AddAPIProvider(
std::make_unique<extensions::ChromeExtensionsRendererAPIProvider>());
chrome_extensions_renderer_client->AddAPIProvider(
std::make_unique<
controlled_frame::ControlledFrameExtensionsRendererAPIProvider>());
@@ -647,7 +656,7 @@ void ChromeContentRendererClient::RenderFrameCreated(
const bool search_result_extractor_enabled =
render_frame->IsMainFrame() &&
optimization_guide::features::IsPageContentAnnotationEnabled();
page_content_annotations::features::IsPageContentAnnotationEnabled();
if (search_result_extractor_enabled) {
continuous_search::SearchResultExtractorImpl::Create(render_frame);
}
@@ -687,7 +696,10 @@ void ChromeContentRendererClient::RenderFrameCreated(
if (!render_frame->IsInFencedFrameTree() ||
base::FeatureList::IsEnabled(blink::features::kFencedFramesAPIChanges)) {
auto password_autofill_agent = std::make_unique<PasswordAutofillAgent>(
render_frame, associated_interfaces);
render_frame, associated_interfaces,
EnableHeavyFormDataScraping(
chrome::GetChannel() == version_info::Channel::CANARY ||
chrome::GetChannel() == version_info::Channel::DEV));
auto password_generation_agent = std::make_unique<PasswordGenerationAgent>(
render_frame, password_autofill_agent.get(), associated_interfaces);
new AutofillAgent(
@@ -904,7 +916,6 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
orig_mime_type, &plugin_info);
*plugin = CreatePlugin(render_frame, params, *plugin_info);
#else // !BUILDFLAG(ENABLE_PLUGINS)
PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type, url);
if (orig_mime_type == pdf::kPDFMimeType) {
ReportPDFLoadStatus(
PDFLoadStatus::kShowedDisabledPluginPlaceholderForEmbeddedPdf);
@@ -970,8 +981,6 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame, original_params)
->plugin();
} else {
PluginUMAReporter::GetInstance()->ReportPluginMissing(orig_mime_type,
url);
placeholder = ChromePluginPlaceholder::CreateLoadableMissingPlugin(
render_frame, original_params);
}
@@ -1139,8 +1148,6 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
return render_frame->CreatePlugin(info, params);
}
case chrome::mojom::PluginStatus::kDisabled: {
PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
url);
if (info.path.value() == ChromeContentClient::kPDFExtensionPluginPath) {
ReportPDFLoadStatus(
PDFLoadStatus::kShowedDisabledPluginPlaceholderForEmbeddedPdf);
@@ -1405,7 +1412,9 @@ void ChromeContentRendererClient::PostCompositorThreadCreated(
}
bool ChromeContentRendererClient::RunIdleHandlerWhenWidgetsHidden() {
return !IsStandaloneContentExtensionProcess();
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kInitIsolateAsForeground) ||
!IsStandaloneContentExtensionProcess();
}
bool ChromeContentRendererClient::AllowPopup() {
@@ -1580,12 +1589,14 @@ ChromeContentRendererClient::CreateWebSocketHandshakeThrottleProvider() {
browser_interface_broker_.get());
}
void ChromeContentRendererClient::GetSupportedKeySystems(
std::unique_ptr<media::KeySystemSupportObserver>
ChromeContentRendererClient::GetSupportedKeySystems(
media::GetSupportedKeySystemsCB cb) {
#if BUILDFLAG(ENABLE_LIBRARY_CDMS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
GetChromeKeySystems(std::move(cb));
return GetChromeKeySystems(std::move(cb));
#else
std::move(cb).Run({});
return nullptr;
#endif
}
@@ -1848,3 +1859,8 @@ void ChromeContentRendererClient::AppendContentSecurityPolicy(
network::mojom::ContentSecurityPolicySource::kHTTP});
#endif
}
std::unique_ptr<blink::WebLinkPreviewTriggerer>
ChromeContentRendererClient::CreateLinkPreviewTriggerer() {
return ::CreateWebLinkPreviewTriggerer();
}
@@ -32,7 +32,6 @@
#include "gpu/config/gpu_finch_features.h"
#include "gpu/config/gpu_switches.h"
#include "media/base/media_switches.h"
#include "net/base/features.h"
#include "services/device/public/cpp/device_features.h"
#include "services/network/public/cpp/features.h"
#include "third_party/blink/public/common/buildflags.h"
@@ -216,6 +215,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
kSetOnlyIfOverridden},
{wf::EnableDocumentPolicyNegotiation,
raw_ref(features::kDocumentPolicyNegotiation)},
{wf::EnableEyeDropperAPI, raw_ref(features::kEyeDropper),
kSetOnlyIfOverridden},
{wf::EnableFedCm, raw_ref(features::kFedCm), kSetOnlyIfOverridden},
{wf::EnableFedCmAutoSelectedFlag,
raw_ref(features::kFedCmAutoSelectedFlag), kSetOnlyIfOverridden},
@@ -240,10 +241,9 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
raw_ref(features::kPrivacySandboxAdsAPIsM1Override),
kSetOnlyIfOverridden},
{wf::EnableSharedStorageAPIM118,
raw_ref(blink::features::kSharedStorageAPIM118),
kSetOnlyIfOverridden},
{wf::EnableSharedStorageAPIM123,
raw_ref(blink::features::kSharedStorageAPIM123), kDefault},
raw_ref(blink::features::kSharedStorageAPIM118), kDefault},
{wf::EnableSharedStorageAPIM124,
raw_ref(blink::features::kSharedStorageAPIM124), kDefault},
{wf::EnableFedCmMultipleIdentityProviders,
raw_ref(features::kFedCmMultipleIdentityProviders), kDefault},
{wf::EnableFedCmDisconnect, raw_ref(features::kFedCmDisconnect),
@@ -346,6 +346,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
raw_ref(device::features::kWebXrIncubations)},
{wf::EnableWebXRPoseMotionData,
raw_ref(device::features::kWebXrIncubations)},
{wf::EnableWebXRSpecParity,
raw_ref(device::features::kWebXrIncubations)},
#endif
{wf::EnableRemoveMobileViewportDoubleTap,
raw_ref(features::kRemoveMobileViewportDoubleTap)},
@@ -412,9 +414,9 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
{"LegacyWindowsDWriteFontFallback",
raw_ref(features::kLegacyWindowsDWriteFontFallback)},
{"OriginIsolationHeader", raw_ref(features::kOriginIsolationHeader)},
{"PartitionedCookies", raw_ref(net::features::kPartitionedCookies)},
{"ReduceAcceptLanguage",
raw_ref(network::features::kReduceAcceptLanguage)},
{"SerialPortConnected", raw_ref(features::kSerialPortConnected)},
{"TopicsAPI", raw_ref(features::kPrivacySandboxAdsAPIsOverride),
kSetOnlyIfOverridden},
{"TopicsAPI", raw_ref(features::kPrivacySandboxAdsAPIsM1Override),
@@ -492,6 +494,8 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) {
{wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechSynthesisAPI,
false},
{wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false},
{wrf::EnableMutationEvents, blink::switches::kMutationEventsEnabled,
true},
{wrf::EnableTextFragmentIdentifiers,
switches::kDisableScrollToTextFragment, false},
{wrf::EnableWebAuthenticationRemoteDesktopSupport,
@@ -504,8 +508,6 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) {
switches::kEnableWebGPUDeveloperFeatures, true},
{wrf::EnableWebGPUExperimentalFeatures, switches::kEnableUnsafeWebGPU,
true},
{wrf::EnableDirectSockets, switches::kEnableIsolatedWebAppsInRenderer,
true},
};
for (const auto& mapping : switchToFeatureMapping) {
@@ -698,15 +700,15 @@ void ResolveInvalidConfigurations() {
WebRuntimeFeatures::EnableSharedStorageAPIM118(false);
}
if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPIM123) ||
if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPIM124) ||
!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) {
LOG_IF(WARNING, WebRuntimeFeatures::IsSharedStorageAPIM123Enabled())
<< "SharedStorage for M123+ cannot be enabled in this "
LOG_IF(WARNING, WebRuntimeFeatures::IsSharedStorageAPIM124Enabled())
<< "SharedStorage for M124+ cannot be enabled in this "
"configuration. Use --"
<< switches::kEnableFeatures << "="
<< blink::features::kSharedStorageAPI.name << ","
<< blink::features::kSharedStorageAPIM123.name << " in addition.";
WebRuntimeFeatures::EnableSharedStorageAPIM123(false);
<< blink::features::kSharedStorageAPIM124.name << " in addition.";
WebRuntimeFeatures::EnableSharedStorageAPIM124(false);
}
if (!base::FeatureList::IsEnabled(
@@ -744,6 +746,17 @@ void ResolveInvalidConfigurations() {
WebRuntimeFeatures::EnableAdInterestGroupAPI(false);
WebRuntimeFeatures::EnableFledge(false);
}
if (base::FeatureList::IsEnabled(
features::kCookieDeprecationFacilitatedTesting)) {
WebRuntimeFeatures::EnableFledgeMultiBid(false);
if (!base::FeatureList::IsEnabled(
blink::features::
kAlwaysAllowFledgeDeprecatedRenderURLReplacements)) {
WebRuntimeFeatures::EnableFledgeDeprecatedRenderURLReplacements(false);
}
}
}
} // namespace
@@ -20,13 +20,14 @@
#include "build/build_config.h"
#include "build/buildflag.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/webid/digital_credentials/digital_identity_provider.h"
#include "content/public/browser/anchor_element_preconnect_delegate.h"
#include "content/public/browser/authenticator_request_client_delegate.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/devtools_manager_delegate.h"
#include "content/public/browser/digital_identity_provider.h"
#include "content/public/browser/dips_delegate.h"
#include "content/public/browser/identity_request_dialog_controller.h"
#include "content/public/browser/legacy_tech_cookie_issue_details.h"
#include "content/public/browser/login_delegate.h"
@@ -59,7 +60,6 @@
#include "sandbox/policy/features.h"
#include "sandbox/policy/mojom/sandbox.mojom.h"
#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/device/public/cpp/geolocation/location_provider.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "services/network/public/cpp/features.h"
@@ -87,6 +87,9 @@
#include "content/public/browser/tts_environment_android.h"
#endif
using AttributionReportType =
content::ContentBrowserClient::AttributionReportingOsReportType;
namespace content {
std::unique_ptr<BrowserMainParts> ContentBrowserClient::CreateBrowserMainParts(
@@ -164,13 +167,6 @@ bool ContentBrowserClient::DoesSiteRequireDedicatedProcess(
return false;
}
bool ContentBrowserClient::ShouldAllowCrossProcessSandboxedFrameForPrecursor(
BrowserContext* browser_context,
const GURL& precursor) {
DCHECK(browser_context);
return true;
}
bool ContentBrowserClient::ShouldLockProcessToSite(
BrowserContext* browser_context,
const GURL& effective_url) {
@@ -265,7 +261,7 @@ size_t ContentBrowserClient::GetProcessCountToIgnoreForLimit() {
std::optional<blink::ParsedPermissionsPolicy>
ContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp(
content::BrowserContext* browser_context,
WebContents* web_contents,
const url::Origin& app_origin) {
return blink::ParsedPermissionsPolicy();
}
@@ -542,12 +538,13 @@ void ContentBrowserClient::OnAuctionComplete(
network::mojom::AttributionSupport ContentBrowserClient::GetAttributionSupport(
AttributionReportingOsApiState state,
content::WebContents* web_contents) {
bool client_os_disabled) {
switch (state) {
case AttributionReportingOsApiState::kDisabled:
return network::mojom::AttributionSupport::kWeb;
case AttributionReportingOsApiState::kEnabled:
return network::mojom::AttributionSupport::kWebAndOs;
return client_os_disabled ? network::mojom::AttributionSupport::kWeb
: network::mojom::AttributionSupport::kWebAndOs;
}
}
@@ -562,13 +559,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed(
return true;
}
bool ContentBrowserClient::ShouldUseOsWebSourceAttributionReporting(
content::RenderFrameHost* rfh) {
return true;
ContentBrowserClient::AttributionReportingOsReportTypes
ContentBrowserClient::GetAttributionReportingOsReportTypes(
WebContents* web_contents) {
return {AttributionReportType::kWeb, AttributionReportType::kWeb};
}
bool ContentBrowserClient::ShouldUseOsWebTriggerAttributionReporting(
content::RenderFrameHost* rfh) {
bool ContentBrowserClient::IsAttributionReportingAllowedForContext(
content::BrowserContext* browser_context,
content::RenderFrameHost* rfh,
const url::Origin& context_origin,
const url::Origin& reporting_origin) {
return true;
}
@@ -679,7 +680,8 @@ std::string ContentBrowserClient::GetGeolocationApiKey() {
return std::string();
}
device::GeolocationManager* ContentBrowserClient::GetGeolocationManager() {
device::GeolocationSystemPermissionManager*
ContentBrowserClient::GetGeolocationSystemPermissionManager() {
return nullptr;
}
@@ -975,9 +977,12 @@ ContentBrowserClient::CreateURLLoaderThrottlesForKeepAlive(
return std::vector<std::unique_ptr<blink::URLLoaderThrottle>>();
}
void ContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
int frame_tree_node_id,
NonNetworkURLLoaderFactoryMap* factories) {}
mojo::PendingRemote<network::mojom::URLLoaderFactory>
ContentBrowserClient::CreateNonNetworkNavigationURLLoaderFactory(
const std::string& scheme,
int frame_tree_node_id) {
return {};
}
void ContentBrowserClient::
RegisterNonNetworkWorkerMainResourceURLLoaderFactories(
@@ -1104,6 +1109,7 @@ bool ContentBrowserClient::ShouldOverrideUrlLoading(
bool has_user_gesture,
bool is_redirect,
bool is_outermost_main_frame,
bool is_prerendering,
ui::PageTransition transition,
bool* ignore_navigation) {
return true;
@@ -1422,7 +1428,7 @@ void ContentBrowserClient::IsClipboardPasteAllowedByPolicy(
void ContentBrowserClient::IsClipboardCopyAllowedByPolicy(
const ClipboardEndpoint& source,
const ClipboardMetadata& metadata,
const std::u16string& data,
const ClipboardPasteData& data,
IsClipboardCopyAllowedCallback callback) {
std::move(callback).Run(data, std::nullopt);
}
@@ -1657,7 +1663,7 @@ bool ContentBrowserClient::UseOutermostMainFrameOrEmbedderForSubCaptureTargets()
void ContentBrowserClient::BindVideoEffectsManager(
const std::string& device_id,
content::BrowserContext* browser_context,
mojo::PendingReceiver<video_capture::mojom::VideoEffectsManager>
mojo::PendingReceiver<media::mojom::VideoEffectsManager>
video_effects_manager) {}
#endif // !BUILDFLAG(IS_ANDROID)
@@ -1682,4 +1688,12 @@ void ContentBrowserClient::NotifyMultiCaptureStateChanged(
const std::string& label,
MultiCaptureChanged state) {}
std::unique_ptr<DipsDelegate> ContentBrowserClient::CreateDipsDelegate() {
return nullptr;
}
bool ContentBrowserClient::ShouldSuppressAXLoadComplete(RenderFrameHost* rfh) {
return false;
}
} // namespace content
@@ -21,6 +21,7 @@
// present in earlier versions of LaCros.
ariaAttributeChangedDeprecated,
ariaCurrentChanged,
ariaNotificationsPosted,
atomicChanged,
autoCompleteChanged,
autocorrectionOccured,
@@ -31,7 +32,6 @@
checkedStateChanged,
checkedStateDescriptionChanged,
childrenChanged,
classNameChanged,
clicked,
collapsed,
controlsChanged,
@@ -93,7 +93,6 @@
nameChanged,
objectAttributeChanged,
orientationChanged,
otherAttributeChanged,
parentChanged,
placeholderChanged,
portalActivated,
@@ -170,8 +169,8 @@
dateTime,
definition,
descriptionList,
descriptionListDetail,
descriptionListTerm,
descriptionListDetailDeprecated,
descriptionListTermDeprecated,
desktop,
details,
dialog,
@@ -172,13 +172,13 @@ namespace declarativeNetRequest {
// TODO(crbug.com/1141166): Add documentation once feature is complete.
[nodoc] dictionary HeaderInfo {
// The name of the header. This HeaderInfo condition matches on the name
// The name of the header. This condition matches on the name
// only if both `values` and `excludedValues` are not specified.
DOMString header;
// If specified, this HeaderInfo condition is matched if the header's value
// If specified, this condition matches if the header's value
// contains at least one element in this list.
DOMString[]? values;
// If specified, this HeaderInfo condition is not matched if the header
// If specified, this condition is not matched if the header
// exists but its value contains at least one element in this list.
DOMString[]? excludedValues;
};
@@ -197,8 +197,9 @@ namespace declarativeNetRequest {
// pattern, specifies the start of a (sub-)domain of the URL.
//
// <b>'^'</b> : Separator character: This matches anything except a letter,
// a digit or one of the following: _ - . %. This can also
// match the end of the URL.
// a digit, or one of the following: <code>_</code>,
// <code>-</code>, <code>.</code>, or <code>%</code>. This
// also match the end of the URL.
//
// Therefore <code>urlFilter</code> is composed of the following parts:
// (optional Left/Domain name anchor) + pattern + (optional Right anchor).
@@ -357,10 +358,10 @@ namespace declarativeNetRequest {
// TODO(crbug.com/1141166): Add documentation once feature is complete.
[nodoc] HeaderInfo[]? responseHeaders;
// Rule does not match if the request matches any response header condition
// in this list (if specified). If both `excludedResponseHeaders` and
// `responseHeaders` are specified, `excludedResponseHeaders` takes
// precedence.
// Rule does not match if the request matches any response header
// condition in this list (if specified). If both `excludedResponseHeaders`
// and `responseHeaders` are specified, then the `excludedResponseHeaders`
// property takes precedence.
// TODO(crbug.com/1141166): Add documentation once feature is complete.
[nodoc] HeaderInfo[]? excludedResponseHeaders;
};
+10 -3
View File
@@ -9,11 +9,11 @@
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include <optional>
#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h"
#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h"
#include "base/bits.h"
@@ -253,8 +253,11 @@ void SetFlags(IsolateHolder::ScriptMode mode,
"--stress-per-context-marking-worklist",
"--no-stress-per-context-marking-worklist");
SetV8FlagsIfOverridden(
features::kV8ProfileGuidedOptimization, "--profile-guided-optimization",
"--profile-guided-optimization-for-empty-feedback-vector");
features::kV8ProfileGuidedOptimization,
"--profile-guided-optimization "
"--profile-guided-optimization-for-empty-feedback-vector",
"--noprofile-guided-optimization "
"--noprofile-guided-optimization-for-empty-feedback-vector");
SetV8FlagsIfOverridden(features::kV8FlushEmbeddedBlobICache,
"--experimental-flush-embedded-blob-icache",
"--no-experimental-flush-embedded-blob-icache");
@@ -336,6 +339,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
"--efficiency-mode-delay-turbofan=%i",
delay);
}
} else {
SetV8FlagsFormatted("--no-efficiency-mode-for-tiering-heuristics");
}
if (base::FeatureList::IsEnabled(
@@ -353,6 +358,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
bool any_slow_histograms_alias =
base::FeatureList::IsEnabled(
features::kV8SlowHistogramsCodeMemoryWriteProtection) ||
base::FeatureList::IsEnabled(
features::kV8SlowHistogramsIntelJCCErratumMitigation) ||
base::FeatureList::IsEnabled(features::kV8SlowHistogramsSparkplug) ||
base::FeatureList::IsEnabled(
features::kV8SlowHistogramsSparkplugAndroid) ||
@@ -9,6 +9,7 @@
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "base/barrier_closure.h"
#include "base/base64.h"
@@ -614,7 +615,8 @@ NetworkContext::NetworkContext(
#if BUILDFLAG(IS_ANDROID)
base::BindRepeating(&ReturnAppStatusListenerIfAlive,
weak_factory_.GetWeakPtr(),
app_status_listeners_.rbegin()->get()),
base::UnsafeDanglingUntriaged(
app_status_listeners_.rbegin()->get())),
#endif // BUILDFLAG(IS_ANDROID)
/*file_operations_factory=*/nullptr);
} else {
@@ -846,9 +848,7 @@ void NetworkContext::CreateURLLoaderFactory(
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client) {
url_loader_factories_.emplace(std::make_unique<cors::CorsURLLoaderFactory>(
this, std::move(params), std::move(resource_scheduler_client),
std::move(receiver), &cors_origin_access_list_,
network_service_ ? network_service_->network_service_resource_block_list()
: nullptr));
std::move(receiver), &cors_origin_access_list_));
}
void NetworkContext::CreateURLLoaderFactoryForCertNetFetcher(
@@ -1092,7 +1092,7 @@ size_t NetworkContext::GetNumOutstandingResolveHostRequestsForTesting() const {
if (internal_host_resolver_)
sum += internal_host_resolver_->GetNumOutstandingRequestsForTesting();
for (const auto& host_resolver : host_resolvers_)
sum += host_resolver.first->GetNumOutstandingRequestsForTesting();
sum += host_resolver->GetNumOutstandingRequestsForTesting(); // IN-TEST
return sum;
}
@@ -1501,7 +1501,9 @@ void NetworkContext::SetNetworkConditions(
if (conditions) {
network_conditions = std::make_unique<NetworkConditions>(
conditions->offline, conditions->latency.InMillisecondsF(),
conditions->download_throughput, conditions->upload_throughput);
conditions->download_throughput, conditions->upload_throughput,
conditions->packet_loss, conditions->packet_queue_length,
conditions->packet_reordering);
}
ThrottlingController::SetConditions(throttling_profile_id,
std::move(network_conditions));
@@ -1802,13 +1804,12 @@ void NetworkContext::CreateHostResolver(
internal_resolver = private_internal_resolver.get();
}
host_resolvers_.emplace(
std::make_unique<HostResolver>(
std::move(receiver),
base::BindOnce(&NetworkContext::OnHostResolverShutdown,
base::Unretained(this)),
internal_resolver, url_request_context_->net_log()),
std::move(private_internal_resolver));
host_resolvers_.emplace(std::make_unique<HostResolver>(
std::move(receiver),
base::BindOnce(&NetworkContext::OnHostResolverShutdown,
base::Unretained(this)),
internal_resolver, std::move(private_internal_resolver),
url_request_context_->net_log()));
}
void NetworkContext::VerifyCertForSignedExchange(
@@ -2364,12 +2365,16 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
// Decide which ProxyDelegate to create. At most one of these will be the
// case for any given NetworkContext: either PrefetchProxy, handling its
// custom proxy configs, or IpProtection, using the proxy allowlist.
// TODO(https://crbug.com/40947771): Once the WebView traffic experiment is
// done, we should only create an IpProtectionProxyDelegate when
// `params_->ip_protection_config_getter` is set (to avoid creating proxy
// delegates for network contexts that don't participate in IP Protection, or
// for any network context when the IP Protection feature is disabled).
auto* nspal = network_service_->network_service_proxy_allow_list();
if (!params_->initial_custom_proxy_config && nspal->IsEnabled()) {
auto ipp_config_cache = std::make_unique<IpProtectionConfigCacheImpl>(
std::move(params_->ip_protection_config_getter));
std::unique_ptr<IpProtectionProxyDelegate> proxy_delegate =
std::make_unique<IpProtectionProxyDelegate>(
nspal, std::move(ipp_config_cache), params_->enable_ip_protection);
proxy_delegate->SetReceiver(
@@ -2491,7 +2496,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::make_unique<NetworkContextApplicationStatusListener>());
cache_params.app_status_listener_getter = base::BindRepeating(
&ReturnAppStatusListenerIfAlive, weak_factory_.GetWeakPtr(),
app_status_listeners_.rbegin()->get());
base::UnsafeDanglingUntriaged(app_status_listeners_.rbegin()->get()));
#endif // BUILDFLAG(IS_ANDROID)
builder.EnableHttpCache(cache_params);
}
@@ -2791,7 +2796,7 @@ void NetworkContext::OnHttpCacheSizeComputed(
HttpCacheDataCounter* counter,
bool is_upper_limit,
int64_t result_or_error) {
EraseIf(http_cache_data_counters_, base::MatchesUniquePtr(counter));
std::erase_if(http_cache_data_counters_, base::MatchesUniquePtr(counter));
std::move(callback).Run(is_upper_limit, result_or_error);
}
@@ -2924,10 +2929,6 @@ bool NetworkContext::IsAllowedToUseAllHttpAuthSchemes(
return !url_matcher_->MatchURL(scheme_host_port.GetURL()).empty();
}
bool NetworkContext::AfpBlockListExperimentEnabled() const {
return params_ && params_->afp_block_list_experiment_enabled;
}
void NetworkContext::CreateTrustedUrlLoaderFactoryForNetworkService(
mojo::PendingReceiver<mojom::URLLoaderFactory>
url_loader_factory_pending_receiver) {
@@ -3026,4 +3027,44 @@ void NetworkContext::SetCookieDeprecationLabel(
url_request_context_->set_cookie_deprecation_label(label);
}
void NetworkContext::RevokeNetworkForNonce(
const base::UnguessableToken& nonce,
RevokeNetworkForNonceCallback callback) {
network_revocation_nonces_.insert(nonce);
// TODO(crbug.com/41488151): Cancel requests in progress.
std::move(callback).Run();
}
void NetworkContext::ExemptUrlFromNetworkRevocationForNonce(
const GURL& exempted_url,
const base::UnguessableToken& nonce,
ExemptUrlFromNetworkRevocationForNonceCallback callback) {
GURL url_without_filename = exempted_url.GetWithoutFilename();
if (network_revocation_exemptions_.contains(nonce)) {
network_revocation_exemptions_.find(nonce)->second.insert(
url_without_filename);
} else {
network_revocation_exemptions_.insert({nonce, {url_without_filename}});
}
std::move(callback).Run();
}
bool NetworkContext::IsNetworkForNonceAndUrlAllowed(
const base::UnguessableToken& nonce,
const GURL& url) const {
// If network hasn't been revoked for the nonce, it's allowed.
if (!network_revocation_nonces_.contains(nonce)) {
return true;
}
// If network has been revoked for the nonce, but the url is exempted, it's
// allowed.
if (network_revocation_exemptions_.contains(nonce) &&
network_revocation_exemptions_.find(nonce)->second.contains(
url.GetWithoutFilename())) {
return true;
}
// The nonce was revoked and the url isn't exempted.
return false;
}
} // namespace network
File diff suppressed because it is too large Load Diff
@@ -1283,7 +1283,7 @@ enum WebFeature {
kV8HTMLVideoElement_Poster_AttributeSetter = 1816,
kNotificationPermissionRequestedIframe = 1817,
kRtcpMuxPolicyNegotiate = 1823,
kDOMClobberedVariableAccessed = 1824,
kDOMClobberedWindowPropertyAccessed = 1824,
kHTMLDocumentCreateProcessingInstruction = 1825,
kFetchResponseConstructionWithStream = 1826,
kLocationOrigin = 1827,
@@ -2590,7 +2590,7 @@ enum WebFeature {
kTrustedTypesPolicyCreated = 3279,
kV8HTMLVideoElement_RequestVideoFrameCallback_Method = 3280,
kV8HTMLVideoElement_CancelVideoFrameCallback_Method = 3281,
kRubyElementWithDisplayBlock = 3282,
kOBSOLETE_RubyElementWithDisplayBlock = 3282,
kOBSOLETE_LocationFragmentDirectiveAccessed = 3283,
kCanvasRenderingContext = 3284,
kSchemefulSameSiteContextDowngrade = 3285,
@@ -3239,7 +3239,7 @@ enum WebFeature {
kOBSOLETE_DocumentTransition = 3931,
kSpeculationRules = 3932,
kV8AbortSignal_Abort_Method = 3933,
kSelectionBackgroundColorInversion = 3934,
kOBSOLETE_SelectionBackgroundColorInversion = 3934,
kOBSOLETE_RTCPeerConnectionPlanBThrewAnException = 3935,
kHTMLRootContained = 3936,
kHTMLBodyContained = 3937,
@@ -3941,7 +3941,7 @@ enum WebFeature {
kEditContext = 4588,
kServiceWorkerStaticRouter_RegisterRouter = 4589,
kServiceWorkerStaticRouter_Evaluate = 4590,
kClientHintsUAFormFactor = 4591,
kClientHintsUAFormFactors = 4591,
kURLSearchParamsHasFnBehaviourDiverged = 4592,
kURLSearchParamsDeleteFnBehaviourDiverged = 4593,
kOBSOLETE_TextWrapPretty = 4594,
@@ -4065,7 +4065,7 @@ enum WebFeature {
kStorageAccessAPI_requestStorageAccess_BeyondCookies_indexedDB_Use = 4705,
kStorageAccessAPI_requestStorageAccess_BeyondCookies_locks = 4706,
kStorageAccessAPI_requestStorageAccess_BeyondCookies_locks_Use = 4707,
kRubyElementWithDisplayBlockAndRt = 4708,
kOBSOLETE_RubyElementWithDisplayBlockAndRt = 4708,
kCSSDeclarationAfterNestedRule = 4709,
kThirdPartyCookieAdAccessBlockByExperiment = 4710,
// The items above roughly this point are available in the M120 branch.
@@ -4107,11 +4107,11 @@ enum WebFeature {
kSubtleCryptoDeriveBitsZeroLength = 4745,
kSubtleCryptoDeriveBitsTruncation = 4746,
kTextDirectiveInShadowDOM = 4747,
kPseudoFirstLetterOnRt = 4748,
kPseudoFirstLineOnRt = 4749,
kOBSOLETE_PseudoFirstLetterOnRt = 4748,
kOBSOLETE_PseudoFirstLineOnRt = 4749,
kAutoSizesLazy = 4750,
kAutoSizesNonLazy = 4751,
kTrustedTypesIntrospection = 4752,
kOBSOLETE_TrustedTypesIntrospection = 4752,
kTrustedTypesIsCheck = 4753,
kMouseDragOnCancelledMouseMove = 4754,
// The items above roughly this point are available in the M121 branch.
@@ -4221,8 +4221,76 @@ enum WebFeature {
kStorageAccessAPI_requestStorageAccess_BeyondCookies_SharedWorker = 4857,
kStorageAccessAPI_requestStorageAccess_BeyondCookies_SharedWorker_Use = 4858,
kV8PointerEvent_GetCoalescedEvents_Method = 4859,
kV8RTCEncodedVideoFrame_Constructor = 4860,
kCSSFunctions = 4861,
kCSSPageRule = 4862,
// The items above roughly this point are available in the M123 branch.
kV8RTCRtpReceiver_JitterBufferTarget_AttributeGetter = 4863,
kV8RTCRtpReceiver_JitterBufferTarget_AttributeSetter = 4864,
kTrustedTypesIntrospectionAttributeType = 4865,
kTrustedTypesIntrospectionPropertyType = 4866,
kTrustedTypesIntrospectionTypeMapping = 4867,
kIndexedDBFileLastModifiedDate = 4868,
kSpeculationRulesRejectedLaxReferrerPolicy = 4869,
kSpeculationRulesUsedLinkReferrerPolicy = 4870,
kSpeculationRulesExplicitReferrerPolicy = 4871,
kDOMClobberedShadowedDocumentPropertyAccessed = 4872,
kDOMClobberedNotShadowedDocumentPropertyAccessed = 4873,
kDOMClobberedShadowedFormPropertyAccessed = 4874,
kDOMClobberedNotShadowedFormPropertyAccessed = 4875,
kTpcdCookieReadBlockedByAdHeuristics = 4876,
kUsedColorSchemeRootScrollbarsDark = 4877,
kSerialPortConnected = 4878,
kDevicePostureMediaFeature = 4879,
kDevicePosture = 4880,
kViewportSegmentsMediaFeature = 4881,
kViewportSegments = 4882,
kPrivateNetworkAccessWebSocketConnected = 4883,
kWebAppTitle = 4884,
kDOMSubtreeModifiedEventFired = 4885,
kDOMNodeInsertedEventFired = 4886,
kDOMNodeRemovedEventFired = 4887,
kDOMNodeRemovedFromDocumentEventFired = 4888,
kDOMNodeInsertedIntoDocumentEventFired = 4889,
kDOMCharacterDataModifiedEventFired = 4890,
kAnyMutationEventFired = 4891,
kAnyMutationEventListenerAdded = 4892,
kBadgeSetWithoutNotificationPermissionInBrowserWindow = 4893,
kBadgeSetWithoutNotificationPermissionInAppWindow = 4894,
kBadgeSetWithoutNotificationPermissionInWorker = 4895,
kQuirksModeCursorHand = 4896,
kTrustedTypesCreatePolicyWithEmptyName = 4897,
kV8RTCEncodedAudioFrame_Constructor = 4898,
// Direct Sockets API:
kTCPSocketConstructor = 4899,
kTCPSocketOpenedAttribute = 4900,
kTCPSocketClosedAttribute = 4901,
kTCPSocketCloseFunction= 4902,
kUDPSocketConstructor = 4903,
kUDPSocketOpenedAttribute = 4904,
kUDPSocketClosedAttribute = 4905,
kUDPSocketCloseFunction= 4906,
kTCPServerSocketConstructor = 4907,
kTCPServerSocketOpenedAttribute = 4908,
kTCPServerSocketClosedAttribute = 4909,
kTCPServerSocketCloseFunction = 4910,
// Web Printing API:
kWebPrintingGetPrintersFunction = 4911,
kWebPrinterCachedAttributesFunction = 4912,
kWebPrinterFetchAttributesFunction = 4913,
kWebPrinterPrintJobFunction = 4914,
kWebPrintJobAttributesFunction = 4915,
kWebPrintJobCancelFunction = 4916,
kWebPrintJobOnJobStateChangeEvent = 4917,
kFledgeAuctionReportBuyers = 4918,
kFledgeAuctionReportBuyerDebugModeConfig = 4919,
kFedCmButtonMode = 4920,
kSimplifyLoadingTransparentPlaceholderImage = 4921,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
@@ -1,8 +1,8 @@
enum AriaNotificationInsertionMode { "queue", "stack", "clear" };
enum AriaNotifyInterrupt { "none", "all", "pending" };
enum AriaNotifyPriority { "none", "important" };
dictionary AriaNotificationOptions {
AriaNotificationInsertionMode insertionMode = "queue";
boolean interruptCurrent = false;
boolean preventInterrupt = false;
DOMString label = "";
};
AriaNotifyInterrupt interrupt = "none";
AriaNotifyPriority priority = "none";
DOMString notificationId = "";
};
@@ -50,5 +50,5 @@
readonly attribute ComputedAccessibleNode? previousSibling;
readonly attribute ComputedAccessibleNode? nextSibling;
[CallWith=ScriptState] Promise<any> ensureUpToDate();
[CallWith=ScriptState] Promise<ComputedAccessibleNode> ensureUpToDate();
};
@@ -1,8 +0,0 @@
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[Exposed=Window, RuntimeEnabled=CSSAnchorPositioning]
interface CSSPositionFallbackRule : CSSGroupingRule {
readonly attribute CSSOMString name;
};
@@ -1,8 +1,11 @@
// Copyright 2022 The Chromium Authors
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://drafts.csswg.org/css-anchor-position-1/#idl-index
[Exposed=Window, RuntimeEnabled=CSSAnchorPositioning]
interface CSSTryRule : CSSRule {
interface CSSPositionTryRule : CSSRule {
readonly attribute CSSOMString name;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
@@ -188,8 +188,8 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
// Storage Access API
[CallWith=ScriptState, NewObject, MeasureAs=StorageAccessAPI_HasStorageAccess_Method] Promise<boolean> hasStorageAccess();
[CallWith=ScriptState, NewObject, MeasureAs=StorageAccessAPI_requestStorageAccess_Method] Promise<void> requestStorageAccess();
[CallWith=ScriptState, NewObject, MeasureAs=StorageAccessAPI_requestStorageAccessFor_Method] Promise<void> requestStorageAccessFor(USVString requestedOrigin);
[CallWith=ScriptState, NewObject, MeasureAs=StorageAccessAPI_requestStorageAccess_Method] Promise<undefined> requestStorageAccess();
[CallWith=ScriptState, NewObject, MeasureAs=StorageAccessAPI_requestStorageAccessFor_Method] Promise<undefined> requestStorageAccessFor(USVString requestedOrigin);
// Text fragment directive API
// https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
@@ -209,9 +209,9 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
[CallWith=ScriptState, Measure, RaisesException, NewObject, SecureContext, RuntimeEnabled=PrivateStateTokens] Promise<boolean> hasRedemptionRecord(USVString issuer);
// Confirmation of Action API
// ARIA Notify API
// https://github.com/WICG/aom/blob/gh-pages/notification-api.md
[RuntimeEnabled=ConfirmationOfAction] void ariaNotify(HTMLString announcement, optional AriaNotificationOptions options = {});
[RuntimeEnabled=AriaNotify] void ariaNotify(DOMString announcement, optional AriaNotificationOptions options = {});
// The (experimental) DOM Parts API.
[RuntimeEnabled=DOMPartsAPI] DocumentPartRoot getPartRoot();
@@ -155,9 +155,9 @@ dictionary CheckVisibilityOptions {
// Accessibility Object Model
[RuntimeEnabled=AccessibilityObjectModel] readonly attribute AccessibleNode? accessibleNode;
// Confirmation of Action API
// ARIA Notify API
// https://github.com/WICG/aom/blob/gh-pages/notification-api.md
[RuntimeEnabled=ConfirmationOfAction] void ariaNotify(HTMLString announcement, optional AriaNotificationOptions options = {});
[RuntimeEnabled=AriaNotify] void ariaNotify(DOMString announcement, optional AriaNotificationOptions options = {});
// Event handler attributes
attribute EventHandler onbeforecopy;
@@ -3,6 +3,6 @@
// found in the LICENSE file.
dictionary GetHTMLOptions {
boolean includeShadowRoots;
sequence<ShadowRoot> shadowRoots;
boolean serializableShadowRoots = false;
sequence<ShadowRoot> shadowRoots = [];
};
@@ -0,0 +1,9 @@
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[RuntimeEnabled=HTMLInterestTargetAttribute]
interface mixin InterestInvokerElement {
[CEReactions,Reflect=interesttarget] attribute Element? interestTargetElement;
[CEReactions,Reflect=interestaction] attribute DOMString interestAction;
};
@@ -5,5 +5,5 @@
[RuntimeEnabled=HTMLInvokeTargetAttribute]
interface mixin InvokerElement {
[CEReactions,Reflect=invoketarget] attribute Element? invokeTargetElement;
[CEReactions] attribute DOMString invokeAction;
[CEReactions,Reflect=invokeaction] attribute DOMString invokeAction;
};
@@ -8,12 +8,12 @@ callback SubscribeCallback = void (Subscriber subscriber);
callback ObserverCallback = void (any value);
callback ObserverCompleteCallback = void ();
// TODO(crbug.com/14859810): Introduce `Mapper` when `map()` is implemented,
// since we reference it in the below comment.
//
callback Mapper = any (any element, unsigned long long index);
// Differs from Mapper only in return type, since this callback is exclusively
// used to visit each element in a sequence, not transform it.
callback Visitor = undefined (any element, unsigned long long index);
callback Predicate = boolean (any value);
dictionary Observer {
ObserverCallback next;
@@ -32,6 +32,8 @@ interface Observable {
[CallWith=ScriptState, MeasureAs=ObservableConstructor] constructor(SubscribeCallback callback);
[CallWith=ScriptState] void subscribe(optional ObserverUnion observer = {}, optional SubscribeOptions options = {});
[CallWith=ScriptState, RaisesException] static Observable from(any value);
// Observable-returning operators.
// See https://wicg.github.io/observable/#observable-returning-operators.
//
@@ -39,6 +41,10 @@ interface Observable {
// `any`, and the conversion semantics (that have not yet been implemented)
// should convert that `any` into an `Observable`.
[CallWith=ScriptState] Observable takeUntil(Observable notifier);
[CallWith=ScriptState] Observable map(Mapper mapper);
[CallWith=ScriptState] Observable filter(Predicate predicate);
[CallWith=ScriptState] Observable take(unsigned long long number_to_take);
[CallWith=ScriptState] Observable drop(unsigned long long number_to_drop);
// Promise-returning operators.
// See https://wicg.github.io/observable/#promise-returning-operators.
@@ -5,5 +5,5 @@
[
ImplementedAs=InternalsStorageAccess
] partial interface Internals {
[CallWith=ScriptState, RaisesException] Promise<void> setStorageAccess(USVString origin, USVString embeddingOrigin, boolean blocked);
[CallWith=ScriptState, RaisesException] Promise<undefined> setStorageAccess(USVString origin, USVString embeddingOrigin, boolean blocked);
};
@@ -133,6 +133,7 @@
"error",
"eventtimingbufferfull",
"exit",
"fencedtreeclick",
"fetch",
"finish",
"focus",
@@ -256,8 +257,8 @@
"reading",
"readingerror",
"readystatechange",
"pageconceal",
"pagereveal",
"pageswap",
"reflectionchange",
"rejectionhandled",
"release",
@@ -13,5 +13,5 @@
dictionary InvokeEventInit : EventInit {
Element? invoker = null;
DOMString action = "auto";
DOMString action = "";
};
@@ -34,7 +34,7 @@
readonly attribute DOMString attrName;
readonly attribute unsigned short attrChange;
// TODO(foolip): None of the initMutationEvent() arguments should be optional.
[Measure] void initMutationEvent(optional DOMString type = "undefined",
[Measure] void initMutationEvent(DOMString type,
optional boolean bubbles = false,
optional boolean cancelable = false,
optional Node? relatedNode = null,
@@ -5,23 +5,23 @@
// https://w3c.github.io/webappsec-csp/#idl-index
dictionary SecurityPolicyViolationEventInit : EventInit {
// TODO(foolip): The spec says "USVString documentURL".
required DOMString documentURI;
// TODO(foolip): The spec says USVString.
DOMString referrer = "";
// TODO(foolip): The spec says "USVString blockedURL".
DOMString blockedURI = "";
required DOMString effectiveDirective;
required DOMString originalPolicy;
// TODO(foolip): The spec says USVString.
DOMString sourceFile = "";
DOMString sample = "";
required SecurityPolicyViolationEventDisposition disposition;
required unsigned short statusCode;
// TODO(foolip): The spec says "unsigned long lineno"
long lineNumber = 0;
// TODO(foolip): The spec says "unsigned long colno"
long columnNumber = 0;
// TODO(foolip): The spec says "USVString documentURL".
DOMString documentURI = "";
// TODO(foolip): The spec says USVString.
DOMString referrer = "";
// TODO(foolip): The spec says "USVString blockedURL".
DOMString blockedURI = "";
DOMString effectiveDirective = "";
DOMString originalPolicy = "";
// TODO(foolip): The spec says USVString.
DOMString sourceFile = "";
DOMString sample = "";
SecurityPolicyViolationEventDisposition disposition = "enforce";
unsigned short statusCode = 0;
// TODO(foolip): The spec says "unsigned long lineno"
long lineNumber = 0;
// TODO(foolip): The spec says "unsigned long colno"
long columnNumber = 0;
required DOMString violatedDirective;
DOMString violatedDirective = "";
};
@@ -37,7 +37,7 @@
[Measure] readonly attribute DOMString data;
[Measure] void initTextEvent(optional DOMString type = "undefined",
[Measure] void initTextEvent(DOMString type,
optional boolean bubbles = false,
optional boolean cancelable = false,
optional Window? view = null,
@@ -8,5 +8,5 @@
sequence<USVString> getInternalResponseURLList(Response response);
// For documentation see IDL for Internals::getInitialResourcePriority.
[CallWith=ScriptState] Promise<unsigned long> getInitialResourcePriority(DOMString url, WorkerGlobalScope worker_global);
[CallWith=ScriptState] Promise<long> getInitialResourcePriority(DOMString url, WorkerGlobalScope worker_global);
};
@@ -1082,6 +1082,16 @@
type: "int",
},
// The forced colors state for the web content. The forced colors state
// is used to evaluate the forced-colors media query, as well as determining
// when to apply system color overrides to author specified styles.
{
name: "inForcedColors",
initial: false,
invalidate: ["ColorScheme"],
type: "bool",
},
// Preferred color scheme from the OS/application passed to the renderer for
// evaluating the prefers-color-scheme media query.
{
@@ -15,5 +15,5 @@ dictionary UADataValues {
DOMString bitness;
sequence<NavigatorUABrandVersion> fullVersionList;
boolean wow64;
sequence<DOMString> formFactor;
sequence<DOMString> formFactors;
};
@@ -44,7 +44,10 @@
// Segments API
// https://github.com/webscreens/window-segments
[RuntimeEnabled=ViewportSegments] readonly attribute FrozenArray<DOMRect>? segments;
[
RuntimeEnabled=ViewportSegments,
MeasureAs=ViewportSegments
] readonly attribute FrozenArray<DOMRect>? segments;
attribute EventHandler onresize;
attribute EventHandler onscroll;
@@ -172,8 +172,8 @@
// 90 is when rotated counter clockwise.
[HighEntropy=Direct, MeasureAs=WindowOrientation, RuntimeEnabled=OrientationEvent] readonly attribute long orientation;
// Event handler attribute for the pageconceal event.
[RuntimeEnabled=PageConcealEvent] attribute EventHandler onpageconceal;
// Event handler attribute for the pageswap event.
[RuntimeEnabled=PageSwapEvent] attribute EventHandler onpageswap;
// Event handler attribute for the pagereveal event.
// https://drafts.csswg.org/css-view-transitions-2/#reveal-event
@@ -27,7 +27,7 @@
[LegacyLenientSetter] readonly attribute boolean fullscreenEnabled;
[LegacyLenientSetter, Unscopable, ImplementedAs=fullscreenElement] readonly attribute boolean fullscreen;
[CallWith=ScriptState, RaisesException] Promise<void> exitFullscreen();
[CallWith=ScriptState, RaisesException] Promise<undefined> exitFullscreen();
attribute EventHandler onfullscreenchange;
attribute EventHandler onfullscreenerror;
@@ -7,7 +7,7 @@
[
ImplementedAs=ElementFullscreen
] partial interface Element {
[CallWith=ScriptState, RaisesException] Promise<void> requestFullscreen(optional FullscreenOptions options = {});
[CallWith=ScriptState, RaisesException] Promise<undefined> requestFullscreen(optional FullscreenOptions options = {});
attribute EventHandler onfullscreenchange;
attribute EventHandler onfullscreenerror;
@@ -11,5 +11,6 @@ interface Fence {
[RaisesException] void reportEvent(ReportEventType event);
[RaisesException] void setReportEventDataForAutomaticBeacons(FenceEvent event);
[RaisesException] sequence<FencedFrameConfig> getNestedConfigs();
[CallWith=ScriptState, RaisesException, RuntimeEnabled=FencedFramesLocalUnpartitionedDataAccess] Promise<void> disableUntrustedNetwork();
[CallWith=ScriptState, RaisesException, RuntimeEnabled=FencedFramesLocalUnpartitionedDataAccess] Promise<undefined> disableUntrustedNetwork();
[RaisesException, RuntimeEnabled=FencedFramesLocalUnpartitionedDataAccess] void notifyEvent(Event triggering_event);
};
@@ -13,4 +13,5 @@ interface HTMLFencedFrameElement : HTMLElement {
// Feature Policy
[CEReactions, Reflect, RuntimeEnabled=FencedFramesAPIChanges] attribute DOMString allow;
[PutForwards=value] readonly attribute DOMTokenList sandbox;
attribute EventHandler onfencedtreeclick;
};
@@ -46,5 +46,5 @@
};
HTMLButtonElement includes PopoverInvokerElement;
HTMLButtonElement includes InvokerElement;
HTMLButtonElement includes InterestInvokerElement;
@@ -113,5 +113,5 @@ enum SelectionMode { "select", "start", "end", "preserve" };
};
HTMLInputElement includes PopoverInvokerElement;
HTMLInputElement includes InvokerElement;
HTMLInputElement includes InterestInvokerElement;
@@ -46,3 +46,4 @@
HTMLAnchorElement includes HTMLAttributionSrcElementUtils;
HTMLAnchorElement includes HTMLHyperlinkElementUtils;
HTMLAnchorElement includes InterestInvokerElement;
@@ -62,7 +62,7 @@
[MeasureAs=HTMLImageElementX] readonly attribute long x;
[MeasureAs=HTMLImageElementY] readonly attribute long y;
[CallWith=ScriptState, RaisesException] Promise<void> decode();
[CallWith=ScriptState, RaisesException] Promise<undefined> decode();
};
HTMLImageElement includes HTMLAttributionSrcElementUtils;
@@ -45,18 +45,16 @@
readonly attribute ShadowRoot? shadowRoot;
// These are the declarative Shadow DOM IDL attributes, which reflect the
// equivalent content attributes.
// equivalent content attributes. Note that these are just the reflections
// of HTMLTemplateElement's attribute, which isn't a common use case: in
// normal declarative shadow DOM usage, the template element is "converted"
// to a shadow root; since the template no longer exists, these reflections
// don't have anything to reflect.
[Reflect,ReflectOnly=("open","closed")] attribute DOMString shadowRootMode;
[CEReactions,Reflect,RuntimeEnabled=TemplateDelegatesFocusReflection] attribute boolean shadowRootDelegatesFocus;
[CEReactions,Reflect,RuntimeEnabled=ShadowRootClonable] attribute boolean shadowRootClonable;
[Reflect, RuntimeEnabled=ElementGetHTML] attribute boolean shadowRootSerializable;
// Used by the DOM Parts API
[Reflect, RuntimeEnabled=DOMPartsAPI] attribute boolean parseparts;
// Declarative shadow dom serializable attribute, which controls whether the
// shadow root will be serialized by getHTML({includeShadowRoots:true}).
// Note that this is just the reflection of HTMLTemplateElement's attribute,
// which isn't a common usage - in normal declarative shadow DOM usage, the
// template element is "converted" to a shadow root.
[Reflect, RuntimeEnabled=ElementGetHTML] attribute boolean serializable;
};
@@ -72,7 +72,7 @@ enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
readonly attribute boolean ended;
[CEReactions, Reflect] attribute boolean autoplay;
[CEReactions, Reflect] attribute boolean loop;
[CallWith=ScriptState, ImplementedAs=playForBindings] Promise<void> play();
[CallWith=ScriptState, ImplementedAs=playForBindings] Promise<undefined> play();
void pause();
[RuntimeEnabled=MediaLatencyHint, CEReactions]
attribute double latencyHint;
@@ -8,11 +8,13 @@
SecureContext,
RuntimeEnabled=WebPreferences
]
interface PreferenceObject {
interface PreferenceObject : EventTarget {
[CallWith=ScriptState] readonly attribute DOMString? override;
[CallWith=ScriptState] readonly attribute DOMString value;
readonly attribute FrozenArray<DOMString> validValues;
[CallWith=ScriptState] undefined clearOverride();
[CallWith=ScriptState] Promise<undefined> requestOverride(DOMString? value);
attribute EventHandler onchange;
};
@@ -6,5 +6,6 @@
Exposed=Window,
RuntimeEnabled=CSSScrollSnapEvents
] interface SnapEvent : Event {
readonly attribute NodeList snapTargets;
readonly attribute Node snapTargetBlock;
readonly attribute Node snapTargetInline;
};
@@ -12,6 +12,8 @@ enum ReadableStreamType { "bytes" };
[
Exposed=(Window,Worker,Worklet)
] interface ReadableStream {
[RuntimeEnabled=ReadableStreamAsyncIterable, HasAsyncIteratorReturnAlgorithm] async iterable<any>(optional ReadableStreamIteratorOptions options = {});
[CallWith=ScriptState, RaisesException] constructor(optional any underlyingSource, optional any strategy);
readonly attribute boolean locked;

Some files were not shown because too many files have changed in this diff Show More