From 8fd9667f723d215ff7dbbc34f0fd70040e14c96c Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Wed, 2 Apr 2025 03:05:57 +0000 Subject: [PATCH] [AUTO][FILECONTROL] - version 135.0.7049.42 --- tools/under-control/src/RELEASE | 2 +- .../browser/aw_content_browser_client.cc | 4 +- .../browser/aw_field_trials.cc | 11 +- .../chrome_browsing_data_remover_delegate.cc | 45 +- .../chrome_browser_interface_binders.cc | 1295 +------- .../browser/chrome_content_browser_client.cc | 177 +- .../src/chrome/browser/prefs/browser_prefs.cc | 552 ++-- .../src/chrome/browser/ui/tab_helpers.cc | 29 +- .../api/accessibility_service_private.idl | 2 +- .../extensions/api/autofill_private.idl | 155 +- .../extensions/api/autotest_private.idl | 14 + .../extensions/api/developer_private.idl | 5 + .../common/extensions/api/document_scan.idl | 2 +- .../extensions/api/enterprise_kiosk_input.idl | 2 +- .../api/enterprise_networking_attributes.idl | 2 +- .../api/enterprise_platform_keys.idl | 2 +- .../api/enterprise_platform_keys_internal.idl | 2 +- .../api/enterprise_reporting_private.idl | 6 +- .../extensions/api/file_manager_private.idl | 2 +- .../chrome/common/extensions/api/login.idl | 2 +- .../extensions/api/login_screen_storage.idl | 2 +- .../common/extensions/api/login_state.idl | 2 +- .../chrome/common/extensions/api/printing.idl | 20 +- .../extensions/api/quick_unlock_private.idl | 2 +- .../extensions/api/shared_storage_private.idl | 30 - .../api/smart_card_provider_private.idl | 2 +- .../common/extensions/api/system_log.idl | 2 +- .../extensions/api/wm_desks_private.idl | 2 +- .../policy/resources/templates/policies.yaml | 7 +- .../PartitionedBlobUrlUsage.yaml | 12 +- .../Extensions/ExtensionSettings.yaml | 1 + .../GenerativeAI/GeminiSettings.yaml | 34 + .../GenAISmartGroupingSettings.yaml | 43 + .../GenAiChromeOsSmartActionsSettings.yaml | 41 + .../Miscellaneous/DownloadRestrictions.yaml | 2 +- .../EnterpriseSearchAggregatorSettings.yaml | 16 +- ...TypePairsFromFileTypeDownloadWarnings.yaml | 35 +- .../ExternalStorageAllowlist.yaml | 4 +- .../Miscellaneous/GlicSettings.yaml | 32 - .../SystemFeaturesDisableList.yaml | 40 + .../ThirdPartyBlockingEnabled.yaml | 2 +- ...enticationRemoteDesktopAllowedOrigins.yaml | 1 + .../ExtensibleEnterpriseSSOBlocklist.yaml | 49 + .../ExtensibleEnterpriseSSOEnabled.yaml | 37 - .../browser/web_contents/web_contents_impl.cc | 140 +- .../src/content/child/runtime_features.cc | 23 +- .../public/browser/content_browser_client.cc | 23 +- .../src/extensions/common/api/app_runtime.idl | 19 - .../src/extensions/common/api/automation.idl | 2 +- .../extensions/common/api/user_scripts.idl | 15 +- tools/under-control/src/gin/v8_initializer.cc | 8 +- .../src/services/network/network_context.cc | 90 +- .../variations/fieldtrial_testing_config.json | 2839 +++++++++-------- .../use_counter/metrics/web_feature.mojom | 45 +- .../aria_notification_options.idl | 4 +- .../core/animation/animation_trigger.idl | 20 + .../animation/animation_trigger_options.idl | 14 + .../blink/renderer/core/dom/document.idl | 2 +- .../blink/renderer/core/dom/element.idl | 11 +- .../core/dom/global_event_handlers.idl | 1 + .../blink/renderer/core/dom/observable.idl | 1 + .../blink/renderer/core/dom/parent_node.idl | 2 +- .../core/dom/popover_invoker_element.idl | 5 +- .../blink/renderer/core/dom/shadow_root.idl | 2 +- .../renderer/core/events/command_event.idl | 2 +- .../core/events/event_type_names.json5 | 2 + .../renderer/core/exported/web_view_impl.cc | 6 +- ...rmissions_policy_violation_report_body.idl | 1 + .../blink/renderer/core/frame/settings.json5 | 7 +- .../core/html/canvas/text_cluster.idl | 4 +- .../core/html/canvas/text_metrics.idl | 7 +- .../core/html/forms/html_button_element.idl | 4 +- .../core/html/html_all_collection.idl | 4 + .../blink/renderer/core/html/html_element.idl | 6 +- .../core/html/html_permission_element.idl | 5 + .../core/navigation_api/navigate_event.idl | 3 +- .../core/navigation_api/navigation.idl | 2 +- .../navigation_api/navigation_activation.idl | 3 +- .../navigation_api/navigation_destination.idl | 2 +- .../navigation_api/navigation_transition.idl | 2 - .../origin_trials/origin_trial_context.cc | 13 +- .../core/page/page_popup_controller.idl | 2 +- .../renderer/core/sanitizer/sanitizer_api.idl | 4 +- .../renderer/core/scheduler/scheduler.idl | 2 +- .../blink/renderer/core/svg/svg_a_element.idl | 3 + .../core/timing/performance_event_timing.idl | 2 +- .../core/timing/performance_script_timing.idl | 2 + .../scoped_view_transition.idl | 6 +- .../modules/ad_auction/auction_ad_config.idl | 1 - .../ad_auction/auction_ad_interest_group.idl | 2 + .../blink/renderer/modules/ai/ai.idl | 6 - .../renderer/modules/ai/ai_availability.idl | 9 + .../modules/ai/ai_capability_availability.idl | 7 + .../renderer/modules/ai/ai_language_model.idl | 8 +- .../ai/ai_language_model_create_options.idl | 46 +- .../modules/ai/ai_language_model_factory.idl | 19 +- .../modules/ai/ai_language_model_params.idl | 17 + .../modules/ai/ai_rewriter_factory.idl | 4 +- .../renderer/modules/ai/ai_summarizer.idl | 6 + .../modules/ai/ai_summarizer_factory.idl | 15 + .../blink/renderer/modules/ai/ai_writer.idl | 4 +- .../renderer/modules/ai/ai_writer_factory.idl | 4 +- .../ai_language_detector_factory.idl | 11 +- .../ai_translator_factory.idl | 8 +- .../canvas2d/base_rendering_context_2d.idl | 18 +- .../canvas/canvas2d/canvas_gradient.idl | 23 + .../credential_request_options.idl | 3 +- .../identity_credential.idl | 4 +- .../identity_credential_error.idl | 2 +- .../identity_credential_request_options.idl | 2 +- .../identity_provider.idl | 6 +- .../identity_provider_config.idl | 10 +- .../direct_sockets/tcp_server_socket.idl | 8 +- .../modules/direct_sockets/tcp_socket.idl | 8 +- .../modules/direct_sockets/udp_socket.idl | 8 +- .../geolocation/geolocation_coordinates.idl | 14 +- .../renderer/modules/indexeddb/idb_cursor.idl | 2 +- .../renderer/modules/launch/launch_params.idl | 4 +- .../renderer/modules/launch/launch_queue.idl | 5 +- .../mediastream/media_track_settings.idl | 7 + .../blink/renderer/modules/ml/ml_context.idl | 32 +- .../language_translator.idl | 18 - .../on_device_translation/translation.idl | 34 - .../translation_language_options.idl | 8 - ...dow_or_worker_global_scope_translation.idl | 11 - .../rtc_encoded_audio_frame_metadata.idl | 2 +- .../rtc_encoded_video_frame.idl | 6 +- .../rtc_encoded_video_frame_metadata.idl | 3 + .../modules/speech/speech_recognition.idl | 6 +- .../speech/speech_recognition_context.idl | 2 +- .../speech/speech_recognition_phrase.idl | 2 +- .../speech/speech_recognition_phrase_list.idl | 2 +- .../web_install/navigator_web_install.idl | 3 +- .../webcodecs/video_decoder_config.idl | 8 + .../webgl/webgl2_rendering_context_base.idl | 8 +- .../modules/webgl/webgl_multi_draw.idl | 64 +- ...aw_instanced_base_vertex_base_instance.idl | 22 +- .../modules/webgpu/gpu_command_encoder.idl | 12 +- .../renderer/modules/webgpu/gpu_device.idl | 2 +- .../webgpu/gpu_image_copy_texture_tagged.idl | 2 +- .../renderer/modules/webgpu/gpu_queue.idl | 8 +- .../modules/webgpu/gpu_supported_limits.idl | 2 +- ...fer.idl => gpu_texel_copy_buffer_info.idl} | 4 +- ...t.idl => gpu_texel_copy_buffer_layout.idl} | 6 +- ...re.idl => gpu_texel_copy_texture_info.idl} | 2 +- .../renderer/modules/xr/xr_gpu_binding.idl | 5 +- .../blink/renderer/modules/xr/xr_system.idl | 1 - .../platform/runtime_enabled_features.json5 | 734 +++-- .../global-interface-listing-expected.txt | 120 +- 149 files changed, 3499 insertions(+), 4010 deletions(-) delete mode 100755 tools/under-control/src/chrome/common/extensions/api/shared_storage_private.idl create mode 100755 tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GeminiSettings.yaml create mode 100755 tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAISmartGroupingSettings.yaml create mode 100755 tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAiChromeOsSmartActionsSettings.yaml delete mode 100755 tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/GlicSettings.yaml create mode 100755 tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOBlocklist.yaml delete mode 100755 tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOEnabled.yaml create mode 100755 tools/under-control/src/third_party/blink/renderer/core/animation/animation_trigger.idl create mode 100755 tools/under-control/src/third_party/blink/renderer/core/animation/animation_trigger_options.idl create mode 100755 tools/under-control/src/third_party/blink/renderer/modules/ai/ai_availability.idl create mode 100755 tools/under-control/src/third_party/blink/renderer/modules/ai/ai_capability_availability.idl create mode 100755 tools/under-control/src/third_party/blink/renderer/modules/ai/ai_language_model_params.idl delete mode 100755 tools/under-control/src/third_party/blink/renderer/modules/on_device_translation/language_translator.idl delete mode 100755 tools/under-control/src/third_party/blink/renderer/modules/on_device_translation/translation.idl delete mode 100755 tools/under-control/src/third_party/blink/renderer/modules/on_device_translation/translation_language_options.idl delete mode 100755 tools/under-control/src/third_party/blink/renderer/modules/on_device_translation/window_or_worker_global_scope_translation.idl rename tools/under-control/src/third_party/blink/renderer/modules/webgpu/{gpu_image_copy_buffer.idl => gpu_texel_copy_buffer_info.idl} (63%) rename tools/under-control/src/third_party/blink/renderer/modules/webgpu/{gpu_image_data_layout.idl => gpu_texel_copy_buffer_layout.idl} (56%) rename tools/under-control/src/third_party/blink/renderer/modules/webgpu/{gpu_image_copy_texture.idl => gpu_texel_copy_texture_info.idl} (89%) diff --git a/tools/under-control/src/RELEASE b/tools/under-control/src/RELEASE index 862e5c10..b777a233 100644 --- a/tools/under-control/src/RELEASE +++ b/tools/under-control/src/RELEASE @@ -1 +1 @@ -134.0.6998.108 +135.0.7049.42 diff --git a/tools/under-control/src/android_webview/browser/aw_content_browser_client.cc b/tools/under-control/src/android_webview/browser/aw_content_browser_client.cc index d0e9dec3..35a39815 100755 --- a/tools/under-control/src/android_webview/browser/aw_content_browser_client.cc +++ b/tools/under-control/src/android_webview/browser/aw_content_browser_client.cc @@ -215,7 +215,7 @@ std::string GetUserAgent() { // "Version/4.0" had been hardcoded in the legacy WebView. std::string product = "Version/4.0 " + GetProduct(); if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kUseMobileUserAgent)) { + embedder_support::kUseMobileUserAgent)) { product += " Mobile"; } @@ -870,7 +870,7 @@ AwContentBrowserClient::CreateLoginDelegate( scoped_refptr response_headers, bool first_auth_attempt, content::GuestPageHolder* guest, - LoginAuthRequiredCallback auth_required_callback) { + content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback) { return std::make_unique(auth_info, web_contents, first_auth_attempt, std::move(auth_required_callback)); diff --git a/tools/under-control/src/android_webview/browser/aw_field_trials.cc b/tools/under-control/src/android_webview/browser/aw_field_trials.cc index b9738a53..288de013 100755 --- a/tools/under-control/src/android_webview/browser/aw_field_trials.cc +++ b/tools/under-control/src/android_webview/browser/aw_field_trials.cc @@ -131,7 +131,7 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) { blink::features::kLowLatencyWebGLImageChromium); // Disable Shared Storage on WebView. - aw_feature_overrides.DisableFeature(blink::features::kSharedStorageAPI); + aw_feature_overrides.DisableFeature(network::features::kSharedStorageAPI); // Disable scrollbar-color on WebView. aw_feature_overrides.DisableFeature(blink::features::kScrollbarColor); @@ -306,7 +306,7 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) { base::features::kPartitionAllocMemoryTagging); // Disable Topics on WebView. - aw_feature_overrides.DisableFeature(blink::features::kBrowsingTopics); + aw_feature_overrides.DisableFeature(network::features::kBrowsingTopics); // Sharing ANGLE's Vulkan queue is not supported on WebView. aw_feature_overrides.DisableFeature(::features::kVulkanFromANGLE); @@ -315,4 +315,11 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) { // a kill switch. https://crbug.com/393606977 aw_feature_overrides.DisableFeature( internal::kFileSystemAccessDirectoryIterationBlocklistCheck); + + // Viz has no internal differentiation for WebView. We will roll out these + // combined features separately. + aw_feature_overrides.DisableFeature( + ::features::kDrawImmediatelyWhenInteractive); + aw_feature_overrides.DisableFeature( + ::features::kAckOnSurfaceActivationWhenInteractive); } diff --git a/tools/under-control/src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/tools/under-control/src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc index e7f573ef..1d98f2e0 100755 --- a/tools/under-control/src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +++ b/tools/under-control/src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc @@ -31,8 +31,8 @@ #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" #include "chrome/browser/autocomplete/zero_suggest_cache_service_factory.h" +#include "chrome/browser/autofill/autofill_entity_data_manager_factory.h" #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/autofill/strike_database_factory.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" @@ -185,14 +185,12 @@ #if !BUILDFLAG(IS_ANDROID) #include "chrome/browser/new_tab_page/microsoft_auth/microsoft_auth_service.h" #include "chrome/browser/new_tab_page/microsoft_auth/microsoft_auth_service_factory.h" -#include "chrome/browser/user_annotations/user_annotations_service_factory.h" #include "chrome/browser/user_education/browser_user_education_storage_service.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_command_scheduler.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/browser/web_applications/web_app_utils.h" -#include "components/user_annotations/user_annotations_service.h" #include "content/public/browser/isolated_web_apps_policy.h" #include "content/public/browser/storage_partition_config.h" #endif // !BUILDFLAG(IS_ANDROID) @@ -206,20 +204,20 @@ #include "chrome/browser/extensions/activity_log/activity_log.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS) -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/ash/net/system_proxy_manager.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/browser_process_platform_part.h" #include "chromeos/ash/components/cryptohome/cryptohome_parameters.h" #include "chromeos/ash/components/dbus/attestation/attestation_client.h" #include "chromeos/ash/components/dbus/attestation/interface.pb.h" -#include "chromeos/ash/components/dbus/constants/attestation_constants.h" // nogncheck -#include "chromeos/ash/components/dbus/dbus_thread_manager.h" // nogncheck +#include "chromeos/ash/components/dbus/constants/attestation_constants.h" +#include "chromeos/ash/components/dbus/dbus_thread_manager.h" #include "chromeos/components/mahi/public/cpp/mahi_manager.h" #include "chromeos/constants/chromeos_features.h" #include "components/user_manager/user.h" #include "device/fido/cros/credential_store.h" -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) #include "chrome/browser/media/cdm_document_service_impl.h" @@ -897,6 +895,10 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( ContentSettingsType::REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS, delete_begin_, delete_end_, website_settings_filter); + host_content_settings_map_->ClearSettingsForOneTypeWithPredicate( + ContentSettingsType::REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS, + delete_begin_, delete_end_, website_settings_filter); + host_content_settings_map_->ClearSettingsForOneTypeWithPredicate( ContentSettingsType::NOTIFICATION_PERMISSION_REVIEW, delete_begin_, delete_end_, website_settings_filter); @@ -970,7 +972,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( TracingDataType::kSecurePaymentConfirmationCredentials)); } -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) if (ash::SystemProxyManager::Get()) { // Sends a request to the System-proxy daemon to clear the proxy user // credentials. System-proxy retrieves proxy username and password from @@ -981,7 +983,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( // them from the NetworkService when needed. ash::SystemProxyManager::Get()->ClearUserCredentials(); } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) if (credential_store_) { credential_store_->DeleteCredentials( @@ -1073,8 +1075,12 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( if (web_data_service.get()) { web_data_service->RemoveFormElementsAddedBetween(delete_begin_, delete_end_); - web_data_service->RemoveEntityInstancesModifiedBetween(delete_begin_, - delete_end_); + if (autofill::EntityDataManager* entity_data_manager = + autofill::AutofillEntityDataManagerFactory::GetForProfile( + profile_)) { + entity_data_manager->RemoveEntityInstancesModifiedBetween(delete_begin_, + delete_end_); + } // Clear out the Autofill StrikeDatabase in its entirety. // TODO(crbug.com/40594007): Respect |delete_begin_| and |delete_end_| and // only clear out entries whose last strikes were created in that @@ -1096,13 +1102,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( FROM_HERE, base::DoNothing(), CreateTaskCompletionClosure(TracingDataType::kAutofillData)); } -#if !BUILDFLAG(IS_ANDROID) - if (auto* user_annotations_service = - UserAnnotationsServiceFactory::GetForProfile(profile_)) { - user_annotations_service->RemoveAnnotationsInRange(delete_begin_, - delete_end_); - } -#endif } ////////////////////////////////////////////////////////////////////////////// @@ -1200,7 +1199,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( } } -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // If the cache from the browser is cleared. Mahi should clear its cache. if (filter_builder->MatchesMostOriginsAndDomains() && chromeos::features::IsMahiEnabled() && chromeos::MahiManager::Get()) { @@ -1216,7 +1215,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( // Licenses. base::RecordAction(UserMetricsAction("ClearBrowsingData_ContentLicenses")); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // On Chrome OS, delete any content protection platform keys. // Platform keys do not support filtering by domain, so skip this if // clearing only a specified set of sites. @@ -1249,7 +1248,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( std::move(clear_platform_keys_callback))); } } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) cdm::MediaDrmStorageImpl::ClearMatchingLicenses( @@ -1749,7 +1748,7 @@ bool ChromeBrowsingDataRemoverDelegate::IsForAllTime() const { return delete_begin_ == base::Time() && delete_end_ == base::Time::Max(); } -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) void ChromeBrowsingDataRemoverDelegate::OnClearPlatformKeys( base::OnceClosure done, bool result) { @@ -1761,7 +1760,7 @@ void ChromeBrowsingDataRemoverDelegate::OnClearPlatformKeys( std::unique_ptr ChromeBrowsingDataRemoverDelegate::MakeCredentialStore() { return -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) std::make_unique< device::fido::cros::PlatformAuthenticatorCredentialStore>(); #else diff --git a/tools/under-control/src/chrome/browser/chrome_browser_interface_binders.cc b/tools/under-control/src/chrome/browser/chrome_browser_interface_binders.cc index 46b7820b..f7cdeb1c 100755 --- a/tools/under-control/src/chrome/browser/chrome_browser_interface_binders.cc +++ b/tools/under-control/src/chrome/browser/chrome_browser_interface_binders.cc @@ -6,23 +6,15 @@ #include -#include "ash/constants/ash_features.h" #include "base/feature_list.h" #include "base/functional/bind.h" -#include "base/strings/stringprintf.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" -#include "chrome/browser/ash/drive/file_system_util.h" -#include "chrome/browser/browser_process.h" #include "chrome/browser/buildflags.h" #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" -#include "chrome/browser/history_clusters/history_clusters_service_factory.h" -#include "chrome/browser/history_embeddings/history_embeddings_utils.h" -#include "chrome/browser/media/media_engagement_score_details.mojom.h" #include "chrome/browser/navigation_predictor/navigation_predictor.h" -#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h" #include "chrome/browser/password_manager/chrome_password_manager_client.h" #include "chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_host.h" #include "chrome/browser/predictors/network_hints_handler_impl.h" @@ -34,45 +26,16 @@ #include "chrome/browser/speech/on_device_speech_recognition_impl.h" #include "chrome/browser/translate/translate_frame_binder.h" #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" -#include "chrome/browser/ui/ui_features.h" -#include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals.mojom.h" -#include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h" -#include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_ui.h" -#include "chrome/browser/ui/webui/chrome_urls/chrome_urls_ui.h" -#include "chrome/browser/ui/webui/data_sharing_internals/data_sharing_internals_ui.h" -#include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" -#include "chrome/browser/ui/webui/location_internals/location_internals.mojom.h" -#include "chrome/browser/ui/webui/location_internals/location_internals_ui.h" -#include "chrome/browser/ui/webui/media/media_engagement_ui.h" -#include "chrome/browser/ui/webui/omnibox/omnibox_internals.mojom.h" -#include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" -#include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_ui.h" -#include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h" -#include "chrome/browser/ui/webui/suggest_internals/suggest_internals.mojom.h" -#include "chrome/browser/ui/webui/suggest_internals/suggest_internals_ui.h" -#include "chrome/browser/ui/webui/usb_internals/usb_internals.mojom.h" -#include "chrome/browser/ui/webui/usb_internals/usb_internals_ui.h" #include "chrome/browser/web_applications/web_app_utils.h" #include "chrome/common/buildflags.h" -#include "chrome/common/chrome_features.h" #include "chrome/common/pref_names.h" -#include "chrome/common/webui_url_constants.h" #include "chrome/services/speech/buildflags/buildflags.h" -#include "components/browsing_topics/mojom/browsing_topics_internals.mojom.h" -#include "components/commerce/content/browser/commerce_internals_ui.h" -#include "components/commerce/core/internals/mojom/commerce_internals.mojom.h" -#include "components/compose/buildflags.h" -#include "components/data_sharing/public/features.h" #include "components/dom_distiller/content/browser/distillability_driver.h" #include "components/dom_distiller/content/browser/distiller_javascript_service_impl.h" #include "components/dom_distiller/content/common/mojom/distillability_service.mojom.h" #include "components/dom_distiller/content/common/mojom/distiller_javascript_service.mojom.h" #include "components/dom_distiller/core/dom_distiller_service.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/language_detection/content/common/language_detection.mojom.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" @@ -80,25 +43,18 @@ #include "components/performance_manager/embedder/binders.h" #include "components/performance_manager/embedder/performance_manager_registry.h" #include "components/prefs/pref_service.h" -#include "components/privacy_sandbox/privacy_sandbox_features.h" #include "components/reading_list/features/reading_list_switches.h" -#include "components/safe_browsing/buildflags.h" #include "components/security_state/content/content_utils.h" #include "components/security_state/content/security_state_tab_helper.h" #include "components/security_state/core/security_state.h" -#include "components/services/on_device_translation/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/spellcheck/spellcheck_buildflags.h" #include "components/translate/content/common/translate.mojom.h" -#include "components/webui/chrome_urls/features.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" -#include "content/public/browser/web_ui_browser_interface_broker_registry.h" -#include "content/public/browser/web_ui_controller_interface_binder.h" #include "content/public/common/content_features.h" #include "content/public/common/url_constants.h" -#include "extensions/buildflags/buildflags.h" #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" @@ -120,308 +76,40 @@ #include "third_party/blink/public/mojom/unhandled_tap_notifier/unhandled_tap_notifier.mojom.h" #endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) -#if BUILDFLAG(FULL_SAFE_BROWSING) -#include "chrome/browser/ui/webui/reset_password/reset_password.mojom.h" -#include "chrome/browser/ui/webui/reset_password/reset_password_ui.h" -#endif // BUILDFLAG(FULL_SAFE_BROWSING) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/screen_ai/screen_ai_service_router.h" #include "chrome/browser/screen_ai/screen_ai_service_router_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" -#include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" -#include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" -#include "chrome/browser/ui/webui/discards/discards.mojom.h" -#include "chrome/browser/ui/webui/discards/discards_ui.h" -#include "chrome/browser/ui/webui/discards/site_data.mojom.h" -#endif - -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" -#include "chrome/browser/ui/webui/on_device_translation_internals/on_device_translation_internals_ui.h" -#include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" -#include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/android/dom_distiller/distiller_ui_handle_android.h" #include "chrome/browser/facilitated_payments/payment_link_handler_binder.h" #include "chrome/browser/offline_pages/android/offline_page_auto_fetcher.h" -#include "chrome/browser/ui/webui/feed_internals/feed_internals.mojom.h" -#include "chrome/browser/ui/webui/feed_internals/feed_internals_ui.h" #include "chrome/common/offline_page_auto_fetcher.mojom.h" -#include "components/commerce/core/commerce_feature_list.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/mojom/digital_goods/digital_goods.mojom.h" #include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h" #else #include "chrome/browser/badging/badge_manager.h" -#include "chrome/browser/new_tab_page/modules/file_suggestion/drive_suggestion.mojom.h" -#include "chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files.mojom.h" -#include "chrome/browser/new_tab_page/modules/v2/authentication/microsoft_auth.mojom.h" -#include "chrome/browser/new_tab_page/modules/v2/calendar/google_calendar.mojom.h" -#include "chrome/browser/new_tab_page/modules/v2/calendar/outlook_calendar.mojom.h" -#include "chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom.h" -#include "chrome/browser/new_tab_page/new_tab_page_util.h" #include "chrome/browser/payments/payment_request_factory.h" -#include "chrome/browser/ui/webui/access_code_cast/access_code_cast.mojom.h" -#include "chrome/browser/ui/webui/access_code_cast/access_code_cast_ui.h" -#include "chrome/browser/ui/webui/app_service_internals/app_service_internals.mojom.h" -#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/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" -#if !defined(OFFICIAL_BUILD) -#include "chrome/browser/ui/webui/new_tab_page/foo/foo.mojom.h" // nogncheck crbug.com/1125897 -#endif -#include "chrome/browser/ui/lens/lens_overlay_untrusted_ui.h" -#include "chrome/browser/ui/lens/lens_side_panel_untrusted_ui.h" #include "chrome/browser/ui/views/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/data_sharing/data_sharing.mojom.h" -#include "chrome/browser/ui/webui/data_sharing/data_sharing_ui.h" -#include "chrome/browser/ui/webui/history/history_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" -#include "chrome/browser/ui/webui/ntp_microsoft_auth/ntp_microsoft_auth_untrusted_ui.h" -#include "chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.h" -#include "chrome/browser/ui/webui/password_manager/password_manager_ui.h" -#include "chrome/browser/ui/webui/privacy_sandbox/private_state_tokens/private_state_tokens.mojom.h" -#include "chrome/browser/ui/webui/privacy_sandbox/related_website_sets/related_website_sets.mojom.h" -#include "chrome/browser/ui/webui/search_engine_choice/search_engine_choice.mojom.h" // nogncheck crbug.com/1125897 -#include "chrome/browser/ui/webui/search_engine_choice/search_engine_choice_ui.h" -#include "chrome/browser/ui/webui/settings/settings_ui.h" -#include "chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h" -#include "chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome.mojom.h" -#include "chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h" -#include "chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search.mojom.h" -#include "chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h" -#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h" -#include "chrome/browser/ui/webui/side_panel/reading_list/reading_list.mojom.h" -#include "chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h" -#include "chrome/browser/ui/webui/tab_search/tab_search.mojom.h" -#include "chrome/browser/ui/webui/tab_search/tab_search_ui.h" -#include "chrome/browser/ui/webui/user_education_internals/user_education_internals.mojom.h" -#include "chrome/browser/ui/webui/user_education_internals/user_education_internals_ui.h" -#include "chrome/browser/ui/webui/webui_gallery/webui_gallery_ui.h" #include "chrome/browser/web_applications/web_install_service_impl.h" -#include "chrome/common/webui_url_constants.h" -#include "components/commerce/core/mojom/product_specifications.mojom.h" -#include "components/commerce/core/mojom/shopping_service.mojom.h" // nogncheck crbug.com/1125897 -#include "components/optimization_guide/core/optimization_guide_features.h" -#include "components/page_image_service/mojom/page_image_service.mojom.h" -#include "components/search/ntp_features.h" -#include "ui/webui/resources/cr_components/color_change_listener/color_change_listener.mojom.h" -#include "ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.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/searchbox/searchbox.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" -#include "ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom.h" #endif // BUILDFLAG(IS_ANDROID) -#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) -#include "chrome/browser/ui/webui/app_home/app_home.mojom.h" -#include "chrome/browser/ui/webui/app_home/app_home_ui.h" -#include "chrome/browser/ui/webui/signin/profile_customization_ui.h" -#include "chrome/browser/ui/webui/signin/profile_picker_ui.h" -#endif // !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) - #if BUILDFLAG(IS_CHROMEOS) -#include "ash/constants/ash_features.h" -#include "ash/public/mojom/hid_preserving_bluetooth_state_controller.mojom.h" -#include "ash/webui/annotator/mojom/untrusted_annotator.mojom.h" -#include "ash/webui/annotator/untrusted_annotator_ui.h" -#include "ash/webui/boca_ui/boca_ui.h" -#include "ash/webui/boca_ui/mojom/boca.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" -#include "ash/webui/color_internals/mojom/color_internals.mojom.h" -#include "ash/webui/common/mojom/accelerator_fetcher.mojom.h" -#include "ash/webui/common/mojom/accessibility_features.mojom.h" -#include "ash/webui/common/mojom/sea_pen.mojom.h" -#include "ash/webui/common/mojom/shortcut_input_provider.mojom.h" -#include "ash/webui/connectivity_diagnostics/connectivity_diagnostics_ui.h" -#include "ash/webui/demo_mode_app_ui/demo_mode_app_untrusted_ui.h" -#include "ash/webui/diagnostics_ui/diagnostics_ui.h" -#include "ash/webui/diagnostics_ui/mojom/input_data_provider.mojom.h" -#include "ash/webui/diagnostics_ui/mojom/network_health_provider.mojom.h" -#include "ash/webui/diagnostics_ui/mojom/system_data_provider.mojom.h" -#include "ash/webui/diagnostics_ui/mojom/system_routine_controller.mojom.h" -#include "ash/webui/eche_app_ui/eche_app_ui.h" -#include "ash/webui/eche_app_ui/mojom/eche_app.mojom.h" -#include "ash/webui/file_manager/file_manager_ui.h" -#include "ash/webui/file_manager/mojom/file_manager.mojom.h" -#include "ash/webui/files_internals/files_internals_ui.h" -#include "ash/webui/files_internals/mojom/files_internals.mojom.h" -#include "ash/webui/firmware_update_ui/firmware_update_app_ui.h" -#include "ash/webui/firmware_update_ui/mojom/firmware_update.mojom.h" -#include "ash/webui/focus_mode/focus_mode_ui.h" -#include "ash/webui/focus_mode/mojom/focus_mode.mojom.h" -#include "ash/webui/graduation/graduation_ui.h" -#include "ash/webui/graduation/mojom/graduation_ui.mojom.h" -#include "ash/webui/growth_internals/growth_internals.mojom.h" -#include "ash/webui/growth_internals/growth_internals_ui.h" -#include "ash/webui/help_app_ui/help_app_ui.h" -#include "ash/webui/help_app_ui/help_app_ui.mojom.h" -#include "ash/webui/help_app_ui/help_app_untrusted_ui.h" -#include "ash/webui/help_app_ui/search/search.mojom.h" -#include "ash/webui/mall/mall_ui.h" -#include "ash/webui/mall/mall_ui.mojom.h" -#include "ash/webui/media_app_ui/media_app_guest_ui.h" -#include "ash/webui/media_app_ui/media_app_ui.h" -#include "ash/webui/media_app_ui/media_app_ui.mojom.h" -#include "ash/webui/media_app_ui/media_app_ui_untrusted.mojom.h" -#include "ash/webui/multidevice_debug/proximity_auth_ui.h" -#include "ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom.h" -#include "ash/webui/os_feedback_ui/os_feedback_ui.h" -#include "ash/webui/os_feedback_ui/os_feedback_untrusted_ui.h" -#include "ash/webui/personalization_app/mojom/personalization_app.mojom.h" -#include "ash/webui/personalization_app/personalization_app_ui.h" -#include "ash/webui/personalization_app/search/search.mojom.h" -#include "ash/webui/print_management/print_management_ui.h" -#include "ash/webui/print_preview_cros/mojom/destination_provider.mojom.h" -#include "ash/webui/print_preview_cros/print_preview_cros_ui.h" -#include "ash/webui/projector_app/mojom/untrusted_projector.mojom.h" -#include "ash/webui/projector_app/untrusted_projector_ui.h" -#include "ash/webui/recorder_app_ui/mojom/recorder_app.mojom.h" -#include "ash/webui/recorder_app_ui/recorder_app_ui.h" -#include "ash/webui/sanitize_ui/mojom/sanitize_ui.mojom.h" -#include "ash/webui/sanitize_ui/sanitize_ui.h" -#include "ash/webui/scanner_feedback_ui/mojom/scanner_feedback_ui.mojom.h" -#include "ash/webui/scanner_feedback_ui/scanner_feedback_untrusted_ui.h" -#include "ash/webui/scanning/mojom/scanning.mojom.h" -#include "ash/webui/scanning/scanning_ui.h" -#include "ash/webui/shimless_rma/shimless_rma.h" -#include "ash/webui/shortcut_customization_ui/backend/search/search.mojom.h" -#include "ash/webui/shortcut_customization_ui/mojom/shortcut_customization.mojom.h" -#include "ash/webui/shortcut_customization_ui/shortcut_customization_app_ui.h" -#include "ash/webui/vc_background_ui/vc_background_ui.h" #include "chrome/browser/apps/digital_goods/digital_goods_factory_impl.h" -#include "chrome/browser/chromeos/upload_office_to_cloud/upload_office_to_cloud.h" -#include "chrome/browser/nearby_sharing/common/nearby_share_features.h" #include "chrome/browser/speech/cros_speech_recognition_service_factory.h" -#include "chrome/browser/ui/webui/ash/add_supervision/add_supervision.mojom.h" -#include "chrome/browser/ui/webui/ash/add_supervision/add_supervision_ui.h" -#include "chrome/browser/ui/webui/ash/app_install/app_install.mojom.h" -#include "chrome/browser/ui/webui/ash/app_install/app_install_dialog.h" -#include "chrome/browser/ui/webui/ash/app_install/app_install_ui.h" -#include "chrome/browser/ui/webui/ash/audio/audio.mojom.h" -#include "chrome/browser/ui/webui/ash/audio/audio_ui.h" -#include "chrome/browser/ui/webui/ash/bluetooth/bluetooth_pairing_dialog.h" -#include "chrome/browser/ui/webui/ash/borealis_installer/borealis_installer.mojom.h" -#include "chrome/browser/ui/webui/ash/borealis_installer/borealis_installer_ui.h" -#include "chrome/browser/ui/webui/ash/cloud_upload/cloud_upload.mojom.h" -#include "chrome/browser/ui/webui/ash/cloud_upload/cloud_upload_dialog.h" -#include "chrome/browser/ui/webui/ash/cloud_upload/cloud_upload_ui.h" -#include "chrome/browser/ui/webui/ash/crostini_installer/crostini_installer.mojom.h" -#include "chrome/browser/ui/webui/ash/crostini_installer/crostini_installer_ui.h" -#include "chrome/browser/ui/webui/ash/crostini_upgrader/crostini_upgrader.mojom.h" -#include "chrome/browser/ui/webui/ash/crostini_upgrader/crostini_upgrader_ui.h" -#include "chrome/browser/ui/webui/ash/curtain_ui/remote_maintenance_curtain_ui.h" -#include "chrome/browser/ui/webui/ash/dlp_internals/dlp_internals.mojom.h" -#include "chrome/browser/ui/webui/ash/dlp_internals/dlp_internals_ui.h" -#include "chrome/browser/ui/webui/ash/emoji/emoji_picker.mojom.h" -#include "chrome/browser/ui/webui/ash/emoji/emoji_search_proxy.h" -#include "chrome/browser/ui/webui/ash/emoji/emoji_ui.h" -#include "chrome/browser/ui/webui/ash/emoji/new_window_proxy.mojom.h" -#include "chrome/browser/ui/webui/ash/emoji/seal.mojom.h" -#include "chrome/browser/ui/webui/ash/enterprise_reporting/enterprise_reporting.mojom.h" -#include "chrome/browser/ui/webui/ash/enterprise_reporting/enterprise_reporting_ui.h" -#include "chrome/browser/ui/webui/ash/extended_updates/extended_updates.mojom.h" -#include "chrome/browser/ui/webui/ash/extended_updates/extended_updates_ui.h" -#include "chrome/browser/ui/webui/ash/internet/internet_config_dialog.h" -#include "chrome/browser/ui/webui/ash/internet/internet_detail_dialog.h" -#include "chrome/browser/ui/webui/ash/launcher_internals/launcher_internals.mojom.h" -#include "chrome/browser/ui/webui/ash/launcher_internals/launcher_internals_ui.h" -#include "chrome/browser/ui/webui/ash/lobster/lobster.mojom.h" -#include "chrome/browser/ui/webui/ash/lock_screen_reauth/lock_screen_network_ui.h" -#include "chrome/browser/ui/webui/ash/login/mojom/screens_factory.mojom.h" -#include "chrome/browser/ui/webui/ash/login/oobe_ui.h" -#include "chrome/browser/ui/webui/ash/mako/mako_ui.h" -#include "chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync.mojom.h" -#include "chrome/browser/ui/webui/ash/manage_mirrorsync/manage_mirrorsync_ui.h" -#include "chrome/browser/ui/webui/ash/multidevice_setup/multidevice_setup_dialog.h" -#include "chrome/browser/ui/webui/ash/network_ui/network_ui.h" -#include "chrome/browser/ui/webui/ash/office_fallback/office_fallback.mojom.h" -#include "chrome/browser/ui/webui/ash/office_fallback/office_fallback_ui.h" -#include "chrome/browser/ui/webui/ash/parent_access/parent_access_ui.h" -#include "chrome/browser/ui/webui/ash/parent_access/parent_access_ui.mojom.h" -#include "chrome/browser/ui/webui/ash/sensor_info/sensor.mojom.h" -#include "chrome/browser/ui/webui/ash/sensor_info/sensor_info_ui.h" -#include "chrome/browser/ui/webui/ash/set_time/set_time_ui.h" -#include "chrome/browser/ui/webui/ash/settings/os_settings_ui.h" -#include "chrome/browser/ui/webui/ash/settings/pages/apps/mojom/app_notification_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/apps/mojom/app_parental_controls_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/date_time/mojom/date_time_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/device/display_settings/display_settings_provider.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/device/input_device_settings/input_device_settings_provider.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/files/mojom/google_drive_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/files/mojom/one_drive_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/people/mojom/graduation_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/privacy/mojom/app_permission_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/pages/search/mojom/magic_boost_handler.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/search/mojom/search.mojom.h" -#include "chrome/browser/ui/webui/ash/settings/search/mojom/user_action_recorder.mojom.h" -#include "chrome/browser/ui/webui/ash/skyvault/local_files_migration.mojom.h" -#include "chrome/browser/ui/webui/ash/skyvault/local_files_migration_ui.h" -#include "chrome/browser/ui/webui/ash/smb_shares/smb_credentials_dialog.h" -#include "chrome/browser/ui/webui/ash/smb_shares/smb_share_dialog.h" -#include "chrome/browser/ui/webui/ash/vm/vm.mojom.h" -#include "chrome/browser/ui/webui/ash/vm/vm_ui.h" -#include "chrome/browser/ui/webui/feedback/feedback_ui.h" -#include "chrome/browser/ui/webui/nearby_share/nearby_share.mojom.h" -#include "chrome/browser/ui/webui/nearby_share/nearby_share_dialog_ui.h" -#include "chromeos/ash/components/audio/public/mojom/cros_audio_config.mojom.h" -#include "chromeos/ash/components/emoji/emoji_search.mojom.h" -#include "chromeos/ash/components/kiosk/vision/webui/kiosk_vision_internals.mojom.h" -#include "chromeos/ash/components/kiosk/vision/webui/ui_controller.h" -#include "chromeos/ash/components/local_search_service/public/mojom/index.mojom.h" -#include "chromeos/ash/services/auth_factor_config/public/mojom/auth_factor_config.mojom.h" -#include "chromeos/ash/services/bluetooth_config/public/mojom/cros_bluetooth_config.mojom.h" -#include "chromeos/ash/services/cellular_setup/public/mojom/cellular_setup.mojom.h" -#include "chromeos/ash/services/cellular_setup/public/mojom/esim_manager.mojom.h" -#include "chromeos/ash/services/connectivity/public/mojom/passpoint.mojom.h" -#include "chromeos/ash/services/hotspot_config/public/mojom/cros_hotspot_config.mojom.h" -#include "chromeos/ash/services/ime/public/mojom/input_method_user_data.mojom.h" -#include "chromeos/ash/services/multidevice_setup/multidevice_setup_service.h" -#include "chromeos/ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom.h" -#include "chromeos/ash/services/nearby/public/mojom/nearby_share_settings.mojom.h" // nogncheck crbug.com/1125897 -#include "chromeos/ash/services/orca/public/mojom/orca_service.mojom.h" -#include "chromeos/components/print_management/mojom/printing_manager.mojom.h" // nogncheck -#include "chromeos/constants/chromeos_features.h" -#include "chromeos/crosapi/mojom/structured_metrics_service.mojom.h" -#include "chromeos/services/network_config/public/mojom/cros_network_config.mojom.h" // nogncheck -#include "chromeos/services/network_health/public/mojom/network_diagnostics.mojom.h" // nogncheck -#include "chromeos/services/network_health/public/mojom/network_health.mojom.h" // nogncheck -#include "media/capture/video/chromeos/mojom/camera_app.mojom.h" -#include "third_party/blink/public/mojom/digital_goods/digital_goods.mojom.h" -#include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -#include "chrome/browser/webshare/share_service_impl.h" -#endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ BUILDFLAG(IS_ANDROID) -#include "third_party/blink/public/mojom/webshare/webshare.mojom.h" +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#include "chrome/browser/webshare/share_service_impl.h" +#include "chrome/common/chrome_features.h" #endif - -#if BUILDFLAG(IS_CHROMEOS) && !defined(OFFICIAL_BUILD) -#include "ash/webui/sample_system_web_app_ui/mojom/sample_system_web_app_ui.mojom.h" -#include "ash/webui/sample_system_web_app_ui/sample_system_web_app_ui.h" -#include "ash/webui/sample_system_web_app_ui/sample_system_web_app_untrusted_ui.h" -#include "ash/webui/status_area_internals/mojom/status_area_internals.mojom.h" -#include "ash/webui/status_area_internals/status_area_internals_ui.h" +#include "third_party/blink/public/mojom/webshare/webshare.mojom.h" #endif #if BUILDFLAG(ENABLE_SPEECH_SERVICE) @@ -445,42 +133,19 @@ #include "media/mojo/mojom/speech_recognition_service.mojom.h" #endif // BUILDFLAG(ENABLE_BROWSER_SPEECH_SERVICE) -#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) -#include "chrome/browser/ui/webui/tab_strip/tab_strip.mojom.h" -#include "chrome/browser/ui/webui/tab_strip/tab_strip_ui.h" -#endif - -#if BUILDFLAG(ENABLE_COMPOSE) -#include "chrome/browser/ui/webui/compose/compose_untrusted_ui.h" -#include "chrome/common/compose/compose.mojom.h" -#endif - #if BUILDFLAG(ENABLE_PRINT_PREVIEW) #include "chrome/browser/printing/web_api/web_printing_service_binder.h" #include "third_party/blink/public/mojom/printing/web_printing.mojom.h" #endif -#if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) -#include "chrome/browser/ui/webui/certificate_manager/certificate_manager_ui.h" -#include "ui/webui/resources/cr_components/certificate_manager/certificate_manager_v2.mojom.h" -#endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) - -#if BUILDFLAG(ENABLE_DICE_SUPPORT) -#include "chrome/browser/ui/webui/signin/batch_upload/batch_upload.mojom.h" -#include "chrome/browser/ui/webui/signin/batch_upload_ui.h" -#include "chrome/browser/ui/webui/signin/signout_confirmation/signout_confirmation.mojom.h" -#include "chrome/browser/ui/webui/signin/signout_confirmation/signout_confirmation_ui.h" -#include "components/signin/public/base/signin_switches.h" -#endif // BUILDFLAG(ENABLE_DICE_SUPPORT) - -#if BUILDFLAG(ENABLE_GLIC) -#include "chrome/browser/glic/glic_enabling.h" -#include "chrome/browser/glic/glic_ui.h" +#if BUILDFLAG(ENABLE_SPELLCHECK) +#include "chrome/browser/spellchecker/spell_check_host_chrome_impl.h" +#include "components/spellcheck/common/spellcheck.mojom.h" #endif namespace chrome::internal { -using content::RegisterWebUIControllerInterfaceBinder; +namespace { #if BUILDFLAG(ENABLE_UNHANDLED_TAP) void BindUnhandledTapWebContentsObserver( @@ -714,6 +379,8 @@ void BindScreen2xMainContentExtractor( } #endif +} // namespace + void PopulateChromeFrameBinders( mojo::BinderMapWithContext* map, content::RenderFrameHost* render_frame_host) { @@ -866,939 +533,15 @@ void PopulateChromeFrameBinders( base::BindRepeating(&BindPaymentLinkHandler)); } #endif -} -void PopulateChromeWebUIFrameBinders( - mojo::BinderMapWithContext* map, - content::RenderFrameHost* render_frame_host) { - RegisterWebUIControllerInterfaceBinder<::mojom::BluetoothInternalsHandler, - BluetoothInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - media::mojom::MediaEngagementScoreDetailsProvider, MediaEngagementUI>( - map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder<::mojom::OmniboxPageHandler, - OmniboxUI>(map); - - RegisterWebUIControllerInterfaceBinder< - site_engagement::mojom::SiteEngagementDetailsProvider, SiteEngagementUI>( - map); - - RegisterWebUIControllerInterfaceBinder<::mojom::UsbInternalsPageHandler, - UsbInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - history_clusters_internals::mojom::PageHandlerFactory, - HistoryClustersInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - optimization_guide_internals::mojom::PageHandlerFactory, - OptimizationGuideInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - segmentation_internals::mojom::PageHandlerFactory, - SegmentationInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - commerce::mojom::CommerceInternalsHandlerFactory, - commerce::CommerceInternalsUI>(map); - - if (base::FeatureList::IsEnabled(chrome_urls::kInternalOnlyUisPref)) { - RegisterWebUIControllerInterfaceBinder< - chrome_urls::mojom::PageHandlerFactory, chrome_urls::ChromeUrlsUI>(map); - } - - RegisterWebUIControllerInterfaceBinder< - data_sharing_internals::mojom::PageHandlerFactory, - DataSharingInternalsUI>(map); - -#if BUILDFLAG(ENABLE_GLIC) - if (GlicEnabling::IsProfileEligible(Profile::FromBrowserContext( - render_frame_host->GetProcess()->GetBrowserContext()))) { - // Register the binder for all eligible profiles but the WebUI page will - // check whether Glic is policy-enabled and restrict access if needed. - RegisterWebUIControllerInterfaceBinder(map); - } -#endif - -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) - RegisterWebUIControllerInterfaceBinder< - connectors_internals::mojom::PageHandler, - enterprise_connectors::ConnectorsInternalsUI>(map); -#endif - -#if BUILDFLAG(IS_CHROMEOS) - RegisterWebUIControllerInterfaceBinder(map); -#endif - -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - RegisterWebUIControllerInterfaceBinder< - app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - on_device_translation_internals::mojom::PageHandlerFactory, - OnDeviceTranslationInternalsUI>(map); -#endif - -#if !BUILDFLAG(IS_ANDROID) - RegisterWebUIControllerInterfaceBinder< - search_engine_choice::mojom::PageHandlerFactory, SearchEngineChoiceUI>( - map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - new_tab_page_third_party::mojom::PageHandlerFactory, - NewTabPageThirdPartyUI>(map); - - if (lens::features::IsLensOverlayEnabled()) { - RegisterWebUIControllerInterfaceBinder< - lens::mojom::LensSidePanelPageHandlerFactory, - lens::LensSidePanelUntrustedUI>(map); - RegisterWebUIControllerInterfaceBinder(map); - } - - RegisterWebUIControllerInterfaceBinder< - color_change_listener::mojom::PageHandler, -#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) - TabStripUI, -#endif -#if BUILDFLAG(IS_CHROMEOS) - ash::OobeUI, ash::personalization_app::PersonalizationAppUI, - ash::vc_background_ui::VcBackgroundUI, ash::settings::OSSettingsUI, - ash::DiagnosticsDialogUI, ash::FirmwareUpdateAppUI, ash::ScanningUI, - ash::OSFeedbackUI, ash::ShortcutCustomizationAppUI, - ash::printing::printing_manager::PrintManagementUI, - ash::InternetConfigDialogUI, ash::InternetDetailDialogUI, ash::SetTimeUI, - ash::BluetoothPairingDialogUI, nearby_share::NearbyShareDialogUI, - ash::cloud_upload::CloudUploadUI, ash::office_fallback::OfficeFallbackUI, - ash::multidevice_setup::MultiDeviceSetupDialogUI, ash::ParentAccessUI, - ash::EmojiUI, ash::RemoteMaintenanceCurtainUI, - ash::app_install::AppInstallDialogUI, ash::SanitizeDialogUI, - ash::printing::print_preview::PrintPreviewCrosUI, - ash::extended_updates::ExtendedUpdatesUI, ash::graduation::GraduationUI, - policy::local_user_files::LocalFilesMigrationUI, -#endif - NewTabPageUI, OmniboxPopupUI, BookmarksSidePanelUI, CustomizeChromeUI, - UserEducationInternalsUI, ReadingListUI, TabSearchUI, WebuiGalleryUI, - HistoryClustersSidePanelUI, ShoppingInsightsSidePanelUI, - media_router::AccessCodeCastUI, commerce::ProductSpecificationsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - new_tab_page::mojom::PageHandlerFactory, NewTabPageUI>(map); - - RegisterWebUIControllerInterfaceBinder< - most_visited::mojom::MostVisitedPageHandlerFactory, NewTabPageUI, - NewTabPageThirdPartyUI>(map); - - auto* history_clusters_service = - HistoryClustersServiceFactory::GetForBrowserContext( - render_frame_host->GetProcess()->GetBrowserContext()); - if (history_clusters_service && - history_clusters_service->is_journeys_feature_flag_enabled()) { - RegisterWebUIControllerInterfaceBinder(map); - } - if (history_embeddings::IsHistoryEmbeddingsFeatureEnabled()) { - if (history_clusters_service && - history_clusters_service->is_journeys_feature_flag_enabled()) { - RegisterWebUIControllerInterfaceBinder< - history_embeddings::mojom::PageHandler, HistoryUI, - HistoryClustersSidePanelUI>(map); - } else { - RegisterWebUIControllerInterfaceBinder< - history_embeddings::mojom::PageHandler, HistoryUI>(map); - } - } - - RegisterWebUIControllerInterfaceBinder< - page_image_service::mojom::PageImageServiceHandler, HistoryUI, - HistoryClustersSidePanelUI, NewTabPageUI, BookmarksSidePanelUI>(map); - -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - RegisterWebUIControllerInterfaceBinder(map); -#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - - RegisterWebUIControllerInterfaceBinder< - browser_command::mojom::CommandHandlerFactory, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - WhatsNewUI, -#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - NewTabPageUI>(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - customize_color_scheme_mode::mojom:: - CustomizeColorSchemeModeHandlerFactory, - CustomizeChromeUI, settings::SettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - theme_color_picker::mojom::ThemeColorPickerHandlerFactory, - CustomizeChromeUI -#if !BUILDFLAG(IS_CHROMEOS) - , - ProfileCustomizationUI, settings::SettingsUI -#endif // !BUILDFLAG(IS_CHROMEOS) - >(map); - -#if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) - RegisterWebUIControllerInterfaceBinder< - certificate_manager_v2::mojom::CertificateManagerPageHandlerFactory, - CertificateManagerUI>(map); -#endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) - - RegisterWebUIControllerInterfaceBinder< - help_bubble::mojom::HelpBubbleHandlerFactory, UserEducationInternalsUI, - settings::SettingsUI, ReadingListUI, NewTabPageUI, CustomizeChromeUI, - PasswordManagerUI, HistoryUI, lens::LensOverlayUntrustedUI, - lens::LensSidePanelUntrustedUI -#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) - , - ProfilePickerUI -#endif //! BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) - >(map); - -#if !defined(OFFICIAL_BUILD) - RegisterWebUIControllerInterfaceBinder( - map); -#endif // !defined(OFFICIAL_BUILD) - - if (IsDriveModuleEnabled()) { - RegisterWebUIControllerInterfaceBinder< - file_suggestion::mojom::DriveSuggestionHandler, NewTabPageUI>(map); - } - - if (base::FeatureList::IsEnabled( - ntp_features::kNtpMostRelevantTabResumptionModule)) { - RegisterWebUIControllerInterfaceBinder< - ntp::most_relevant_tab_resumption::mojom::PageHandler, NewTabPageUI>( - map); - } - - if (base::FeatureList::IsEnabled(ntp_features::kNtpCalendarModule)) { - RegisterWebUIControllerInterfaceBinder< - ntp::calendar::mojom::GoogleCalendarPageHandler, NewTabPageUI>(map); - } - - if (IsOutlookCalendarModuleEnabledForProfile(Profile::FromBrowserContext( - render_frame_host->GetBrowserContext()))) { - RegisterWebUIControllerInterfaceBinder< - ntp::calendar::mojom::OutlookCalendarPageHandler, NewTabPageUI>(map); - } - - if (IsMicrosoftModuleEnabledForProfile(Profile::FromBrowserContext( - render_frame_host->GetBrowserContext()))) { - RegisterWebUIControllerInterfaceBinder< - ntp::authentication::mojom::MicrosoftAuthPageHandler, NewTabPageUI>( - map); - } - - if (IsMicrosoftFilesModuleEnabledForProfile(Profile::FromBrowserContext( - render_frame_host->GetBrowserContext()))) { - RegisterWebUIControllerInterfaceBinder< - file_suggestion::mojom::MicrosoftFilesPageHandler, NewTabPageUI>(map); - } - -#if BUILDFLAG(IS_CHROMEOS) - RegisterWebUIControllerInterfaceBinder< - ash::mojom::HidPreservingBluetoothStateController, - ash::settings::OSSettingsUI>(map); -#endif // defined(IS_CHROMEOS) - - RegisterWebUIControllerInterfaceBinder< - reading_list::mojom::PageHandlerFactory, ReadingListUI>(map); - RegisterWebUIControllerInterfaceBinder< - side_panel::mojom::BookmarksPageHandlerFactory, BookmarksSidePanelUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - shopping_service::mojom::ShoppingServiceHandlerFactory, - BookmarksSidePanelUI, commerce::ProductSpecificationsUI, - ShoppingInsightsSidePanelUI, HistoryUI>(map); - - RegisterWebUIControllerInterfaceBinder< - commerce::product_specifications::mojom:: - ProductSpecificationsHandlerFactory, - commerce::ProductSpecificationsUI, HistoryUI>(map); - - RegisterWebUIControllerInterfaceBinder< - commerce::price_tracking::mojom::PriceTrackingHandlerFactory, - ShoppingInsightsSidePanelUI, BookmarksSidePanelUI>(map); - - RegisterWebUIControllerInterfaceBinder< - commerce::price_insights::mojom::PriceInsightsHandlerFactory, - ShoppingInsightsSidePanelUI>(map); - - RegisterWebUIControllerInterfaceBinder< - side_panel::mojom::CustomizeChromePageHandlerFactory, CustomizeChromeUI>( - map); - - if (base::FeatureList::IsEnabled( - ntp_features::kCustomizeChromeWallpaperSearch) && - base::FeatureList::IsEnabled( - optimization_guide::features::kOptimizationGuideModelExecution)) { - RegisterWebUIControllerInterfaceBinder< - side_panel::customize_chrome::mojom::WallpaperSearchHandlerFactory, - CustomizeChromeUI>(map); - } - - if (features::IsToolbarPinningEnabled()) { - RegisterWebUIControllerInterfaceBinder< - side_panel::customize_chrome::mojom::CustomizeToolbarHandlerFactory, - CustomizeChromeUI>(map); - } - - RegisterWebUIControllerInterfaceBinder< - read_anything::mojom::UntrustedPageHandlerFactory, - ReadAnythingUntrustedUI>(map); - - RegisterWebUIControllerInterfaceBinder(map); - RegisterWebUIControllerInterfaceBinder< - metrics_reporter::mojom::PageMetricsHost, TabSearchUI, NewTabPageUI, - OmniboxPopupUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ::mojom::user_education_internals::UserEducationInternalsPageHandler, - UserEducationInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ::mojom::app_service_internals::AppServiceInternalsPageHandler, - AppServiceInternalsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - access_code_cast::mojom::PageHandlerFactory, - media_router::AccessCodeCastUI>(map); -#endif // BUILDFLAG(IS_ANDROID) - -#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) - RegisterWebUIControllerInterfaceBinder(map); -#endif - -#if BUILDFLAG(IS_CHROMEOS) - RegisterWebUIControllerInterfaceBinder< - ash::file_manager::mojom::PageHandlerFactory, - ash::file_manager::FileManagerUI>(map); - - RegisterWebUIControllerInterfaceBinder< - add_supervision::mojom::AddSupervisionHandler, ash::AddSupervisionUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - app_management::mojom::PageHandlerFactory, ash::settings::OSSettingsUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::mojom::UserActionRecorder, ash::settings::OSSettingsUI>( - map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::SearchHandler, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::app_notification::mojom::AppNotificationsHandler, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::app_permission::mojom::AppPermissionsHandler, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::app_parental_controls::mojom::AppParentalControlsHandler, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::mojom::InputDeviceSettingsProvider, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::mojom::DisplaySettingsProvider, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::common::mojom::ShortcutInputProvider, ash::settings::OSSettingsUI, - ash::ShortcutCustomizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::graduation::mojom::GraduationHandler, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::cellular_setup::mojom::CellularSetup, ash::settings::OSSettingsUI>( - map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::cellular_setup::mojom::ESimManager, ash::settings::OSSettingsUI, - ash::NetworkUI, ash::OobeUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::borealis_installer::mojom::PageHandlerFactory, - ash::BorealisInstallerUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::crostini_installer::mojom::PageHandlerFactory, - ash::CrostiniInstallerUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::crostini_upgrader::mojom::PageHandlerFactory, - ash::CrostiniUpgraderUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::multidevice_setup::mojom::MultiDeviceSetup, ash::OobeUI, - ash::multidevice::ProximityAuthUI, - ash::multidevice_setup::MultiDeviceSetupDialogUI>(map); - - RegisterWebUIControllerInterfaceBinder< - parent_access_ui::mojom::ParentAccessUiHandler, ash::ParentAccessUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::multidevice_setup::mojom::PrivilegedHostDeviceSetter, ash::OobeUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - chromeos::network_config::mojom::CrosNetworkConfig, - ash::InternetConfigDialogUI, ash::InternetDetailDialogUI, ash::NetworkUI, - ash::OobeUI, ash::settings::OSSettingsUI, ash::LockScreenNetworkUI, - ash::ShimlessRMADialogUI>(map); - - RegisterWebUIControllerInterfaceBinder< - chromeos::connectivity::mojom::PasspointService, - ash::InternetDetailDialogUI, ash::NetworkUI, ash::settings::OSSettingsUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - chromeos::printing::printing_manager::mojom::PrintingMetadataProvider, - ash::printing::printing_manager::PrintManagementUI>(map); - - RegisterWebUIControllerInterfaceBinder< - chromeos::printing::printing_manager::mojom::PrintManagementHandler, - ash::printing::printing_manager::PrintManagementUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::help_app::mojom::PageHandlerFactory, ash::HelpAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::local_search_service::mojom::Index, ash::HelpAppUI>(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::SignalingMessageExchanger, - ash::eche_app::EcheAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::SystemInfoProvider, ash::eche_app::EcheAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::AccessibilityProvider, ash::eche_app::EcheAppUI>( - map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::NotificationGenerator, ash::eche_app::EcheAppUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::DisplayStreamHandler, ash::eche_app::EcheAppUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::StreamOrientationObserver, - ash::eche_app::EcheAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::ConnectionStatusObserver, ash::eche_app::EcheAppUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::eche_app::mojom::KeyboardLayoutHandler, ash::eche_app::EcheAppUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::media_app_ui::mojom::PageHandlerFactory, ash::MediaAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - chromeos::network_health::mojom::NetworkHealthService, ash::NetworkUI, - ash::ConnectivityDiagnosticsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - chromeos::network_diagnostics::mojom::NetworkDiagnosticsRoutines, - ash::NetworkUI, ash::ConnectivityDiagnosticsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::diagnostics::mojom::InputDataProvider, ash::DiagnosticsDialogUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::diagnostics::mojom::NetworkHealthProvider, ash::DiagnosticsDialogUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::diagnostics::mojom::SystemDataProvider, ash::DiagnosticsDialogUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::diagnostics::mojom::SystemRoutineController, - ash::DiagnosticsDialogUI>(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::common::mojom::AccessibilityFeatures, ash::ScanningUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::os_feedback_ui::mojom::HelpContentProvider, ash::OSFeedbackUI>(map); - RegisterWebUIControllerInterfaceBinder< - ash::os_feedback_ui::mojom::FeedbackServiceProvider, ash::OSFeedbackUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::shimless_rma::mojom::ShimlessRmaService, ash::ShimlessRMADialogUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::shortcut_customization::mojom::AcceleratorConfigurationProvider, - ash::ShortcutCustomizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::shortcut_customization::mojom::SearchHandler, - ash::ShortcutCustomizationAppUI>(map); - - if (ash::features::IsPrinterPreviewCrosAppEnabled()) { - RegisterWebUIControllerInterfaceBinder< - ash::printing::print_preview::mojom::DestinationProvider, - ash::printing::print_preview::PrintPreviewCrosUI>(map); - } - - RegisterWebUIControllerInterfaceBinder< - emoji_picker::mojom::PageHandlerFactory, ash::EmojiUI>(map); - - if (base::FeatureList::IsEnabled( - ash::features::kImeSystemEmojiPickerMojoSearch)) { - RegisterWebUIControllerInterfaceBinder(map); - } - - RegisterWebUIControllerInterfaceBinder(map); - RegisterWebUIControllerInterfaceBinder< - enterprise_reporting::mojom::PageHandlerFactory, - ash::reporting::EnterpriseReportingUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::WallpaperProvider, - ash::personalization_app::PersonalizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::AmbientProvider, - ash::personalization_app::PersonalizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::ThemeProvider, - ash::personalization_app::PersonalizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::UserProvider, - ash::personalization_app::PersonalizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::KeyboardBacklightProvider, - ash::personalization_app::PersonalizationAppUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::personalization_app::mojom::SeaPenProvider, - ash::personalization_app::PersonalizationAppUI, - ash::vc_background_ui::VcBackgroundUI>(map); - - RegisterWebUIControllerInterfaceBinder< - launcher_internals::mojom::PageHandlerFactory, ash::LauncherInternalsUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::bluetooth_config::mojom::CrosBluetoothConfig, - ash::BluetoothPairingDialogUI, ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::audio_config::mojom::CrosAudioConfig, ash::settings::OSSettingsUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::hotspot_config::mojom::CrosHotspotConfig, - ash::settings::OSSettingsUI>(map); - - if (base::FeatureList::IsEnabled( - ash::features::kSystemJapanesePhysicalTyping)) { - RegisterWebUIControllerInterfaceBinder< - ash::ime::mojom::InputMethodUserDataService, - ash::settings::OSSettingsUI>(map); - } - - if (chromeos::features::IsOrcaEnabled() || - chromeos::features::IsMahiEnabled()) { - RegisterWebUIControllerInterfaceBinder< - ash::settings::magic_boost_handler::mojom::PageHandlerFactory, - ash::settings::OSSettingsUI>(map); - } - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder< - ash::kiosk_vision::mojom::PageConnector, ash::kiosk_vision::UIController>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::extended_updates::mojom::PageHandlerFactory, - ash::extended_updates::ExtendedUpdatesUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::firmware_update::mojom::UpdateProvider, ash::FirmwareUpdateAppUI>( - map); - - RegisterWebUIControllerInterfaceBinder< - ash::firmware_update::mojom::SystemUtils, ash::FirmwareUpdateAppUI>(map); - - if (ash::features::IsDriveFsMirroringEnabled()) { - RegisterWebUIControllerInterfaceBinder< - ash::manage_mirrorsync::mojom::PageHandlerFactory, - ash::ManageMirrorSyncUI>(map); - } - - Profile* profile = - Profile::FromBrowserContext(render_frame_host->GetBrowserContext()); - if (chromeos::IsEligibleAndEnabledUploadOfficeToCloud(profile)) { - 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::settings::one_drive::mojom::PageHandlerFactory, - ash::settings::OSSettingsUI>(map); - } - - RegisterWebUIControllerInterfaceBinder< - ash::settings::google_drive::mojom::PageHandlerFactory, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::settings::date_time::mojom::PageHandlerFactory, - ash::settings::OSSettingsUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::screens_factory::mojom::ScreensFactory, ash::OobeUI>(map); - - RegisterWebUIControllerInterfaceBinder< - ash::app_install::mojom::PageHandlerFactory, - ash::app_install::AppInstallDialogUI>(map); - - RegisterWebUIControllerInterfaceBinder< - new_window_proxy::mojom::NewWindowProxy, ash::EmojiUI>(map); - RegisterWebUIControllerInterfaceBinder(map); - - if (base::FeatureList::IsEnabled(features::kSkyVault) && - base::FeatureList::IsEnabled(features::kSkyVaultV2)) { - RegisterWebUIControllerInterfaceBinder< - policy::local_user_files::mojom::PageHandlerFactory, - policy::local_user_files::LocalFilesMigrationUI>(map); - } - - if (ash::features::IsGrowthInternalsEnabled()) { - RegisterWebUIControllerInterfaceBinder(map); - } -#endif // BUILDFLAG(IS_CHROMEOS) - -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); - - RegisterWebUIControllerInterfaceBinder(map); -#endif - -#if BUILDFLAG(IS_ANDROID) - RegisterWebUIControllerInterfaceBinder(map); -#endif - -#if BUILDFLAG(FULL_SAFE_BROWSING) - RegisterWebUIControllerInterfaceBinder<::mojom::ResetPasswordHandler, - ResetPasswordUI>(map); -#endif - -#if BUILDFLAG(IS_CHROMEOS) - // Because Nearby Share is only currently supported for the primary profile, - // we should only register binders in that scenario. However, we don't want to - // plumb the profile through to this function, so we 1) ensure that - // NearbyShareDialogUI will not be created for non-primary profiles, and 2) - // rely on the BindInterface implementation of OSSettingsUI to ensure that no - // Nearby Share receivers are bound. - RegisterWebUIControllerInterfaceBinder< - nearby_share::mojom::NearbyShareSettings, ash::settings::OSSettingsUI, - nearby_share::NearbyShareDialogUI>(map); - RegisterWebUIControllerInterfaceBinder( - map); - RegisterWebUIControllerInterfaceBinder( - map); - RegisterWebUIControllerInterfaceBinder(map); -#endif // BUILDFLAG(IS_CHROMEOS) - -#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) - RegisterWebUIControllerInterfaceBinder<::app_home::mojom::PageHandlerFactory, - webapps::AppHomeUI>(map); -#endif // !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) - -#if !BUILDFLAG(IS_ANDROID) - RegisterWebUIControllerInterfaceBinder<::mojom::WebAppInternalsHandler, - WebAppInternalsUI>(map); -#endif - - RegisterWebUIControllerInterfaceBinder<::mojom::LocationInternalsHandler, - LocationInternalsUI>(map); - -#if !BUILDFLAG(IS_ANDROID) - if (base::FeatureList::IsEnabled( - optimization_guide::features::kOptimizationGuideOnDeviceModel)) { - RegisterWebUIControllerInterfaceBinder< - ::mojom::OnDeviceInternalsPageHandlerFactory, OnDeviceInternalsUI>(map); - } -#endif - - if (base::FeatureList::IsEnabled( - privacy_sandbox::kPrivacySandboxInternalsDevUI)) { - RegisterWebUIControllerInterfaceBinder< - privacy_sandbox_internals::mojom::PageHandler, - privacy_sandbox_internals::PrivacySandboxInternalsUI>(map); - } - -#if !BUILDFLAG(IS_ANDROID) - if (base::FeatureList::IsEnabled(privacy_sandbox::kRelatedWebsiteSetsDevUI)) { - RegisterWebUIControllerInterfaceBinder< - related_website_sets::mojom::RelatedWebsiteSetsPageHandler, - privacy_sandbox_internals::PrivacySandboxInternalsUI>(map); - } - - if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivateStateTokensDevUI)) { - RegisterWebUIControllerInterfaceBinder< - private_state_tokens::mojom::PrivateStateTokensPageHandler, - privacy_sandbox_internals::PrivacySandboxInternalsUI>(map); - } -#endif - -#if BUILDFLAG(ENABLE_DICE_SUPPORT) - if (base::FeatureList::IsEnabled(switches::kBatchUploadDesktop)) { - RegisterWebUIControllerInterfaceBinder< - batch_upload::mojom::PageHandlerFactory, BatchUploadUI>(map); - } - - RegisterWebUIControllerInterfaceBinder< - signout_confirmation::mojom::PageHandlerFactory, SignoutConfirmationUI>( - map); -#endif // BUILDFLAG(ENABLE_DICE_SUPPORT) - -#if BUILDFLAG(IS_CHROMEOS) - if (ash::features::IsFocusModeEnabled()) { - RegisterWebUIControllerInterfaceBinder< - ash::focus_mode::mojom::TrackProvider, ash::FocusModeUI>(map); - } - - RegisterWebUIControllerInterfaceBinder< - ash::sanitize_ui::mojom::SettingsResetter, ash::SanitizeDialogUI>(map); - - if (ash::features::IsGraduationEnabled()) { - RegisterWebUIControllerInterfaceBinder< - ash::graduation_ui::mojom::GraduationUiHandler, - ash::graduation::GraduationUI>(map); - } -#endif // BUILDFLAG(IS_CHROMEOS) -} - -void PopulateChromeWebUIFrameInterfaceBrokers( - content::WebUIBrowserInterfaceBrokerRegistry& registry) { - // This function is broken up into sections based on WebUI types. - - // --- Section 1: chrome:// WebUIs: - -#if BUILDFLAG(IS_CHROMEOS) && !defined(OFFICIAL_BUILD) - registry.ForWebUI() - .Add() - .Add(); - - registry.ForWebUI() - .Add(); -#endif // BUILDFLAG(IS_CHROMEOS) && !defined(OFFICIAL_BUILD) - -#if BUILDFLAG(IS_CHROMEOS) - registry.ForWebUI() - .Add() - .Add() - .Add(); - - registry.ForWebUI() - .Add() - .Add() - .Add(); - registry.ForWebUI() - .Add() - .Add(); - registry.ForWebUI() - .Add(); - registry.ForWebUI() - .Add(); - registry.ForWebUI() - .Add(); - registry.ForWebUI() - .Add(); - registry.ForWebUI() - .Add(); - registry.ForWebUI().Add(); -#endif // BUILDFLAG(IS_CHROMEOS) - - // --- Section 2: chrome-untrusted:// WebUIs: -#if BUILDFLAG(IS_CHROMEOS) - registry.ForWebUI() - .Add() - .Add(); - - if (chromeos::features::IsOrcaEnabled() || - ash::features::IsLobsterEnabled()) { - registry.ForWebUI() - .Add() - .Add(); - } - - registry.ForWebUI() - .Add(); - - registry.ForWebUI() - .Add(); - - registry.ForWebUI() - .Add() - .Add(); - - registry.ForWebUI() - .Add(); - - registry.ForWebUI() - .Add() - .Add(); - - registry.ForWebUI() - .Add(); - - registry.ForWebUI() - .Add() - .Add(); -#endif // BUILDFLAG(IS_CHROMEOS) - -#if BUILDFLAG(IS_CHROMEOS) && !defined(OFFICIAL_BUILD) - registry.ForWebUI() - .Add(); -#endif // BUILDFLAG(IS_CHROMEOS) && !defined(OFFICIAL_BUILD) - -#if BUILDFLAG(ENABLE_COMPOSE) - registry.ForWebUI() - .Add() - .Add(); -#endif // BUILDFLAG(ENABLE_COMPOSE) -#if !BUILDFLAG(IS_ANDROID) - if (lens::features::IsLensOverlayEnabled()) { - registry.ForWebUI() - .Add() - .Add() - .Add() - .Add() - .Add(); - } - if (lens::features::IsLensOverlayEnabled()) { - registry.ForWebUI() - .Add() - .Add() - .Add() - .Add() - .Add(); - } - registry.ForWebUI() - .Add(); - - if (base::FeatureList::IsEnabled( - data_sharing::features::kDataSharingFeature)) { - registry.ForWebUI() - .Add() - .Add(); - } - - registry.ForWebUI() - .Add(); - -#endif // !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(ENABLE_SPELLCHECK) + map->Add(base::BindRepeating( + [](content::RenderFrameHost* frame_host, + mojo::PendingReceiver receiver) { + SpellCheckHostChromeImpl::Create( + frame_host->GetProcess()->GetDeprecatedID(), std::move(receiver)); + })); +#endif // BUILDFLAG(ENABLE_SPELLCHECK) } } // namespace chrome::internal diff --git a/tools/under-control/src/chrome/browser/chrome_content_browser_client.cc b/tools/under-control/src/chrome/browser/chrome_content_browser_client.cc index 678e42c9..2e672ca4 100755 --- a/tools/under-control/src/chrome/browser/chrome_content_browser_client.cc +++ b/tools/under-control/src/chrome/browser/chrome_content_browser_client.cc @@ -58,6 +58,8 @@ #include "chrome/browser/browsing_data/chrome_browsing_data_model_delegate.h" #include "chrome/browser/browsing_data/chrome_browsing_data_remover_constants.h" #include "chrome/browser/browsing_topics/browsing_topics_service_factory.h" +#include "chrome/browser/btm/btm_browser_signin_detector.h" +#include "chrome/browser/btm/stateful_bounce_counter.h" #include "chrome/browser/captive_portal/captive_portal_service_factory.h" #include "chrome/browser/child_process_host_flags.h" #include "chrome/browser/chrome_browser_main_extra_parts_nacl_deprecation.h" @@ -71,8 +73,6 @@ #include "chrome/browser/defaults.h" #include "chrome/browser/device_api/device_service_impl.h" #include "chrome/browser/device_api/managed_configuration_service.h" -#include "chrome/browser/dips/dips_browser_signin_detector.h" -#include "chrome/browser/dips/stateful_bounce_counter.h" #include "chrome/browser/download/chrome_download_manager_delegate.h" #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/enterprise/browser_management/management_service_factory.h" @@ -148,15 +148,11 @@ #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" #include "chrome/browser/renderer_preferences_util.h" #include "chrome/browser/request_header_integrity/buildflags.h" -#include "chrome/browser/safe_browsing/chrome_ping_manager_factory.h" -#include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h" -#include "chrome/browser/safe_browsing/delayed_warning_navigation_throttle.h" -#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/url_checker_delegate_impl.h" -#include "chrome/browser/safe_browsing/url_lookup_service_factory.h" #include "chrome/browser/search/search.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.h" +#include "chrome/browser/serial/chrome_serial_delegate.h" #include "chrome/browser/sharing/sms/sms_remote_fetcher.h" #include "chrome/browser/signin/chrome_signin_proxying_url_loader_factory.h" #include "chrome/browser/signin/chrome_signin_url_loader_throttle.h" @@ -185,6 +181,7 @@ #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "chrome/browser/ui/chrome_select_file_policy.h" +#include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/lens/lens_overlay_side_panel_navigation_throttle.h" #include "chrome/browser/ui/login/http_auth_coordinator.h" #include "chrome/browser/ui/login/login_navigation_throttle.h" @@ -303,7 +300,6 @@ #include "components/safe_browsing/content/browser/async_check_tracker.h" #include "components/safe_browsing/content/browser/browser_url_loader_throttle.h" #include "components/safe_browsing/content/browser/password_protection/password_protection_commit_deferring_condition.h" -#include "components/safe_browsing/content/browser/safe_browsing_navigation_throttle.h" #include "components/safe_browsing/content/browser/ui_manager.h" #include "components/safe_browsing/core/browser/hashprefix_realtime/hash_realtime_service.h" #include "components/safe_browsing/core/browser/realtime/policy_engine.h" @@ -403,6 +399,7 @@ #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/is_potentially_trustworthy.h" #include "services/network/public/cpp/network_switches.h" +#include "services/network/public/cpp/permissions_policy/permissions_policy_declaration.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/self_deleting_url_loader_factory.h" #include "services/network/public/cpp/web_sandbox_flags.h" @@ -415,7 +412,6 @@ #include "third_party/blink/public/common/loader/url_loader_throttle.h" #include "third_party/blink/public/common/navigation/navigation_policy.h" #include "third_party/blink/public/common/permissions/permission_utils.h" -#include "third_party/blink/public/common/permissions_policy/permissions_policy.h" #include "third_party/blink/public/common/switches.h" #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h" @@ -425,6 +421,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/page_transition_types.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_provider.h" #include "ui/color/color_provider_key.h" #include "ui/gfx/switches.h" #include "ui/native_theme/native_theme.h" @@ -476,7 +473,6 @@ #include "chrome/browser/ash/arc/fileapi/arc_content_file_system_backend_delegate.h" #include "chrome/browser/ash/arc/fileapi/arc_documents_provider_backend_delegate.h" #include "chrome/browser/ash/boca/on_task/on_task_locked_session_navigation_throttle.h" -#include "chrome/browser/ash/crosapi/browser_util.h" #include "chrome/browser/ash/drive/fileapi/drivefs_file_system_backend_delegate.h" #include "chrome/browser/ash/file_system_provider/fileapi/backend_delegate.h" #include "chrome/browser/ash/fileapi/external_file_url_loader_factory.h" @@ -549,6 +545,7 @@ #if !BUILDFLAG(IS_ANDROID) #include "chrome/browser/digital_credentials/digital_identity_provider_desktop.h" +#include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h" #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" #include "chrome/browser/ui/webui/ntp_microsoft_auth/ntp_microsoft_auth_response_capture_navigation_throttle.h" #include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h" @@ -560,6 +557,8 @@ #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_CHROMEOS) +#include "ash/multi_capture/multi_capture_service.h" +#include "ash/shell.h" #include "base/debug/leak_annotations.h" #include "chrome/browser/apps/app_service/app_install/app_install_navigation_throttle.h" #include "chrome/browser/apps/intent_helper/chromeos_disabled_apps_throttle.h" @@ -571,12 +570,12 @@ #include "chrome/browser/file_system_access/cloud_identifier/cloud_identifier_util_cros.h" #include "chrome/browser/policy/system_features_disable_list_policy_handler.h" #include "chrome/browser/smart_card/chromeos_smart_card_delegate.h" +#include "chrome/browser/web_applications/chromeos_web_app_experiments.h" #include "chrome/browser/web_applications/web_app_tab_helper.h" #include "chrome/common/chromeos/extensions/chromeos_system_extension_info.h" #include "chromeos/ash/components/quickoffice/quickoffice_prefs.h" #include "chromeos/components/kiosk/kiosk_utils.h" #include "chromeos/constants/chromeos_features.h" -#include "content/public/browser/chromeos/multi_capture_service.h" #include "third_party/cros_system_api/switches/chrome_switches.h" #endif @@ -592,7 +591,6 @@ #include "chrome/browser/page_info/web_view_side_panel_throttle.h" #include "chrome/browser/search/instant_service.h" #include "chrome/browser/search/instant_service_factory.h" -#include "chrome/browser/serial/chrome_serial_delegate.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/browser_finder.h" @@ -743,6 +741,12 @@ #include "chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service.h" #include "chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service_factory.h" #include "chrome/browser/safe_browsing/chrome_password_protection_service.h" +#include "chrome/browser/safe_browsing/chrome_ping_manager_factory.h" +#include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h" +#include "chrome/browser/safe_browsing/delayed_warning_navigation_throttle.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" +#include "chrome/browser/safe_browsing/url_lookup_service_factory.h" +#include "components/safe_browsing/content/browser/safe_browsing_navigation_throttle.h" #endif #if BUILDFLAG(ENABLE_OFFLINE_PAGES) @@ -1345,25 +1349,28 @@ bool IsErrorPageAutoReloadEnabled() { void NotifyMultiCaptureStarted(const std::string& label, content::WebContents* web_contents, const webapps::AppId* app_id) { - if (app_id && - video_capture::mojom::MultiCaptureServiceClient::Version_ >= - video_capture::mojom::MultiCaptureServiceClient::MethodMinVersions:: - kMultiCaptureStartedFromAppMinVersion) { - content::GetMultiCaptureService().NotifyMultiCaptureStartedFromApp( - label, *app_id, - web_app::WebAppProvider::GetForWebContents(web_contents) - ->registrar_unsafe() - .GetAppShortName(*app_id)); + if (app_id) { + CHECK_DEREF(ash::Shell::Get()) + .multi_capture_service() + ->NotifyMultiCaptureStartedFromApp( + label, *app_id, + web_app::WebAppProvider::GetForWebContents(web_contents) + ->registrar_unsafe() + .GetAppShortName(*app_id)); } else { // TODO(b/319317165): Remove this case once the pivot to web apps is // complete. - content::GetMultiCaptureService().NotifyMultiCaptureStarted( - label, url::Origin::Create(web_contents->GetLastCommittedURL())); + CHECK_DEREF(ash::Shell::Get()) + .multi_capture_service() + ->NotifyMultiCaptureStarted( + label, url::Origin::Create(web_contents->GetLastCommittedURL())); } } void NotifyMultiCaptureStopped(const std::string& label) { - content::GetMultiCaptureService().NotifyMultiCaptureStopped(label); + CHECK_DEREF(ash::Shell::Get()) + .multi_capture_service() + ->NotifyMultiCaptureStopped(label); } bool IsSubAppsPermissionGrantedByAdmins(content::WebContents* contents) { @@ -1890,12 +1897,13 @@ ChromeContentBrowserClient::GetStoragePartitionConfigForSite( #if BUILDFLAG(ENABLE_EXTENSIONS) if (content::SiteIsolationPolicy::ShouldUrlUseApplicationIsolationLevel( browser_context, site)) { - CHECK(site.SchemeIs(chrome::kIsolatedAppScheme)); + CHECK(url::Origin::Create(site).scheme() == chrome::kIsolatedAppScheme); ASSIGN_OR_RETURN(const auto iwa_url_info, web_app::IsolatedWebAppUrlInfo::Create(site), [&](auto) { LOG(ERROR) << "Invalid isolated-app URL: " << site; return default_storage_partition_config; }); + return iwa_url_info.storage_partition_config(browser_context); } #endif @@ -2420,7 +2428,7 @@ size_t ChromeContentBrowserClient::GetProcessCountToIgnoreForLimit() { #endif } -std::optional +std::optional ChromeContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp( content::WebContents* web_contents, const url::Origin& app_origin) { @@ -2440,13 +2448,13 @@ ChromeContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp( registrar.FindAllAppsNestedInUrl( app_origin.GetURL(), web_app::WebAppFilter::InstalledInChrome()); if (app_ids_for_origin.empty()) { - return blink::ParsedPermissionsPolicy(); + return network::ParsedPermissionsPolicy(); } return registrar.GetPermissionsPolicy(app_ids_for_origin[0]); #else NOTIMPLEMENTED(); - return blink::ParsedPermissionsPolicy(); + return network::ParsedPermissionsPolicy(); #endif } @@ -2819,7 +2827,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( if (prefs->GetBoolean(policy::policy_prefs:: kForcePermissionPolicyUnloadDefaultEnabled)) { command_line->AppendSwitch( - blink::switches::kForcePermissionPolicyUnloadDefaultEnabled); + network::switches::kForcePermissionPolicyUnloadDefaultEnabled); } if (prefs->GetBoolean(prefs::kWebAudioOutputBufferingEnabled)) { @@ -2902,19 +2910,23 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( #endif // BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID) - // Make the {WebAuthenticationRemoteProxiedRequestsAllowed or - // WebAuthenticationRemoteDesktopAllowedOrigins} policy enable the - // experimental WebAuthenticationRemoteDesktopSupport Blink runtime + // Make the WebAuthenticationRemoteProxiedRequestsAllowed policy enable + // the experimental WebAuthenticationRemoteDesktopSupport Blink runtime // feature. if (prefs->GetBoolean( - webauthn::pref_names::kRemoteProxiedRequestsAllowed) || - (base::FeatureList::IsEnabled( - device::kWebAuthnRemoteDesktopAllowedOriginsPolicy) && - !prefs->GetList(webauthn::pref_names::kRemoteDesktopAllowedOrigins) - .empty())) { + webauthn::pref_names::kRemoteProxiedRequestsAllowed)) { command_line->AppendSwitch(switches::kWebAuthRemoteDesktopSupport); } #endif + // Make the WebAuthenticationRemoteDesktopAllowedOrigins policy enable the + // experimental WebAuthenticationRemoteDesktopSupport Blink runtime + // feature. + if (base::FeatureList::IsEnabled( + device::kWebAuthnRemoteDesktopAllowedOriginsPolicy) && + !prefs->GetList(webauthn::pref_names::kRemoteDesktopAllowedOrigins) + .empty()) { + command_line->AppendSwitch(switches::kWebAuthRemoteDesktopSupport); + } } MaybeAppendBlinkSettingsSwitchForFieldTrial(browser_command_line, @@ -3947,25 +3959,18 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs, web_prefs->preferred_color_scheme = ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme()); - bool using_different_colored_frame = false; Profile* profile = Profile::FromBrowserContext(web_contents->GetBrowserContext()); CHECK(profile); - if (ThemeService* theme_service = - ThemeServiceFactory::GetForProfile(profile)) { - using_different_colored_frame = !theme_service->UsingDefaultTheme() || - theme_service->GetUserColor().has_value() || - theme_service->UsingDeviceTheme(); - } - // Update based on the ColorProvider associated with `web_contents`. Depends - // on the browser color mode settings and whether the user profile has set a - // custom coloring for the browser ui. + // Update the preferred root scrollbar color based on the lightness level of + // the toolbar's color. web_prefs->preferred_root_scrollbar_color_scheme = - web_contents->GetColorMode() == ui::ColorProviderKey::ColorMode::kLight || - using_different_colored_frame - ? blink::mojom::PreferredColorScheme::kLight - : blink::mojom::PreferredColorScheme::kDark; + color_utils::IsDark( + web_contents->GetColorProvider().GetColor(kColorToolbar)) + ? blink::mojom::PreferredColorScheme::kDark + : blink::mojom::PreferredColorScheme::kLight; + #endif // BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID) @@ -4290,6 +4295,10 @@ ChromeContentBrowserClient::GetTtsControllerDelegate() { void ChromeContentBrowserClient::MaybeOverrideManifest( content::RenderFrameHost* render_frame_host, blink::mojom::ManifestPtr& manifest) { +#if BUILDFLAG(IS_CHROMEOS) + web_app::ChromeOsWebAppExperiments::MaybeOverrideManifest(render_frame_host, + manifest); +#endif #if !BUILDFLAG(IS_ANDROID) Profile* profile = Profile::FromBrowserContext(render_frame_host->GetBrowserContext()); @@ -5138,13 +5147,6 @@ void ChromeContentBrowserClient::SessionEnding( bool ChromeContentBrowserClient::ShouldEnableAudioProcessHighPriority() { return IsAudioProcessHighPriorityEnabled(); } - -bool ChromeContentBrowserClient::ShouldUseFontDataManager( - const GURL& site_url) { - return IsTopChromeWebUIURL(site_url) && - base::FeatureList::IsEnabled(features::kFontDataService); -} - #endif // BUILDFLAG(IS_WIN) void ChromeContentBrowserClient:: @@ -5461,6 +5463,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( &throttles); #endif +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) // g_browser_process->safe_browsing_service() may be null in unittests. safe_browsing::SafeBrowsingUIManager* ui_manager = g_browser_process->safe_browsing_service() @@ -5476,6 +5479,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( std::make_unique( handle)); } +#endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: @@ -5771,7 +5775,9 @@ bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs( void ChromeContentBrowserClient::InitOnUIThread() { DCHECK_CURRENTLY_ON(BrowserThread::UI); +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) safe_browsing_service_ = g_browser_process->safe_browsing_service(); +#endif // Initialize `network_contexts_parent_directory_`. base::FilePath user_data_dir; @@ -5883,10 +5889,14 @@ ChromeContentBrowserClient::MaybeCreateSafeBrowsingURLLoaderThrottle( safe_browsing::RealTimeUrlLookupServiceBase* url_lookup_service = GetUrlLookupService(browser_context, is_enterprise_lookup_enabled, is_consumer_lookup_enabled); +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) safe_browsing::HashRealTimeService* hash_realtime_service = safe_browsing_service_ ? safe_browsing_service_->GetHashRealTimeService(profile) : nullptr; +#else + safe_browsing::HashRealTimeService* hash_realtime_service = nullptr; +#endif safe_browsing::hash_realtime_utils::HashRealTimeSelection hash_realtime_selection = safe_browsing::hash_realtime_utils::DetermineHashRealTimeSelection( @@ -6893,6 +6903,13 @@ content::UsbDelegate* ChromeContentBrowserClient::GetUsbDelegate() { return usb_delegate_.get(); } +content::SerialDelegate* ChromeContentBrowserClient::GetSerialDelegate() { + if (!serial_delegate_) { + serial_delegate_ = std::make_unique(); + } + return serial_delegate_.get(); +} + content::PrivateNetworkDeviceDelegate* ChromeContentBrowserClient::GetPrivateNetworkDeviceDelegate() { if (!private_network_device_delegate_) { @@ -6926,8 +6943,6 @@ bool ChromeContentBrowserClient::IsSecurityLevelAcceptableForWebAuthn( SecurityStateTabHelper::FromWebContents(web_contents); security_state::SecurityLevel security_level = helper->GetSecurityLevel(); return security_level == security_state::SecurityLevel::SECURE || - security_level == - security_state::SecurityLevel::SECURE_WITH_POLICY_INSTALLED_CERT || base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kIgnoreCertificateErrors); } @@ -6948,12 +6963,6 @@ void ChromeContentBrowserClient::CreateManagedConfigurationService( std::move(receiver)); } -content::SerialDelegate* ChromeContentBrowserClient::GetSerialDelegate() { - if (!serial_delegate_) - serial_delegate_ = std::make_unique(); - return serial_delegate_.get(); -} - content::HidDelegate* ChromeContentBrowserClient::GetHidDelegate() { if (!hid_delegate_) hid_delegate_ = std::make_unique(); @@ -7012,7 +7021,7 @@ ChromeContentBrowserClient::CreateLoginDelegate( scoped_refptr response_headers, bool first_auth_attempt, content::GuestPageHolder* guest, - LoginAuthRequiredCallback auth_required_callback) { + content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback) { #if BUILDFLAG(IS_CHROMEOS) // Negotiate challenge is handled via GSSAPI library, which can not receive // external credentials. However, on ChromeOS we can suggest the user to @@ -7111,6 +7120,20 @@ ChromeContentBrowserClient::CreateWindowForVideoPictureInPicture( return content::VideoOverlayWindow::Create(controller); } +media::PictureInPictureEventsInfo::AutoPipReason +ChromeContentBrowserClient::GetAutoPipReason( + const content::WebContents& web_contents) const { +#if BUILDFLAG(IS_ANDROID) + return media::PictureInPictureEventsInfo::AutoPipReason::kUnknown; +#else + auto* auto_pip_tab_helper = + AutoPictureInPictureTabHelper::FromWebContents(&web_contents); + return auto_pip_tab_helper + ? auto_pip_tab_helper->GetAutoPipTriggerReason() + : media::PictureInPictureEventsInfo::AutoPipReason::kUnknown; +#endif // BUILDFLAG(IS_ANDROID) +} + void ChromeContentBrowserClient::RegisterRendererPreferenceWatcher( content::BrowserContext* browser_context, mojo::PendingRemote watcher) { @@ -7256,6 +7279,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate( if (!safe_browsing_enabled_for_profile && !should_check_on_sb_disabled) return nullptr; +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) // |safe_browsing_service_| may be unavailable in tests. if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) { safe_browsing_url_checker_delegate_ = @@ -7263,6 +7287,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate( safe_browsing_service_->database_manager(), safe_browsing_service_->ui_manager()); } +#endif // Update allowlist domains. if (safe_browsing_url_checker_delegate_) { @@ -7278,6 +7303,7 @@ ChromeContentBrowserClient::GetUrlLookupService( content::BrowserContext* browser_context, bool is_enterprise_lookup_enabled, bool is_consumer_lookup_enabled) { +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) // |safe_browsing_service_| may be unavailable in tests. if (!safe_browsing_service_) { return nullptr; @@ -7291,6 +7317,7 @@ ChromeContentBrowserClient::GetUrlLookupService( return safe_browsing::RealTimeUrlLookupServiceFactory::GetForProfile( profile); } +#endif return nullptr; } @@ -7302,6 +7329,7 @@ ChromeContentBrowserClient::GetAsyncCheckTracker( safe_browsing::hash_realtime_utils::HashRealTimeSelection hash_realtime_selection, content::FrameTreeNodeId frame_tree_node_id) { +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) content::WebContents* contents = wc_getter.Run(); if (!contents || !safe_browsing_service_ || !safe_browsing_service_->ui_manager()) { @@ -7326,6 +7354,9 @@ ChromeContentBrowserClient::GetAsyncCheckTracker( contents, safe_browsing_service_->ui_manager().get(), safe_browsing::AsyncCheckTracker:: IsPlatformEligibleForSyncCheckerCheckAllowlist()); +#else + return nullptr; +#endif } void ChromeContentBrowserClient::ReportLegacyTechEvent( @@ -8594,10 +8625,10 @@ bool ShouldBrowserContextEnableDips(content::BrowserContext* browser_context) { void ChromeContentBrowserClient::OnDipsServiceCreated( content::BrowserContext* browser_context, - content::BtmService* dips_service) { + content::BtmService* btm_service) { // Create BtmBrowserSigninDetector. CHECK(BtmBrowserSigninDetector::Get(browser_context)); - dips::StatefulBounceCounter::CreateFor(dips_service); + btm::StatefulBounceCounter::CreateFor(btm_service); } static_assert(content::ContentBrowserClient::kDefaultDipsRemoveMask == @@ -8863,6 +8894,14 @@ ChromeContentBrowserClient::OverrideForInternalWebUI(content::WebUI* web_ui, return std::make_unique(web_ui, url.host()); } +bool ChromeContentBrowserClient::ShouldEnableSubframeZoom() { +#if BUILDFLAG(ENABLE_PDF) + return chrome_pdf::features::IsOopifPdfEnabled(); +#else + return false; +#endif +} + #if BUILDFLAG(ENABLE_PDF) std::optional ChromeContentBrowserClient::MaybeOverrideLocalURLCrossOriginEmbedderPolicy( diff --git a/tools/under-control/src/chrome/browser/prefs/browser_prefs.cc b/tools/under-control/src/chrome/browser/prefs/browser_prefs.cc index 3cc0bb18..c95fca6d 100755 --- a/tools/under-control/src/chrome/browser/prefs/browser_prefs.cc +++ b/tools/under-control/src/chrome/browser/prefs/browser_prefs.cc @@ -15,7 +15,6 @@ #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/chromecast_buildflags.h" -#include "build/chromeos_buildflags.h" #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/invert_bubble_prefs.h" @@ -70,6 +69,7 @@ #include "chrome/browser/push_messaging/push_messaging_service_impl.h" #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" #include "chrome/browser/search/search.h" +#include "chrome/browser/serial/serial_policy_allowed_ports.h" #include "chrome/browser/sharing_hub/sharing_hub_features.h" #include "chrome/browser/ssl/ssl_config_service_manager.h" #include "chrome/browser/tracing/chrome_tracing_delegate.h" @@ -90,16 +90,6 @@ #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" #include "chrome/browser/ui/webui/policy/policy_ui.h" #include "chrome/browser/ui/webui/print_preview/policy_settings.h" -#include "components/page_info/core/merchant_trust_service.h" -#include "components/plus_addresses/plus_address_prefs.h" -#include "components/privacy_sandbox/tpcd_pref_names.h" -#include "components/services/on_device_translation/buildflags/buildflags.h" -#include "components/sharing_message/sharing_sync_preference.h" -#include "components/signin/core/browser/active_primary_accounts_metrics_recorder.h" -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chrome/browser/ash/net/secure_dns_manager.h" -#include "chrome/browser/ui/webui/settings/reset_settings_handler.h" -#endif // BUILDFLAG(IS_CHROMEOS_ASH) #include "chrome/browser/updates/announcement_notification/announcement_notification_service.h" #include "chrome/browser/user_education/browser_user_education_storage_service.h" #include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h" @@ -124,7 +114,6 @@ #include "components/enterprise/connectors/core/connectors_prefs.h" #include "components/fingerprinting_protection_filter/common/fingerprinting_protection_filter_constants.h" #include "components/fingerprinting_protection_filter/common/prefs.h" -#include "components/flags_ui/pref_service_flags_storage.h" #include "components/history_clusters/core/history_clusters_prefs.h" #include "components/image_fetcher/core/cache/image_cache.h" #include "components/invalidation/impl/fcm_invalidation_service.h" @@ -146,11 +135,13 @@ #include "components/omnibox/browser/zero_suggest_provider.h" #include "components/optimization_guide/core/model_execution/model_execution_prefs.h" #include "components/optimization_guide/core/optimization_guide_prefs.h" +#include "components/page_info/core/merchant_trust_service.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/payments/core/payment_prefs.h" #include "components/performance_manager/public/user_tuning/prefs.h" #include "components/permissions/permission_hats_trigger_helper.h" #include "components/permissions/pref_names.h" +#include "components/plus_addresses/plus_address_prefs.h" #include "components/policy/core/browser/browser_policy_connector.h" #include "components/policy/core/browser/url_blocklist_manager.h" #include "components/policy/core/common/local_test_policy_provider.h" @@ -162,8 +153,9 @@ #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_prefs.h" +#include "components/privacy_sandbox/tpcd_pref_names.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h" -#include "components/safe_browsing/content/common/file_type_policies_prefs.h" +#include "components/safe_browsing/buildflags.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/saved_tab_groups/public/pref_names.h" #include "components/search_engines/search_engine_choice/search_engine_choice_service.h" @@ -172,7 +164,10 @@ #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/on_device_translation/buildflags/buildflags.h" #include "components/sessions/core/session_id_generator.h" +#include "components/sharing_message/sharing_sync_preference.h" +#include "components/signin/core/browser/active_primary_accounts_metrics_recorder.h" #include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_prefs.h" #include "components/signin/public/identity_manager/identity_manager.h" @@ -192,6 +187,7 @@ #include "components/update_client/update_client.h" #include "components/variations/service/variations_service.h" #include "components/webui/chrome_urls/pref_names.h" +#include "components/webui/flags/pref_service_flags_storage.h" #include "content/public/browser/render_process_host.h" #include "extensions/buildflags/buildflags.h" #include "net/http/http_server_properties_manager.h" @@ -201,7 +197,7 @@ #include "rlz/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_BACKGROUND_MODE) -#include "chrome/browser/background/background_mode_manager.h" +#include "chrome/browser/background/extensions/background_mode_manager.h" #endif #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) @@ -223,7 +219,7 @@ #include "chrome/browser/ui/extensions/settings_api_bubble_helpers.h" #include "chrome/browser/ui/webui/extensions/extensions_ui.h" #include "extensions/browser/api/audio/audio_api.h" -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/ash/device_name/device_name_store.h" #include "chrome/browser/ash/extensions/extensions_permissions_tracker.h" #include "chrome/browser/ash/kerberos/kerberos_credentials_manager.h" @@ -236,12 +232,11 @@ #include "chrome/browser/ash/settings/stats_reporting_controller.h" #include "chrome/browser/ash/system_web_apps/apps/media_app/media_app_guest_ui_config.h" #include "chrome/browser/component_updater/metadata_table_chromeos.h" -#include "chrome/browser/extensions/api/shared_storage/shared_storage_private_api.h" #include "chrome/browser/ui/ash/projector/projector_app_client_impl.h" #include "chrome/browser/ui/webui/ash/edu_coexistence/edu_coexistence_login_handler.h" #include "chrome/browser/ui/webui/signin/ash/inline_login_handler_impl.h" #include "chromeos/ash/components/carrier_lock/carrier_lock_manager.h" -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #endif // BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_PDF) @@ -291,7 +286,6 @@ #include "chrome/browser/screen_ai/pref_names.h" #include "chrome/browser/search/background/ntp_custom_background_service.h" #include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service.h" -#include "chrome/browser/serial/serial_policy_allowed_ports.h" #include "chrome/browser/signin/signin_promo.h" #include "chrome/browser/task_manager/task_manager_interface.h" #include "chrome/browser/themes/theme_syncable_service.h" @@ -323,24 +317,6 @@ #endif #if BUILDFLAG(IS_CHROMEOS) -#include "chrome/browser/chromeos/extensions/echo_private/echo_private_api_util.h" -#include "chrome/browser/chromeos/extensions/login_screen/login/login_api_prefs.h" -#include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager_impl.h" -#include "chrome/browser/chromeos/reporting/metric_reporting_prefs.h" -#include "chrome/browser/extensions/api/document_scan/profile_prefs_registry_util.h" -#include "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_registry_util.h" -#include "chrome/browser/memory/oom_kills_monitor.h" -#include "chrome/browser/policy/annotations/blocklist_handler.h" -#include "chrome/browser/policy/system_features_disable_list_policy_handler.h" -#include "chrome/browser/ui/webui/certificates_handler.h" -#include "chromeos/ash/components/quickoffice/quickoffice_prefs.h" -#include "chromeos/ui/wm/fullscreen/pref_names.h" -#if BUILDFLAG(USE_CUPS) -#include "chrome/browser/extensions/api/printing/printing_api_handler.h" -#endif // BUILDFLAG(USE_CUPS) -#endif // BUILDFLAG(IS_CHROMEOS) - -#if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/constants/ash_pref_names.h" #include "ash/public/cpp/ash_prefs.h" #include "chrome/browser/apps/app_discovery_service/almanac_fetcher.h" @@ -399,6 +375,7 @@ #include "chrome/browser/ash/login/users/avatar/user_image_sync_observer.h" #include "chrome/browser/ash/net/ash_proxy_monitor.h" #include "chrome/browser/ash/net/network_throttling_observer.h" +#include "chrome/browser/ash/net/secure_dns_manager.h" #include "chrome/browser/ash/plugin_vm/plugin_vm_pref_names.h" #include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h" #include "chrome/browser/ash/policy/core/device_cloud_policy_manager_ash.h" @@ -425,13 +402,24 @@ #include "chrome/browser/ash/system/automatic_reboot_manager.h" #include "chrome/browser/ash/system/input_device_settings.h" #include "chrome/browser/ash/system_web_apps/apps/help_app/help_app_notification_controller.h" +#include "chrome/browser/ash/wallpaper_handlers/wallpaper_prefs.h" +#include "chrome/browser/chromeos/extensions/echo_private/echo_private_api_util.h" +#include "chrome/browser/chromeos/extensions/login_screen/login/login_api_prefs.h" +#include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager_impl.h" +#include "chrome/browser/chromeos/reporting/metric_reporting_prefs.h" #include "chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos.h" +#include "chrome/browser/extensions/api/document_scan/profile_prefs_registry_util.h" +#include "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_registry_util.h" #include "chrome/browser/extensions/extension_assets_manager_chromeos.h" #include "chrome/browser/media/protected_media_identifier_permission_context.h" +#include "chrome/browser/memory/oom_kills_monitor.h" #include "chrome/browser/metrics/chromeos_metrics_provider.h" +#include "chrome/browser/policy/annotations/blocklist_handler.h" +#include "chrome/browser/policy/system_features_disable_list_policy_handler.h" #include "chrome/browser/ui/ash/shelf/chrome_shelf_prefs.h" #include "chrome/browser/ui/webui/ash/login/enable_debugging_screen_handler.h" #include "chrome/browser/ui/webui/ash/settings/os_settings_ui.h" +#include "chrome/browser/ui/webui/certificates_handler.h" #include "chrome/browser/ui/webui/settings/reset_settings_handler.h" #include "chrome/browser/upgrade_detector/upgrade_detector_chromeos.h" #include "chromeos/ash/components/audio/audio_devices_pref_handler_impl.h" @@ -446,6 +434,7 @@ #include "chromeos/ash/components/network/network_metadata_store.h" #include "chromeos/ash/components/network/proxy/proxy_config_handler.h" #include "chromeos/ash/components/policy/restriction_schedule/device_restriction_schedule_controller.h" +#include "chromeos/ash/components/quickoffice/quickoffice_prefs.h" #include "chromeos/ash/components/report/report_controller.h" #include "chromeos/ash/components/scheduler_config/scheduler_configuration_manager.h" #include "chromeos/ash/components/timezone/timezone_resolver.h" @@ -457,11 +446,15 @@ #include "chromeos/ash/services/device_sync/public/cpp/device_sync_prefs.h" #include "chromeos/ash/services/multidevice_setup/multidevice_setup_service.h" #include "chromeos/components/quick_answers/public/cpp/quick_answers_prefs.h" +#include "chromeos/ui/wm/fullscreen/pref_names.h" #include "components/account_manager_core/chromeos/account_manager.h" #include "components/onc/onc_pref_names.h" // nogncheck #include "components/quirks/quirks_manager.h" #include "components/user_manager/user_manager_impl.h" -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(USE_CUPS) +#include "chrome/browser/extensions/api/printing/printing_api_handler.h" +#endif // BUILDFLAG(USE_CUPS) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_MAC) #include "chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h" @@ -488,30 +481,16 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif -// TODO(crbug.com/40118868): Revisit the macro expression once build flag switch -// of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -#include "chrome/browser/browser_switcher/browser_switcher_prefs.h" -#endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -#if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h" -#include "chrome/browser/lacros/account_manager/account_cache.h" -#include "chrome/browser/lacros/app_mode/kiosk_session_service_lacros.h" -#include "chrome/browser/lacros/lacros_prefs.h" -#include "chrome/browser/lacros/net/proxy_config_service_lacros.h" -#endif - -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) +#if BUILDFLAG(ENABLE_DICE_SUPPORT) #include "chrome/browser/ui/startup/first_run_service.h" #endif @@ -519,7 +498,7 @@ #include "chrome/browser/downgrade/downgrade_prefs.h" #endif -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/device_identity/device_oauth2_token_store_desktop.h" #include "chrome/browser/ui/startup/default_browser_prompt/default_browser_prompt.h" #endif @@ -538,10 +517,6 @@ #include "ui/color/system_theme.h" #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chrome/browser/ash/wallpaper_handlers/wallpaper_prefs.h" -#endif - #if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) #include "chrome/browser/on_device_translation/pref_names.h" #endif // BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) @@ -551,8 +526,12 @@ #endif #if BUILDFLAG(ENABLE_GLIC) -#include "chrome/browser/glic/glic_profile_configuration.h" -#include "chrome/browser/glic/launcher/glic_launcher_configuration.h" +#include "chrome/browser/background/glic/glic_launcher_configuration.h" +#include "chrome/browser/glic/glic_pref_names.h" +#endif + +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) +#include "components/safe_browsing/content/common/file_type_policies_prefs.h" #endif namespace { @@ -560,59 +539,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 02/2024. -#if BUILDFLAG(IS_ANDROID) -constexpr char kSavePasswordsSuspendedByError[] = - "profile.save_passwords_suspended_by_error"; -#endif -constexpr char kSafeBrowsingDeepScanPromptSeen[] = - "safebrowsing.deep_scan_prompt_seen"; -constexpr char kSafeBrowsingEsbEnabledTimestamp[] = - "safebrowsing.esb_enabled_timestamp"; - -#if BUILDFLAG(IS_MAC) -constexpr char kScreenTimeEnabled[] = "policy.screen_time"; -#endif - -// Deprecated 02/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) -constexpr std::array - kWelcomeTourTimeBucketsOfFirstInteractions = { - "ash.welcome_tour.interaction_time.ExploreApp.first_time_bucket", - "ash.welcome_tour.interaction_time.FilesApp.first_time_bucket", - "ash.welcome_tour.interaction_time.Launcher.first_time_bucket", - "ash.welcome_tour.interaction_time.QuickSettings.first_time_bucket", - "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"; // Deprecated 03/2024 constexpr char kOsCryptAppBoundFixedData2PrefName[] = "os_crypt.app_bound_fixed_data2"; @@ -621,25 +548,19 @@ constexpr char kOsCryptAppBoundFixedData3PrefName[] = "os_crypt.app_bound_fixed_data3"; #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) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 03/2024 constexpr char kOobeGuestAcceptedTos[] = "oobe.guest_accepted_tos"; -#endif // BUILDFLAG(IS_CHROMEOS_ASH) - -#if BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 04/2024 constexpr char kLastUploadedEuiccStatusPrefLegacy[] = "esim.last_upload_euicc_status"; -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Deprecated 03/2024. constexpr char kShowInternalAccessibilityTree[] = @@ -674,7 +595,7 @@ inline constexpr char kWebAppPreinstalledAppWindowExperiment[] = // Deprecated 04/2024. inline constexpr char kDIPSTimerLastUpdate[] = "dips_timer_last_update"; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 04/2024 constexpr char kMetricsUserInheritOwnerConsent[] = "metrics.user_inherit_owner_consent"; @@ -684,7 +605,7 @@ constexpr char kGlanceablesEnabled[] = "ash.glanceables_enabled"; // A preference to keep track of the device registered time. constexpr char kDeviceRegisteredTime[] = "DeviceRegisteredTime"; constexpr char kArcKioskDictionaryName[] = "arc-kiosk"; -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_ANDROID) // Deprecated 05/2024 @@ -700,7 +621,7 @@ inline constexpr char kHasShownRefreshWhatsNew[] = "browser.has_shown_refresh_2023_whats_new"; #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 05/2024 // A boolean pref which determines if you can pause mouse keys with a // keyboard shortcut. @@ -714,7 +635,7 @@ inline constexpr char kAccessibilityMouseKeysDisableInTextFields[] = // the text input focus. inline constexpr char kAccessibilityScreenMagnifierCenterFocus[] = "settings.a11y.screen_magnifier_center_focus"; -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Deprecated 05/2024. constexpr char kBlockTruncatedCookies[] = "profile.cookie_block_truncated"; @@ -756,7 +677,7 @@ inline constexpr char kTrackingProtectionOffboardedSince[] = inline constexpr char kTrackingProtectionOffboardingAckAction[] = "tracking_protection.tracking_protection_offboarding_ack_action"; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 06/2024. constexpr std::array kHoldingSpaceWallpaperNudgeTimesOfFirstInteraction = { @@ -816,7 +737,7 @@ constexpr char kDefaultSearchProviderChoicePending[] = "default_search_provider.engine_choice_pending"; // Deprecated 07/2024 -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) +#if BUILDFLAG(ENABLE_DICE_SUPPORT) inline constexpr char kFirstRunStudyGroup[] = "browser.first_run_study_group"; #endif @@ -841,19 +762,13 @@ constexpr char kDismissedTabsPrefName[] = "NewTabPage.TabResumption.DismissedTabs"; #endif +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 07/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) constexpr char kAppDeduplicationServiceLastGetTimestamp[] = "apps.app_deduplication_service.last_get_data_from_server_timestamp"; -#endif - -// Deprecated 07/2024 -#if BUILDFLAG(IS_CHROMEOS_ASH) +// Deprecated 07/2024. constexpr char kShowTunaScreenEnabled[] = "ash.tuna_screen_oobe_enabled"; -#endif - -// Deprecated 08/2024 -#if BUILDFLAG(IS_CHROMEOS) +// Deprecated 08/2024. inline constexpr char kStandaloneWindowMigrationNudgeShown[] = "standalone_window_migration_nudge_shown"; #endif @@ -880,7 +795,7 @@ constexpr char kSafeBrowsingEsbOptInWithFriendlierSettings[] = "safebrowsing.esb_opt_in_with_friendlier_settings"; // Deprecated 08/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) constexpr char kDeviceDMTokenV1[] = "device_dm_token"; constexpr char kDeviceDMTokenV2[] = "device_dm_token_v2"; #endif @@ -899,7 +814,7 @@ constexpr char kSyncPasswordLengthAndHashSalt[] = "profile.sync_password_length_and_hash_salt"; // Deprecated 09/2024 -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) constexpr char kDemoModeResourcesRemoved[] = "demo_mode_resources_removed"; constexpr char kAccumulatedUsagePref[] = "demo_mode_resources_remover.accumulated_device_usage_s"; @@ -971,13 +886,13 @@ inline constexpr char kWhatsNewHatsActivationThreshold[] = const char kModelExecutionMainToggleSettingState[] = "optimization_guide.model_execution_main_toggle_setting_state"; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 10/2024 // An integer pref which determines how much FaceGaze should smooth cursor // movements. inline constexpr char kAccessibilityFaceGazeCursorSmoothing[] = "settings.a11y.face_gaze.cursor_smoothing"; -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Deprecated 10/2024. const char kBeforeunloadEventCancelByPreventDefaultEnabled[] = @@ -986,7 +901,7 @@ const char kBeforeunloadEventCancelByPreventDefaultEnabled[] = // Deprecated 10/2024. inline constexpr char kDocumentSuggestEnabled[] = "documentsuggest.enabled"; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 10/2024 inline constexpr char kWallpaperSeaPenMigrationStatus[] = "ash.wallpaper.sea_pen.migration_status"; @@ -1081,7 +996,7 @@ inline constexpr char kQuietNotificationPermissionUiEnablingMethod[] = "profile.content_settings.enable_quiet_permission_ui_enabling_method." "notifications"; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 11/2024 inline constexpr char kHatsPrivacyHubPostLaunchIsSelected[] = "hats_privacy_hub_postlaunch_is_selected"; @@ -1095,7 +1010,7 @@ inline constexpr char kDeleteTimePeriodV2[] = inline constexpr char kDeleteTimePeriodV2Basic[] = "browser.clear_data.time_period_v2_basic"; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 12/2024 inline const char kCryptAuthDeviceSyncIsRecoveringFromFailure[] = "cryptauth.device_sync.is_recovering_from_failure"; @@ -1141,21 +1056,43 @@ inline constexpr char kUsedPolicyCertificates[] = inline constexpr char kUserAgentClientHintsGREASEUpdateEnabled[] = "policy.user_agent_client_hints_grease_update_enabled"; +// Deprecated 02/2025. +inline constexpr char kDefaultSearchProviderKeywordsUseExtendedList[] = + "default_search_provider.keywords_use_extended_list"; + +#if BUILDFLAG(IS_ANDROID) +// Deprecated 2/2025. +inline constexpr char kLocalPasswordsMigrationWarningShownTimestamp[] = + "local_passwords_migration_warning_shown_timestamp"; +inline constexpr char kLocalPasswordMigrationWarningShownAtStartup[] = + "local_passwords_migration_warning_shown_at_startup"; +#endif // BUILDFLAG(IS_ANDROID) + +#if BUILDFLAG(IS_CHROMEOS) +// Deprecated 2/2025. +inline constexpr char kLiveCaptionUserMicrophoneEnabled[] = + "accessibility.captions.user_microphone_captioning_enabled"; +inline constexpr char kUserMicrophoneCaptionLanguageCode[] = + "accessibility.captions.user_microphone_language_code"; +#endif // BUILDFLAG(IS_CHROMEOS) + +#if BUILDFLAG(IS_CHROMEOS) +// Deprecated 02/2025. +constexpr char kScannerFeedbackEnabled[] = "ash.scanner.feedback_enabled"; +constexpr char kHmrFeedbackAllowed[] = "settings.mahi_feedback_allowed"; +constexpr char kSharedStorage[] = "shared_storage"; +#endif // BUILDFLAG(IS_CHROMEOS) + +#if BUILDFLAG(IS_ANDROID) +// Deprecated 02/2025. +inline constexpr char kRootSecretPrefName[] = + "webauthn.authenticator_root_secret"; +#endif // BUILDFLAG(IS_ANDROID) + // Register local state used only for migration (clearing or moving to a new // key). void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) { - // Deprecated 02/2024 -#if BUILDFLAG(IS_MAC) - registry->RegisterBooleanPref(kScreenTimeEnabled, true); -#endif - - // Deprecated 02/2024. - registry->RegisterFilePathPref(kSearchEnginesChoiceProfile, base::FilePath()); - #if BUILDFLAG(IS_WIN) - // Deprecated 02/2024. - registry->RegisterStringPref(kOsCryptAppBoundFixedDataPrefName, - std::string()); // Deprecated 03/2024. registry->RegisterStringPref(kOsCryptAppBoundFixedData2PrefName, std::string()); @@ -1164,19 +1101,17 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) { std::string()); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 03/2024. registry->RegisterBooleanPref(kOobeGuestAcceptedTos, false); // Deprecated 05/2024. registry->RegisterTimePref(kDeviceRegisteredTime, base::Time()); registry->RegisterDictionaryPref(kArcKioskDictionaryName); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) -// Deprecated 04/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) + // Deprecated 04/2024. registry->RegisterDictionaryPref(kLastUploadedEuiccStatusPrefLegacy); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_ANDROID) // Deprecated 05/2024. @@ -1188,28 +1123,23 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) { registry->RegisterBooleanPref(kHasShownRefreshWhatsNew, false); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 06/2024. registry->RegisterBooleanPref(kLocalUserFilesMigrationEnabled, false); #endif -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) + +#if BUILDFLAG(ENABLE_DICE_SUPPORT) // Deprecated 07/2024. registry->RegisterStringPref(kFirstRunStudyGroup, std::string()); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 08/2024. registry->RegisterStringPref(kDeviceDMTokenV1, std::string()); registry->RegisterStringPref(kDeviceDMTokenV2, std::string()); -#endif - -#if BUILDFLAG(IS_CHROMEOS_ASH) - // Deprecated 08/2024. registry->RegisterBooleanPref(kDemoModeResourcesRemoved, false); registry->RegisterIntegerPref(kAccumulatedUsagePref, 0); -#endif -#if BUILDFLAG(IS_CHROMEOS) // Deprecated 10/2024. registry->RegisterIntegerPref(kMigrationStep, 0); registry->RegisterDictionaryPref(kMoveMigrationResumeStepPref); @@ -1251,6 +1181,11 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) { // Deprecated 02/2025. registry->RegisterBooleanPref(kUserAgentClientHintsGREASEUpdateEnabled, true); + +#if BUILDFLAG(IS_ANDROID) + // Deprecated 02/2025. + registry->RegisterStringPref(kRootSecretPrefName, std::string()); +#endif // BUILDFLAG(IS_ANDROID) } // Register prefs used only for migration (clearing or moving to a new key). @@ -1258,37 +1193,6 @@ void RegisterProfilePrefsForMigration( user_prefs::PrefRegistrySyncable* registry) { chrome_browser_net::secure_dns::RegisterProbesSettingBackupPref(registry); - // Deprecated 02/2024. -#if BUILDFLAG(IS_ANDROID) - registry->RegisterBooleanPref(kSavePasswordsSuspendedByError, false); -#endif - registry->RegisterBooleanPref(kSafeBrowsingDeepScanPromptSeen, false); - registry->RegisterTimePref(kSafeBrowsingEsbEnabledTimestamp, base::Time()); - -// Deprecated 02/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) - 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()); @@ -1321,7 +1225,7 @@ void RegisterProfilePrefsForMigration( // Deprecated 04/2024. registry->RegisterTimePref(kDIPSTimerLastUpdate, base::Time()); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 04/2024. registry->RegisterBooleanPref(kMetricsUserInheritOwnerConsent, true); registry->RegisterBooleanPref(kGlanceablesEnabled, true); @@ -1332,7 +1236,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterBooleanPref(kAccessibilityMouseKeysDisableInTextFields, true); registry->RegisterBooleanPref(kAccessibilityScreenMagnifierCenterFocus, true); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Deprecated 05/2024. registry->RegisterBooleanPref(kBlockTruncatedCookies, true); @@ -1369,7 +1273,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterTimePref(kTrackingProtectionOffboardedSince, base::Time()); registry->RegisterIntegerPref(kTrackingProtectionOffboardingAckAction, 0); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 06/2024. for (const char* pref : kHoldingSpaceWallpaperNudgeTimesOfFirstInteraction) { registry->RegisterTimePref(pref, base::Time()); @@ -1394,7 +1298,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterBooleanPref(kBirchUseLastActive, true); registry->RegisterBooleanPref(kBirchUseMostVisited, true); registry->RegisterBooleanPref(kBirchUseSelfShare, true); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Deprecated 06/2024. registry->RegisterBooleanPref(kDefaultSearchProviderChoicePending, false); @@ -1416,21 +1320,15 @@ void RegisterProfilePrefsForMigration( registry->RegisterListPref(kDismissedTabsPrefName); #endif +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 07/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) registry->RegisterTimePref(kAppDeduplicationServiceLastGetTimestamp, base::Time()); -#endif - -#if BUILDFLAG(IS_CHROMEOS_ASH) - // Deprecated 07/2024. registry->RegisterBooleanPref(kShowTunaScreenEnabled, true); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) -// Deprecated 08/2024 -#if BUILDFLAG(IS_CHROMEOS) + // Deprecated 08/2024 registry->RegisterBooleanPref(kStandaloneWindowMigrationNudgeShown, false); -#endif +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) // All of these were deprecated 08/2024. @@ -1489,15 +1387,9 @@ void RegisterProfilePrefsForMigration( // Deprecated 10/2024 #if BUILDFLAG(IS_CHROMEOS) registry->RegisterBooleanPref(kLacrosSecondaryProfilesAllowed, true); -#endif // BUILDFLAG(IS_CHROMEOS) - -#if BUILDFLAG(IS_CHROMEOS_ASH) - // Deprecated 10/2024 registry->RegisterIntegerPref(kAccessibilityFaceGazeCursorSmoothing, 7); - - // Deprecated 10/2024 registry->RegisterIntegerPref(kWallpaperSeaPenMigrationStatus, 0); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // Deprecated 10/2024 registry->RegisterBooleanPref(kLiveCaptionBubblePinned, false); @@ -1563,7 +1455,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterIntegerPref(kQuietNotificationPermissionUiEnablingMethod, 0); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 11/2024 registry->RegisterBooleanPref(kHatsPrivacyHubPostLaunchIsSelected, false); registry->RegisterInt64Pref(kHatsPrivacyHubPostLaunchCycleEndTs, 0); @@ -1573,7 +1465,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterIntegerPref(kDeleteTimePeriodV2, -1); registry->RegisterIntegerPref(kDeleteTimePeriodV2Basic, -1); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 12/2024 registry->RegisterDoublePref(kCryptAuthDeviceSyncLastSyncTimeSeconds, 0.0); registry->RegisterBooleanPref(kCryptAuthDeviceSyncIsRecoveringFromFailure, @@ -1609,6 +1501,31 @@ void RegisterProfilePrefsForMigration( // Deprecated 01/2025. registry->RegisterBooleanPref(kUsedPolicyCertificates, false); #endif // BUILDFLAG(IS_CHROMEOS) + + // Deprecated 02/2025. + registry->RegisterBooleanPref(kDefaultSearchProviderKeywordsUseExtendedList, + false); + +#if BUILDFLAG(IS_ANDROID) + // Deprecated 02/2025. + registry->RegisterTimePref(kLocalPasswordsMigrationWarningShownTimestamp, + base::Time()); + registry->RegisterBooleanPref(kLocalPasswordMigrationWarningShownAtStartup, + false); +#endif // BUILDFLAG(IS_ANDROID) + +#if BUILDFLAG(IS_CHROMEOS) + // Deprecated 02/2025. + registry->RegisterBooleanPref(kLiveCaptionUserMicrophoneEnabled, false); + registry->RegisterStringPref(kUserMicrophoneCaptionLanguageCode, ""); +#endif // BUILDFLAG(IS_CHROMEOS) + +#if BUILDFLAG(IS_CHROMEOS) + // Deprecated 02/2025. + registry->RegisterBooleanPref(kScannerFeedbackEnabled, true); + registry->RegisterBooleanPref(kHmrFeedbackAllowed, true); + registry->RegisterDictionaryPref(kSharedStorage); +#endif // BUILDFLAG(IS_CHROMEOS) } } // namespace @@ -1677,8 +1594,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { secure_origin_allowlist::RegisterPrefs(registry); segmentation_platform::SegmentationPlatformService::RegisterLocalStatePrefs( registry); -#if !BUILDFLAG(IS_ANDROID) SerialPolicyAllowedPorts::RegisterPrefs(registry); +#if !BUILDFLAG(IS_ANDROID) HidPolicyAllowedDevices::RegisterLocalStatePrefs(registry); #endif sessions::SessionIdGenerator::RegisterPrefs(registry); @@ -1750,11 +1667,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { WhatsNewUI::RegisterLocalStatePrefs(registry); #endif -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) +#if BUILDFLAG(ENABLE_DICE_SUPPORT) FirstRunService::RegisterLocalStatePrefs(registry); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) arc::prefs::RegisterLocalStatePrefs(registry); ChromeOSMetricsProvider::RegisterPrefs(registry); ash::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry); @@ -1828,9 +1745,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) { quirks::QuirksManager::RegisterPrefs(registry); UpgradeDetectorChromeos::RegisterPrefs(registry); RegisterNearbySharingLocalPrefs(registry); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) - -#if BUILDFLAG(IS_CHROMEOS) chromeos::echo_offer::RegisterPrefs(registry); memory::OOMKillsMonitor::RegisterPrefs(registry); policy::SystemFeaturesDisableListPolicyHandler::RegisterPrefs(registry); @@ -1849,12 +1763,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) { false); #endif -#if BUILDFLAG(IS_CHROMEOS_LACROS) - AccountCache::RegisterLocalStatePrefs(registry); - lacros_prefs::RegisterLocalStatePrefs(registry); - KioskSessionServiceLacros::RegisterLocalStatePrefs(registry); -#endif - #if BUILDFLAG(IS_WIN) OSCrypt::RegisterLocalPrefs(registry); registry->RegisterBooleanPref(prefs::kRendererCodeIntegrityEnabled, true); @@ -1882,9 +1790,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) { #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) RegisterDefaultBrowserPromptPrefs(registry); -#endif - -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry); #endif @@ -1967,7 +1872,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, DownloadPrefs::RegisterProfilePrefs(registry); fingerprinting_protection_filter::prefs::RegisterProfilePrefs(registry); #if BUILDFLAG(ENABLE_GLIC) - glic::GlicProfileConfiguration::RegisterProfilePrefs(registry); + glic::prefs::RegisterProfilePrefs(registry); #endif permissions::PermissionHatsTriggerHelper::RegisterProfilePrefs(registry); history_clusters::prefs::RegisterProfilePrefs(registry); @@ -2014,12 +1919,15 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, PushMessagingAppIdentifier::RegisterProfilePrefs(registry); QuietNotificationPermissionUiState::RegisterProfilePrefs(registry); RegisterBrowserUserPrefs(registry); + RegisterGeminiSettingsPrefs(registry); RegisterPrefersDefaultScrollbarStylesPrefs(registry); RegisterSafetyHubProfilePrefs(registry); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) settings::ResetSettingsHandler::RegisterProfilePrefs(registry); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) safe_browsing::file_type::RegisterProfilePrefs(registry); +#endif safe_browsing::RegisterProfilePrefs(registry); SearchPrefetchService::RegisterProfilePrefs(registry); blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs( @@ -2063,9 +1971,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, RegisterAnimationPolicyPrefs(registry); extensions::ActivityLog::RegisterProfilePrefs(registry); extensions::AudioAPI::RegisterUserPrefs(registry); -#if BUILDFLAG(IS_CHROMEOS_ASH) - extensions::shared_storage::RegisterProfilePrefs(registry); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) // TODO(devlin): This would be more inline with the other calls here if it // were nested in either a class or separate namespace with a simple // Register[Profile]Prefs() name. @@ -2181,9 +2086,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #if BUILDFLAG(USE_CUPS) extensions::PrintingAPIHandler::RegisterProfilePrefs(registry); #endif // BUILDFLAG(USE_CUPS) -#endif // BUILDFLAG(IS_CHROMEOS) - -#if BUILDFLAG(IS_CHROMEOS_ASH) app_list::AppListSyncableService::RegisterProfilePrefs(registry); apps::AlmanacFetcher::RegisterProfilePrefs(registry); apps::AppPlatformMetricsService::RegisterProfilePrefs(registry); @@ -2265,15 +2167,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, ChromeMediaAppGuestUIDelegate::RegisterProfilePrefs(registry); ash::boca::RegisterOnTaskProfilePrefs(registry); ash::boca::BabelOrcaManager::RegisterProfilePrefs(registry); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) - -#if BUILDFLAG(IS_CHROMEOS_LACROS) - lacros_prefs::RegisterProfilePrefs(registry); - chromeos::ProxyConfigServiceLacros::RegisterProfilePrefs(registry); - lacros_prefs::RegisterExtensionControlledAshPrefs(registry); - KioskSessionServiceLacros::RegisterProfilePrefs(registry); - apps::WebsiteMetricsServiceLacros::RegisterProfilePrefs(registry); -#endif +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) CdmPrefServiceHelper::RegisterProfilePrefs(registry); @@ -2282,17 +2176,17 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // BUILDFLAG(IS_CHROMEOS_ASH) + // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); enterprise_signin::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(ENABLE_EXTENSIONS) && !BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(ENABLE_EXTENSIONS) && !BUILDFLAG(IS_CHROMEOS) preinstalled_apps::RegisterProfilePrefs(registry); #endif @@ -2313,13 +2207,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, registry->RegisterBooleanPref(prefs::kLensDesktopNTPSearchEnabled, true); #endif + registry->RegisterListPref( + webauthn::pref_names::kRemoteDesktopAllowedOrigins); + #if !BUILDFLAG(IS_ANDROID) registry->RegisterBooleanPref( webauthn::pref_names::kRemoteProxiedRequestsAllowed, false); - registry->RegisterListPref( - webauthn::pref_names::kRemoteDesktopAllowedOrigins); - registry->RegisterStringPref( webauthn::pref_names::kLastUsedPairingFromSyncPublicKey, ""); @@ -2390,7 +2284,7 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #if BUILDFLAG(IS_ANDROID) ::android::RegisterUserProfilePrefs(registry); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) ash::RegisterUserProfilePrefs(registry, locale); ash::TokenHandleFetcher::RegisterPrefs(registry); #endif @@ -2400,7 +2294,11 @@ void RegisterScreenshotPrefs(PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kDisableScreenshots, false); } -#if BUILDFLAG(IS_CHROMEOS_ASH) +void RegisterGeminiSettingsPrefs(user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterIntegerPref(prefs::kGeminiSettings, 0); +} + +#if BUILDFLAG(IS_CHROMEOS) void RegisterSigninProfilePrefs(user_prefs::PrefRegistrySyncable* registry, std::string_view country) { RegisterProfilePrefs(registry, g_browser_process->GetApplicationLocale()); @@ -2422,36 +2320,24 @@ 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 02/2024 -#if BUILDFLAG(IS_MAC) - local_state->ClearPref(kScreenTimeEnabled); -#endif - - // Added 02/2024 - local_state->ClearPref(kSearchEnginesChoiceProfile); - #if BUILDFLAG(IS_WIN) - // Deprecated 02/2024. - local_state->ClearPref(kOsCryptAppBoundFixedDataPrefName); // Deprecated 03/2024. local_state->ClearPref(kOsCryptAppBoundFixedData2PrefName); // Deprecated 06/2024. local_state->ClearPref(kOsCryptAppBoundFixedData3PrefName); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Added 03/2024. local_state->ClearPref(kOobeGuestAcceptedTos); // Added 05/2024. local_state->ClearPref(kDeviceRegisteredTime); local_state->ClearPref(kArcKioskDictionaryName); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) -// Added 04/2024 . -#if BUILDFLAG(IS_CHROMEOS_ASH) + // Added 04/2024. local_state->ClearPref(kLastUploadedEuiccStatusPrefLegacy); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_ANDROID) // Added 05/2024. @@ -2464,29 +2350,23 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) { #endif // Added 06/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) local_state->ClearPref(kLocalUserFilesMigrationEnabled); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) +#if BUILDFLAG(ENABLE_DICE_SUPPORT) // Added 07/2024. local_state->ClearPref(kFirstRunStudyGroup); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Added 08/2024. local_state->ClearPref(kDeviceDMTokenV1); local_state->ClearPref(kDeviceDMTokenV2); -#endif - -// Added 08/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) local_state->ClearPref(kDemoModeResourcesRemoved); local_state->ClearPref(kAccumulatedUsagePref); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) -// Added 10/2024 -#if BUILDFLAG(IS_CHROMEOS) + // Added 10/2024. local_state->ClearPref(kMigrationStep); local_state->ClearPref(kMoveMigrationResumeStepPref); local_state->ClearPref(kMoveMigrationResumeCountPref); @@ -2530,6 +2410,16 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) { // Added 02/2025. local_state->ClearPref(kUserAgentClientHintsGREASEUpdateEnabled); + // Added 02/2025 +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) + local_state->ClearPref(prefs::kDefaultBrowserPromptRefreshStudyGroup); +#endif + + // Added 02/2025 +#if BUILDFLAG(IS_ANDROID) + local_state->ClearPref(kRootSecretPrefName); +#endif // BUILDFLAG(IS_ANDROID) + // Please don't delete the following line. It is used by PRESUBMIT.py. // END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS @@ -2582,34 +2472,6 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_path); #endif - // Added 02/2024 - profile_prefs->ClearPref(kSafeBrowsingDeepScanPromptSeen); - profile_prefs->ClearPref(kSafeBrowsingEsbEnabledTimestamp); - - // 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); @@ -2639,7 +2501,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, // Added 04/2024. profile_prefs->ClearPref(kDIPSTimerLastUpdate); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Added 04/2024. profile_prefs->ClearPref(kMetricsUserInheritOwnerConsent); profile_prefs->ClearPref(kGlanceablesEnabled); @@ -2648,7 +2510,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kAccessibilityMouseKeysShortcutToPauseEnabled); profile_prefs->ClearPref(kAccessibilityMouseKeysDisableInTextFields); profile_prefs->ClearPref(kAccessibilityScreenMagnifierCenterFocus); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Added 05/2024. profile_prefs->ClearPref(kBlockTruncatedCookies); @@ -2681,7 +2543,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kTrackingProtectionOffboardedSince); profile_prefs->ClearPref(kTrackingProtectionOffboardingAckAction); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Added 06/2024. for (const char* pref : kHoldingSpaceWallpaperNudgeTimesOfFirstInteraction) { profile_prefs->ClearPref(pref); @@ -2703,7 +2565,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kBirchUseLastActive); profile_prefs->ClearPref(kBirchUseMostVisited); profile_prefs->ClearPref(kBirchUseSelfShare); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_ANDROID) // Added 06/2024. @@ -2733,18 +2595,12 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kDismissedTabsPrefName); #endif - // Added 07/2024. -#if BUILDFLAG(IS_CHROMEOS_ASH) - profile_prefs->ClearPref(kAppDeduplicationServiceLastGetTimestamp); -#endif - -#if BUILDFLAG(IS_CHROMEOS_ASH) - // Added 07/2024. - profile_prefs->ClearPref(kShowTunaScreenEnabled); -#endif - -// Added 08/2024 #if BUILDFLAG(IS_CHROMEOS) + // Added 07/2024. + profile_prefs->ClearPref(kAppDeduplicationServiceLastGetTimestamp); + profile_prefs->ClearPref(kShowTunaScreenEnabled); + + // Added 08/2024. profile_prefs->ClearPref(kStandaloneWindowMigrationNudgeShown); #endif @@ -2807,15 +2663,9 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, // Added 10/2024 #if BUILDFLAG(IS_CHROMEOS) profile_prefs->ClearPref(kLacrosSecondaryProfilesAllowed); -#endif // BUILDFLAG(IS_CHROMEOS) - -#if BUILDFLAG(IS_CHROMEOS_ASH) - // Added 10/2024 profile_prefs->ClearPref(kAccessibilityFaceGazeCursorSmoothing); - - // Added 10/2024 profile_prefs->ClearPref(kWallpaperSeaPenMigrationStatus); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_CHROMEOS) // Added 10/2024 profile_prefs->ClearPref(kLiveCaptionBubblePinned); @@ -2873,7 +2723,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kQuietNotificationPermissionShouldShowPromo); profile_prefs->ClearPref(kQuietNotificationPermissionUiEnablingMethod); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Added 11/2024 profile_prefs->ClearPref(kHatsPrivacyHubPostLaunchIsSelected); profile_prefs->ClearPref(kHatsPrivacyHubPostLaunchCycleEndTs); @@ -2883,7 +2733,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kDeleteTimePeriodV2); profile_prefs->ClearPref(kDeleteTimePeriodV2Basic); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // Deprecated 12/2024 profile_prefs->ClearPref(kCryptAuthDeviceSyncLastSyncTimeSeconds); profile_prefs->ClearPref(kCryptAuthDeviceSyncIsRecoveringFromFailure); @@ -2918,6 +2768,28 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs, profile_prefs->ClearPref(kUsedPolicyCertificates); #endif // BUILDFLAG(IS_CHROMEOS) + // Added 02/2025. + profile_prefs->ClearPref(kDefaultSearchProviderKeywordsUseExtendedList); + +#if BUILDFLAG(IS_ANDROID) + // Added 02/2025. + profile_prefs->ClearPref(kLocalPasswordsMigrationWarningShownTimestamp); + profile_prefs->ClearPref(kLocalPasswordMigrationWarningShownAtStartup); +#endif // BUILDFLAG(IS_ANDROID) + +#if BUILDFLAG(IS_CHROMEOS) + // Deprecated 02/2025. + profile_prefs->ClearPref(kLiveCaptionUserMicrophoneEnabled); + profile_prefs->ClearPref(kUserMicrophoneCaptionLanguageCode); +#endif // BUILDFLAG(IS_CHROMEOS) + +#if BUILDFLAG(IS_CHROMEOS) + // Added 02/2025. + profile_prefs->ClearPref(kScannerFeedbackEnabled); + profile_prefs->ClearPref(kHmrFeedbackAllowed); + profile_prefs->ClearPref(kSharedStorage); +#endif // BUILDFLAG(IS_CHROMEOS) + // Please don't delete the following line. It is used by PRESUBMIT.py. // END_MIGRATE_OBSOLETE_PROFILE_PREFS diff --git a/tools/under-control/src/chrome/browser/ui/tab_helpers.cc b/tools/under-control/src/chrome/browser/ui/tab_helpers.cc index 2d39a00a..605c712f 100755 --- a/tools/under-control/src/chrome/browser/ui/tab_helpers.cc +++ b/tools/under-control/src/chrome/browser/ui/tab_helpers.cc @@ -59,13 +59,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_key.h" #include "chrome/browser/resource_coordinator/tab_helper.h" -#include "chrome/browser/safe_browsing/chrome_password_reuse_detection_manager_client.h" -#include "chrome/browser/safe_browsing/chrome_safe_browsing_tab_observer_delegate.h" #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.h" -#include "chrome/browser/safe_browsing/safe_browsing_service.h" -#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/sessions/session_tab_helper_factory.h" #include "chrome/browser/site_protection/site_protection_metrics_observer.h" #include "chrome/browser/ssl/chrome_security_blocking_page_factory.h" @@ -145,7 +139,6 @@ #include "components/permissions/permission_request_manager.h" #include "components/safe_browsing/content/browser/async_check_tracker.h" #include "components/safe_browsing/content/browser/safe_browsing_navigation_observer.h" -#include "components/safe_browsing/content/browser/safe_browsing_tab_observer.h" #include "components/safe_browsing/core/common/features.h" #include "components/search/ntp_features.h" #include "components/site_engagement/content/site_engagement_helper.h" @@ -184,6 +177,7 @@ #include "chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_android.h" #include "components/facilitated_payments/core/features/features.h" #include "components/fingerprinting_protection_filter/common/fingerprinting_protection_filter_features.h" +#include "components/ip_protection/common/ip_protection_status.h" #include "components/sensitive_content/android/android_sensitive_content_client.h" #include "components/sensitive_content/features.h" #include "components/webapps/browser/android/app_banner_manager_android.h" @@ -279,6 +273,16 @@ #include "components/tpcd/enterprise_reporting/enterprise_reporting_tab_helper.h" #endif +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) +#include "chrome/browser/safe_browsing/chrome_password_reuse_detection_manager_client.h" +#include "chrome/browser/safe_browsing/chrome_safe_browsing_tab_observer_delegate.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" +#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 "components/safe_browsing/content/browser/safe_browsing_tab_observer.h" +#endif + using content::WebContents; namespace { @@ -355,6 +359,11 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { TrackingProtectionSettingsFactory::GetForProfile(profile), profile->IsIncognitoProfile()); } + + // Only create the IpProtectionStatus if the User Bypass feature is enabled. + if (net::features::kIpPrivacyEnableUserBypass.Get()) { + ip_protection::IpProtectionStatus::CreateForWebContents(web_contents); + } #endif // BUILDFLAG(IS_ANDROID) if (breadcrumbs::IsEnabled(g_browser_process->local_state())) { BreadcrumbManagerTabHelper::CreateForWebContents(web_contents); @@ -366,7 +375,9 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { if (!autofill_client_provider.uses_platform_autofill()) { ChromePasswordManagerClient::CreateForWebContents(web_contents); } +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) ChromePasswordReuseDetectionManagerClient::CreateForWebContents(web_contents); +#endif CreateSubresourceFilterWebContentsHelper(web_contents); #if BUILDFLAG(ENABLE_RLZ) ChromeRLZTrackerWebContentsObserver::CreateForWebContentsIfNeeded( @@ -486,14 +497,17 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { // See https://crbug.com/910288. resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents( web_contents); +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents( web_contents, HostContentSettingsMapFactory::GetForProfile(profile), safe_browsing::SafeBrowsingNavigationObserverManagerFactory:: GetForBrowserContext(profile), profile->GetPrefs(), g_browser_process->safe_browsing_service()); +#endif site_protection::SiteProtectionMetricsObserver::CreateForWebContents( web_contents); +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) if (base::FeatureList::IsEnabled( safe_browsing::kTailoredSecurityIntegration)) { safe_browsing::TailoredSecurityUrlObserver::CreateForWebContents( @@ -515,6 +529,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { std::make_unique()); safe_browsing::TriggerCreator::MaybeCreateTriggersForWebContents( profile, web_contents); +#endif // BUILDFLAG(SAFE_BROWSING_AVAILABLE) SafetyTipWebContentsObserver::CreateForWebContents(web_contents); SearchEngineTabHelper::CreateForWebContents(web_contents); if (site_engagement::SiteEngagementService::IsEnabled()) { diff --git a/tools/under-control/src/chrome/common/extensions/api/accessibility_service_private.idl b/tools/under-control/src/chrome/common/extensions/api/accessibility_service_private.idl index 9d07f08e..ef335e0e 100755 --- a/tools/under-control/src/chrome/common/extensions/api/accessibility_service_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/accessibility_service_private.idl @@ -5,7 +5,7 @@ // API which provides support for ChromeOS Accessibility features in the // browser. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/accessibility_service_private/accessibility_service_private.h"] namespace accessibilityServicePrivate { diff --git a/tools/under-control/src/chrome/common/extensions/api/autofill_private.idl b/tools/under-control/src/chrome/common/extensions/api/autofill_private.idl index a0abd0a1..e40fb534 100755 --- a/tools/under-control/src/chrome/common/extensions/api/autofill_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/autofill_private.idl @@ -134,6 +134,16 @@ namespace autofillPrivate { LOYALTY_MEMBERSHIP_PROGRAM, LOYALTY_MEMBERSHIP_PROVIDER, LOYALTY_MEMBERSHIP_ID, + VEHICLE_OWNER_TAG, + VEHICLE_LICENSE_PLATE, + VEHICLE_VIN, + VEHICLE_MAKE, + VEHICLE_MODEL, + DRIVERS_LICENSE_NAME_TAG, + DRIVERS_LICENSE_REGION, + DRIVERS_LICENSE_NUMBER, + DRIVERS_LICENSE_EXPIRATION_DATE_TAG, + DRIVERS_LICENSE_ISSUE_DATE_TAG, MAX_VALID_FIELD_TYPE }; @@ -308,14 +318,86 @@ namespace autofillPrivate { AutofillMetadata? metadata; }; - // User annotations entry data. Corresponds to the eponymous message from - // components/optimization_guide/proto/features/common_quality_data.proto. - dictionary UserAnnotationsEntry { - long entryId; - DOMString key; + // Contains the attribute type name and other relevant information about the + // attribute type. It is part of the `EntityInstance` API. + dictionary AttributeType { + // Contains the value of an `AttributeTypeName` on the C++ side. + long typeName; + // The type name as a human readable string. + DOMString typeNameAsString; + }; + + // Contains the entity type name and other relevant information about the + // entity type. It is part of the `EntityInstance` API. + dictionary EntityType { + // Contains the value of an `EntityTypeName` on the C++ side. + long typeName; + // The type name as a human readable string. + DOMString typeNameAsString; + // The i18n string representation of "Add ". Used in the entity + // adding settings UI. The string cannot be constructed dynamically, + // because the entity string might need declension in some languages. + DOMString addEntityString; + // The i18n string representation of "Edit ". Used in the entity + // editing settings UI. The string cannot be constructed dynamically, + // because the entity string might need declension in some languages. + DOMString editEntityString; + }; + + // An attribute instance is a typed string value with additional metadata. + // It is associated with an `EntityInstance`. + dictionary AttributeInstance { + // Contains the attribute type name and other relevant information about the + // attribute type. + AttributeType type; + // The attribute value. DOMString value; }; + // An entity instance entry which can be saved in the "Autofill with AI" + // section of the settings UI. + dictionary EntityInstance { + // Contains the entity type name and other relevant information about the + // entity type. + EntityType type; + // The attribute instances of this entity instance. + AttributeInstance[] attributes; + // The guid of the entity instance. + DOMString guid; + // The nickname of the entity instance. + DOMString nickname; + }; + + // Contains the minimum amount of information needed to display an entity + // instance, along with the guid. The guid is needed to retrieve the complete + // information of the entity instance. + dictionary EntityInstanceWithLabels { + // The guid of the entity instance. + DOMString guid; + // The enitity instance label. + DOMString entityLabel; + // The enitity instance sublabel. + DOMString entitySubLabel; + }; + + // A Pay Over Time Issuer entry which can be displayed in the autofill + // section of the settings UI. + dictionary PayOverTimeIssuerEntry { + // Unique identifier for the Pay Over Time issuer. + DOMString? issuerId; + + // The Pay Over Time issuer's instrument ID from the GPay server, + // if applicable. + DOMString? instrumentId; + + // The Pay Over Time issuer's display name. + DOMString? displayName; + + // The Pay Over Time issuer image source. + DOMString? imageSrc; + }; + + callback VoidCallback = void(); callback GetAccountInfoCallback = void(optional AccountInfo accountInfo); callback GetCountryListCallback = void(CountryEntry[] countries); callback GetAddressComponentsCallback = void(AddressComponents components); @@ -325,10 +407,13 @@ namespace autofillPrivate { callback IsValidIbanCallback = void(boolean isValid); callback GetCreditCardCallback = void(optional CreditCardEntry card); callback CheckForDeviceAuthCallback = void(boolean isDeviceAuthAvailable); - callback GetUserAnnotationsEntriesCallback = void(UserAnnotationsEntry[] items); - callback hasUserAnnotationsEntriesCallback = void(boolean hasEntries); callback isUserEligibleForAutofillImprovementsCallback = void(boolean eligible); - callback annotationsBootstrappingCallback = void(boolean bootstrapped); + callback LoadEntityInstancesCallback = void(EntityInstanceWithLabels[] entries); + callback GetEntityInstanceByGuid = void(EntityInstance entity); + callback GetAllEntityTypesCallback = void(EntityType[] entities); + callback GetAllAttributeTypesForEntityCallback = + void(AttributeType[] attributes); + callback GetPayOverTimeIssuerListCallback = void(PayOverTimeIssuerEntry[] entries); interface Functions { // Gets currently signed-in user profile info, no value is returned if @@ -388,12 +473,12 @@ namespace autofillPrivate { GetCreditCardListCallback callback); // Gets the list of IBANs. - // `callback`: Callback which will be called with the list of IBANs. + // |callback|: Callback which will be called with the list of IBANs. 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 + // |callback|: Callback which will be called with the result of IBAN // validation. static void isValidIban( DOMString ibanValue, IsValidIbanCallback callback); @@ -418,6 +503,12 @@ namespace autofillPrivate { // ids. static void removeVirtualCard(DOMString cardId); + // Gets the list of Pay Over Time Issuers. + // |callback|: Callback which will be called with the list of + // Pay Over Time Issuers. + static void getPayOverTimeIssuerList( + GetPayOverTimeIssuerListCallback callback); + // Authenticates the user via device authentication and if successful, it // will then flip the mandatory auth toggle. static void authenticateUserAndFlipMandatoryAuthToggle(); @@ -442,30 +533,38 @@ namespace autofillPrivate { // `syncer::UserSelectableType::kAutofill` in `SyncUserSettings`. static void setAutofillSyncToggleEnabled(boolean enabled); - // Returns the list of user annotations entries. - static void getUserAnnotationsEntries( - GetUserAnnotationsEntriesCallback callback); - - // Returns if there are any saved user annotations entries. - static void hasUserAnnotationsEntries( - hasUserAnnotationsEntriesCallback callback); - // Returns if the user is eligible for autofill improvements. static void isUserEligibleForAutofillImprovements( isUserEligibleForAutofillImprovementsCallback callback); - // Deletes the user annotations entry by its id. - static void deleteUserAnnotationsEntry(long entryId); - - // Deletes all user annotations entries. - static void deleteAllUserAnnotationsEntries(); - // Notifies autofill client about the prediction improvements pre changing. static void predictionImprovementsIphFeatureUsed(); - // Triggers bootstrapping of user annotations. Returns true if - // bootstrapping was successful (entries were added), false otherwise. - static void triggerAnnotationsBootstrapping(annotationsBootstrappingCallback callback); + // Adds a new entity instance if it doesn't exist yet. Otherwise, it updates + // the entity instance. + static void addOrUpdateEntityInstance( + EntityInstance entityInstance, optional VoidCallback callback); + + // Deletes an entity instance by its guid. + static void removeEntityInstance( + DOMString guid, optional VoidCallback callback); + + // Returns all of the user's entity instances with labels. + static void loadEntityInstances(LoadEntityInstancesCallback callback); + + // Returns the entity instance by its guid. + static void getEntityInstanceByGuid( + DOMString guid, GetEntityInstanceByGuid callback); + + // Returns a list of all possible entity types. Used for the user to decide + // what entity instance to add. + static void getAllEntityTypes(GetAllEntityTypesCallback callback); + + // Returns a list of all possible attributes that can be set on an entity. + // Used for adding/editing a new entity instance. + static void getAllAttributeTypesForEntity( + long entityTypeName, + GetAllAttributeTypesForEntityCallback callback); }; interface Events { @@ -474,10 +573,12 @@ namespace autofillPrivate { // `addressEntries`: the updated list of addresses. // `creditCardEntries`: the updated list of credit cards. // `ibans`: the updated list of IBANs. + // `payOverTimeIssuers`: the updated list of Pay Over Time issuers // `accountInfo`: account info if the user is signed-in or no value if not. static void onPersonalDataChanged(AddressEntry[] addressEntries, CreditCardEntry[] creditCardEntries, IbanEntry[] ibans, + PayOverTimeIssuerEntry[] payOverTimeIssuers, optional AccountInfo accountInfo); }; }; diff --git a/tools/under-control/src/chrome/common/extensions/api/autotest_private.idl b/tools/under-control/src/chrome/common/extensions/api/autotest_private.idl index b044f35d..117b99ec 100755 --- a/tools/under-control/src/chrome/common/extensions/api/autotest_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/autotest_private.idl @@ -824,6 +824,14 @@ namespace autotestPrivate { callback OverrideOrcaResponseForTestingCallback = void(boolean success); + // Request data containing the mock responses from + // overrideScannerResponsesForTesting. + dictionary ScannerResponseArray { + DOMString[] responses; + }; + + callback OverrideScannerResponsesForTestingCallback = void(boolean success); + interface Functions { // Must be called to allow autotestPrivateAPI events to be fired. static void initializeEvents(); @@ -1628,6 +1636,12 @@ namespace autotestPrivate { OrcaResponseArray array, OverrideOrcaResponseForTestingCallback callback); + // Overrides the response from Scanner Provider and returns the boolean + // value that indicates if the overriding is successful or not. + static void overrideScannerResponsesForTesting( + ScannerResponseArray array, + OverrideScannerResponsesForTestingCallback callback); + // ARC set interactive enable/disable state. // |enabled|: Enable ARC interactive. // |callback|: Called when the operation sent to ARC by mojo. diff --git a/tools/under-control/src/chrome/common/extensions/api/developer_private.idl b/tools/under-control/src/chrome/common/extensions/api/developer_private.idl index d65deafb..9691063c 100755 --- a/tools/under-control/src/chrome/common/extensions/api/developer_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/developer_private.idl @@ -5,6 +5,7 @@ // developerPrivate API. // This is a private API exposing developing and debugging functionalities for // apps and extensions. +[implemented_in = "chrome/browser/extensions/api/developer_private/developer_private_functions.h"] namespace developerPrivate { // DEPRECATED: Prefer ExtensionType. @@ -252,10 +253,13 @@ namespace developerPrivate { DisableReasons disableReasons; AccessModifier errorCollection; AccessModifier fileAccess; + boolean fileAccessPendingChange; HomePage homePage; DOMString iconUrl; DOMString id; AccessModifier incognitoAccess; + AccessModifier userScriptsAccess; + boolean incognitoAccessPendingChange; DOMString[] installWarnings; boolean isCommandRegistrationHandledExternally; DOMString? launchUrl; @@ -344,6 +348,7 @@ namespace developerPrivate { DOMString extensionId; boolean? fileAccess; boolean? incognitoAccess; + boolean? userScriptsAccess; boolean? errorCollection; HostAccess? hostAccess; boolean? showAccessRequestsInToolbar; diff --git a/tools/under-control/src/chrome/common/extensions/api/document_scan.idl b/tools/under-control/src/chrome/common/extensions/api/document_scan.idl index 501cdc0a..1395312d 100755 --- a/tools/under-control/src/chrome/common/extensions/api/document_scan.idl +++ b/tools/under-control/src/chrome/common/extensions/api/document_scan.idl @@ -4,7 +4,7 @@ // Use the chrome.documentScan API to discover and retrieve // images from attached document scanners. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/extensions/api/document_scan/document_scan_api.h"] namespace documentScan { dictionary ScanOptions { diff --git a/tools/under-control/src/chrome/common/extensions/api/enterprise_kiosk_input.idl b/tools/under-control/src/chrome/common/extensions/api/enterprise_kiosk_input.idl index 356628e0..de3ec93d 100755 --- a/tools/under-control/src/chrome/common/extensions/api/enterprise_kiosk_input.idl +++ b/tools/under-control/src/chrome/common/extensions/api/enterprise_kiosk_input.idl @@ -6,7 +6,7 @@ // settings for Kiosk sessions. // Note: This API is only available to extensions installed by enterprise // policy in ChromeOS Kiosk sessions. -[platforms = ("chromeos", "lacros"), +[platforms = ("chromeos"), implemented_in = "chrome/browser/extensions/api/enterprise_kiosk_input/enterprise_kiosk_input_api.h"] namespace enterprise.kioskInput { dictionary SetCurrentInputMethodOptions { diff --git a/tools/under-control/src/chrome/common/extensions/api/enterprise_networking_attributes.idl b/tools/under-control/src/chrome/common/extensions/api/enterprise_networking_attributes.idl index f52570e6..bae34e28 100755 --- a/tools/under-control/src/chrome/common/extensions/api/enterprise_networking_attributes.idl +++ b/tools/under-control/src/chrome/common/extensions/api/enterprise_networking_attributes.idl @@ -6,7 +6,7 @@ // information about your current network. // Note: This API is only available to extensions force-installed by enterprise // policy. -[platforms = ("chromeos", "lacros"), +[platforms = ("chromeos"), implemented_in = "chrome/browser/extensions/api/enterprise_networking_attributes/enterprise_networking_attributes_api.h"] namespace enterprise.networkingAttributes { [noinline_doc] dictionary NetworkDetails { diff --git a/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys.idl b/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys.idl index c25f76a0..c9f36b39 100755 --- a/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys.idl +++ b/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys.idl @@ -6,7 +6,7 @@ // install certificates for these keys. The certificates will be managed by the // platform and can be used for TLS authentication, network access or by other // extension through $(ref:platformKeys chrome.platformKeys). -[platforms = ("chromeos", "lacros")] +[platforms = ("chromeos")] namespace enterprise.platformKeys { [nocompile] dictionary Token { // Uniquely identifies this Token. diff --git a/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys_internal.idl b/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys_internal.idl index d4db017e..4ac4b7bf 100755 --- a/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys_internal.idl +++ b/tools/under-control/src/chrome/common/extensions/api/enterprise_platform_keys_internal.idl @@ -3,7 +3,7 @@ // found in the LICENSE file. // Internal API for platform keys and certificate management. -[ platforms = ("chromeos", "lacros"), +[ platforms = ("chromeos"), implemented_in = "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h" ] namespace enterprise.platformKeysInternal { dictionary Hash { diff --git a/tools/under-control/src/chrome/common/extensions/api/enterprise_reporting_private.idl b/tools/under-control/src/chrome/common/extensions/api/enterprise_reporting_private.idl index d20a184b..2263b34b 100755 --- a/tools/under-control/src/chrome/common/extensions/api/enterprise_reporting_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/enterprise_reporting_private.idl @@ -107,14 +107,14 @@ namespace enterprise.reportingPrivate { // Captures the type of event so it can be associated with user or device in // Chrome for reporting purposes - [platforms = ("chromeos", "lacros")] + [platforms = ("chromeos")] enum EventType { DEVICE, USER }; // Composite object that captures the information we need to report events. // Some fields like the record and priority are serialized to avoid any // dependency on proto definitions here, given the fact that they will likely // change in the future. These will be deserialized and validated in Chrome. - [platforms = ("chromeos", "lacros")] + [platforms = ("chromeos")] dictionary EnqueueRecordRequest { // Serialized record data binary based on the proto definition in // //components/reporting/proto/synced/record.proto. @@ -389,7 +389,7 @@ namespace enterprise.reportingPrivate { // |request|: Composite object that captures everything // we need for uploading records. // |callback|: Callback that is triggered upon completion - [platforms = ("chromeos", "lacros")] + [platforms = ("chromeos")] static void enqueueRecord( EnqueueRecordRequest request, optional DoneCallback callback); diff --git a/tools/under-control/src/chrome/common/extensions/api/file_manager_private.idl b/tools/under-control/src/chrome/common/extensions/api/file_manager_private.idl index f772316e..21396baf 100755 --- a/tools/under-control/src/chrome/common/extensions/api/file_manager_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/file_manager_private.idl @@ -420,7 +420,7 @@ enum BulkPinStage { // It's usually MyFiles. When SkyVault is enabled the admin might // choose between Google Drive and OneDrive. // NOTE: This is independent of the Downloads folder which is mostly used -// in the browser (lacros or ash). +// in the browser. enum DefaultLocation { my_files, google_drive, diff --git a/tools/under-control/src/chrome/common/extensions/api/login.idl b/tools/under-control/src/chrome/common/extensions/api/login.idl index 56a42db4..603e58c9 100755 --- a/tools/under-control/src/chrome/common/extensions/api/login.idl +++ b/tools/under-control/src/chrome/common/extensions/api/login.idl @@ -3,7 +3,7 @@ // found in the LICENSE file. // Use the chrome.login API to launch and exit user sessions. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/login_screen/login/login_api.h"] namespace login { callback VoidCallback = void (); diff --git a/tools/under-control/src/chrome/common/extensions/api/login_screen_storage.idl b/tools/under-control/src/chrome/common/extensions/api/login_screen_storage.idl index 118c785d..50a03f16 100755 --- a/tools/under-control/src/chrome/common/extensions/api/login_screen_storage.idl +++ b/tools/under-control/src/chrome/common/extensions/api/login_screen_storage.idl @@ -4,7 +4,7 @@ // Use the chrome.loginScreenStorage API to store persistent data // from the login screen or inject data into the session. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/login_screen/login_screen_storage/login_screen_storage_api.h"] namespace loginScreenStorage { callback StoreCallback = void (); diff --git a/tools/under-control/src/chrome/common/extensions/api/login_state.idl b/tools/under-control/src/chrome/common/extensions/api/login_state.idl index 3a1f702e..e6835826 100755 --- a/tools/under-control/src/chrome/common/extensions/api/login_state.idl +++ b/tools/under-control/src/chrome/common/extensions/api/login_state.idl @@ -4,7 +4,7 @@ // Use the chrome.loginState API to read and monitor the login // state. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/login_screen/login_state/login_state_api.h"] namespace loginState { enum ProfileType { diff --git a/tools/under-control/src/chrome/common/extensions/api/printing.idl b/tools/under-control/src/chrome/common/extensions/api/printing.idl index 7f758538..67819d38 100755 --- a/tools/under-control/src/chrome/common/extensions/api/printing.idl +++ b/tools/under-control/src/chrome/common/extensions/api/printing.idl @@ -4,17 +4,18 @@ // Use the chrome.printing API to send print jobs to printers // installed on Chromebook. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/extensions/api/printing/printing_api.h"] namespace printing { dictionary SubmitJobRequest { // The print job to be submitted. - // The only supported content type is "application/pdf", and the + // Supported content types are "application/pdf" and "image/png". The // Cloud Job Ticket // shouldn't include FitToPageTicketItem, - // PageRangeTicketItem, ReverseOrderTicketItem - // and VendorTicketItem fields since they are - // irrelevant for native printing. All other fields must be present. + // PageRangeTicketItem and ReverseOrderTicketItem + // fields since they are irrelevant for native printing. + // VendorTicketItem is optional. All other fields must be + // present. printerProvider.PrintJob job; // Used internally to store the blob uuid after parameter customization and @@ -153,6 +154,7 @@ namespace printing { callback CancelJobCallback = void(); callback GetPrintersCallback = void(Printer[] printers); callback GetPrinterInfoCallback = void(GetPrinterInfoResponse response); + callback getJobStatusCallback = void(JobStatus status); interface Functions { // Submits the job for printing. If the extension is not listed in @@ -183,6 +185,14 @@ namespace printing { static void getPrinterInfo( DOMString printerId, GetPrinterInfoCallback callback); + + // Returns the status of the print job. This call will fail with a runtime + // error if the print job with the given `jobId` doesn't exist. + // `jobId`: The id of the print job to return the status of. This should be + // the same id received in a $(ref:SubmitJobResponse). + static void getJobStatus( + DOMString jobId, + getJobStatusCallback callback); }; interface Properties { diff --git a/tools/under-control/src/chrome/common/extensions/api/quick_unlock_private.idl b/tools/under-control/src/chrome/common/extensions/api/quick_unlock_private.idl index 435e75fb..3d7409c9 100755 --- a/tools/under-control/src/chrome/common/extensions/api/quick_unlock_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/quick_unlock_private.idl @@ -10,7 +10,7 @@ // used for all lock screen settings. // Note: This API can not be used to actually unlock the device. -[platforms=("chromeos", "lacros")] +[platforms=("chromeos")] namespace quickUnlockPrivate { dictionary TokenInfo { // The authentication token that can be passed to $(ref:setModes) calls. diff --git a/tools/under-control/src/chrome/common/extensions/api/shared_storage_private.idl b/tools/under-control/src/chrome/common/extensions/api/shared_storage_private.idl deleted file mode 100755 index 5a11017c..00000000 --- a/tools/under-control/src/chrome/common/extensions/api/shared_storage_private.idl +++ /dev/null @@ -1,30 +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. - -// Used by gnubbyd in ash and lacros. Stores small amounts of data in ash prefs -// which is shared by ash and lacros versions of the extension. -// TODO(b/231890240): Once Terminal SWA runs in lacros rather than ash, we can -// migrate gnubbyd back to using chrome.storage.local and remove this private -// API. -[platforms=("chromeos", "lacros"), - implemented_in="chrome/browser/extensions/api/shared_storage/shared_storage_private_api.h"] -namespace sharedStoragePrivate { - - callback GetCallback = void (object items); - callback SetCallback = void (); - callback RemoveCallback = void (); - - interface Functions { - // Gets all items from shared extension local storage. - static void get(GetCallback callback); - - // Sets given items into shared extension local storage. - static void set(object items, SetCallback callback); - - // Removes item from shared extension local storage. - static void remove( - DOMString[] keys, RemoveCallback callback); - }; -}; - diff --git a/tools/under-control/src/chrome/common/extensions/api/smart_card_provider_private.idl b/tools/under-control/src/chrome/common/extensions/api/smart_card_provider_private.idl index eb0b13ae..4e39b333 100755 --- a/tools/under-control/src/chrome/common/extensions/api/smart_card_provider_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/smart_card_provider_private.idl @@ -11,7 +11,7 @@ // [3] https://github.com/WICG/web-smart-card/blob/main/README.md#web-idl // // TODO(crbug.com/40247152): Add API for the remaining SCard* functions. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/smart_card_provider_private/smart_card_provider_private_api.h"] namespace smartCardProviderPrivate { diff --git a/tools/under-control/src/chrome/common/extensions/api/system_log.idl b/tools/under-control/src/chrome/common/extensions/api/system_log.idl index 33de2db1..f9e7328c 100755 --- a/tools/under-control/src/chrome/common/extensions/api/system_log.idl +++ b/tools/under-control/src/chrome/common/extensions/api/system_log.idl @@ -4,7 +4,7 @@ // Use the chrome.systemLog API to record Chrome system logs from // extensions. -[platforms=("chromeos", "lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/system_log/system_log_api.h"] namespace systemLog { callback VoidCallback = void (); diff --git a/tools/under-control/src/chrome/common/extensions/api/wm_desks_private.idl b/tools/under-control/src/chrome/common/extensions/api/wm_desks_private.idl index 90c19807..f8d7fee0 100755 --- a/tools/under-control/src/chrome/common/extensions/api/wm_desks_private.idl +++ b/tools/under-control/src/chrome/common/extensions/api/wm_desks_private.idl @@ -3,7 +3,7 @@ // found in the LICENSE file. // Private API for trusted extensions/apps to do desk related operations. -[platforms=("chromeos","lacros"), +[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/wm/wm_desks_private_api.h"] namespace wmDesksPrivate { enum SavedDeskType { diff --git a/tools/under-control/src/components/policy/resources/templates/policies.yaml b/tools/under-control/src/components/policy/resources/templates/policies.yaml index a7e3083e..8188194b 100755 --- a/tools/under-control/src/components/policy/resources/templates/policies.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policies.yaml @@ -1257,7 +1257,7 @@ policies: 1256: PdfViewerOutOfProcessIframeEnabled 1257: LockScreenAutoStartOnlineReauth 1258: KeyboardFocusableScrollersEnabled - 1259: ExtensibleEnterpriseSSOEnabled + 1259: ExtensibleEnterpriseSSOBlocklist 1260: CSSCustomStateDeprecatedSyntaxEnabled 1261: MemorySaverModeSavings 1262: KioskVisionTelemetryEnabled @@ -1325,7 +1325,7 @@ policies: 1324: WebRtcIPHandlingUrl 1325: GenAIPhotoEditingSettings 1326: PartitionedBlobUrlUsage - 1327: GlicSettings + 1327: '' 1328: DefaultControlledFrameSetting 1329: ControlledFrameAllowedForUrls 1330: ControlledFrameBlockedForUrls @@ -1333,6 +1333,9 @@ policies: 1332: WebAuthenticationRemoteDesktopAllowedOrigins 1333: ServiceWorkerToControlSrcdocIframeEnabled 1334: ProvisionManagedClientCertificateForBrowser + 1335: GeminiSettings + 1336: GenAISmartGroupingSettings + 1337: GenAiChromeOsSmartActionsSettings atomic_groups: 1: Homepage diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/ContentSettings/PartitionedBlobUrlUsage.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/ContentSettings/PartitionedBlobUrlUsage.yaml index c6750f7d..67a90df2 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/ContentSettings/PartitionedBlobUrlUsage.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/ContentSettings/PartitionedBlobUrlUsage.yaml @@ -15,7 +15,7 @@ desc: |- If you must use the policy, please file a bug on crbug.com explaining your use case and CC {janiceliu, awillia}@chromium.org. The policy is scheduled to be offered through $1Google Chrome - version 138, after which the old implementation will be removed. + version 140, after which the old implementation will be removed. NOTE: Only newly-started renderer processes will reflect changes to this policy while the browser is running. @@ -28,11 +28,6 @@ features: dynamic_refresh: true per_profile: true -future_on: - - chrome.* - - chrome_os - - android - items: - caption: Partition Blob URLs during fetching and navigation. value: true @@ -47,6 +42,11 @@ owners: schema: type: boolean +supported_on: +- chrome.*:135- +- chrome_os:135- +- android:135- + tags: [] type: main diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Extensions/ExtensionSettings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Extensions/ExtensionSettings.yaml index 56762b7d..7b2d947d 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Extensions/ExtensionSettings.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Extensions/ExtensionSettings.yaml @@ -61,6 +61,7 @@ features: dynamic_refresh: true per_profile: true future_on: +- android - fuchsia owners: - finnur@chromium.org diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GeminiSettings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GeminiSettings.yaml new file mode 100755 index 00000000..30751e67 --- /dev/null +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GeminiSettings.yaml @@ -0,0 +1,34 @@ +caption: Settings for Gemini integration +desc: |- + Enables Gemini app integration + + 0/unset = Gemini integration will be available for users + + 1 = Gemini integration will not be available for users +owners: +- salg@google.com +- ssid@chromium.org +- file://components/policy/OWNERS +example_value: 1 +future_on: +- android +- chrome.* +- chrome_os +features: + dynamic_refresh: true + per_profile: true +type: int-enum +schema: + type: integer + enum: + - 0 + - 1 +items: +- caption: Enable Gemini integration. + name: Enabled + value: 0 +- caption: Do not enable Gemini integration. + name: Disabled + value: 1 +default: 0 +tags: [] \ No newline at end of file diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAISmartGroupingSettings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAISmartGroupingSettings.yaml new file mode 100755 index 00000000..96d6c7e2 --- /dev/null +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAISmartGroupingSettings.yaml @@ -0,0 +1,43 @@ +caption: Settings for Generative AI Smart Grouping feature +desc: |- + This policy controls the settings of the Generative AI Smart Grouping feature for $1Google ChromeOS. + + 0 = Allow the feature to be used, while allowing Google to use relevant data to improve its AI models. Relevant data may include prompts, inputs, outputs, source materials, and written feedback, depending on the feature. It may also be reviewed by humans to improve AI models. 0 is the default value, except when noted below. + + 1 = Allow the feature to be used, but does not allow Google to improve models using users' content (including prompts, inputs, outputs, source materials, and written feedback). 1 is the default value for Enterprise users managed by Google Admin console and for Education accounts managed by Google Workspace. + + 2 = Do not allow the feature. + + If the policy is unset, its behavior is determined by the GenAiDefaultSettings policy. + + For more information on data handling for generative AI features, please see https://support.google.com/chrome/a?p=generative_ai_settings. + +default: 0 +example_value: 2 +features: + dynamic_refresh: true + per_profile: true +owners: +- hctsai@google.com +- hcyang@google.com +- file://ash/wm/coral/OWNERS +items: +- caption: Allow Generative AI overview window grouping and improve AI models. + name: Allowed + value: 0 +- caption: Allow Generative AI overview window grouping without improving AI models. + name: AllowedWithoutLogging + value: 1 +- caption: Do not allow Generative AI overview window grouping. + name: Disabled + value: 2 +schema: + enum: + - 0 + - 1 + - 2 + type: integer +future_on: +- chrome_os +tags: [] +type: int-enum diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAiChromeOsSmartActionsSettings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAiChromeOsSmartActionsSettings.yaml new file mode 100755 index 00000000..e5faf8d9 --- /dev/null +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/GenerativeAI/GenAiChromeOsSmartActionsSettings.yaml @@ -0,0 +1,41 @@ +caption: Settings for Scanner feature +desc: |- + This policy controls the settings of the Scanner feature for $1Google ChromeOS. + + 0 = Allow the feature to be used, while allowing Google to use relevant data to improve its AI models. Relevant data may include prompts, inputs, outputs, source materials, and written feedback, depending on the feature. It may also be reviewed by humans to improve AI models. 0 is the default value, except when noted below. + + 1 = Allow the feature to be used, but does not allow Google to improve models using users' content (including prompts, inputs, outputs, source materials, and written feedback). 1 is the default value for Enterprise users managed by Google Admin console and for Education accounts managed by Google Workspace. + + 2 = Do not allow the feature. + + If the policy is unset, its behavior is determined by the GenAiDefaultSettings policy. + + For more information on data handling for generative AI features, please see https://support.google.com/chrome/a?p=generative_ai_settings. + +default: 0 +example_value: 2 +features: + dynamic_refresh: true + per_profile: true +owners: +- file://ash/scanner/OWNERS +items: +- caption: Allow Scanner and improve AI models. + name: Allowed + value: 0 +- caption: Allow Scanner without improving AI models. + name: AllowedWithoutLogging + value: 1 +- caption: Do not allow Scanner. + name: Disabled + value: 2 +schema: + enum: + - 0 + - 1 + - 2 + type: integer +future_on: +- chrome_os +tags: [] +type: int-enum diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/DownloadRestrictions.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/DownloadRestrictions.yaml index cb6ac925..7fbffe79 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/DownloadRestrictions.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/DownloadRestrictions.yaml @@ -28,7 +28,6 @@ features: per_profile: true future_on: - fuchsia -- ios items: - caption: No special restrictions. Default. name: DefaultDownloadSecurity @@ -62,6 +61,7 @@ supported_on: - chrome.*:61- - chrome_os:61- - android:131- +- ios:135- tags: - local-data-access type: int-enum diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/EnterpriseSearchAggregatorSettings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/EnterpriseSearchAggregatorSettings.yaml index fb746f7b..e4c02d93 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/EnterpriseSearchAggregatorSettings.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/EnterpriseSearchAggregatorSettings.yaml @@ -1,5 +1,7 @@ -caption: Enterprise search aggregator settings +caption: Enterprise search aggregator settings (Beta) desc: |- + This is a beta feature. As this is a feature in development, available to our trusted testers, please be aware that it may undergo changes and updates. + This policy allows administrators to set a designated enterprise search aggregator that will provide search recommendations and results within the address bar when triggered by a specific keyword. Users can initiate a search by typing the keyword specified in the shortcut field with or without the @ prefix (e.g. @work), followed by Space or Tab, in the address bar. The following fields are required: name, shortcut, search_url, suggest_url. @@ -14,6 +16,8 @@ desc: |- The icon_url field specifies the URL to an image that will be used on the search suggestions. A default icon will be used when this field is not set. It's recommended to use a favicon (example https://www.google.com/favicon.ico). + The require_shortcut field specifies whether the address bar shortcut is required to see search recommendations. If this field is not set, the address bar shortcut is not required. + On Microsoft® Windows®, this policy is only available on instances that are joined to a Microsoft® Active Directory® domain, joined to Microsoft® Azure® Active Directory® or enrolled in Chrome Enterprise Core. On macOS, this policy is only available on instances that are managed via MDM, joined to a domain via MCX or enrolled in Chrome Enterprise Core. @@ -24,11 +28,13 @@ example_value: search_url: https://www.aggregator.com/search?q=site%3Awikipedia.com+{searchTerms} suggest_url: https://www.aggregator.com/suggest?q={searchTerms} icon_url: https://www.google.com/favicon.ico + require_shortcut: true features: dynamic_refresh: true per_profile: true owners: - ftirelo@chromium.org +- alexwchen@chromium.org - jdonnelly@chromium.org - mahmadi@chromium.org schema: @@ -44,13 +50,15 @@ schema: type: string icon_url: type: string + require_shortcut: + type: boolean required: - name - shortcut - suggest_url - search_url -future_on: -- chrome.* -- chrome_os +supported_on: +- chrome.*:135- +- chrome_os:135- tags: [] type: dict diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExemptDomainFileTypePairsFromFileTypeDownloadWarnings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExemptDomainFileTypePairsFromFileTypeDownloadWarnings.yaml index 16f5921b..254b1b55 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExemptDomainFileTypePairsFromFileTypeDownloadWarnings.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExemptDomainFileTypePairsFromFileTypeDownloadWarnings.yaml @@ -3,28 +3,33 @@ caption: Disable download file type extension-based warnings for specified file desc: |- You can enable this policy to create a dictionary of file type extensions with a corresponding list of domains that will be exempted from file type extension-based download warnings. This lets enterprise administrators block file type extension-based download warnings for files that are associated with a listed domain. For example, if the "jnlp" extension is associated with "website1.com", users would not see a warning when downloading "jnlp" files from "website1.com", but see a download warning when downloading "jnlp" files from "website2.com". - Files with file type extensions specified for domains identified by this policy will still be subject to non-file type extension-based security warnings such as mixed-content download warnings and Safe Browsing warnings. + Files with file type extensions specified for domains identified by this policy will still be subject to non-file type extension-based security warnings such as mixed-content download warnings and Safe Browsing warnings. - If you disable this policy or don't configure it, file types that trigger extension-based download warnings will show warnings to the user. + If you disable this policy or don't configure it, file types that trigger extension-based download warnings will show warnings to the user. - If you enable this policy: + If you enable this policy: - * The URL pattern should be formatted according to https://cloud.google.com/docs/chrome-enterprise/policies/url-patterns. - * The file type extension entered must be in lower-cased ASCII. The leading separator should not be included when listing the file type extension, so list "jnlp" should be used instead of ".jnlp". + * The URL pattern should be formatted according to https://cloud.google.com/docs/chrome-enterprise/policies/url-patterns. - Example: + * The file type extension entered must be in lower-cased ASCII. The leading separator should not be included when listing the file type extension, so list "jnlp" should be used instead of ".jnlp". - The following example value would prevent file type extension-based download warnings on swf, exe, and jnlp extensions for *.example.com domains. It will show the user a file type extension-based download warning on any other domain for exe and jnlp files, but not for swf files. + Example: - [ - { "file_extension": "jnlp", "domains": ["example.com"] }, - { "file_extension": "exe", "domains": ["example.com"] }, - { "file_extension": "swf", "domains": ["*"] } - ] + The following example value would prevent file type extension-based download warnings on "exe" and "jnlp" extensions for *.example.com domains, and on "swf" extensions for all domains. It will show the user a file type extension-based download warning on any other domain for exe and jnlp files, but not for swf files. - Note that while the preceding example shows the suppression of file type extension-based download warnings for "swf" files for all domains, applying suppression of such warnings for all domains for any dangerous file type extension is not recommended due to security concerns. It is shown in the example merely to demonstrate the ability to do so. + [ + { "file_extension": "jnlp", "domains": ["example.com"] }, + { "file_extension": "exe", "domains": ["example.com"] }, + { "file_extension": "swf", "domains": ["*"] } + ] - If this policy is enabled alongside DownloadRestrictions and DownloadRestrictions is set to block dangerous file types, download blocks determined by DownloadRestrictions take precedence. For example, if this policy is set to enable "exe" extension downloads from "website1.com", and DownloadRestrictions is set to block malicious downloads and dangerous file types, then "exe" extension downloads will still be blocked in all domains. If DownloadRestrictions is not set to block dangerous file types, then file types specified in this policy will be exempted from file-type extension-based download warnings in the specified domains. Read more about DownloadRestrictions (https://chromeenterprise.google/policies/?policy=DownloadRestrictions). + Note that while the preceding example shows the suppression of file type extension-based download warnings for "swf" files for all domains, applying suppression of such warnings for all domains for any dangerous file type extension is not recommended due to security concerns. It is shown in the example merely to demonstrate the ability to do so. + + If this policy is enabled alongside DownloadRestrictions, then the exemptions to file type extension-based warnings specified by this policy take precedence over a DownloadRestrictions setting that would block dangerous file types. The exemptions specified by this policy only apply to the "block dangerous file types" behavior specified by values 1 and 2 of DownloadRestrictions. + + For example, if this policy specifies an exemption for "exe" downloads from "website1.com", and DownloadRestrictions is set to block malicious downloads and dangerous file types (value 1), then "exe" downloads from "website1.com" will be exempt from file type extension-based blocking but will still be blocked if they are malicious. + + More information about DownloadRestrictions can be found at https://chromeenterprise.google/policies/?policy=DownloadRestrictions. example_value: - domains: - https://example.com @@ -40,7 +45,7 @@ features: future_on: - fuchsia owners: -- flowerhorne@google.com +- chlily@chromium.org schema: items: $ref: DomainFiletypePair diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExternalStorageAllowlist.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExternalStorageAllowlist.yaml index 7d66e0fd..60d6ad5a 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExternalStorageAllowlist.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ExternalStorageAllowlist.yaml @@ -18,7 +18,7 @@ schema: items: $ref: UsbDeviceId type: array -future_on: -- chrome_os +supported_on: +- chrome_os:135- tags: [] type: dict diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/GlicSettings.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/GlicSettings.yaml deleted file mode 100755 index 40b25302..00000000 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/GlicSettings.yaml +++ /dev/null @@ -1,32 +0,0 @@ -caption: Control Glic access -desc: |- - If this policy is Enabled or not set, users are able to use the - Glic feature. Setting this policy to Disabled prevents - users from interacting with Glic; the button in the tab - strip is hidden and Glic is unavailable via keyboard - shortcut unless enabled in another profile. -owners: -- bokan@chromium.org -- file://chrome/browser/glic/OWNERS -example_value: 0 -future_on: -- chrome.* -features: - dynamic_refresh: true - per_profile: true -type: int-enum -schema: - type: integer - enum: - - 0 - - 1 -items: -- caption: Enable use of Glic - name: Enabled - value: 0 -- caption: Disable use of Glic. - name: Disabled - value: 1 -default: 0 -tags: -- google-sharing diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/SystemFeaturesDisableList.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/SystemFeaturesDisableList.yaml index 896ee926..98127217 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/SystemFeaturesDisableList.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/SystemFeaturesDisableList.yaml @@ -62,6 +62,36 @@ items: - caption: Recorder (supported since version 130) name: recorder value: recorder +- caption: Gmail (supported since version 135) + name: gmail + value: gmail +- caption: Google Docs (supported since version 135) + name: google_docs + value: google_docs +- caption: Google Slides (supported since version 135) + name: google_slides + value: google_slides +- caption: Google Sheets (supported since version 135) + name: google_sheets + value: google_sheets +- caption: Google Drive (supported since version 135) + name: google_drive + value: google_drive +- caption: Google Keep (supported since version 135) + name: google_keep + value: google_keep +- caption: Google Calendar (supported since version 135) + name: google_calendar + value: google_calendar +- caption: Google Chat (supported since version 135) + name: google_chat + value: google_chat +- caption: YouTube (supported since version 135) + name: youtube + value: youtube +- caption: Google Maps (supported since version 135) + name: google_maps + value: google_maps owners: - file://components/policy/OWNERS - ayaelattar@chromium.org @@ -82,6 +112,16 @@ schema: - print_jobs - key_shortcuts - recorder + - gmail + - google_docs + - google_slides + - google_sheets + - google_drive + - google_keep + - google_calendar + - google_chat + - youtube + - google_maps type: string type: array supported_on: diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ThirdPartyBlockingEnabled.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ThirdPartyBlockingEnabled.yaml index 3ceda312..ac78ce91 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ThirdPartyBlockingEnabled.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/ThirdPartyBlockingEnabled.yaml @@ -21,6 +21,6 @@ owners: schema: type: boolean supported_on: -- chrome.win:65- +- chrome.win:65-135 tags: [] type: main diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/WebAuthenticationRemoteDesktopAllowedOrigins.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/WebAuthenticationRemoteDesktopAllowedOrigins.yaml index 57dad911..9e2d0f6b 100755 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/WebAuthenticationRemoteDesktopAllowedOrigins.yaml +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Miscellaneous/WebAuthenticationRemoteDesktopAllowedOrigins.yaml @@ -16,6 +16,7 @@ features: future_on: - chrome.* - chrome_os +- android example_value: - https://remotedesktop.google.com - https://vdi.corp.example diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOBlocklist.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOBlocklist.yaml new file mode 100755 index 00000000..bcba8b66 --- /dev/null +++ b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOBlocklist.yaml @@ -0,0 +1,49 @@ +caption: Blocklist of identity providers that cannot use Extensible Enterprise SSO for the browser + +desc: |- + Disable single sign-on using Extensible Enterprise SSO for the listed identity providers. + + By adding the value 'all', all supported identity providers for SSO are disabled. + + By adding the value 'microsoft', support for single sign-on for Microsoft® cloud identity provider in Chrome is disabled. + + By leaving this policy unset, all identity providers that are supported by $1Google Chrome will be enabled. + + For identity providers that are enabled in $1Google Chrome and configured on the device the administrator, users who sign into their once using that identity provider, on any application that supports Extensible Enterprise SSO, can be signed into web properties using that identity provider automatically. Information pertaining to the user's authencitation information is transmitted to the user's cloud identity provider for each authentication event. + + Notes: + + $1Google Chrome does not support Single Sign-on using Extensible Enterprise SSO in Incognito or Guest modes. + + $1Google Chrome only supports Single Sign-on using Extensible Enterprise SSO for the following identity providers: Microsoft. + + This feature is available starting in macOS 10.15. + +owners: +- ydago@chromium.org +- file://components/policy/OWNERS + +supported_on: +- chrome.mac:135- + +features: + dynamic_refresh: true + per_profile: false +type: string-enum-list +schema: + items: + enum: + - all + - microsoft + type: string + type: array +items: +- caption: All identity providers + name: all + value: all +- caption: Microsoft® cloud identity provider + name: microsoft + value: microsoft +example_value: +- all +tags: [] diff --git a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOEnabled.yaml b/tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOEnabled.yaml deleted file mode 100755 index 9b7e926f..00000000 --- a/tools/under-control/src/components/policy/resources/templates/policy_definitions/Signin/ExtensibleEnterpriseSSOEnabled.yaml +++ /dev/null @@ -1,37 +0,0 @@ -owners: -- ydago@chromium.org -- file://components/policy/OWNERS -caption: Enable extensible Enterprise SSO support -desc: |- - Configures automatic user sign-in for accounts with authentication providers by an Enterprise SSO Extension. - - By setting this policy to 1 (Enabled) or leaving it unset, authentication providers with an SSO extension on the device will use that extension to authenticate users trying to sign in. - - By setting this policy to 0 (Disabled), automatic sign-in as described above is disabled. - - This feature is available starting in MacOS Catalina. - - Note: This policy doesn't apply to Incognito or Guest modes. -future_on: -- chrome.mac - -features: - dynamic_refresh: true - per_profile: false -type: int-enum -schema: - enum: - - 0 - - 1 - type: integer -items: -- caption: Disable extensible Enterprise SSO support - name: Disabled - value: 0 -- caption: Enable extensible Enterprise SSO support - name: Enabled - value: 1 - -default: 1 -example_value: 0 -tags: [] diff --git a/tools/under-control/src/content/browser/web_contents/web_contents_impl.cc b/tools/under-control/src/content/browser/web_contents/web_contents_impl.cc index 94917dc4..97d4479d 100755 --- a/tools/under-control/src/content/browser/web_contents/web_contents_impl.cc +++ b/tools/under-control/src/content/browser/web_contents/web_contents_impl.cc @@ -69,14 +69,14 @@ #include "content/browser/browser_main_loop.h" #include "content/browser/browser_plugin/browser_plugin_embedder.h" #include "content/browser/browser_plugin/browser_plugin_guest.h" +#include "content/browser/btm/btm_bounce_detector.h" +#include "content/browser/btm/btm_navigation_flow_detector.h" #include "content/browser/child_process_security_policy_impl.h" #include "content/browser/closewatcher/close_listener_manager.h" #include "content/browser/compositor/surface_utils.h" #include "content/browser/device_posture/device_posture_provider_impl.h" #include "content/browser/devtools/protocol/page_handler.h" #include "content/browser/devtools/render_frame_devtools_agent_host.h" -#include "content/browser/dips/dips_bounce_detector.h" -#include "content/browser/dips/dips_navigation_flow_detector.h" #include "content/browser/display_cutout/display_cutout_host_impl.h" #include "content/browser/dom_storage/dom_storage_context_wrapper.h" #include "content/browser/dom_storage/session_storage_namespace_impl.h" @@ -177,6 +177,7 @@ #include "partition_alloc/buildflags.h" #include "ppapi/buildflags/buildflags.h" #include "services/device/public/mojom/wake_lock.mojom.h" +#include "services/network/public/cpp/features.h" #include "services/network/public/cpp/request_destination.h" #include "services/network/public/cpp/web_sandbox_flags.h" #include "services/network/public/mojom/network_context.mojom.h" @@ -711,6 +712,14 @@ void RecordRendererUnresponsiveMetrics( rph_priority); } +// Helper function to simplify getting the correct HostZoomMapImpl for a +// RenderFrameHost. Implemented here to be close to its only consumer, +// GetPendingZoomLevel(). +HostZoomMapImpl* HostZoomMapForRenderFrameHost(const RenderFrameHost* rfh) { + return static_cast( + HostZoomMap::Get(rfh->GetSiteInstance())); +} + } // namespace // This is a small helper class created while a JavaScript dialog is showing @@ -1311,18 +1320,31 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context) std::make_unique(base::BindRepeating( &WebContentsImpl::OnScreensChange, base::Unretained(this))); - if (base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { + if (base::FeatureList::IsEnabled(network::features::kSharedStorageAPI)) { SharedStorageBudgetCharger::CreateForWebContents(this); } if (input::IsTransferInputToVizSupported()) { - GetHostFrameSinkManager()->SetupRenderInputRouterDelegateConnection( - compositor_frame_sink_grouping_id_, - rir_delegate_client_receiver_.BindNewPipeAndPassRemote(), - rir_delegate_remote_.BindNewPipeAndPassReceiver()); + SetupRenderInputRouterDelegateConnection(); } } +void WebContentsImpl::SetupRenderInputRouterDelegateConnection() { + // Handles setting up GPU mojo endpoint connections. In general, the number of + // retries for setting up these mojo connections is capped by the maximum + // number of attempts to restart the GPU process, see + // GpuProcessHost::GetFallbackCrashLimit(). + rir_delegate_client_receiver_.reset(); + rir_delegate_remote_.reset(); + GetHostFrameSinkManager()->SetupRenderInputRouterDelegateConnection( + compositor_frame_sink_grouping_id_, + rir_delegate_client_receiver_.BindNewPipeAndPassRemote(), + rir_delegate_remote_.BindNewPipeAndPassReceiver()); + rir_delegate_client_receiver_.set_disconnect_handler( + base::BindOnce(&WebContentsImpl::SetupRenderInputRouterDelegateConnection, + weak_factory_.GetWeakPtr())); +} + WebContentsImpl::~WebContentsImpl() { TRACE_EVENT0("content", "WebContentsImpl::~WebContentsImpl"); WebContentsOfBrowserContext::Detach(*this); @@ -2243,12 +2265,9 @@ void WebContentsImpl::UpdateZoomIfNecessary(const std::string& scheme, RenderFrameHostImpl* rfh) { OPTIONAL_TRACE_EVENT2("content", "WebContentsImpl::UpdateZoomIfNecessary", "scheme", scheme, "host", host); - NavigationEntry* entry = rfh->GetController().GetLastCommittedEntry(); - if (!entry) { - return; - } - GURL url = HostZoomMap::GetURLFromEntry(entry); + // The following code expects that rfh has its own independent zoom. + GURL url = HostZoomMap::GetURLForRenderFrameHost(rfh->GetGlobalId()); if (host != net::GetHostOrSpecFromURL(url) || (!scheme.empty() && !url.SchemeIs(scheme))) { return; @@ -3502,6 +3521,18 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences( #if BUILDFLAG(IS_ANDROID) prefs.long_press_link_select_text = long_press_link_select_text_; + + if (base::FeatureList::IsEnabled( + features::kRestrictOrientationLockToPhones)) { + // Only lock fullscreen orientation if the provider allows it, and if the + // prefs currently want to do so. While current behavior happens to match + // exactly with the provider claiming to support orientation lock, we still + // want to give the cache the opportunity to turn it off for other reasons. + // For example, if a foldable is folded, then the prefs cache should notify + // us that the behavior may have changed. + prefs.video_fullscreen_orientation_lock_enabled &= + screen_orientation_provider_->IsOrientationLockSupported(); + } #endif #if BUILDFLAG(IS_ANDROID) @@ -3726,7 +3757,7 @@ void WebContentsImpl::OnVibrate(RenderFrameHostImpl* rfh) { observers_.NotifyObservers(&WebContentsObserver::VibrationRequested); } -std::optional +std::optional WebContentsImpl::GetPermissionsPolicyForIsolatedWebApp( RenderFrameHostImpl* source) { WebExposedIsolationInfo weii = @@ -4087,6 +4118,12 @@ void WebContentsImpl::RenderWidgetWasResized( width_changed); } +bool WebContentsImpl::PreHandleMouseEvent(const blink::WebMouseEvent& event) { + OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), + "WebContentsImpl::PreHandleMouseEvent"); + return delegate_ ? delegate_->PreHandleMouseEvent(this, event) : false; +} + KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), @@ -7151,6 +7188,15 @@ void WebContentsImpl::OnFirstContentfulPaintInPrimaryMainFrame() { &WebContentsObserver::OnFirstContentfulPaintInPrimaryMainFrame); } +gfx::NativeWindow WebContentsImpl::GetOwnerNativeWindow() { + return GetTopLevelNativeWindow(); +} + +media::PictureInPictureEventsInfo::AutoPipReason +WebContentsImpl::GetAutoPipReason() const { + return GetContentClient()->browser()->GetAutoPipReason(*this); +} + void WebContentsImpl::NotifyChangedNavigationState( InvalidateTypes changed_flags) { NotifyNavigationStateChanged(changed_flags); @@ -8656,15 +8702,35 @@ void WebContentsImpl::RunFileChooser( } double WebContentsImpl::GetPendingZoomLevel(RenderWidgetHostImpl* rwh) { - // TODO(372932834): This needs to be modified for the PDF-in-OOPIF case, as - // while the PDF will have its own RenderWidgetHost, the associated - // RenderFrameHost won't always be at the root of a FrameTree (and the - // FrameTree won't be of type kGuest). - // Note: this could involve (something like) detecting that the rfh for `rwh` - // is *not* a frame-tree root, but *does* have a temporary zoom level set in - // HostZoomMap. - RenderFrameHostImpl* rfh = - rwh->frame_tree()->root()->current_frame_host()->GetOutermostMainFrame(); + RenderFrameHostImpl* rfh = nullptr; + // Find the RenderFrameHost for `rwh`. + ForEachRenderFrameHostImplWithAction( + [rwh, &rfh](RenderFrameHostImpl* render_frame_host) { + if (render_frame_host->GetRenderWidgetHost() == rwh) { + rfh = render_frame_host; + return RenderFrameHost::FrameIterationAction::kStop; + } + return RenderFrameHost::FrameIterationAction::kContinue; + }); + + if (rfh) { + // Find nearest ancestor that has independent zoom. + // Use GetParentOrOuterDocument() instead of GetParent() in order + // to "step out of" any fenced frames that are encountered. + while (!HostZoomMapForRenderFrameHost(rfh)->IsIndependentZoomFrameTreeNode( + rfh->GetFrameTreeNodeId()) && + rfh->GetParentOrOuterDocument()) { + rfh = rfh->GetParentOrOuterDocument(); + } + } else { + // Not finding a `rfh` suggests that `rwh` is still in the process of being + // set up, or is for a newly created RenderWidgetHost without a + // RenderFrameHost (e.g. for a