[AUTO][FILECONTROL] - version 127.0.6533.57
This commit is contained in:
committed by
github-actions[bot]
parent
d086628abf
commit
5620d1468e
@@ -1 +1 @@
|
||||
126.0.6478.186
|
||||
127.0.6533.57
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/trace_event/base_tracing.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/crash/content/browser/crash_handler_host_linux.h"
|
||||
#include "components/embedder_support/origin_trials/origin_trials_settings_storage.h"
|
||||
@@ -137,7 +138,6 @@ using AttributionReportingOsRegistrar =
|
||||
|
||||
namespace android_webview {
|
||||
namespace {
|
||||
static bool g_should_create_thread_pool = true;
|
||||
#if DCHECK_IS_ON()
|
||||
// A boolean value to determine if the NetworkContext has been created yet. This
|
||||
// exists only to check correctness: g_check_cleartext_permitted may only be set
|
||||
@@ -517,7 +517,8 @@ base::FilePath AwContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
}
|
||||
|
||||
std::string AwContentBrowserClient::GetDefaultDownloadName() {
|
||||
NOTREACHED() << "Android WebView does not use chromium downloads";
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Android WebView does not use chromium downloads";
|
||||
return std::string();
|
||||
}
|
||||
|
||||
@@ -534,7 +535,7 @@ AwContentBrowserClient::GetLocalTracesDirectory() {
|
||||
|
||||
void AwContentBrowserClient::DidCreatePpapiPlugin(
|
||||
content::BrowserPpapiHost* browser_host) {
|
||||
NOTREACHED() << "Android WebView does not support plugins";
|
||||
NOTREACHED_IN_MIGRATION() << "Android WebView does not support plugins";
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::AllowPepperSocketAPI(
|
||||
@@ -542,14 +543,14 @@ bool AwContentBrowserClient::AllowPepperSocketAPI(
|
||||
const GURL& url,
|
||||
bool private_api,
|
||||
const content::SocketPermissionRequest* params) {
|
||||
NOTREACHED() << "Android WebView does not support plugins";
|
||||
NOTREACHED_IN_MIGRATION() << "Android WebView does not support plugins";
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::IsPepperVpnProviderAPIAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& url) {
|
||||
NOTREACHED() << "Android WebView does not support plugins";
|
||||
NOTREACHED_IN_MIGRATION() << "Android WebView does not support plugins";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -696,9 +697,8 @@ AwContentBrowserClient::CreateURLLoaderThrottles(
|
||||
static_cast<ui::PageTransition>(request.transition_type),
|
||||
ui::PAGE_TRANSITION_RELOAD);
|
||||
if (is_load_url || is_go_back_forward || is_reload) {
|
||||
result.push_back(
|
||||
std::make_unique<AwURLLoaderThrottle>(static_cast<AwBrowserContext*>(
|
||||
browser_context)));
|
||||
result.push_back(std::make_unique<AwURLLoaderThrottle>(
|
||||
static_cast<AwBrowserContext*>(browser_context)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,14 +841,6 @@ bool AwContentBrowserClient::ShouldOverrideUrlLoading(
|
||||
request_headers, ignore_navigation);
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::CreateThreadPool(std::string_view name) {
|
||||
if (g_should_create_thread_pool) {
|
||||
base::ThreadPoolInstance::Create(name);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<content::LoginDelegate>
|
||||
AwContentBrowserClient::CreateLoginDelegate(
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
@@ -1004,9 +996,9 @@ bool AwContentBrowserClient::ShouldLockProcessToSite(
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::ShouldEnforceNewCanCommitUrlChecks() {
|
||||
// TODO(https://crbug.com/326250356): Diagnose and fix Android WebView crashes
|
||||
// from these new checks and then remove this function.
|
||||
return false;
|
||||
// TODO(https://crbug.com/326250356): Diagnose any remaining Android WebView
|
||||
// crashes from these new checks and then remove this function.
|
||||
return true;
|
||||
}
|
||||
|
||||
void AwContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
@@ -1025,6 +1017,8 @@ void AwContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
bool* disable_secure_dns,
|
||||
network::mojom::URLLoaderFactoryOverridePtr* factory_override,
|
||||
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
|
||||
TRACE_EVENT0("android_webview",
|
||||
"AwContentBrowserClient::WillCreateURLLoaderFactory");
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> proxied_receiver;
|
||||
@@ -1113,9 +1107,12 @@ uint32_t AwContentBrowserClient::GetWebSocketOptions(
|
||||
content::WebContents* web_contents =
|
||||
content::WebContents::FromRenderFrameHost(frame);
|
||||
AwContents* aw_contents = AwContents::FromWebContents(web_contents);
|
||||
AwBrowserContext* aw_context =
|
||||
AwBrowserContext::FromWebContents(web_contents);
|
||||
|
||||
bool global_cookie_policy =
|
||||
AwCookieAccessPolicy::GetInstance()->GetShouldAcceptCookies();
|
||||
bool global_cookie_policy = aw_context->GetCookieManager()
|
||||
->cookie_access_policy()
|
||||
->GetShouldAcceptCookies();
|
||||
bool third_party_cookie_policy = aw_contents->AllowThirdPartyCookies();
|
||||
if (!global_cookie_policy) {
|
||||
options |= network::mojom::kWebSocketOptionBlockAllCookies;
|
||||
@@ -1141,9 +1138,14 @@ bool AwContentBrowserClient::WillCreateRestrictedCookieManager(
|
||||
target_rcm_remote;
|
||||
*receiver = target_rcm_remote.InitWithNewPipeAndPassReceiver();
|
||||
|
||||
AwBrowserContext* aw_context =
|
||||
static_cast<AwBrowserContext*>(browser_context);
|
||||
AwCookieAccessPolicy* aw_cookie_access_policy =
|
||||
aw_context->GetCookieManager()->cookie_access_policy();
|
||||
|
||||
AwProxyingRestrictedCookieManager::CreateAndBind(
|
||||
std::move(target_rcm_remote), is_service_worker, process_id, routing_id,
|
||||
std::move(orig_receiver));
|
||||
std::move(orig_receiver), aw_cookie_access_policy);
|
||||
|
||||
return false; // only made a proxy, still need the actual impl to be made.
|
||||
}
|
||||
@@ -1233,11 +1235,6 @@ void AwContentBrowserClient::OnDisplayInsecureContent(
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void AwContentBrowserClient::DisableCreatingThreadPool() {
|
||||
g_should_create_thread_pool = false;
|
||||
}
|
||||
|
||||
blink::mojom::OriginTrialsSettingsPtr
|
||||
AwContentBrowserClient::GetOriginTrialsSettings() {
|
||||
return AwBrowserProcess::GetInstance()
|
||||
@@ -1267,6 +1264,8 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed(
|
||||
const url::Origin* destination_origin,
|
||||
const url::Origin* reporting_origin,
|
||||
bool* can_bypass) {
|
||||
AwBrowserContext* aw_context =
|
||||
static_cast<AwBrowserContext*>(browser_context);
|
||||
// WebView only supports OS-level attribution and not web-attribution.
|
||||
// Note: We do not check here if attribution reporting has been disabled
|
||||
// for the associated WebView as this is checked at the start of processing
|
||||
@@ -1285,10 +1284,14 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed(
|
||||
case AttributionReportingOperation::kReport:
|
||||
case AttributionReportingOperation::kSourceTransitionalDebugReporting:
|
||||
case AttributionReportingOperation::kTriggerTransitionalDebugReporting:
|
||||
case AttributionReportingOperation::kSourceAggregatableDebugReport:
|
||||
case AttributionReportingOperation::kTriggerAggregatableDebugReport:
|
||||
return false;
|
||||
case AttributionReportingOperation::kOsSourceTransitionalDebugReporting:
|
||||
case AttributionReportingOperation::kOsTriggerTransitionalDebugReporting: {
|
||||
if (!AwCookieAccessPolicy::GetInstance()->GetShouldAcceptCookies()) {
|
||||
if (!aw_context->GetCookieManager()
|
||||
->cookie_access_policy()
|
||||
->GetShouldAcceptCookies()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1366,4 +1369,20 @@ bool AwContentBrowserClient::WillProvidePublicFirstPartySets() {
|
||||
switches::kWebViewFpsComponent);
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::IsFullCookieAccessAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
content::WebContents* web_contents,
|
||||
const GURL& url,
|
||||
const blink::StorageKey& storage_key) {
|
||||
if (!web_contents) {
|
||||
// We do not allow third-party cookie access from service workers.
|
||||
return false;
|
||||
}
|
||||
AwSettings* aw_settings = AwSettings::FromWebContents(web_contents);
|
||||
if (!aw_settings) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return aw_settings->GetAllowThirdPartyCookies();
|
||||
}
|
||||
} // namespace android_webview
|
||||
|
||||
@@ -558,12 +558,6 @@ by a child template that "extends" this file.
|
||||
{{ self.supports_vr() }}
|
||||
{{ self.extra_web_rendering_activity_definitions() }}
|
||||
</activity>
|
||||
<activity android:name="org.chromium.chrome.browser.multiwindow.MultiInstanceChromeTabbedActivity"
|
||||
android:theme="@style/Theme.Chromium.TabbedMode"
|
||||
android:exported="false"
|
||||
{{ self.chrome_activity_common() }}>
|
||||
{{ self.extra_web_rendering_activity_definitions() }}
|
||||
</activity>
|
||||
|
||||
<!--
|
||||
TODO(crbug.com/40698801): investigate why
|
||||
@@ -1092,6 +1086,9 @@ by a child template that "extends" this file.
|
||||
<receiver android:name="org.chromium.chrome.browser.announcement.AnnouncementNotificationManager$Receiver"
|
||||
android:exported="false"/>
|
||||
|
||||
<service android:name="org.chromium.chrome.browser.notifications.NotificationIntentInterceptorService"
|
||||
android:exported="false"/>
|
||||
|
||||
<receiver android:name="org.chromium.chrome.browser.notifications.NotificationIntentInterceptor$Receiver"
|
||||
android:exported="false"/>
|
||||
|
||||
|
||||
+69
-55
@@ -156,7 +156,7 @@
|
||||
#include "chrome/browser/android/oom_intervention/oom_intervention_decider.h"
|
||||
#include "chrome/browser/android/webapps/webapp_registry.h"
|
||||
#include "chrome/browser/offline_pages/offline_page_model_factory.h"
|
||||
#include "chrome/browser/profiles/profile_android.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/android/tab_model/tab_model.h"
|
||||
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
|
||||
#include "components/cdm/browser/media_drm_storage_impl.h" // nogncheck crbug.com/1125897
|
||||
@@ -677,9 +677,8 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
Java_PackageHash_onCookiesDeleted(
|
||||
base::android::AttachCurrentThread(),
|
||||
ProfileAndroid::FromProfile(profile_)->GetJavaObject());
|
||||
Java_PackageHash_onCookiesDeleted(base::android::AttachCurrentThread(),
|
||||
profile_->GetJavaObject());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -832,13 +831,15 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
ContentSettingsType::SITE_ENGAGEMENT, base::Time(), base::Time::Max(),
|
||||
website_settings_filter);
|
||||
|
||||
if (MediaEngagementService::IsEnabled()) {
|
||||
MediaEngagementService::Get(profile_)->ClearDataBetweenTime(delete_begin_,
|
||||
delete_end_);
|
||||
}
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
if (MediaEngagementService::IsEnabled()) {
|
||||
MediaEngagementService::Get(profile_)->ClearDataBetweenTime(
|
||||
delete_begin_, delete_end_);
|
||||
}
|
||||
|
||||
PermissionActionsHistoryFactory::GetForProfile(profile_)->ClearHistory(
|
||||
delete_begin_, delete_end_);
|
||||
PermissionActionsHistoryFactory::GetForProfile(profile_)->ClearHistory(
|
||||
delete_begin_, delete_end_);
|
||||
}
|
||||
}
|
||||
|
||||
if ((remove_mask & constants::DATA_TYPE_SITE_USAGE_DATA) ||
|
||||
@@ -855,6 +856,14 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
ContentSettingsType::REVOKED_UNUSED_SITE_PERMISSIONS, delete_begin_,
|
||||
delete_end_, website_settings_filter);
|
||||
|
||||
host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
|
||||
ContentSettingsType::REVOKED_ABUSIVE_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);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
|
||||
ContentSettingsType::INTENT_PICKER_DISPLAY, delete_begin_, delete_end_,
|
||||
@@ -864,14 +873,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
ContentSettingsType::FILE_SYSTEM_LAST_PICKED_DIRECTORY, delete_begin,
|
||||
delete_end, website_settings_filter);
|
||||
|
||||
host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
|
||||
ContentSettingsType::NOTIFICATION_PERMISSION_REVIEW, delete_begin_,
|
||||
delete_end_, website_settings_filter);
|
||||
|
||||
host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
|
||||
ContentSettingsType::REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS,
|
||||
delete_begin_, delete_end_, website_settings_filter);
|
||||
|
||||
host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
|
||||
ContentSettingsType::PRIVATE_NETWORK_GUARD, delete_begin_, delete_end_,
|
||||
website_settings_filter);
|
||||
@@ -1067,39 +1068,48 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
// dependencies or reimplement the relevant part of WebCacheManager
|
||||
// in content/browser.
|
||||
// TODO(crbug.com/40657761): add a test for this.
|
||||
for (content::RenderProcessHost::iterator iter =
|
||||
content::RenderProcessHost::AllHostsIterator();
|
||||
!iter.IsAtEnd(); iter.Advance()) {
|
||||
content::RenderProcessHost* render_process_host = iter.GetCurrentValue();
|
||||
if (render_process_host->GetBrowserContext() == profile_ &&
|
||||
render_process_host->IsInitializedAndNotDead()) {
|
||||
web_cache::WebCacheManager::GetInstance()->ClearCacheForProcess(
|
||||
render_process_host->GetID());
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
for (content::RenderProcessHost::iterator iter =
|
||||
content::RenderProcessHost::AllHostsIterator();
|
||||
!iter.IsAtEnd(); iter.Advance()) {
|
||||
content::RenderProcessHost* render_process_host =
|
||||
iter.GetCurrentValue();
|
||||
if (render_process_host->GetBrowserContext() == profile_ &&
|
||||
render_process_host->IsInitializedAndNotDead()) {
|
||||
web_cache::WebCacheManager::GetInstance()->ClearCacheForProcess(
|
||||
render_process_host->GetID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_NACL)
|
||||
nacl::NaClBrowser::GetInstance()->ClearValidationCache(UIThreadTrampoline(
|
||||
CreateTaskCompletionClosure(TracingDataType::kNaclCache)));
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
nacl::NaClBrowser::GetInstance()->ClearValidationCache(UIThreadTrampoline(
|
||||
CreateTaskCompletionClosure(TracingDataType::kNaclCache)));
|
||||
|
||||
pnacl::PnaclHost::GetInstance()->ClearTranslationCacheEntriesBetween(
|
||||
delete_begin_, delete_end_,
|
||||
UIThreadTrampoline(
|
||||
CreateTaskCompletionClosure(TracingDataType::kPnaclCache)));
|
||||
pnacl::PnaclHost::GetInstance()->ClearTranslationCacheEntriesBetween(
|
||||
delete_begin_, delete_end_,
|
||||
UIThreadTrampoline(
|
||||
CreateTaskCompletionClosure(TracingDataType::kPnaclCache)));
|
||||
}
|
||||
#endif
|
||||
|
||||
browsing_data::RemovePrerenderCacheData(
|
||||
prerender::NoStatePrefetchManagerFactory::GetForBrowserContext(
|
||||
profile_));
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
browsing_data::RemovePrerenderCacheData(
|
||||
prerender::NoStatePrefetchManagerFactory::GetForBrowserContext(
|
||||
profile_));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
// Don't bridge through if the service isn't present, which means we're
|
||||
// probably running in a native unit test.
|
||||
feed::FeedService* service =
|
||||
feed::FeedServiceFactory::GetForBrowserContext(profile_);
|
||||
if (service) {
|
||||
service->ClearCachedData();
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
// Don't bridge through if the service isn't present, which means
|
||||
// we're probably running in a native unit test.
|
||||
feed::FeedService* service =
|
||||
feed::FeedServiceFactory::GetForBrowserContext(profile_);
|
||||
if (service) {
|
||||
service->ClearCachedData();
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_FEED_V2)
|
||||
|
||||
@@ -1121,18 +1131,19 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
#endif
|
||||
|
||||
// TODO(crbug.com/41380998): Remove null-check.
|
||||
auto* webrtc_event_log_manager = WebRtcEventLogManager::GetInstance();
|
||||
if (webrtc_event_log_manager) {
|
||||
webrtc_event_log_manager->ClearCacheForBrowserContext(
|
||||
profile_, delete_begin_, delete_end_,
|
||||
CreateTaskCompletionClosure(TracingDataType::kWebrtcEventLogs));
|
||||
} else {
|
||||
LOG(ERROR) << "WebRtcEventLogManager not instantiated.";
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
auto* webrtc_event_log_manager = WebRtcEventLogManager::GetInstance();
|
||||
if (webrtc_event_log_manager) {
|
||||
webrtc_event_log_manager->ClearCacheForBrowserContext(
|
||||
profile_, delete_begin_, delete_end_,
|
||||
CreateTaskCompletionClosure(TracingDataType::kWebrtcEventLogs));
|
||||
} else {
|
||||
LOG(ERROR) << "WebRtcEventLogManager not instantiated.";
|
||||
}
|
||||
}
|
||||
|
||||
// Mark cached favicons as expired to force redownload on next visit.
|
||||
if (filter_builder->GetMode() ==
|
||||
BrowsingDataFilterBuilder::Mode::kPreserve) {
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
history::HistoryService* history_service =
|
||||
HistoryServiceFactory::GetForProfile(
|
||||
profile_, ServiceAccessType::EXPLICIT_ACCESS);
|
||||
@@ -1157,7 +1168,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
// 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.
|
||||
if (filter_builder->GetMode() != BrowsingDataFilterBuilder::Mode::kDelete) {
|
||||
if (filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
const user_manager::User* user =
|
||||
ash::ProfileHelper::Get()->GetUserByProfile(profile_);
|
||||
if (!user) {
|
||||
@@ -1278,9 +1289,11 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
//
|
||||
// TODO(alexmos): Support finer-grained filtering based on time ranges and
|
||||
// |filter|. For now, conservatively delete all saved isolated origins.
|
||||
if (remove_mask &
|
||||
(constants::DATA_TYPE_ISOLATED_ORIGINS | constants::DATA_TYPE_HISTORY))
|
||||
if (remove_mask & (constants::DATA_TYPE_ISOLATED_ORIGINS |
|
||||
constants::DATA_TYPE_HISTORY) &&
|
||||
filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
browsing_data::RemoveSiteIsolationData(prefs);
|
||||
}
|
||||
|
||||
if (remove_mask & constants::DATA_TYPE_HISTORY) {
|
||||
network::mojom::NetworkContext* network_context =
|
||||
@@ -1318,7 +1331,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Remove external protocol data.
|
||||
if (remove_mask & constants::DATA_TYPE_EXTERNAL_PROTOCOL_DATA &&
|
||||
filter_builder->GetMode() == BrowsingDataFilterBuilder::Mode::kPreserve) {
|
||||
filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
ExternalProtocolHandler::ClearData(profile_);
|
||||
}
|
||||
|
||||
@@ -1340,7 +1353,8 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
// site data are cleared, or when history is cleared. This is because clearing
|
||||
// cookies or history implies forgetting that the user has logged into sites.
|
||||
if (remove_mask &
|
||||
(constants::DATA_TYPE_SITE_DATA | constants::DATA_TYPE_HISTORY)) {
|
||||
(constants::DATA_TYPE_SITE_DATA | constants::DATA_TYPE_HISTORY) &&
|
||||
filter_builder->MatchesMostOriginsAndDomains()) {
|
||||
login_detection::prefs::RemoveLoginDetectionData(prefs);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#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/ai/ai_manager_impl.h"
|
||||
#include "chrome/browser/ash/drive/file_system_util.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/buildflags.h"
|
||||
@@ -21,7 +22,6 @@
|
||||
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
|
||||
#include "chrome/browser/history_clusters/history_clusters_service_factory.h"
|
||||
#include "chrome/browser/media/media_engagement_score_details.mojom.h"
|
||||
#include "chrome/browser/model_execution/model_manager_impl.h"
|
||||
#include "chrome/browser/navigation_predictor/navigation_predictor.h"
|
||||
#include "chrome/browser/on_device_translation/translation_manager_impl.h"
|
||||
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
|
||||
@@ -36,9 +36,10 @@
|
||||
#include "chrome/browser/ssl/security_state_tab_helper.h"
|
||||
#include "chrome/browser/translate/translate_frame_binder.h"
|
||||
#include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
|
||||
#include "chrome/browser/ui/side_panel/companion/companion_utils.h"
|
||||
#include "chrome/browser/ui/views/side_panel/companion/companion_utils.h"
|
||||
#include "chrome/browser/ui/ui_features.h"
|
||||
#include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_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/internals/internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/location_internals/location_internals.mojom.h"
|
||||
@@ -62,6 +63,7 @@
|
||||
#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"
|
||||
@@ -160,6 +162,7 @@
|
||||
#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters.mojom.h"
|
||||
#include "chrome/browser/new_tab_page/modules/photos/photos.mojom.h"
|
||||
#include "chrome/browser/new_tab_page/modules/recipes/recipes.mojom.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/calendar/google_calendar.mojom.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/history_clusters/history_clusters_v2.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/modules/v2/tab_resumption/tab_resumption.mojom.h"
|
||||
@@ -179,9 +182,11 @@
|
||||
#endif
|
||||
#include "chrome/browser/ui/lens/lens_untrusted_ui.h"
|
||||
#include "chrome/browser/ui/lens/search_bubble_ui.h"
|
||||
#include "chrome/browser/ui/side_panel/customize_chrome/customize_chrome_utils.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/hats/hats_ui.h"
|
||||
#include "chrome/browser/ui/webui/history/history_ui.h"
|
||||
#include "chrome/browser/ui/webui/internals/user_education/user_education_internals.mojom.h"
|
||||
@@ -203,12 +208,9 @@
|
||||
#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/side_panel/user_notes/user_notes.mojom.h"
|
||||
#include "chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_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/webui_gallery/webui_gallery_ui.h"
|
||||
#include "chrome/browser/ui/webui/whats_new/whats_new_ui.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "components/optimization_guide/core/optimization_guide_features.h"
|
||||
#include "components/page_image_service/mojom/page_image_service.mojom.h"
|
||||
@@ -239,6 +241,10 @@
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
|
||||
// BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
#include "chrome/browser/ui/webui/whats_new/whats_new_ui.h"
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
|
||||
#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"
|
||||
@@ -250,14 +256,11 @@
|
||||
#include "ui/webui/resources/cr_components/customize_themes/customize_themes.mojom.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "ash/webui/conch/conch_ui.h"
|
||||
#include "ash/webui/conch/mojom/conch.mojom.h"
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "ash/constants/ash_features.h"
|
||||
#include "ash/public/mojom/hid_preserving_bluetooth_state_controller.mojom.h"
|
||||
#include "ash/webui/annotator/mojom/untrusted_annotator.mojom.h"
|
||||
#include "ash/webui/annotator/untrusted_annotator_ui.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"
|
||||
@@ -281,10 +284,14 @@
|
||||
#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/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"
|
||||
@@ -297,11 +304,12 @@
|
||||
#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_annotator.mojom.h"
|
||||
#include "ash/webui/projector_app/mojom/untrusted_projector.mojom.h"
|
||||
#include "ash/webui/projector_app/untrusted_projector_annotator_ui.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/scanning/mojom/scanning.mojom.h"
|
||||
#include "ash/webui/scanning/scanning_ui.h"
|
||||
#include "ash/webui/shimless_rma/shimless_rma.h"
|
||||
@@ -362,6 +370,7 @@
|
||||
#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"
|
||||
@@ -378,6 +387,8 @@
|
||||
#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"
|
||||
@@ -1136,6 +1147,10 @@ void PopulateChromeWebUIFrameBinders(
|
||||
commerce::mojom::CommerceInternalsHandlerFactory,
|
||||
commerce::CommerceInternalsUI>(map);
|
||||
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
data_sharing_internals::mojom::PageHandlerFactory,
|
||||
DataSharingInternalsUI>(map);
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
@@ -1225,7 +1240,7 @@ void PopulateChromeWebUIFrameBinders(
|
||||
history_clusters::mojom::PageHandler, HistoryUI>(map);
|
||||
}
|
||||
}
|
||||
if (base::FeatureList::IsEnabled(history_embeddings::kHistoryEmbeddings)) {
|
||||
if (history_embeddings::IsHistoryEmbeddingEnabled()) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
history_embeddings::mojom::PageHandler, HistoryUI>(map);
|
||||
}
|
||||
@@ -1234,9 +1249,17 @@ void PopulateChromeWebUIFrameBinders(
|
||||
page_image_service::mojom::PageImageServiceHandler, HistoryUI,
|
||||
HistoryClustersSidePanelUI, NewTabPageUI, BookmarksSidePanelUI>(map);
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
RegisterWebUIControllerInterfaceBinder<whats_new::mojom::PageHandlerFactory,
|
||||
WhatsNewUI>(map);
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
browser_command::mojom::CommandHandlerFactory, NewTabPageUI, WhatsNewUI>(
|
||||
map);
|
||||
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<searchbox::mojom::PageHandler,
|
||||
NewTabPageUI, OmniboxPopupUI>(map);
|
||||
@@ -1335,6 +1358,11 @@ void PopulateChromeWebUIFrameBinders(
|
||||
map);
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(ntp_features::kNtpCalendarModule)) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
ntp::calendar::mojom::GoogleCalendarPageHandler, NewTabPageUI>(map);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
if (ash::features::IsBluetoothDisconnectWarningEnabled()) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
@@ -1380,16 +1408,14 @@ void PopulateChromeWebUIFrameBinders(
|
||||
CustomizeChromeUI>(map);
|
||||
}
|
||||
|
||||
if (user_notes::IsUserNotesEnabled()) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
side_panel::mojom::UserNotesPageHandlerFactory, UserNotesSidePanelUI>(
|
||||
map);
|
||||
}
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
read_anything::mojom::UntrustedPageHandlerFactory,
|
||||
ReadAnythingUntrustedUI>(map);
|
||||
|
||||
if (features::IsReadAnythingEnabled()) {
|
||||
if (base::FeatureList::IsEnabled(
|
||||
data_sharing::features::kDataSharingFeature)) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
read_anything::mojom::UntrustedPageHandlerFactory,
|
||||
ReadAnythingUntrustedUI>(map);
|
||||
data_sharing::mojom::PageHandlerFactory, DataSharingUI>(map);
|
||||
}
|
||||
|
||||
RegisterWebUIControllerInterfaceBinder<tab_search::mojom::PageHandlerFactory,
|
||||
@@ -1638,6 +1664,12 @@ void PopulateChromeWebUIFrameBinders(
|
||||
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);
|
||||
|
||||
@@ -1690,11 +1722,9 @@ void PopulateChromeWebUIFrameBinders(
|
||||
ash::audio_config::mojom::CrosAudioConfig, ash::settings::OSSettingsUI>(
|
||||
map);
|
||||
|
||||
if (ash::features::IsHotspotEnabled()) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
ash::hotspot_config::mojom::CrosHotspotConfig,
|
||||
ash::settings::OSSettingsUI>(map);
|
||||
}
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
ash::hotspot_config::mojom::CrosHotspotConfig,
|
||||
ash::settings::OSSettingsUI>(map);
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
ash::features::kSystemJapanesePhysicalTyping)) {
|
||||
@@ -1706,6 +1736,10 @@ void PopulateChromeWebUIFrameBinders(
|
||||
RegisterWebUIControllerInterfaceBinder<audio::mojom::PageHandlerFactory,
|
||||
ash::AudioUI>(map);
|
||||
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
ash::kiosk_vision::mojom::PageConnector, ash::kiosk_vision::UIController>(
|
||||
map);
|
||||
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
ash::extended_updates::mojom::PageHandlerFactory,
|
||||
ash::extended_updates::ExtendedUpdatesUI>(map);
|
||||
@@ -1743,6 +1777,10 @@ void PopulateChromeWebUIFrameBinders(
|
||||
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);
|
||||
|
||||
@@ -1830,6 +1868,13 @@ void PopulateChromeWebUIFrameBinders(
|
||||
privacy_sandbox_internals::mojom::PageHandler,
|
||||
privacy_sandbox_internals::PrivacySandboxInternalsUI>(map);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
if (ash::features::IsFocusModeEnabled()) {
|
||||
RegisterWebUIControllerInterfaceBinder<
|
||||
ash::focus_mode::mojom::TrackProvider, ash::FocusModeUI>(map);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
}
|
||||
|
||||
void PopulateChromeWebUIFrameInterfaceBrokers(
|
||||
@@ -1847,11 +1892,11 @@ void PopulateChromeWebUIFrameInterfaceBrokers(
|
||||
.Add<ash::mojom::status_area_internals::PageHandler>();
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OFFICIAL_BUILD)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
registry.ForWebUI<ash::ConchUI>()
|
||||
.Add<ash::conch::mojom::PageHandler>()
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
registry.ForWebUI<ash::RecorderAppUI>()
|
||||
.Add<ash::recorder_app::mojom::PageHandler>()
|
||||
.Add<color_change_listener::mojom::PageHandler>();
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
registry.ForWebUI<ash::CameraAppUI>()
|
||||
@@ -1871,6 +1916,7 @@ void PopulateChromeWebUIFrameInterfaceBrokers(
|
||||
.Add<color_change_listener::mojom::PageHandler>();
|
||||
registry.ForWebUI<FeedbackUI>()
|
||||
.Add<color_change_listener::mojom::PageHandler>();
|
||||
registry.ForWebUI<ash::MallUI>().Add<ash::mall::mojom::PageHandler>();
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// --- Section 2: chrome-untrusted:// WebUIs:
|
||||
@@ -1884,7 +1930,7 @@ void PopulateChromeWebUIFrameInterfaceBrokers(
|
||||
registry.ForWebUI<ash::DemoModeAppUntrustedUI>()
|
||||
.Add<ash::mojom::demo_mode::UntrustedPageHandlerFactory>();
|
||||
|
||||
registry.ForWebUI<ash::UntrustedProjectorAnnotatorUI>()
|
||||
registry.ForWebUI<ash::UntrustedAnnotatorUI>()
|
||||
.Add<ash::annotator::mojom::UntrustedAnnotatorPageHandlerFactory>();
|
||||
|
||||
registry.ForWebUI<ash::UntrustedProjectorUI>()
|
||||
@@ -1923,8 +1969,7 @@ void PopulateChromeWebUIFrameInterfaceBrokers(
|
||||
registry.ForWebUI<CompanionSidePanelUntrustedUI>()
|
||||
.Add<side_panel::mojom::CompanionPageHandlerFactory>();
|
||||
}
|
||||
if (features::IsReadAnythingEnabled() &&
|
||||
features::IsReadAnythingWebUIToolbarEnabled()) {
|
||||
if (features::IsReadAnythingWebUIToolbarEnabled()) {
|
||||
registry.ForWebUI<ReadAnythingUntrustedUI>()
|
||||
.Add<color_change_listener::mojom::PageHandler>();
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/ai/ai_manager_impl.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.h"
|
||||
#include "chrome/browser/browser_about_handler.h"
|
||||
@@ -97,7 +98,6 @@
|
||||
#include "chrome/browser/memory/chrome_browser_main_extra_parts_memory.h"
|
||||
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
|
||||
#include "chrome/browser/metrics/chrome_feature_list_creator.h"
|
||||
#include "chrome/browser/model_execution/model_manager_impl.h"
|
||||
#include "chrome/browser/navigation_predictor/anchor_element_preloader.h"
|
||||
#include "chrome/browser/net/chrome_network_delegate.h"
|
||||
#include "chrome/browser/net/profile_network_context_service.h"
|
||||
@@ -190,7 +190,6 @@
|
||||
#include "chrome/browser/usb/chrome_usb_delegate.h"
|
||||
#include "chrome/browser/vr/vr_tab_helper.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/pending_install_info.h"
|
||||
#include "chrome/browser/webapps/web_app_offline.h"
|
||||
#include "chrome/browser/webauthn/webauthn_pref_names.h"
|
||||
#include "chrome/common/buildflags.h"
|
||||
@@ -241,6 +240,8 @@
|
||||
#include "components/error_page/common/error_page_switches.h"
|
||||
#include "components/error_page/common/localized_error.h"
|
||||
#include "components/error_page/content/browser/net_error_auto_reloader.h"
|
||||
#include "components/fingerprinting_protection_filter/browser/fingerprinting_protection_filter_features.h"
|
||||
#include "components/fingerprinting_protection_filter/browser/throttle_manager.h"
|
||||
#include "components/google/core/common/google_switches.h"
|
||||
#include "components/heap_profiling/in_process/heap_profiler_controller.h"
|
||||
#include "components/history/content/browser/visited_link_navigation_throttle.h"
|
||||
@@ -488,6 +489,7 @@
|
||||
#include "chrome/browser/flags/android/chrome_feature_list.h"
|
||||
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
|
||||
#include "chrome/browser/ui/webid/digital_identity_safety_interstitial_bridge_android.h"
|
||||
#include "chrome/browser/webid/digital_identity_provider_android.h"
|
||||
#include "chrome/common/chrome_descriptors.h"
|
||||
#include "components/browser_ui/accessibility/android/font_size_prefs_android.h"
|
||||
#include "components/crash/content/browser/child_exit_observer_android.h"
|
||||
@@ -510,6 +512,10 @@
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/preloading/preview/preview_navigation_throttle.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h"
|
||||
#include "chrome/browser/web_applications/locks/app_lock.h"
|
||||
#include "chrome/browser/web_applications/web_app_helpers.h"
|
||||
#include "chrome/browser/webid/digital_identity_provider_desktop.h"
|
||||
#include "third_party/blink/public/mojom/installedapp/related_application.mojom.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -553,10 +559,11 @@
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
#include "chrome/browser/ui/chrome_pages.h"
|
||||
#include "chrome/browser/ui/search/new_tab_page_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/side_panel/read_anything/read_anything_side_panel_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/web_applications/tabbed_web_app_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/web_applications/webui_web_app_navigation_throttle.h"
|
||||
#include "chrome/browser/ui/webui/chrome_content_browser_client_webui_part.h"
|
||||
#include "chrome/browser/ui/webui/webui_util_desktop.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_error_page.h"
|
||||
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory.h"
|
||||
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
|
||||
@@ -614,7 +621,7 @@
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_LENS_DESKTOP_GOOGLE_BRANDED_FEATURES)
|
||||
#include "chrome/browser/ui/lens/lens_side_panel_navigation_helper.h"
|
||||
#include "chrome/browser/ui/views/lens/lens_side_panel_navigation_helper.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
@@ -738,10 +745,6 @@
|
||||
#include "chrome/browser/screen_ai/screen_ai_install_state.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) || !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
|
||||
#include "chrome/browser/signin/bound_session_credentials/bound_session_cookie_refresh_service.h"
|
||||
#include "chrome/browser/signin/bound_session_credentials/bound_session_cookie_refresh_service_factory.h"
|
||||
@@ -956,7 +959,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebContents(
|
||||
switches::autoplay::kDocumentUserActivationRequiredPolicy) {
|
||||
result = blink::mojom::AutoplayPolicy::kDocumentUserActivationRequired;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -1458,6 +1461,25 @@ MaybeCreateVisitedLinkNavigationThrottleFor(
|
||||
ChromeContentBrowserClient::PopupNavigationDelegateFactory
|
||||
g_popup_navigation_delegate_factory = &CreatePopupNavigationDelegate;
|
||||
|
||||
bool DetermineIfDevtoolsUserForProcessPerSite() {
|
||||
bool is_devtools_user = false;
|
||||
if (ProfileManager* profile_manager = g_browser_process->profile_manager()) {
|
||||
std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles();
|
||||
for (auto* profile : profiles) {
|
||||
if (profile->GetPrefs()->HasPrefPath(
|
||||
prefs::kDevToolsSyncedPreferencesSyncDisabled) ||
|
||||
profile->GetPrefs()->HasPrefPath(prefs::kDevToolsPreferences)) {
|
||||
is_devtools_user = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
base::UmaHistogramBoolean(
|
||||
"SiteIsolation.ProcessPerSiteWithMainFrameThreshold.IsDevToolsUser",
|
||||
is_devtools_user);
|
||||
return is_devtools_user;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
@@ -1586,10 +1608,17 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
registry->RegisterBooleanPref(policy::policy_prefs::kMutationEventsEnabled,
|
||||
false);
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
policy::policy_prefs::kCSSCustomStateDeprecatedSyntaxEnabled,
|
||||
/*default_value=*/false);
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
policy::policy_prefs::kBeforeunloadEventCancelByPreventDefaultEnabled,
|
||||
true);
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
policy::policy_prefs::kKeyboardFocusableScrollersEnabled, true);
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
policy::policy_prefs::
|
||||
kAllowBackForwardCacheForCacheControlNoStorePageEnabled,
|
||||
@@ -1951,6 +1980,18 @@ bool ChromeContentBrowserClient::ShouldUseProcessPerSite(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::ShouldAllowProcessPerSiteForMultipleMainFrames(
|
||||
content::BrowserContext* browser_context) {
|
||||
static bool is_devtools_user = DetermineIfDevtoolsUserForProcessPerSite();
|
||||
|
||||
// TODO(dtapuska): Implement enterprise policy support here.
|
||||
if (is_devtools_user && base::FeatureList::IsEnabled(
|
||||
features::kProcessPerSiteSkipDevtoolsUsers)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::ShouldUseSpareRenderProcessHost(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& site_url) {
|
||||
@@ -2264,23 +2305,8 @@ ChromeContentBrowserClient::GetPermissionsPolicyForIsolatedWebApp(
|
||||
if (app_origin.scheme() == extensions::kExtensionScheme) {
|
||||
return std::nullopt;
|
||||
}
|
||||
CHECK(web_contents);
|
||||
if (web_app::IsolatedWebAppPendingInstallInfo::HasPendingInstallSource(
|
||||
*web_contents)) {
|
||||
// We allow sync-xhr for apps that are being installed or updated to
|
||||
// allow synchronous requests from the generated install page, which is
|
||||
// used to implement manifest fallback logic while we migrate the
|
||||
// expected manifest path from /manifest.webmanifest to
|
||||
// /.well-known/manifest.webmanifest.
|
||||
//
|
||||
// TODO(crbug.com/325132780): Remove when manifest fallback logic is gone.
|
||||
return blink::ParsedPermissionsPolicy(
|
||||
{blink::ParsedPermissionsPolicyDeclaration(
|
||||
blink::mojom::PermissionsPolicyFeature::kSyncXHR,
|
||||
/*allowed_origins=*/{}, /*self_if_matches=*/app_origin,
|
||||
/*matches_all_origins=*/false, /*matches_opaque_src=*/false)});
|
||||
}
|
||||
|
||||
CHECK(web_contents);
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
||||
auto& registrar =
|
||||
@@ -2657,6 +2683,17 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
command_line->AppendSwitch(blink::switches::kMutationEventsEnabled);
|
||||
}
|
||||
|
||||
if (!prefs->GetBoolean(
|
||||
policy::policy_prefs::kKeyboardFocusableScrollersEnabled)) {
|
||||
command_line->AppendSwitch(
|
||||
blink::switches::kKeyboardFocusableScrollersOptOut);
|
||||
}
|
||||
if (prefs->GetBoolean(
|
||||
policy::policy_prefs::kCSSCustomStateDeprecatedSyntaxEnabled)) {
|
||||
command_line->AppendSwitch(
|
||||
blink::switches::kCSSCustomStateDeprecatedSyntaxEnabled);
|
||||
}
|
||||
|
||||
if (prefs->GetBoolean(policy::policy_prefs::
|
||||
kForcePermissionPolicyUnloadDefaultEnabled)) {
|
||||
command_line->AppendSwitch(
|
||||
@@ -3326,6 +3363,7 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed(
|
||||
return allowed;
|
||||
}
|
||||
case AttributionReportingOperation::kSourceVerboseDebugReport:
|
||||
case AttributionReportingOperation::kSourceAggregatableDebugReport:
|
||||
case AttributionReportingOperation::kOsSourceVerboseDebugReport:
|
||||
DCHECK(source_origin);
|
||||
DCHECK(reporting_origin);
|
||||
@@ -3346,6 +3384,7 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed(
|
||||
return allowed;
|
||||
}
|
||||
case AttributionReportingOperation::kTriggerVerboseDebugReport:
|
||||
case AttributionReportingOperation::kTriggerAggregatableDebugReport:
|
||||
case AttributionReportingOperation::kOsTriggerVerboseDebugReport:
|
||||
DCHECK(destination_origin);
|
||||
DCHECK(reporting_origin);
|
||||
@@ -3486,6 +3525,7 @@ bool ChromeContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
|
||||
|
||||
bool ChromeContentBrowserClient::IsFullCookieAccessAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
content::WebContents* web_contents,
|
||||
const GURL& url,
|
||||
const blink::StorageKey& storage_key) {
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
@@ -3507,7 +3547,7 @@ void ChromeContentBrowserClient::OnTrustAnchorUsed(
|
||||
policy::PolicyCertServiceFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(browser_context));
|
||||
if (!service) {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
}
|
||||
service->SetUsedPolicyCertificates();
|
||||
@@ -3582,6 +3622,15 @@ ChromeContentBrowserClient::GetGeneratedCodeCacheSettings(
|
||||
return content::GeneratedCodeCacheSettings(true, size_in_bytes, cache_path);
|
||||
}
|
||||
|
||||
std::string ChromeContentBrowserClient::GetWebUIHostnameForCodeCacheMetrics(
|
||||
const GURL& webui_url) const {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
return webui::GetWebUIHostnameForCodeCacheMetrics(webui_url);
|
||||
#else
|
||||
return ContentBrowserClient::GetWebUIHostnameForCodeCacheMetrics(webui_url);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::AllowCertificateError(
|
||||
content::WebContents* web_contents,
|
||||
int cert_error,
|
||||
@@ -4140,10 +4189,8 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
|
||||
web_prefs->always_show_focus =
|
||||
prefs->GetBoolean(ash::prefs::kAccessibilityFocusHighlightEnabled);
|
||||
#else
|
||||
if (features::IsAccessibilityFocusHighlightEnabled()) {
|
||||
web_prefs->always_show_focus =
|
||||
prefs->GetBoolean(prefs::kAccessibilityFocusHighlightEnabled);
|
||||
}
|
||||
web_prefs->always_show_focus =
|
||||
prefs->GetBoolean(prefs::kAccessibilityFocusHighlightEnabled);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
@@ -4950,6 +4997,12 @@ bool ChromeContentBrowserClient::ShouldEnableAudioProcessHighPriority() {
|
||||
return IsAudioProcessHighPriorityEnabled();
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::ShouldUseSkiaFontManager(
|
||||
const GURL& site_url) {
|
||||
return (base::FeatureList::IsEnabled(features::kSkiaFontService) &&
|
||||
IsTopChromeWebUIURL(site_url));
|
||||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
void ChromeContentBrowserClient::
|
||||
@@ -5163,6 +5216,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles);
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(fingerprinting_protection_filter::features::
|
||||
kEnableFingerprintingProtectionFilter)) {
|
||||
if (auto* throttle_manager = fingerprinting_protection_filter::
|
||||
ThrottleManager::FromNavigationHandle(*handle)) {
|
||||
throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles);
|
||||
}
|
||||
}
|
||||
|
||||
MaybeAddThrottle(
|
||||
LookalikeUrlNavigationThrottle::MaybeCreateNavigationThrottle(handle),
|
||||
&throttles);
|
||||
@@ -5324,10 +5385,8 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (features::IsReadAnythingEnabled()) {
|
||||
MaybeAddThrottle(ReadAnythingSidePanelNavigationThrottle::CreateFor(handle),
|
||||
&throttles);
|
||||
}
|
||||
MaybeAddThrottle(ReadAnythingSidePanelNavigationThrottle::CreateFor(handle),
|
||||
&throttles);
|
||||
|
||||
if (lens::features::IsLensOverlayEnabled()) {
|
||||
if (profile) {
|
||||
@@ -5515,24 +5574,13 @@ ChromeContentBrowserClient::GetDevToolsBackgroundServiceExpirations(
|
||||
std::optional<base::TimeDelta>
|
||||
ChromeContentBrowserClient::GetSpareRendererDelayForSiteURL(
|
||||
const GURL& site_url) {
|
||||
if (!base::FeatureList::IsEnabled(
|
||||
features::kDeferredSpareRendererForTopChromeWebUI)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (!IsTopChromeWebUIURL(site_url)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// Prevent new spare renderer creation until page loading completes, signaled
|
||||
// by WebContentsImpl::DidStopLoading. When enabled, delay spare renderer
|
||||
// creation indefinitely by returning the maximum TimeDelta value.
|
||||
if (features::kSpareRendererWarmupDelayUntilPageStopsLoading.Get()) {
|
||||
return base::TimeDelta::Max();
|
||||
}
|
||||
|
||||
// Otherwise, schedule new spare renderer creation after a predefined delay.
|
||||
return features::kSpareRendererWarmupDelay.Get();
|
||||
// Experiments have shown that delaying 2s brings the most significant
|
||||
// improvements to Top Chrome WebUIs. See crbug.com/41490050.
|
||||
return base::Seconds(2);
|
||||
}
|
||||
|
||||
std::unique_ptr<content::TracingDelegate>
|
||||
@@ -5737,7 +5785,8 @@ std::unique_ptr<blink::URLLoaderThrottle> CreateGoogleURLLoaderThrottle(
|
||||
BoundSessionCookieRefreshServiceFactory::GetForProfile(profile);
|
||||
std::unique_ptr<BoundSessionRequestThrottledHandler>
|
||||
bound_session_request_throttled_handler;
|
||||
chrome::mojom::BoundSessionThrottlerParamsPtr bound_session_throttler_params;
|
||||
std::vector<chrome::mojom::BoundSessionThrottlerParamsPtr>
|
||||
bound_session_throttler_params;
|
||||
|
||||
if (bound_session_cookie_refresh_service) {
|
||||
bound_session_request_throttled_handler =
|
||||
@@ -7837,7 +7886,8 @@ void RunDigitalIdentityCallback(
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
void ChromeContentBrowserClient::ShowDigitalIdentityInterstitialIfNeeded(
|
||||
content::ContentBrowserClient::DigitalIdentityInterstitialAbortCallback
|
||||
ChromeContentBrowserClient::ShowDigitalIdentityInterstitialIfNeeded(
|
||||
content::WebContents& web_contents,
|
||||
const url::Origin& origin,
|
||||
bool is_only_requesting_age,
|
||||
@@ -7846,13 +7896,22 @@ void ChromeContentBrowserClient::ShowDigitalIdentityInterstitialIfNeeded(
|
||||
std::make_unique<DigitalIdentitySafetyInterstitialBridgeAndroid>();
|
||||
auto* bridge_ptr = bridge.get();
|
||||
// Callback takes ownership of |bridge|.
|
||||
bridge_ptr->ShowInterstitialIfNeeded(
|
||||
return bridge_ptr->ShowInterstitialIfNeeded(
|
||||
web_contents, origin, is_only_requesting_age,
|
||||
base::BindOnce(&RunDigitalIdentityCallback, std::move(bridge),
|
||||
std::move(callback)));
|
||||
}
|
||||
#endif
|
||||
|
||||
std::unique_ptr<content::DigitalIdentityProvider>
|
||||
ChromeContentBrowserClient::CreateDigitalIdentityProvider() {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
return std::make_unique<DigitalIdentityProviderAndroid>();
|
||||
#else
|
||||
return std::make_unique<DigitalIdentityProviderDesktop>();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::SuppressDifferentOriginSubframeJSDialogs(
|
||||
content::BrowserContext* browser_context) {
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
@@ -8167,7 +8226,7 @@ std::string ChromeContentBrowserClient::GetChildProcessSuffix(int child_flags) {
|
||||
if (child_flags == chrome::kChildProcessHelperAlerts) {
|
||||
return chrome::kMacHelperSuffixAlerts;
|
||||
}
|
||||
NOTREACHED() << "Unsupported child process flags!";
|
||||
NOTREACHED_IN_MIGRATION() << "Unsupported child process flags!";
|
||||
return {};
|
||||
}
|
||||
#endif // BUILDFLAG(IS_MAC)
|
||||
@@ -8335,6 +8394,7 @@ ChromeContentBrowserClient::GetIpProtectionProxyBypassPolicy() {
|
||||
|
||||
void ChromeContentBrowserClient::MaybePrewarmHttpDiskCache(
|
||||
content::BrowserContext& browser_context,
|
||||
const std::optional<url::Origin>& initiator_origin,
|
||||
const GURL& navigation_url) {
|
||||
Profile* profile = Profile::FromBrowserContext(&browser_context);
|
||||
CHECK(profile);
|
||||
@@ -8342,7 +8402,7 @@ void ChromeContentBrowserClient::MaybePrewarmHttpDiskCache(
|
||||
// `loading_predictor` can be nullptr if the profile `IsOffTheRecord`.
|
||||
if (predictors::LoadingPredictor* loading_predictor =
|
||||
predictors::LoadingPredictorFactory::GetForProfile(profile)) {
|
||||
loading_predictor->MaybePrewarmResources(navigation_url);
|
||||
loading_predictor->MaybePrewarmResources(initiator_origin, navigation_url);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8351,18 +8411,18 @@ void ChromeContentBrowserClient::NotifyMultiCaptureStateChanged(
|
||||
content::GlobalRenderFrameHostId capturer_rfh_id,
|
||||
const std::string& label,
|
||||
MultiCaptureChanged state) {
|
||||
content::WebContents* const web_contents = WebContents::FromRenderFrameHost(
|
||||
RenderFrameHost::FromID(capturer_rfh_id));
|
||||
if (!web_contents) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case MultiCaptureChanged::kStarted:
|
||||
case MultiCaptureChanged::kStarted: {
|
||||
content::WebContents* const web_contents =
|
||||
WebContents::FromRenderFrameHost(
|
||||
RenderFrameHost::FromID(capturer_rfh_id));
|
||||
if (!web_contents) {
|
||||
return;
|
||||
}
|
||||
NotifyMultiCaptureStarted(
|
||||
label, web_contents,
|
||||
web_app::WebAppTabHelper::GetAppId(web_contents));
|
||||
break;
|
||||
} break;
|
||||
case MultiCaptureChanged::kStopped:
|
||||
NotifyMultiCaptureStopped(label);
|
||||
break;
|
||||
@@ -8385,8 +8445,77 @@ bool ChromeContentBrowserClient::ShouldSuppressAXLoadComplete(
|
||||
url == GURL(chrome::kChromeUINewTabPageURL);
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::BindModelManager(
|
||||
void ChromeContentBrowserClient::BindAIManager(
|
||||
content::RenderFrameHost* rfh,
|
||||
mojo::PendingReceiver<blink::mojom::ModelManager> receiver) {
|
||||
ModelManagerImpl::Create(rfh, std::move(receiver));
|
||||
mojo::PendingReceiver<blink::mojom::AIManager> receiver) {
|
||||
AIManagerImpl::Create(rfh, std::move(receiver));
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
void ChromeContentBrowserClient::QueryInstalledWebAppsByManifestId(
|
||||
const GURL& frame_url,
|
||||
const GURL& manifest_id,
|
||||
content::BrowserContext* browser_context,
|
||||
base::OnceCallback<void(std::optional<blink::mojom::RelatedApplication>)>
|
||||
callback) {
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
web_app::WebAppProvider* const provider =
|
||||
web_app::WebAppProvider::GetForLocalAppsUnchecked(profile);
|
||||
|
||||
webapps::AppId app_id = web_app::GenerateAppIdFromManifestId(manifest_id);
|
||||
|
||||
if (app_id.empty()) {
|
||||
return std::move(callback).Run(std::nullopt);
|
||||
}
|
||||
|
||||
// arg_for_shutdown must be explicitly defined, otherwise
|
||||
// ScheduleCallbackWithResult cannot infer the optional type the nullopt
|
||||
// is associated with.
|
||||
std::optional<blink::mojom::RelatedApplication> arg_for_shutdown =
|
||||
std::nullopt;
|
||||
web_app::AppLockDescription lock_description(app_id);
|
||||
|
||||
provider->scheduler().ScheduleCallbackWithResult<web_app::AppLock>(
|
||||
"QueryInstalledWebAppsByManifestId", std::move(lock_description),
|
||||
base::BindOnce(
|
||||
[](webapps::AppId app_id, webapps::ManifestId manifest_id,
|
||||
GURL frame_url, web_app::AppLock& lock,
|
||||
base::Value::Dict& debug_value)
|
||||
-> std::optional<blink::mojom::RelatedApplication> {
|
||||
debug_value.Set("input", base::Value::Dict()
|
||||
.Set("manifest_id", manifest_id.spec())
|
||||
.Set("frame_url", frame_url.spec()));
|
||||
|
||||
if (!lock.registrar().IsLocallyInstalled(app_id)) {
|
||||
debug_value.Set("did_find_application", false);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (!lock.registrar().IsUrlInAppScope(frame_url, app_id)) {
|
||||
debug_value.Set("did_find_application", false);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
blink::mojom::RelatedApplication application;
|
||||
application.platform = "webapp";
|
||||
application.id = lock.registrar().GetAppManifestId(app_id).spec();
|
||||
// Note: This url is the manifest_url for purely legacy reasons
|
||||
// where Android used to implement the unique identifier using the
|
||||
// manifest url.
|
||||
if (lock.registrar().GetAppManifestUrl(app_id).is_valid()) {
|
||||
application.url =
|
||||
lock.registrar().GetAppManifestUrl(app_id).spec();
|
||||
}
|
||||
|
||||
debug_value.Set("did_find_application", true);
|
||||
debug_value.Set(
|
||||
"application",
|
||||
base::Value::Dict()
|
||||
.Set("app_id", application.id.value_or(""))
|
||||
.Set("manifest_url", application.url.value_or("")));
|
||||
return application;
|
||||
},
|
||||
std::move(app_id), std::move(manifest_id), std::move(frame_url)),
|
||||
std::move(callback), std::move(arg_for_shutdown));
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -78,15 +78,18 @@
|
||||
#include "chrome/browser/ui/browser_ui_prefs.h"
|
||||
#include "chrome/browser/ui/hats/hats_service_desktop.h"
|
||||
#include "chrome/browser/ui/network_profile_bubble.h"
|
||||
#include "chrome/browser/ui/performance_controls/performance_controls_metrics.h"
|
||||
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
|
||||
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
|
||||
#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h"
|
||||
#include "chrome/browser/ui/side_panel/side_panel_prefs.h"
|
||||
#include "chrome/browser/ui/tabs/organization/prefs.h"
|
||||
#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
|
||||
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_pref_names.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_prefs.h"
|
||||
#include "chrome/browser/ui/toolbar/chrome_labs/chrome_labs_prefs.h"
|
||||
#include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h"
|
||||
#include "chrome/browser/ui/toolbar/toolbar_pref_names.h"
|
||||
#include "chrome/browser/ui/views/side_panel/side_panel_prefs.h"
|
||||
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
|
||||
#include "chrome/browser/ui/webui/bookmarks/bookmark_prefs.h"
|
||||
#include "chrome/browser/ui/webui/flags/flags_ui.h"
|
||||
@@ -144,7 +147,6 @@
|
||||
#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"
|
||||
@@ -280,6 +282,8 @@
|
||||
#include "chrome/browser/new_tab_page/modules/photos/photos_service.h"
|
||||
#include "chrome/browser/new_tab_page/modules/recipes/recipes_service.h"
|
||||
#include "chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing_handler.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/calendar/google_calendar_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/tab_resumption/tab_resumption_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/promos/promo_service.h"
|
||||
#include "chrome/browser/policy/developer_tools_policy_handler.h"
|
||||
@@ -288,10 +292,8 @@
|
||||
#include "chrome/browser/serial/serial_policy_allowed_ports.h"
|
||||
#include "chrome/browser/signin/signin_promo.h"
|
||||
#include "chrome/browser/ui/commerce/commerce_ui_tab_helper.h"
|
||||
#include "chrome/browser/ui/lens/lens_overlay_permission_utils.h"
|
||||
#include "chrome/browser/ui/safety_hub/safety_hub_prefs.h"
|
||||
#include "chrome/browser/ui/startup/startup_browser_creator.h"
|
||||
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
|
||||
#include "chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.h"
|
||||
#include "chrome/browser/ui/webui/history/foreign_session_handler.h"
|
||||
#include "chrome/browser/ui/webui/new_tab_page/new_tab_page_handler.h"
|
||||
@@ -299,9 +301,9 @@
|
||||
#include "chrome/browser/ui/webui/settings/settings_ui.h"
|
||||
#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_prefs.h"
|
||||
#include "chrome/browser/ui/webui/tab_search/tab_search_prefs.h"
|
||||
#include "chrome/browser/ui/webui/whats_new/whats_new_ui.h"
|
||||
#include "chrome/browser/upgrade_detector/upgrade_detector.h"
|
||||
#include "components/headless/policy/headless_mode_prefs.h"
|
||||
#include "components/lens/lens_overlay_permission_utils.h"
|
||||
#include "components/live_caption/live_caption_controller.h"
|
||||
#include "components/live_caption/live_translate_controller.h"
|
||||
#include "components/ntp_tiles/custom_links_manager_impl.h"
|
||||
@@ -344,7 +346,6 @@
|
||||
#include "chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.h"
|
||||
#include "chrome/browser/ash/app_list/app_list_syncable_service.h"
|
||||
#include "chrome/browser/ash/app_list/arc/arc_app_list_prefs.h"
|
||||
#include "chrome/browser/ash/app_mode/arc/arc_kiosk_app_manager.h"
|
||||
#include "chrome/browser/ash/app_mode/kiosk_chrome_app_manager.h"
|
||||
#include "chrome/browser/ash/app_mode/kiosk_cryptohome_remover.h"
|
||||
#include "chrome/browser/ash/app_mode/kiosk_system_session.h"
|
||||
@@ -471,11 +472,9 @@
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "chrome/browser/enterprise/platform_auth/platform_auth_policy_observer.h"
|
||||
#include "chrome/browser/font_prewarmer_tab_helper.h"
|
||||
#include "chrome/browser/media/cdm_pref_service_helper.h"
|
||||
#include "chrome/browser/media/media_foundation_service_monitor.h"
|
||||
#include "chrome/browser/os_crypt/app_bound_encryption_metrics_win.h"
|
||||
#include "chrome/browser/os_crypt/app_bound_encryption_provider_win.h"
|
||||
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "chrome/browser/win/conflicts/incompatible_applications_updater.h"
|
||||
@@ -485,6 +484,7 @@
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
||||
#include "chrome/browser/enterprise/platform_auth/platform_auth_policy_observer.h"
|
||||
#include "components/os_crypt/sync/os_crypt.h"
|
||||
#endif
|
||||
|
||||
@@ -995,6 +995,9 @@ constexpr char kOsCryptAppBoundFixedDataPrefName[] =
|
||||
// Deprecated 03/2024
|
||||
constexpr char kOsCryptAppBoundFixedData2PrefName[] =
|
||||
"os_crypt.app_bound_fixed_data2";
|
||||
// Deprecated 06/2024
|
||||
constexpr char kOsCryptAppBoundFixedData3PrefName[] =
|
||||
"os_crypt.app_bound_fixed_data3";
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
// Deprecated 02/2024.
|
||||
@@ -1059,6 +1062,7 @@ constexpr char kGlanceablesEnabled[] = "ash.glanceables_enabled";
|
||||
// Deprecated 05/2024.
|
||||
// A preference to keep track of the device registered time.
|
||||
constexpr char kDeviceRegisteredTime[] = "DeviceRegisteredTime";
|
||||
constexpr char kArcKioskDictionaryName[] = "arc-kiosk";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -1081,12 +1085,58 @@ inline constexpr char kHasShownRefreshWhatsNew[] =
|
||||
// keyboard shortcut.
|
||||
inline constexpr char kAccessibilityMouseKeysShortcutToPauseEnabled[] =
|
||||
"settings.a11y.mouse_keys.ctrl_to_pause_enabled";
|
||||
// A boolean pref which determines if mouse keys is automatically disabled in
|
||||
// text fields.
|
||||
inline constexpr char kAccessibilityMouseKeysDisableInTextFields[] =
|
||||
"settings.a11y.mouse_keys.disable_in_text_fields";
|
||||
// A boolean pref which determines whether screen magnifier should center
|
||||
// the text input focus.
|
||||
inline constexpr char kAccessibilityScreenMagnifierCenterFocus[] =
|
||||
"settings.a11y.screen_magnifier_center_focus";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// Deprecated 05/2024.
|
||||
constexpr char kBlockTruncatedCookies[] = "profile.cookie_block_truncated";
|
||||
|
||||
// Deprecated 05/2024
|
||||
inline constexpr char kDefaultSearchProviderChoiceLocationPrefName[] =
|
||||
"default_search_provider_data.choice_location";
|
||||
|
||||
// Deprecated 05/2024.
|
||||
inline constexpr char kSyncCachedTrustedVaultAutoUpgradeDebugInfo[] =
|
||||
"sync.cached_trusted_vault_auto_upgrade_debug_info";
|
||||
|
||||
// Deprecated 05/2024.
|
||||
inline constexpr char kAutologinEnabled[] = "autologin.enabled";
|
||||
inline constexpr char kReverseAutologinRejectedEmailList[] =
|
||||
"reverse_autologin.rejected_email_list";
|
||||
|
||||
// Deprecated 06/2024.
|
||||
inline constexpr char kTrackingProtectionOnboardingNoticeFirstRequested[] =
|
||||
"tracking_protection.tracking_protection_onboarding_notice_first_requested";
|
||||
inline constexpr char kTrackingProtectionOnboardingNoticeLastRequested[] =
|
||||
"tracking_protection.tracking_protection_onboarding_notice_last_requested";
|
||||
|
||||
// Deprecated 06/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
inline constexpr char kAccessibilityReadAnythingOmniboxIconLabelShownCount[] =
|
||||
"settings.a11y.read_anything.omnibox_icon_label_shown_count";
|
||||
#endif
|
||||
|
||||
// Deprecated 06/2024.
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
inline constexpr char kAccessibilityPdfOcrAlwaysActive[] =
|
||||
"settings.a11y.pdf_ocr_always_active";
|
||||
#endif
|
||||
|
||||
// Deprecated 06/2024.
|
||||
inline constexpr char kTrackingProtectionOffboarded[] =
|
||||
"tracking_protection.tracking_protection_offboarded";
|
||||
inline constexpr char kTrackingProtectionOffboardedSince[] =
|
||||
"tracking_protection.tracking_protection_offboarded_since";
|
||||
inline constexpr char kTrackingProtectionOffboardingAckAction[] =
|
||||
"tracking_protection.tracking_protection_offboarding_ack_action";
|
||||
|
||||
// Register local state used only for migration (clearing or moving to a new
|
||||
// key).
|
||||
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
@@ -1200,6 +1250,9 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
// Deprecated 03/2024.
|
||||
registry->RegisterStringPref(kOsCryptAppBoundFixedData2PrefName,
|
||||
std::string());
|
||||
// Deprecated 06/2024.
|
||||
registry->RegisterStringPref(kOsCryptAppBoundFixedData3PrefName,
|
||||
std::string());
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -1208,6 +1261,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
|
||||
// Deprecated 05/2024.
|
||||
registry->RegisterTimePref(kDeviceRegisteredTime, base::Time());
|
||||
registry->RegisterDictionaryPref(kArcKioskDictionaryName);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// Deprecated 04/2024.
|
||||
@@ -1556,10 +1610,47 @@ void RegisterProfilePrefsForMigration(
|
||||
// Deprecated 05/2024.
|
||||
registry->RegisterBooleanPref(kAccessibilityMouseKeysShortcutToPauseEnabled,
|
||||
true);
|
||||
registry->RegisterBooleanPref(kAccessibilityMouseKeysDisableInTextFields,
|
||||
true);
|
||||
registry->RegisterBooleanPref(kAccessibilityScreenMagnifierCenterFocus, true);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// Deprecated 05/2024.
|
||||
registry->RegisterBooleanPref(kBlockTruncatedCookies, true);
|
||||
|
||||
// Deprecated 05/2024
|
||||
registry->RegisterIntegerPref(
|
||||
kDefaultSearchProviderChoiceLocationPrefName,
|
||||
static_cast<int>(search_engines::ChoiceMadeLocation::kOther));
|
||||
|
||||
// Deprecated 05/2024.
|
||||
registry->RegisterStringPref(kSyncCachedTrustedVaultAutoUpgradeDebugInfo, "");
|
||||
|
||||
// Deprecated 05/2024.
|
||||
registry->RegisterBooleanPref(kAutologinEnabled, true);
|
||||
registry->RegisterListPref(kReverseAutologinRejectedEmailList);
|
||||
|
||||
// Deprecated 06/2024.
|
||||
registry->RegisterTimePref(kTrackingProtectionOnboardingNoticeFirstRequested,
|
||||
base::Time());
|
||||
registry->RegisterTimePref(kTrackingProtectionOnboardingNoticeLastRequested,
|
||||
base::Time());
|
||||
|
||||
// Deprecated 06/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterIntegerPref(
|
||||
kAccessibilityReadAnythingOmniboxIconLabelShownCount, 0);
|
||||
#endif
|
||||
|
||||
// Deprecated 06/2024.
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
registry->RegisterBooleanPref(kAccessibilityPdfOcrAlwaysActive, true);
|
||||
#endif
|
||||
|
||||
// Deprecated 06/2024.
|
||||
registry->RegisterBooleanPref(kTrackingProtectionOffboarded, false);
|
||||
registry->RegisterTimePref(kTrackingProtectionOffboardedSince, base::Time());
|
||||
registry->RegisterIntegerPref(kTrackingProtectionOffboardingAckAction, 0);
|
||||
}
|
||||
|
||||
void ClearSyncRequestedPrefAndMaybeMigrate(PrefService* profile_prefs) {
|
||||
@@ -1619,6 +1710,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
metrics::RegisterDemographicsLocalStatePrefs(registry);
|
||||
network_time::NetworkTimeTracker::RegisterPrefs(registry);
|
||||
optimization_guide::prefs::RegisterLocalStatePrefs(registry);
|
||||
optimization_guide::model_execution::prefs::RegisterLocalStatePrefs(registry);
|
||||
password_manager::PasswordManager::RegisterLocalPrefs(registry);
|
||||
policy::BrowserPolicyConnector::RegisterPrefs(registry);
|
||||
policy::LocalTestPolicyProvider::RegisterLocalStatePrefs(registry);
|
||||
@@ -1690,12 +1782,13 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
media_router::RegisterLocalStatePrefs(registry);
|
||||
metrics::TabStatsTracker::RegisterPrefs(registry);
|
||||
performance_manager::user_tuning::prefs::RegisterLocalStatePrefs(registry);
|
||||
PerformanceInterventionMetricsReporter::RegisterLocalStatePrefs(registry);
|
||||
RegisterBrowserPrefs(registry);
|
||||
speech::SodaInstaller::RegisterLocalStatePrefs(registry);
|
||||
StartupBrowserCreator::RegisterLocalStatePrefs(registry);
|
||||
task_manager::TaskManagerInterface::RegisterPrefs(registry);
|
||||
UpgradeDetector::RegisterPrefs(registry);
|
||||
WhatsNewUI::RegisterLocalStatePrefs(registry);
|
||||
registry->RegisterIntegerPref(prefs::kLastWhatsNewVersion, 0);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
@@ -1705,7 +1798,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
arc::prefs::RegisterLocalStatePrefs(registry);
|
||||
ChromeOSMetricsProvider::RegisterPrefs(registry);
|
||||
ash::ArcKioskAppManager::RegisterPrefs(registry);
|
||||
ash::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry);
|
||||
ash::carrier_lock::CarrierLockManager::RegisterLocalPrefs(registry);
|
||||
ash::cert_provisioning::RegisterLocalStatePrefs(registry);
|
||||
@@ -1813,12 +1905,12 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kRendererAppContainerEnabled, true);
|
||||
registry->RegisterBooleanPref(prefs::kBlockBrowserLegacyExtensionPoints,
|
||||
true);
|
||||
registry->RegisterIntegerPref(prefs::kDynamicCodeSettings, /*Default=*/0);
|
||||
registry->RegisterBooleanPref(prefs::kApplicationBoundEncryptionEnabled,
|
||||
true);
|
||||
registry->RegisterBooleanPref(
|
||||
policy::policy_prefs::kNativeWindowOcclusionEnabled, true);
|
||||
MediaFoundationServiceMonitor::RegisterPrefs(registry);
|
||||
os_crypt::RegisterLocalStatePrefs(registry);
|
||||
os_crypt_async::AppBoundEncryptionProviderWin::RegisterLocalPrefs(registry);
|
||||
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
IncompatibleApplicationsUpdater::RegisterLocalStatePrefs(registry);
|
||||
@@ -1843,9 +1935,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
screen_ai::RegisterLocalStatePrefs(registry);
|
||||
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
||||
PlatformAuthPolicyObserver::RegisterPrefs(registry);
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
||||
|
||||
// Platform-specific and compile-time conditional individual preferences.
|
||||
// If you have multiple preferences that should clearly be grouped together,
|
||||
@@ -1927,7 +2019,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
permissions::RegisterProfilePrefs(registry);
|
||||
PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry);
|
||||
PlatformNotificationServiceImpl::RegisterProfilePrefs(registry);
|
||||
plus_addresses::RegisterProfilePrefs(registry);
|
||||
policy::URLBlocklistManager::RegisterProfilePrefs(registry);
|
||||
PolicyUI::RegisterProfilePrefs(registry);
|
||||
PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
|
||||
@@ -2052,6 +2143,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
|
||||
first_run::RegisterProfilePrefs(registry);
|
||||
gcm::RegisterProfilePrefs(registry);
|
||||
GoogleCalendarPageHandler::RegisterProfilePrefs(registry);
|
||||
HatsServiceDesktop::RegisterProfilePrefs(registry);
|
||||
lens::prefs::RegisterProfilePrefs(registry);
|
||||
NtpCustomBackgroundService::RegisterProfilePrefs(registry);
|
||||
@@ -2073,13 +2165,14 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
signin::RegisterProfilePrefs(registry);
|
||||
StartupBrowserCreator::RegisterProfilePrefs(registry);
|
||||
TabResumptionPageHandler::RegisterProfilePrefs(registry);
|
||||
MostRelevantTabResumptionPageHandler::RegisterProfilePrefs(registry);
|
||||
tab_groups::saved_tab_groups::prefs::RegisterProfilePrefs(registry);
|
||||
tab_organization_prefs::RegisterProfilePrefs(registry);
|
||||
tab_search_prefs::RegisterProfilePrefs(registry);
|
||||
ThemeColorPickerHandler::RegisterProfilePrefs(registry);
|
||||
toolbar::RegisterProfilePrefs(registry);
|
||||
UnifiedAutoplayConfig::RegisterProfilePrefs(registry);
|
||||
user_notes::RegisterProfilePrefs(registry);
|
||||
tab_groups::SavedTabGroupUtils::RegisterProfilePrefs(registry);
|
||||
|
||||
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
captions::LiveCaptionController::RegisterProfilePrefs(registry);
|
||||
@@ -2110,6 +2203,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
registry->RegisterBooleanPref(policy::policy_prefs::kFloatingWorkspaceEnabled,
|
||||
false);
|
||||
::reporting::RegisterProfilePrefs(registry);
|
||||
registry->RegisterBooleanPref(prefs::kFloatingSsoEnabled, false);
|
||||
registry->RegisterListPref(prefs::kFloatingSsoDomainBlocklist);
|
||||
registry->RegisterListPref(prefs::kFloatingSsoDomainBlocklistExceptions);
|
||||
#if BUILDFLAG(USE_CUPS)
|
||||
extensions::PrintingAPIHandler::RegisterProfilePrefs(registry);
|
||||
#endif // BUILDFLAG(USE_CUPS)
|
||||
@@ -2255,7 +2351,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
webauthn::pref_names::kEnclaveFailedPINAttemptsCount, 0);
|
||||
|
||||
side_panel_prefs::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
|
||||
tabs::RegisterProfilePrefs(registry);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
registry->RegisterBooleanPref(webauthn::pref_names::kAllowWithBrokenCerts,
|
||||
false);
|
||||
@@ -2276,14 +2374,15 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
registry->RegisterBooleanPref(prefs::kAccessibilityPdfOcrAlwaysActive, true);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kAccessibilityMainNodeAnnotationsEnabled, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
registry->RegisterBooleanPref(kClearUserDataDir1Pref, false);
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kBlockTruncatedCookies, true);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kManagedPrivateNetworkAccessRestrictionsEnabled, false);
|
||||
|
||||
@@ -2306,15 +2405,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
registry->RegisterIntegerPref(prefs::kChromeDataRegionSetting, 0);
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kTabGroupsDeletionSkipDialogOnDelete,
|
||||
false);
|
||||
registry->RegisterBooleanPref(prefs::kTabGroupsDeletionSkipDialogOnUngroup,
|
||||
false);
|
||||
registry->RegisterBooleanPref(prefs::kTabGroupsDeletionSkipDialogOnRemoveTab,
|
||||
false);
|
||||
registry->RegisterBooleanPref(prefs::kTabGroupsDeletionSkipDialogOnCloseTab,
|
||||
false);
|
||||
|
||||
registry->RegisterIntegerPref(prefs::kLensOverlayStartCount, 0);
|
||||
}
|
||||
|
||||
@@ -2467,6 +2557,8 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
|
||||
local_state->ClearPref(kOsCryptAppBoundFixedDataPrefName);
|
||||
// Deprecated 03/2024.
|
||||
local_state->ClearPref(kOsCryptAppBoundFixedData2PrefName);
|
||||
// Deprecated 06/2024.
|
||||
local_state->ClearPref(kOsCryptAppBoundFixedData3PrefName);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2475,6 +2567,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
|
||||
|
||||
// Added 05/2024.
|
||||
local_state->ClearPref(kDeviceRegisteredTime);
|
||||
local_state->ClearPref(kArcKioskDictionaryName);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// Added 04/2024 .
|
||||
@@ -2923,11 +3016,48 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
|
||||
// Added 05/2024.
|
||||
profile_prefs->ClearPref(kAccessibilityMouseKeysShortcutToPauseEnabled);
|
||||
profile_prefs->ClearPref(kAccessibilityMouseKeysDisableInTextFields);
|
||||
profile_prefs->ClearPref(kAccessibilityScreenMagnifierCenterFocus);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// Added 05/2024.
|
||||
profile_prefs->ClearPref(kBlockTruncatedCookies);
|
||||
|
||||
// Added 05/2024
|
||||
profile_prefs->ClearPref(kDefaultSearchProviderChoiceLocationPrefName);
|
||||
|
||||
// Added 05/2024.
|
||||
profile_prefs->ClearPref(kSyncCachedTrustedVaultAutoUpgradeDebugInfo);
|
||||
|
||||
// Added 05/2024.
|
||||
profile_prefs->ClearPref(kAutologinEnabled);
|
||||
profile_prefs->ClearPref(kReverseAutologinRejectedEmailList);
|
||||
|
||||
// Added 06/2024.
|
||||
profile_prefs->ClearPref(kTrackingProtectionOnboardingNoticeFirstRequested);
|
||||
profile_prefs->ClearPref(kTrackingProtectionOnboardingNoticeLastRequested);
|
||||
|
||||
// Added 06/2024.
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
profile_prefs->ClearPref(
|
||||
kAccessibilityReadAnythingOmniboxIconLabelShownCount);
|
||||
#endif
|
||||
|
||||
// Added 06/2024.
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
profile_prefs->ClearPref(kAccessibilityPdfOcrAlwaysActive);
|
||||
#endif
|
||||
|
||||
// Added 06/2024.
|
||||
profile_prefs->ClearPref(kTrackingProtectionOffboarded);
|
||||
profile_prefs->ClearPref(kTrackingProtectionOffboardedSince);
|
||||
profile_prefs->ClearPref(kTrackingProtectionOffboardingAckAction);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// Added 06/2024.
|
||||
syncer::SyncPrefs::MaybeMigratePasswordsToPerAccountPref(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Please don't delete the following line. It is used by PRESUBMIT.py.
|
||||
// END_MIGRATE_OBSOLETE_PROFILE_PREFS
|
||||
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
#include "chrome/browser/content_settings/sound_content_setting_observer.h"
|
||||
#include "chrome/browser/dips/dips_bounce_detector.h"
|
||||
#include "chrome/browser/dips/dips_service.h"
|
||||
#include "chrome/browser/enterprise/data_protection/data_protection_navigation_controller.h"
|
||||
#include "chrome/browser/external_protocol/external_protocol_observer.h"
|
||||
#include "chrome/browser/favicon/favicon_utils.h"
|
||||
#include "chrome/browser/file_system_access/file_system_access_features.h"
|
||||
#include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
|
||||
#include "chrome/browser/file_system_access/file_system_access_tab_helper.h"
|
||||
#include "chrome/browser/fingerprinting_protection/chrome_fingerprinting_protection_web_contents_helper_factory.h"
|
||||
#include "chrome/browser/history/history_tab_helper.h"
|
||||
#include "chrome/browser/history/top_sites_factory.h"
|
||||
#include "chrome/browser/history_clusters/history_clusters_tab_helper.h"
|
||||
@@ -102,12 +104,11 @@
|
||||
#include "chrome/browser/ui/safety_hub/unused_site_permissions_service.h"
|
||||
#include "chrome/browser/ui/safety_hub/unused_site_permissions_service_factory.h"
|
||||
#include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
|
||||
#include "chrome/browser/ui/side_panel/companion/companion_utils.h"
|
||||
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
|
||||
#include "chrome/browser/ui/tab_dialogs.h"
|
||||
#include "chrome/browser/ui/tab_ui_helper.h"
|
||||
#include "chrome/browser/ui/thumbnails/thumbnail_tab_helper.h"
|
||||
#include "chrome/browser/user_notes/user_notes_tab_helper.h"
|
||||
#include "chrome/browser/ui/views/side_panel/companion/companion_utils.h"
|
||||
#include "chrome/browser/v8_compile_hints/v8_compile_hints_tab_helper.h"
|
||||
#include "chrome/browser/vr/vr_tab_helper.h"
|
||||
#include "chrome/common/buildflags.h"
|
||||
@@ -130,9 +131,9 @@
|
||||
#include "components/dom_distiller/core/dom_distiller_features.h"
|
||||
#include "components/download/content/factory/navigation_monitor_factory.h"
|
||||
#include "components/download/content/public/download_navigation_observer.h"
|
||||
#include "components/enterprise/buildflags/buildflags.h"
|
||||
#include "components/feed/buildflags.h"
|
||||
#include "components/fingerprinting_protection_filter/browser/fingerprinting_protection_filter_features.h"
|
||||
#include "components/fingerprinting_protection_filter/browser/fingerprinting_protection_web_contents_helper.h"
|
||||
#include "components/history/content/browser/web_contents_top_sites_observer.h"
|
||||
#include "components/history/core/browser/top_sites.h"
|
||||
#include "components/infobars/content/content_infobar_manager.h"
|
||||
@@ -149,6 +150,7 @@
|
||||
#include "components/permissions/features.h"
|
||||
#include "components/permissions/permission_recovery_success_rate_tracker.h"
|
||||
#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"
|
||||
@@ -200,12 +202,12 @@
|
||||
#include "chrome/browser/ui/sad_tab_helper.h"
|
||||
#include "chrome/browser/ui/search/search_tab_helper.h"
|
||||
#include "chrome/browser/ui/search_engine_choice/search_engine_choice_tab_helper.h"
|
||||
#include "chrome/browser/ui/side_panel/companion/companion_tab_helper.h"
|
||||
#include "chrome/browser/ui/side_panel/companion/exps_registration_success_observer.h"
|
||||
#include "chrome/browser/ui/side_panel/customize_chrome/customize_chrome_tab_helper.h"
|
||||
#include "chrome/browser/ui/side_panel/customize_chrome/customize_chrome_utils.h"
|
||||
#include "chrome/browser/ui/side_panel/history_clusters/history_clusters_tab_helper.h"
|
||||
#include "chrome/browser/ui/side_panel/read_anything/read_anything_tab_helper.h"
|
||||
#include "chrome/browser/ui/views/side_panel/companion/companion_tab_helper.h"
|
||||
#include "chrome/browser/ui/views/side_panel/companion/exps_registration_success_observer.h"
|
||||
#include "chrome/browser/ui/views/side_panel/customize_chrome/customize_chrome_tab_helper.h"
|
||||
#include "chrome/browser/ui/views/side_panel/customize_chrome/customize_chrome_utils.h"
|
||||
#include "chrome/browser/ui/views/side_panel/history_clusters/history_clusters_tab_helper.h"
|
||||
#include "chrome/browser/ui/views/side_panel/read_anything/read_anything_tab_helper.h"
|
||||
#include "chrome/browser/ui/sync/browser_synced_tab_delegate.h"
|
||||
#include "chrome/browser/ui/ui_features.h"
|
||||
#include "chrome/browser/ui/uma_browsing_activity_observer.h"
|
||||
@@ -406,10 +408,10 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
FindBarState::ConfigureWebContents(web_contents);
|
||||
if (base::FeatureList::IsEnabled(fingerprinting_protection_filter::features::
|
||||
kEnableFingerprintingProtectionFilter)) {
|
||||
fingerprinting_protection_filter::
|
||||
FingerprintingProtectionWebContentsHelper::CreateForWebContents(
|
||||
web_contents, profile->GetPrefs(),
|
||||
TrackingProtectionSettingsFactory::GetForProfile(profile));
|
||||
// TODO(https://crbug.com/40280666): Move this to TabFeatures.
|
||||
CreateFingerprintingProtectionWebContentsHelper(
|
||||
web_contents, profile->GetPrefs(),
|
||||
TrackingProtectionSettingsFactory::GetForProfile(profile));
|
||||
}
|
||||
download::DownloadNavigationObserver::CreateForWebContents(
|
||||
web_contents,
|
||||
@@ -512,6 +514,16 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
web_contents,
|
||||
safe_browsing::TailoredSecurityServiceFactory::GetForProfile(profile));
|
||||
}
|
||||
if (base::FeatureList::IsEnabled(
|
||||
safe_browsing::kSafeBrowsingAsyncRealTimeCheck) &&
|
||||
g_browser_process->safe_browsing_service()) {
|
||||
safe_browsing::AsyncCheckTracker::CreateForWebContents(
|
||||
web_contents, g_browser_process->safe_browsing_service()->ui_manager());
|
||||
}
|
||||
// SafeBrowsingTabObserver creates a ClientSideDetectionHost, which observes
|
||||
// events from PermissionRequestManager and AsyncCheckTracker in its
|
||||
// constructor. Therefore, PermissionRequestManager and AsyncCheckTracker need
|
||||
// to be created before SafeBrowsingTabObserver is created.
|
||||
safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(
|
||||
web_contents,
|
||||
std::make_unique<safe_browsing::ChromeSafeBrowsingTabObserverDelegate>());
|
||||
@@ -545,6 +557,21 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
web_contents);
|
||||
tpcd::trial::ValidityService::MaybeCreateForWebContents(web_contents);
|
||||
TrustedVaultEncryptionKeysTabHelper::CreateForWebContents(web_contents);
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(features::kSafetyHub)) {
|
||||
auto* service = UnusedSitePermissionsServiceFactory::GetForProfile(profile);
|
||||
if (service) {
|
||||
UnusedSitePermissionsService::TabHelper::CreateForWebContents(
|
||||
web_contents, service);
|
||||
}
|
||||
}
|
||||
#else // BUILDFLAG(IS_ANDROID)
|
||||
auto* service = UnusedSitePermissionsServiceFactory::GetForProfile(profile);
|
||||
if (service) {
|
||||
UnusedSitePermissionsService::TabHelper::CreateForWebContents(web_contents,
|
||||
service);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
ukm::InitializeSourceUrlRecorderForWebContents(web_contents);
|
||||
v8_compile_hints::V8CompileHintsTabHelper::MaybeCreateForWebContents(
|
||||
web_contents);
|
||||
@@ -601,6 +628,10 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
FormInteractionTabHelper::CreateForWebContents(web_contents);
|
||||
FramebustBlockTabHelper::CreateForWebContents(web_contents);
|
||||
IntentPickerTabHelper::CreateForWebContents(web_contents);
|
||||
#if BUILDFLAG(ENTERPRISE_WATERMARK)
|
||||
enterprise_data_protection::DataProtectionNavigationController::
|
||||
MaybeCreateForWebContents(web_contents);
|
||||
#endif
|
||||
javascript_dialogs::TabModalDialogManager::CreateForWebContents(
|
||||
web_contents,
|
||||
std::make_unique<JavaScriptTabModalDialogManagerDelegateDesktop>(
|
||||
@@ -638,19 +669,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
if (commerce::isContextualConsentEnabled()) {
|
||||
commerce_hint::CommerceHintTabHelper::CreateForWebContents(web_contents);
|
||||
}
|
||||
auto* service = UnusedSitePermissionsServiceFactory::GetForProfile(profile);
|
||||
if (service) {
|
||||
UnusedSitePermissionsService::TabHelper::CreateForWebContents(web_contents,
|
||||
service);
|
||||
}
|
||||
if (base::FeatureList::IsEnabled(ntp_features::kNtpHistoryClustersModule)) {
|
||||
side_panel::HistoryClustersTabHelper::CreateForWebContents(web_contents);
|
||||
}
|
||||
if (companion::IsCompanionFeatureEnabled()) {
|
||||
companion::CompanionTabHelper::CreateForWebContents(web_contents);
|
||||
}
|
||||
if (features::IsReadAnythingEnabled() &&
|
||||
features::IsReadAnythingLocalSidePanelEnabled()) {
|
||||
if (features::IsReadAnythingLocalSidePanelEnabled()) {
|
||||
ReadAnythingTabHelper::CreateForWebContents(web_contents);
|
||||
}
|
||||
if (base::FeatureList::IsEnabled(
|
||||
@@ -720,9 +745,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
HatsHelper::CreateForWebContents(web_contents);
|
||||
}
|
||||
SharedHighlightingPromo::CreateForWebContents(web_contents);
|
||||
if (user_notes::IsUserNotesEnabled() && !profile->IsOffTheRecord()) {
|
||||
user_notes::UserNotesTabHelper::CreateForWebContents(web_contents);
|
||||
}
|
||||
|
||||
if (!profile->IsIncognitoProfile()) {
|
||||
// TODO(crbug.com/40863325): Consider using the in-memory cache instead.
|
||||
|
||||
@@ -372,9 +372,6 @@ namespace autofillPrivate {
|
||||
// Logs that the server cards edit link was clicked.
|
||||
static void logServerCardLinkClicked();
|
||||
|
||||
// Enables or disables FIDO Authentication for credit card unmasking.
|
||||
static void setCreditCardFIDOAuthEnabledState(boolean enabled);
|
||||
|
||||
// Enrolls a credit card into virtual cards.
|
||||
// |cardId|: The server side id of the credit card to be enrolled. Note it
|
||||
// refers to the legacy server id of credit cards, not the instrument ids.
|
||||
|
||||
@@ -382,6 +382,7 @@ namespace autotestPrivate {
|
||||
double presentDeviation;
|
||||
double renderQuality;
|
||||
double janksPerMinute;
|
||||
double janksPercentage;
|
||||
};
|
||||
|
||||
callback TakeScreenshotCallback = void (DOMString base64Png);
|
||||
@@ -1009,7 +1010,7 @@ namespace autotestPrivate {
|
||||
VoidCallback callback);
|
||||
|
||||
// Launches Files app directly to absolutePath, if the path does not
|
||||
// exist, it will launch to the default opening location (i.e. My files).
|
||||
// exist, it will launch to the default opening location (i.e. MyFiles).
|
||||
// If the supplied path is a file (and it exists) it will open Files app
|
||||
// to the parent folder instead.
|
||||
static void launchFilesAppToPath(
|
||||
|
||||
@@ -1803,7 +1803,7 @@ interface Functions {
|
||||
static void searchDriveMetadata(SearchMetadataParams searchParams,
|
||||
SearchDriveMetadataCallback callback);
|
||||
|
||||
// Search files in My Files.
|
||||
// Search files in MyFiles.
|
||||
[nocompile, doesNotSupportPromises]
|
||||
static void searchFiles(SearchMetadataParams searchParams,
|
||||
SearchFilesCallback callback);
|
||||
|
||||
@@ -38,8 +38,6 @@ namespace pdfViewerPrivate {
|
||||
|
||||
callback GetStreamInfoCallback = void(StreamInfo streamInfo);
|
||||
callback IsAllowedLocalFileAccessCallback = void(boolean result);
|
||||
callback IsPdfOcrAlwaysActiveCallback = void(boolean result);
|
||||
callback OnPdfOcrPrefSetCallback = void(boolean result);
|
||||
callback VoidCallback = void();
|
||||
|
||||
interface Functions {
|
||||
@@ -54,23 +52,11 @@ namespace pdfViewerPrivate {
|
||||
DOMString url,
|
||||
IsAllowedLocalFileAccessCallback callback);
|
||||
|
||||
// Determines if the preference for PDF OCR is set to run PDF OCR always.
|
||||
// |callback|: Called with true if PDF OCR is set to be always active;
|
||||
// false otherwise.
|
||||
static void isPdfOcrAlwaysActive(
|
||||
IsPdfOcrAlwaysActiveCallback callback);
|
||||
|
||||
// Sets the current tab title to `title` for a full-page PDF.
|
||||
static void setPdfDocumentTitle(
|
||||
DOMString title,
|
||||
optional VoidCallback callback);
|
||||
|
||||
// Sets a pref value for PDF OCR.
|
||||
// |value|: The new value of the pref.
|
||||
// |callback|: The callback for whether the pref was set or not.
|
||||
static void setPdfOcrPref(
|
||||
boolean value, OnPdfOcrPrefSetCallback callback);
|
||||
|
||||
// Sets PDF plugin attributes in the stream for this context if there is
|
||||
// one.
|
||||
static void setPdfPluginAttributes(
|
||||
@@ -79,10 +65,6 @@ namespace pdfViewerPrivate {
|
||||
};
|
||||
|
||||
interface Events {
|
||||
// Fired when a pref value for PDF OCR has changed.
|
||||
// |value| The pref value that changed.
|
||||
static void onPdfOcrPrefChanged(boolean value);
|
||||
|
||||
// Fired when the browser wants the listener to perform a save.
|
||||
// `streamUrl`: Unique ID for the instance that should perform the save.
|
||||
static void onSave(DOMString streamUrl);
|
||||
|
||||
@@ -108,8 +108,8 @@
|
||||
#include "components/safe_browsing/buildflags.h"
|
||||
#include "components/safe_browsing/content/renderer/threat_dom_details.h"
|
||||
#include "components/spellcheck/spellcheck_buildflags.h"
|
||||
#include "components/subresource_filter/content/renderer/safe_browsing_unverified_ruleset_dealer.h"
|
||||
#include "components/subresource_filter/content/renderer/subresource_filter_agent.h"
|
||||
#include "components/subresource_filter/content/renderer/unverified_ruleset_dealer.h"
|
||||
#include "components/subresource_filter/core/common/common_features.h"
|
||||
#include "components/variations/net/variations_http_headers.h"
|
||||
#include "components/variations/variations_switches.h"
|
||||
@@ -202,7 +202,6 @@
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/common/controlled_frame/controlled_frame.h"
|
||||
#include "chrome/common/initialize_extensions_client.h"
|
||||
#include "chrome/renderer/extensions/api/chrome_extensions_renderer_api_provider.h"
|
||||
#include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
|
||||
@@ -257,10 +256,6 @@
|
||||
#include "chrome/renderer/media/chrome_key_systems.h"
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
#include "chrome/renderer/cco/multiline_detector.h"
|
||||
#endif
|
||||
|
||||
using autofill::AutofillAgent;
|
||||
using autofill::PasswordAutofillAgent;
|
||||
using autofill::PasswordGenerationAgent;
|
||||
@@ -389,8 +384,7 @@ ChromeContentRendererClient::ChromeContentRendererClient()
|
||||
#endif
|
||||
) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
EnsureExtensionsClientInitialized(
|
||||
controlled_frame::CreateAvailabilityCheckMap());
|
||||
EnsureExtensionsClientInitialized();
|
||||
extensions::ExtensionsRendererClient::Set(
|
||||
ChromeExtensionsRendererClient::GetInstance());
|
||||
#endif
|
||||
@@ -462,8 +456,8 @@ void ChromeContentRendererClient::RenderThreadStarted() {
|
||||
InitSpellCheck();
|
||||
#endif
|
||||
|
||||
subresource_filter_ruleset_dealer_ =
|
||||
std::make_unique<subresource_filter::UnverifiedRulesetDealer>();
|
||||
subresource_filter_ruleset_dealer_ = std::make_unique<
|
||||
subresource_filter::SafeBrowsingUnverifiedRulesetDealer>();
|
||||
|
||||
phishing_model_setter_ =
|
||||
std::make_unique<safe_browsing::PhishingModelSetterImpl>();
|
||||
@@ -731,7 +725,7 @@ void ChromeContentRendererClient::RenderFrameCreated(
|
||||
|
||||
// Owned by |render_frame|.
|
||||
new page_load_metrics::MetricsRenderFrameObserver(render_frame);
|
||||
// There is no render thread, thus no UnverifiedRulesetDealer in
|
||||
// There is no render thread, thus no SafeBrowsingUnverifiedRulesetDealer in
|
||||
// ChromeRenderViewTests.
|
||||
if (subresource_filter_ruleset_dealer_) {
|
||||
auto* subresource_filter_agent =
|
||||
@@ -783,10 +777,6 @@ void ChromeContentRendererClient::RenderFrameCreated(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
MultilineDetector::InstallIfNecessary(render_frame);
|
||||
#endif
|
||||
|
||||
if (render_frame->IsMainFrame()) {
|
||||
new commerce::CommerceWebExtractor(render_frame, registry);
|
||||
}
|
||||
@@ -1020,7 +1010,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
};
|
||||
switch (status) {
|
||||
case chrome::mojom::PluginStatus::kNotFound: {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kAllowed:
|
||||
@@ -1328,8 +1318,9 @@ void ChromeContentRendererClient::ReportNaClAppType(
|
||||
}
|
||||
} else {
|
||||
// We found an extension that is not covered by any metric
|
||||
NOTREACHED() << "Invalid NaCl usage in extension. Extension name: "
|
||||
<< extension->name() << ", type: " << extension->GetType();
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Invalid NaCl usage in extension. Extension name: "
|
||||
<< extension->name() << ", type: " << extension->GetType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1497,6 +1488,12 @@ bool ChromeContentRendererClient::IsLinkVisited(uint64_t link_hash) {
|
||||
return chrome_observer_->visited_link_reader()->IsVisited(link_hash);
|
||||
}
|
||||
|
||||
void ChromeContentRendererClient::AddOrUpdateVisitedLinkSalt(
|
||||
const url::Origin& origin,
|
||||
uint64_t salt) {
|
||||
return chrome_observer_->visited_link_reader()->AddOrUpdateSalt(origin, salt);
|
||||
}
|
||||
|
||||
std::unique_ptr<blink::WebPrescientNetworking>
|
||||
ChromeContentRendererClient::CreatePrescientNetworking(
|
||||
content::RenderFrame* render_frame) {
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "cc/input/browser_controls_offset_tags_info.h"
|
||||
#include "components/attribution_reporting/features.h"
|
||||
#include "components/download/public/common/download_stats.h"
|
||||
#include "components/url_formatter/url_formatter.h"
|
||||
@@ -89,9 +90,9 @@
|
||||
#include "content/browser/preloading/prerender/prerender_new_tab_handle.h"
|
||||
#include "content/browser/renderer_host/agent_scheduling_group_host.h"
|
||||
#include "content/browser/renderer_host/cross_process_frame_connector.h"
|
||||
#include "content/browser/renderer_host/cursor_manager.h"
|
||||
#include "content/browser/renderer_host/frame_token_message_queue.h"
|
||||
#include "content/browser/renderer_host/frame_tree_node.h"
|
||||
#include "content/browser/renderer_host/input/touch_emulator_impl.h"
|
||||
#include "content/browser/renderer_host/media/media_stream_manager.h"
|
||||
#include "content/browser/renderer_host/navigation_entry_impl.h"
|
||||
#include "content/browser/renderer_host/navigation_request.h"
|
||||
@@ -103,7 +104,6 @@
|
||||
#include "content/browser/renderer_host/render_view_host_impl.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_factory.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_view_base.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_view_child_frame.h"
|
||||
#include "content/browser/renderer_host/text_input_manager.h"
|
||||
@@ -120,6 +120,8 @@
|
||||
#include "content/browser/webui/web_ui_impl.h"
|
||||
#include "content/common/content_switches_internal.h"
|
||||
#include "content/common/features.h"
|
||||
#include "content/common/input/cursor_manager.h"
|
||||
#include "content/common/input/render_widget_host_input_event_router.h"
|
||||
#include "content/public/browser/ax_inspect_factory.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_plugin_guest_manager.h"
|
||||
@@ -238,6 +240,11 @@
|
||||
#include "content/browser/starscan_load_observer.h"
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#include "content/public/browser/document_picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/picture_in_picture_window_controller.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
namespace content {
|
||||
|
||||
namespace {
|
||||
@@ -269,6 +276,11 @@ BASE_FEATURE(kCrashOnDanglingBrowserContext,
|
||||
"CrashOnDanglingBrowserContext",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Kill switch for inner WebContents visibility updates.
|
||||
BASE_FEATURE(kUpdateInnerWebContentsVisibility,
|
||||
"UpdateInnerWebContentsVisibility",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
using LifecycleState = RenderFrameHost::LifecycleState;
|
||||
using LifecycleStateImpl = RenderFrameHostImpl::LifecycleStateImpl;
|
||||
using AttributionReportingOsRegistrar =
|
||||
@@ -837,7 +849,7 @@ class WebContentsImpl::WebContentsDestructionObserver
|
||||
raw_ptr<WebContentsImpl> owner_;
|
||||
};
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
// TODO(sreejakshetty): Make |WebContentsImpl::ColorChooserHolder| per-frame
|
||||
// instead of WebContents-owned.
|
||||
// WebContentsImpl::ColorChooserHolder -----------------------------------------
|
||||
@@ -888,7 +900,7 @@ class WebContentsImpl::ColorChooserHolder : public blink::mojom::ColorChooser {
|
||||
// mojo renderer client.
|
||||
mojo::Remote<blink::mojom::ColorChooserClient> client_;
|
||||
};
|
||||
#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
|
||||
#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
|
||||
// WebContentsImpl::WebContentsTreeNode ----------------------------------------
|
||||
WebContentsImpl::WebContentsTreeNode::WebContentsTreeNode(
|
||||
@@ -896,9 +908,7 @@ WebContentsImpl::WebContentsTreeNode::WebContentsTreeNode(
|
||||
: current_web_contents_(current_web_contents),
|
||||
outer_web_contents_(nullptr),
|
||||
outer_contents_frame_tree_node_id_(
|
||||
FrameTreeNode::kFrameTreeNodeInvalidId),
|
||||
focused_frame_tree_(
|
||||
current_web_contents->GetPrimaryFrameTree().GetSafeRef()) {}
|
||||
FrameTreeNode::kFrameTreeNodeInvalidId) {}
|
||||
|
||||
WebContentsImpl::WebContentsTreeNode::~WebContentsTreeNode() = default;
|
||||
|
||||
@@ -956,7 +966,7 @@ WebContentsImpl::WebContentsTreeNode::DetachInnerWebContents(
|
||||
}
|
||||
}
|
||||
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -978,12 +988,17 @@ void WebContentsImpl::WebContentsTreeNode::OnFrameTreeNodeDestroyed(
|
||||
outer_web_contents_->node_.DetachInnerWebContents(current_web_contents_);
|
||||
}
|
||||
|
||||
FrameTree* WebContentsImpl::WebContentsTreeNode::focused_frame_tree() {
|
||||
CHECK(focused_frame_tree_);
|
||||
return focused_frame_tree_;
|
||||
}
|
||||
|
||||
void WebContentsImpl::WebContentsTreeNode::SetFocusedFrameTree(
|
||||
FrameTree* frame_tree) {
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsTreeNode::SetFocusedFrameTree");
|
||||
DCHECK(!outer_web_contents())
|
||||
<< "Only the outermost WebContents tracks focus.";
|
||||
focused_frame_tree_ = frame_tree->GetSafeRef();
|
||||
focused_frame_tree_ = frame_tree;
|
||||
}
|
||||
|
||||
WebContentsImpl*
|
||||
@@ -1098,7 +1113,7 @@ class WebContentsOfBrowserContext : public base::SupportsUserData::Data {
|
||||
<< "WebContents (for more info see https://crbug.com/1376879#c44); "
|
||||
<< "creator = " << creator;
|
||||
} else {
|
||||
NOTREACHED()
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "BrowserContext is getting destroyed without first closing all "
|
||||
<< "WebContents (for more info see https://crbug.com/1376879#c44); "
|
||||
<< "creator = " << creator;
|
||||
@@ -1147,6 +1162,7 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
|
||||
delegate_(nullptr),
|
||||
render_view_host_delegate_view_(nullptr),
|
||||
opened_by_another_window_(false),
|
||||
node_(this),
|
||||
primary_frame_tree_(browser_context,
|
||||
this,
|
||||
this,
|
||||
@@ -1157,7 +1173,6 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
|
||||
this,
|
||||
this,
|
||||
FrameTree::Type::kPrimary),
|
||||
node_(this),
|
||||
primary_main_frame_process_status_(
|
||||
base::TERMINATION_STATUS_STILL_RUNNING),
|
||||
primary_main_frame_process_error_code_(0),
|
||||
@@ -1188,6 +1203,7 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
|
||||
prerender_host_registry_(std::make_unique<PrerenderHostRegistry>(*this)) {
|
||||
TRACE_EVENT0("content", "WebContentsImpl::WebContentsImpl");
|
||||
WebContentsOfBrowserContext::Attach(*this);
|
||||
node_.SetFocusedFrameTree(&primary_frame_tree_);
|
||||
#if BUILDFLAG(ENABLE_PPAPI)
|
||||
pepper_playback_observer_ = std::make_unique<PepperPlaybackObserver>(this);
|
||||
#endif
|
||||
@@ -1254,6 +1270,8 @@ WebContentsImpl::~WebContentsImpl() {
|
||||
|
||||
FullscreenContentsSet(GetBrowserContext())->erase(this);
|
||||
|
||||
touch_emulator_.reset();
|
||||
|
||||
rwh_input_event_router_.reset();
|
||||
|
||||
WebContentsImpl* outermost = GetOutermostWebContents();
|
||||
@@ -1288,7 +1306,7 @@ WebContentsImpl::~WebContentsImpl() {
|
||||
dialog_manager_->CancelDialogs(this, /*reset_state=*/true);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
color_chooser_holder_.reset();
|
||||
#endif
|
||||
find_request_manager_.reset();
|
||||
@@ -2527,11 +2545,11 @@ bool WebContentsImpl::IsCrashed() {
|
||||
case base::TERMINATION_STATUS_STILL_RUNNING:
|
||||
return false;
|
||||
case base::TERMINATION_STATUS_MAX_ENUM:
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
}
|
||||
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2719,6 +2737,16 @@ WebContents::ScopedIgnoreInputEvents WebContentsImpl::IgnoreInputEvents(
|
||||
wc->web_input_event_audit_callbacks_.erase(*callback_id);
|
||||
} else {
|
||||
--wc->ignore_input_events_count_;
|
||||
// Reset gesture detection so that we don't continue to generate new
|
||||
// gestures from suppressed touches. These suppressed gestures would
|
||||
// otherwise confuse the event stream validator when input is
|
||||
// re-enabled.
|
||||
if (wc->ignore_input_events_count_ == 0) {
|
||||
if (auto* view = wc->GetRenderWidgetHostView()) {
|
||||
static_cast<RenderWidgetHostViewBase*>(view)
|
||||
->ResetGestureDetection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3141,7 +3169,7 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences() {
|
||||
prefs.autoplay_policy =
|
||||
blink::mojom::AutoplayPolicy::kDocumentUserActivationRequired;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
}
|
||||
|
||||
prefs.dont_send_key_events_to_javascript =
|
||||
@@ -3541,6 +3569,10 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
|
||||
if (params.picture_in_picture_options.has_value()) {
|
||||
picture_in_picture_options_ = params.picture_in_picture_options;
|
||||
if (GetOpener()) {
|
||||
picture_in_picture_opener_ =
|
||||
FromRenderFrameHostImpl(GetOpener())->GetWeakPtr();
|
||||
}
|
||||
}
|
||||
|
||||
// This is set before initializing the render manager since
|
||||
@@ -3662,7 +3694,7 @@ void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) {
|
||||
pending_contents_.erase(iter);
|
||||
return;
|
||||
}
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
}
|
||||
|
||||
void WebContentsImpl::OnRenderWidgetHostDestroyed(
|
||||
@@ -3822,7 +3854,7 @@ void WebContentsImpl::RenderWidgetWasResized(
|
||||
}
|
||||
|
||||
KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::PreHandleKeyboardEvent");
|
||||
auto* outermost_contents = GetOutermostWebContents();
|
||||
@@ -3863,7 +3895,8 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
|
||||
bool WebContentsImpl::HandleKeyboardEvent(
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::HandleKeyboardEvent");
|
||||
if (browser_plugin_embedder_ &&
|
||||
@@ -3915,7 +3948,7 @@ RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() {
|
||||
if (!rwh_input_event_router_.get()) {
|
||||
rwh_input_event_router_ =
|
||||
std::make_unique<RenderWidgetHostInputEventRouter>(
|
||||
GetHostFrameSinkManager());
|
||||
GetHostFrameSinkManager(), this);
|
||||
}
|
||||
}
|
||||
return rwh_input_event_router_.get();
|
||||
@@ -4334,6 +4367,19 @@ void WebContentsImpl::UpdateVisibilityAndNotifyPageAndView(
|
||||
if (new_visibility != Visibility::VISIBLE) {
|
||||
SetVisibilityAndNotifyObservers(new_visibility);
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(kUpdateInnerWebContentsVisibility)) {
|
||||
// Inner WebContents are skipped in ForEachRenderViewHost() above, which
|
||||
// causes inner WebContents to not be notified of visibility changes.
|
||||
//
|
||||
// Note: An inner WebContents that is hidden within the embedder could
|
||||
// spuriously be set to visible (e.g. if its parent is display:none), but
|
||||
// this is ignored here for now.
|
||||
for (WebContents* inner : GetInnerWebContents()) {
|
||||
static_cast<WebContentsImpl*>(inner)
|
||||
->UpdateVisibilityAndNotifyPageAndView(new_visibility, is_activity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
@@ -4462,7 +4508,7 @@ bool WebContentsImpl::RequestKeyboardLock(
|
||||
"esc_key_locked", esc_key_locked);
|
||||
DCHECK(render_widget_host);
|
||||
if (WebContentsImpl::FromRenderWidgetHostImpl(render_widget_host) != this) {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5166,12 +5212,20 @@ void WebContentsImpl::AXTreeIDForMainFrameHasChanged() {
|
||||
&WebContentsObserver::AXTreeIDForMainFrameHasChanged);
|
||||
}
|
||||
|
||||
void WebContentsImpl::AccessibilityEventReceived(
|
||||
const ui::AXUpdatesAndEvents& details) {
|
||||
void WebContentsImpl::ProcessAccessibilityUpdatesAndEvents(
|
||||
ui::AXUpdatesAndEvents& details) {
|
||||
OPTIONAL_TRACE_EVENT0("content",
|
||||
"WebContentsImpl::AccessibilityEventReceived");
|
||||
|
||||
// First, supply the data to consumers that won't change it.
|
||||
observers_.NotifyObservers(&WebContentsObserver::AccessibilityEventReceived,
|
||||
details);
|
||||
|
||||
// Next, supply the data to consumers that may change it or who need to avoid
|
||||
// extra copying. Note that this also includes those who will pass to mojo
|
||||
// pipes not taking const.
|
||||
// TODO(accessibility): add support for this. WebContentsDelegate isn't the
|
||||
// right abstraction since it contains many other side effects.
|
||||
}
|
||||
|
||||
void WebContentsImpl::AccessibilityLocationChangesReceived(
|
||||
@@ -6155,7 +6209,7 @@ bool WebContentsImpl::GotResponseToKeyboardLockRequest(bool allowed) {
|
||||
}
|
||||
if (WebContentsImpl::FromRenderWidgetHostImpl(keyboard_lock_widget_) !=
|
||||
this) {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
}
|
||||
// KeyboardLock is only supported when called by the top-level browsing
|
||||
@@ -6190,7 +6244,7 @@ WebContents* WebContentsImpl::GetFirstWebContentsInLiveOriginalOpenerChain() {
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
void WebContentsImpl::DidChooseColorInColorChooser(SkColor color) {
|
||||
OPTIONAL_TRACE_EVENT1("content",
|
||||
"WebContentsImpl::DidChooseColorInColorChooser",
|
||||
@@ -6266,7 +6320,7 @@ void WebContentsImpl::Find(int request_id,
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::Find");
|
||||
// Cowardly refuse to search for no text.
|
||||
if (search_text.empty()) {
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6684,6 +6738,18 @@ void WebContentsImpl::NotifyNavigationStateChangedFromController(
|
||||
NotifyNavigationStateChanged(changed_flags);
|
||||
}
|
||||
|
||||
TouchEmulator* WebContentsImpl::GetTouchEmulator(bool create_if_necessary) {
|
||||
CHECK(rwh_input_event_router_);
|
||||
|
||||
if (!touch_emulator_ && create_if_necessary) {
|
||||
touch_emulator_ = std::make_unique<TouchEmulatorImpl>(
|
||||
rwh_input_event_router_.get(),
|
||||
rwh_input_event_router_->last_device_scale_factor());
|
||||
}
|
||||
|
||||
return touch_emulator_.get();
|
||||
}
|
||||
|
||||
void WebContentsImpl::DidNavigateMainFramePreCommit(
|
||||
NavigationHandle* navigation_handle,
|
||||
bool navigation_is_within_page) {
|
||||
@@ -6708,7 +6774,7 @@ void WebContentsImpl::DidNavigateMainFramePreCommit(
|
||||
GetBackForwardTransitionAnimationManager());
|
||||
if (animation_manager) {
|
||||
animation_manager->OnDidNavigatePrimaryMainFramePreCommit(
|
||||
*request, frame_tree_node->render_manager()->current_frame_host(),
|
||||
request, frame_tree_node->render_manager()->current_frame_host(),
|
||||
request->GetRenderFrameHost());
|
||||
}
|
||||
#endif
|
||||
@@ -7384,7 +7450,7 @@ void WebContentsImpl::OnColorChooserFactoryReceiver(
|
||||
color_chooser_factory_receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
void WebContentsImpl::OpenColorChooser(
|
||||
mojo::PendingReceiver<blink::mojom::ColorChooser> chooser_receiver,
|
||||
mojo::PendingRemote<blink::mojom::ColorChooserClient> client,
|
||||
@@ -7411,7 +7477,7 @@ void WebContentsImpl::OpenColorChooser(
|
||||
color_chooser_holder_.reset();
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
|
||||
#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PPAPI)
|
||||
void WebContentsImpl::OnPepperInstanceCreated(RenderFrameHostImpl* source,
|
||||
@@ -8492,19 +8558,6 @@ void WebContentsImpl::DidStopLoading() {
|
||||
manager->DidStopLoading();
|
||||
}
|
||||
});
|
||||
|
||||
// The spare renderer creation might have been delayed until the page stops
|
||||
// loading. Notify the spare renderer manager about the page loading
|
||||
// completion. This is a no-op if a spare rendere already exists.
|
||||
//
|
||||
// TODO(crbug.com/41490050): replace the implicit treatment of
|
||||
// TimeDelta::Max() with an enum and optional TimeDelta if we decide to launch
|
||||
// deferred spare renderer.
|
||||
bool immediately_warmup_spare_renderer =
|
||||
GetContentClient()->browser()->GetSpareRendererDelayForSiteURL(
|
||||
GetURL()) == base::TimeDelta::Max();
|
||||
RenderProcessHostImpl::NotifySpareManagerAboutRecentlyUsedSiteInstance(
|
||||
GetSiteInstance(), /* ignore_delay */ immediately_warmup_spare_renderer);
|
||||
}
|
||||
|
||||
void WebContentsImpl::DidChangeLoadProgressForPrimaryMainFrame() {
|
||||
@@ -8957,6 +9010,34 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
|
||||
CloseListenerManager::DidChangeFocusedFrame(this);
|
||||
}
|
||||
|
||||
FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (has_picture_in_picture_document_) {
|
||||
WebContents* picture_in_picture_web_contents =
|
||||
PictureInPictureWindowController::
|
||||
GetOrCreateDocumentPictureInPictureController(this)
|
||||
->GetChildWebContents();
|
||||
if (picture_in_picture_web_contents) {
|
||||
return &(static_cast<WebContentsImpl*>(picture_in_picture_web_contents)
|
||||
->GetPrimaryFrameTree());
|
||||
}
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FrameTree* WebContentsImpl::GetPictureInPictureOpenerFrameTree() {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (picture_in_picture_opener_) {
|
||||
return &(static_cast<WebContentsImpl*>(picture_in_picture_opener_.get())
|
||||
->GetPrimaryFrameTree());
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void WebContentsImpl::DidCallFocus() {
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::DidCallFocus");
|
||||
// Any explicit focusing of another window while this WebContents is in
|
||||
@@ -9101,7 +9182,17 @@ void WebContentsImpl::FocusOwningWebContents(
|
||||
if (focused_widget != render_widget_host &&
|
||||
(!focused_widget ||
|
||||
focused_widget->delegate() != render_widget_host->delegate())) {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (&GetPrimaryFrameTree() != GetFocusedFrameTree()) {
|
||||
UMA_HISTOGRAM_BOOLEAN("Android.FocusChanged.FocusOwningWebContents",
|
||||
true);
|
||||
}
|
||||
#endif
|
||||
SetAsFocusedWebContentsIfNecessary();
|
||||
} else {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
UMA_HISTOGRAM_BOOLEAN("Android.FocusChanged.FocusOwningWebContents", false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9537,7 +9628,7 @@ gfx::Size WebContentsImpl::GetSize() {
|
||||
return view_android->bounds().size();
|
||||
#elif BUILDFLAG(IS_IOS)
|
||||
// TODO(crbug.com/40254930): Implement me.
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return gfx::Size();
|
||||
#endif
|
||||
}
|
||||
@@ -10244,7 +10335,7 @@ bool WebContentsImpl::IsBackForwardCacheSupported() {
|
||||
if (!GetDelegate()) {
|
||||
return false;
|
||||
}
|
||||
return GetDelegate()->IsBackForwardCacheSupported();
|
||||
return GetDelegate()->IsBackForwardCacheSupported(*this);
|
||||
}
|
||||
|
||||
FrameTree* WebContentsImpl::LoadingTree() {
|
||||
@@ -10626,7 +10717,7 @@ void WebContentsImpl::RenderFrameHostStateChanged(
|
||||
dict.Add("new", new_state);
|
||||
});
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC)
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (old_state == LifecycleState::kActive && !render_frame_host->GetParent()) {
|
||||
// TODO(sreejakshetty): Remove this reset when ColorChooserHolder becomes
|
||||
// per-frame.
|
||||
@@ -10634,7 +10725,7 @@ void WebContentsImpl::RenderFrameHostStateChanged(
|
||||
// kActive.
|
||||
color_chooser_holder_.reset();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC)
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
observers_.NotifyObservers(&WebContentsObserver::RenderFrameHostStateChanged,
|
||||
render_frame_host, old_state, new_state);
|
||||
@@ -10696,10 +10787,12 @@ void WebContentsImpl::NotifyPrimaryMainFrameProcessIsAlive() {
|
||||
void WebContentsImpl::UpdateBrowserControlsState(
|
||||
cc::BrowserControlsState constraints,
|
||||
cc::BrowserControlsState current,
|
||||
bool animate) {
|
||||
bool animate,
|
||||
const std::optional<cc::BrowserControlsOffsetTagsInfo>& offset_tags_info) {
|
||||
// Browser controls should be synchronised with the scroll state. Therefore,
|
||||
// they are controlled from the renderer by the main RenderFrame(Host).
|
||||
GetPrimaryPage().UpdateBrowserControlsState(constraints, current, animate);
|
||||
GetPrimaryPage().UpdateBrowserControlsState(constraints, current, animate,
|
||||
offset_tags_info);
|
||||
}
|
||||
|
||||
void WebContentsImpl::SetV8CompileHints(base::ReadOnlySharedMemoryRegion data) {
|
||||
@@ -10781,6 +10874,7 @@ std::unique_ptr<PrerenderHandle> WebContentsImpl::StartPrerendering(
|
||||
prerendering_url, trigger_type, embedder_histogram_suffix,
|
||||
/*target_hint=*/std::nullopt, content::Referrer(),
|
||||
/*eagerness=*/std::nullopt,
|
||||
/*no_vary_search_expected=*/std::nullopt,
|
||||
/*initiator_origin=*/std::nullopt,
|
||||
content::ChildProcessHost::kInvalidUniqueID, GetWeakPtr(),
|
||||
/*initiator_frame_token=*/std::nullopt,
|
||||
|
||||
@@ -169,7 +169,7 @@ void SetRuntimeFeatureFromChromiumFeature(const base::Feature& chromium_feature,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,10 +389,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
kSetOnlyIfOverridden},
|
||||
{"Fledge", raw_ref(features::kPrivacySandboxAdsAPIsM1Override),
|
||||
kSetOnlyIfOverridden},
|
||||
#if BUILDFLAG(USE_FONTATIONS_BACKEND)
|
||||
{"FontationsFontBackend",
|
||||
raw_ref(blink::features::kFontationsFontBackend)},
|
||||
#endif
|
||||
{"FontSrcLocalMatching", raw_ref(features::kFontSrcLocalMatching)},
|
||||
{"LegacyWindowsDWriteFontFallback",
|
||||
raw_ref(features::kLegacyWindowsDWriteFontFallback)},
|
||||
@@ -476,6 +474,12 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) {
|
||||
{wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false},
|
||||
{wrf::EnableMutationEvents, blink::switches::kMutationEventsEnabled,
|
||||
true},
|
||||
{wrf::EnableKeyboardFocusableScrollers,
|
||||
blink::switches::kKeyboardFocusableScrollersEnabled, true},
|
||||
{wrf::EnableKeyboardFocusableScrollers,
|
||||
blink::switches::kKeyboardFocusableScrollersOptOut, false},
|
||||
{wrf::EnableCSSCustomStateDeprecatedSyntax,
|
||||
blink::switches::kCSSCustomStateDeprecatedSyntaxEnabled, true},
|
||||
{wrf::EnableTextFragmentIdentifiers,
|
||||
switches::kDisableScrollToTextFragment, false},
|
||||
{wrf::EnableWebAuthenticationRemoteDesktopSupport,
|
||||
@@ -715,6 +719,7 @@ void ResolveInvalidConfigurations() {
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kCookieDeprecationFacilitatedTesting)) {
|
||||
WebRuntimeFeatures::EnableFledgeMultiBid(false);
|
||||
WebRuntimeFeatures::EnableFledgeRealTimeReporting(false);
|
||||
|
||||
if (!base::FeatureList::IsEnabled(
|
||||
blink::features::
|
||||
|
||||
@@ -9,20 +9,18 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/buildflag.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "content/browser/model_execution/mock_model_manager.h"
|
||||
#include "content/browser/ai/mock_ai_manager_impl.h"
|
||||
#include "content/public/browser/anchor_element_preconnect_delegate.h"
|
||||
#include "content/public/browser/authenticator_request_client_delegate.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
@@ -92,6 +90,7 @@
|
||||
#include "content/public/browser/tts_environment_android.h"
|
||||
#else
|
||||
#include "services/video_effects/public/mojom/video_effects_processor.mojom-forward.h"
|
||||
#include "third_party/blink/public/mojom/installedapp/related_application.mojom.h"
|
||||
#endif
|
||||
|
||||
using AttributionReportType =
|
||||
@@ -161,6 +160,11 @@ bool ContentBrowserClient::ShouldUseProcessPerSite(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldAllowProcessPerSiteForMultipleMainFrames(
|
||||
BrowserContext* context) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldUseSpareRenderProcessHost(
|
||||
BrowserContext* browser_context,
|
||||
const GURL& site_url) {
|
||||
@@ -628,6 +632,7 @@ bool ContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
|
||||
|
||||
bool ContentBrowserClient::IsFullCookieAccessAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
content::WebContents* web_contents,
|
||||
const GURL& url,
|
||||
const blink::StorageKey& storage_key) {
|
||||
return true;
|
||||
@@ -644,6 +649,11 @@ GeneratedCodeCacheSettings ContentBrowserClient::GetGeneratedCodeCacheSettings(
|
||||
return GeneratedCodeCacheSettings(false, 0, base::FilePath());
|
||||
}
|
||||
|
||||
std::string ContentBrowserClient::GetWebUIHostnameForCodeCacheMetrics(
|
||||
const GURL& webui_url) const {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
void ContentBrowserClient::AllowCertificateError(
|
||||
WebContents* web_contents,
|
||||
int cert_error,
|
||||
@@ -948,11 +958,6 @@ std::wstring ContentBrowserClient::GetAppContainerSidForSandboxType(
|
||||
L"924012148-129201922");
|
||||
}
|
||||
|
||||
std::string ContentBrowserClient::GetAppContainerId() {
|
||||
return base::WideToUTF8(
|
||||
base::CommandLine::ForCurrentProcess()->GetProgram().value());
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::IsRendererAppContainerDisabled() {
|
||||
return false;
|
||||
}
|
||||
@@ -974,6 +979,10 @@ bool ContentBrowserClient::ShouldEnableAudioProcessHighPriority() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::ShouldUseSkiaFontManager(const GURL& site_url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
@@ -1055,7 +1064,7 @@ void ContentBrowserClient::CreateWebSocket(
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client) {
|
||||
// NOTREACHED because WillInterceptWebSocket returns false.
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
}
|
||||
|
||||
void ContentBrowserClient::WillCreateWebTransport(
|
||||
@@ -1202,11 +1211,6 @@ bool ContentBrowserClient::ShowPaymentHandlerWindow(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::CreateThreadPool(std::string_view name) {
|
||||
base::ThreadPoolInstance::Create(name);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContentBrowserClient::IsSecurityLevelAcceptableForWebAuthn(
|
||||
content::RenderFrameHost* rfh,
|
||||
const url::Origin& caller_origin) {
|
||||
@@ -1522,13 +1526,15 @@ ContentBrowserClient::CreateIdentityRequestDialogController(
|
||||
return std::make_unique<IdentityRequestDialogController>();
|
||||
}
|
||||
|
||||
void ContentBrowserClient::ShowDigitalIdentityInterstitialIfNeeded(
|
||||
ContentBrowserClient::DigitalIdentityInterstitialAbortCallback
|
||||
ContentBrowserClient::ShowDigitalIdentityInterstitialIfNeeded(
|
||||
WebContents& web_contents,
|
||||
const url::Origin& origin,
|
||||
bool is_only_requesting_age,
|
||||
DigitalIdentityInterstitialCallback callback) {
|
||||
std::move(callback).Run(
|
||||
DigitalIdentityProvider::RequestStatusForMetrics::kErrorOther);
|
||||
return base::OnceClosure();
|
||||
}
|
||||
|
||||
std::unique_ptr<DigitalIdentityProvider>
|
||||
@@ -1720,6 +1726,7 @@ ContentBrowserClient::GetIpProtectionProxyBypassPolicy() {
|
||||
|
||||
void ContentBrowserClient::MaybePrewarmHttpDiskCache(
|
||||
BrowserContext& browser_context,
|
||||
const std::optional<url::Origin>& initiator_origin,
|
||||
const GURL& navigation_url) {}
|
||||
|
||||
void ContentBrowserClient::NotifyMultiCaptureStateChanged(
|
||||
@@ -1735,10 +1742,21 @@ bool ContentBrowserClient::ShouldSuppressAXLoadComplete(RenderFrameHost* rfh) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void ContentBrowserClient::BindModelManager(
|
||||
void ContentBrowserClient::BindAIManager(
|
||||
RenderFrameHost* rfh,
|
||||
mojo::PendingReceiver<blink::mojom::ModelManager> receiver) {
|
||||
MockModelManager::Create(rfh, std::move(receiver));
|
||||
mojo::PendingReceiver<blink::mojom::AIManager> receiver) {
|
||||
MockAIManagerImpl::Create(rfh, std::move(receiver));
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
void ContentBrowserClient::QueryInstalledWebAppsByManifestId(
|
||||
const GURL& frame_url,
|
||||
const GURL& manifest_id,
|
||||
content::BrowserContext* browser_context,
|
||||
base::OnceCallback<void(std::optional<blink::mojom::RelatedApplication>)>
|
||||
callback) {
|
||||
std::move(callback).Run(std::nullopt);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
} // namespace content
|
||||
|
||||
@@ -242,6 +242,7 @@
|
||||
// End ARIA Graphics module roles.
|
||||
// --------------------------------------------------------------
|
||||
grid,
|
||||
gridCell,
|
||||
group,
|
||||
header,
|
||||
headerAsNonLandmark,
|
||||
@@ -946,6 +947,9 @@ enum PositionType {
|
||||
// an <code><input> element.
|
||||
DOMString? value;
|
||||
|
||||
// The HTML id for this element, if this node is an HTML element.
|
||||
DOMString? htmlId;
|
||||
|
||||
// The HTML tag for this element, if this node is an HTML element.
|
||||
DOMString? htmlTag;
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Use `iconVariants` for icon declarations with support for color schemes.
|
||||
// In addition to these keys, a size key is allowed with a value of the file
|
||||
// path to the image.
|
||||
[generate_error_messages, nodoc] namespace iconVariants {
|
||||
enum ColorScheme { dark, light };
|
||||
|
||||
[additionalProperties] dictionary IconVariant {
|
||||
// Optional DOMString path to an icon that should be used with any possible
|
||||
// size.
|
||||
DOMString? any;
|
||||
|
||||
// Optional ColorScheme.
|
||||
ColorScheme[]? color_schemes;
|
||||
};
|
||||
|
||||
dictionary ManifestKeys {
|
||||
IconVariant[] icon_variants;
|
||||
};
|
||||
};
|
||||
@@ -117,11 +117,11 @@ const char* GetSnapshotFileName(const V8SnapshotFileType file_type) {
|
||||
#if BUILDFLAG(USE_V8_CONTEXT_SNAPSHOT)
|
||||
return kV8ContextSnapshotFileName;
|
||||
#else
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -258,12 +258,6 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
SetV8FlagsIfOverridden(features::kV8PerContextMarkingWorklist,
|
||||
"--stress-per-context-marking-worklist",
|
||||
"--no-stress-per-context-marking-worklist");
|
||||
SetV8FlagsIfOverridden(
|
||||
features::kV8ProfileGuidedOptimization,
|
||||
"--profile-guided-optimization "
|
||||
"--profile-guided-optimization-for-empty-feedback-vector",
|
||||
"--noprofile-guided-optimization "
|
||||
"--noprofile-guided-optimization-for-empty-feedback-vector");
|
||||
SetV8FlagsIfOverridden(features::kV8FlushEmbeddedBlobICache,
|
||||
"--experimental-flush-embedded-blob-icache",
|
||||
"--no-experimental-flush-embedded-blob-icache");
|
||||
@@ -319,9 +313,22 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
"--no-write-protect-code-memory");
|
||||
SetV8FlagsIfOverridden(features::kV8SlowHistograms, "--slow-histograms",
|
||||
"--no-slow-histograms");
|
||||
SetV8FlagsIfOverridden(features::kV8SideStepTransitions,
|
||||
"--clone_object_sidestep_transitions",
|
||||
"--noclone_object_sidestep_transitions");
|
||||
SetV8FlagsIfOverridden(features::kV8SingleThreadedGCInBackground,
|
||||
"--single-threaded-gc-in-background",
|
||||
"--no-single-threaded-gc-in-background");
|
||||
SetV8FlagsIfOverridden(features::kV8SingleThreadedGCInBackgroundParallelPause,
|
||||
"--parallel-pause-for-gc-in-background",
|
||||
"--no-parallel-pause-for-gc-in-background");
|
||||
SetV8FlagsIfOverridden(
|
||||
features::kV8SingleThreadedGCInBackgroundNoIncrementalMarking,
|
||||
"--no-incremental-marking-for-gc-in-background",
|
||||
"--incremental-marking-for-gc-in-background");
|
||||
SetV8FlagsIfOverridden(features::kV8DecommitPooledPages,
|
||||
"--decommit-pooled-pages",
|
||||
"--no-decommit-pooled-pages");
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kV8ConcurrentSparkplug)) {
|
||||
if (int max_threads = features::kV8ConcurrentSparkplugMaxThreads.Get()) {
|
||||
@@ -435,9 +442,6 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
|
||||
// WebAssembly features.
|
||||
|
||||
SetV8FlagsIfOverridden(features::kWebAssemblyTailCall,
|
||||
"--experimental-wasm-return-call",
|
||||
"--no-experimental-wasm-return-call");
|
||||
SetV8FlagsIfOverridden(features::kWebAssemblyInlining,
|
||||
"--experimental-wasm-inlining",
|
||||
"--no-experimental-wasm-inlining");
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "services/network/network_context.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -112,6 +113,8 @@
|
||||
#include "services/network/network_service_network_delegate.h"
|
||||
#include "services/network/network_service_proxy_delegate.h"
|
||||
#include "services/network/oblivious_http_request_handler.h"
|
||||
#include "services/network/prefetch_cache.h"
|
||||
#include "services/network/prefetch_url_loader_client.h"
|
||||
#include "services/network/proxy_config_service_mojo.h"
|
||||
#include "services/network/proxy_lookup_request.h"
|
||||
#include "services/network/proxy_resolving_socket_factory_mojo.h"
|
||||
@@ -120,6 +123,7 @@
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "services/network/public/cpp/parsed_headers.h"
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
#include "services/network/public/cpp/simple_host_resolver.h"
|
||||
#include "services/network/public/mojom/clear_data_filter.mojom.h"
|
||||
#include "services/network/public/mojom/cookie_encryption_provider.mojom.h"
|
||||
@@ -405,6 +409,19 @@ base::RepeatingCallback<bool(const GURL&)> BuildUrlFilter(
|
||||
class NetworkContextApplicationStatusListener
|
||||
: public base::android::ApplicationStatusListener {
|
||||
public:
|
||||
// Sets `get_callback` to be a callback that returns nullptr if the created
|
||||
// NetworkContextApplicationStatusListener has been destroyed, and the
|
||||
// listener itself, otherwise. It's a constructor argument to avoid needing
|
||||
// a cast, moving this into the header, or other complexities around
|
||||
// `app_status_listeners_` being a vector of the parent class.
|
||||
explicit NetworkContextApplicationStatusListener(
|
||||
disk_cache::ApplicationStatusListenerGetter& get_callback) {
|
||||
get_callback =
|
||||
base::BindRepeating(&NetworkContextApplicationStatusListener::
|
||||
ReturnAppStatusListenerIfAlive,
|
||||
weak_ptr_factory_.GetWeakPtr());
|
||||
}
|
||||
|
||||
// base::android::ApplicationStatusListener implementation:
|
||||
void SetCallback(const ApplicationStateChangeCallback& callback) override {
|
||||
DCHECK(!callback_);
|
||||
@@ -418,17 +435,16 @@ class NetworkContextApplicationStatusListener
|
||||
}
|
||||
|
||||
private:
|
||||
ApplicationStateChangeCallback callback_;
|
||||
};
|
||||
|
||||
base::android::ApplicationStatusListener* ReturnAppStatusListenerIfAlive(
|
||||
base::WeakPtr<NetworkContext> network_context,
|
||||
base::android::ApplicationStatusListener* listener) {
|
||||
if (!network_context) {
|
||||
return nullptr;
|
||||
static base::android::ApplicationStatusListener*
|
||||
ReturnAppStatusListenerIfAlive(
|
||||
base::WeakPtr<base::android::ApplicationStatusListener> listener) {
|
||||
return listener.get();
|
||||
}
|
||||
return listener;
|
||||
}
|
||||
|
||||
ApplicationStateChangeCallback callback_;
|
||||
base::WeakPtrFactory<base::android::ApplicationStatusListener>
|
||||
weak_ptr_factory_{this};
|
||||
};
|
||||
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -516,6 +532,52 @@ bool GetFullDataFilePath(
|
||||
return true;
|
||||
}
|
||||
|
||||
// Produces URLLoaderFactoryParams suitable for a prefetch. Generally this
|
||||
// should match the params that are used for subresource fetches to render
|
||||
// processes.
|
||||
mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() {
|
||||
auto params = mojom::URLLoaderFactoryParams::New();
|
||||
params->process_id = mojom::kBrowserProcessId;
|
||||
// We want to be able to use TrustedParams to set the IsolationInfo for each
|
||||
// prefetch separately, so make it trusted.
|
||||
// TODO(crbug.com/342445996): Maybe stop using TrustedParams and lock this
|
||||
// down?
|
||||
params->is_trusted = true;
|
||||
|
||||
// This can be set to true by the content::switches::kDisableWebSecurity
|
||||
// switch, but that's not available in the network service. The consequences
|
||||
// of this being disabled should just be that prefetches fail where this flag
|
||||
// would have taken effect.
|
||||
// TODO(crbug.com/342445996): Pass this through from the caller.
|
||||
//
|
||||
// Android WebView also disables web security when the
|
||||
// `allow_universal_access_from_file_urls` flag is set, however, WebView
|
||||
// doesn't currently support prefetch anyway.
|
||||
params->disable_web_security = false;
|
||||
|
||||
// TODO(crbug.com/342445996): Find out if we need to set anything here.
|
||||
params->client_security_state = mojom::ClientSecurityState::New();
|
||||
|
||||
// TODO(crbug.com/342445996): params->coep_reporter
|
||||
|
||||
// --disable-web-security also disables Opaque Response Blocking (ORB).
|
||||
params->is_orb_enabled = !params->disable_web_security;
|
||||
|
||||
// TODO(crbug.com/342445996): trust_token_issuance_policy,
|
||||
// trust_token_redemption_policy
|
||||
|
||||
// TODO(crbug.com/342445996): Add observers as needed for DevTools support,
|
||||
// etc.
|
||||
|
||||
// TODO(crbug.com/342445996): params->cookie_setting_overrides
|
||||
|
||||
params->debug_tag = "CreateURLLoaderFactoryParamsForPrefetch";
|
||||
|
||||
// TODO(crbug.com/342445996): params->require_cross_site_requests_for_cookies
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
@@ -604,8 +666,10 @@ NetworkContext::NetworkContext(
|
||||
params_->file_paths->shared_dictionary_directory &&
|
||||
!params_->file_paths->shared_dictionary_directory->path().empty()) {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
disk_cache::ApplicationStatusListenerGetter get_callback;
|
||||
app_status_listeners_.push_back(
|
||||
std::make_unique<NetworkContextApplicationStatusListener>());
|
||||
std::make_unique<NetworkContextApplicationStatusListener>(
|
||||
get_callback));
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
// TODO(crbug.com/40255884): Set `file_operations_factory` to support
|
||||
// sandboxed network service on Android.
|
||||
@@ -617,10 +681,7 @@ NetworkContext::NetworkContext(
|
||||
params_->shared_dictionary_cache_max_size,
|
||||
shared_dictionary::kDictionaryMaxCountPerNetworkContext,
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
base::BindRepeating(&ReturnAppStatusListenerIfAlive,
|
||||
weak_factory_.GetWeakPtr(),
|
||||
base::UnsafeDanglingUntriaged(
|
||||
app_status_listeners_.rbegin()->get())),
|
||||
std::move(get_callback),
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
/*file_operations_factory=*/nullptr);
|
||||
} else {
|
||||
@@ -2106,7 +2167,7 @@ void NetworkContext::CreateMdnsResponder(
|
||||
|
||||
mdns_responder_manager_->CreateMdnsResponder(std::move(responder_receiver));
|
||||
#else
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
#endif // BUILDFLAG(ENABLE_MDNS)
|
||||
}
|
||||
|
||||
@@ -2360,12 +2421,12 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
// TODO(crbug.com/40928765): The TrustAnchorUsed callback should
|
||||
// work on all platforms. (Also consider whether this wrapper is the best
|
||||
// way to handle this or if it should be refactored.)
|
||||
cert_verifier_with_trust_anchors_ =
|
||||
new CertVerifierWithTrustAnchors(base::BindRepeating(
|
||||
auto cert_verifier_with_trust_anchors =
|
||||
std::make_unique<CertVerifierWithTrustAnchors>(base::BindRepeating(
|
||||
&NetworkContext::TrustAnchorUsed, base::Unretained(this)));
|
||||
cert_verifier_with_trust_anchors_->InitializeOnIOThread(
|
||||
cert_verifier_with_trust_anchors->InitializeOnIOThread(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
|
||||
cert_verifier = std::move(cert_verifier_with_trust_anchors);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
}
|
||||
|
||||
@@ -2523,10 +2584,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
app_status_listeners_.push_back(
|
||||
std::make_unique<NetworkContextApplicationStatusListener>());
|
||||
cache_params.app_status_listener_getter = base::BindRepeating(
|
||||
&ReturnAppStatusListenerIfAlive, weak_factory_.GetWeakPtr(),
|
||||
base::UnsafeDanglingUntriaged(app_status_listeners_.rbegin()->get()));
|
||||
std::make_unique<NetworkContextApplicationStatusListener>(
|
||||
cache_params.app_status_listener_getter));
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
builder.EnableHttpCache(cache_params);
|
||||
}
|
||||
@@ -3110,6 +3169,37 @@ void NetworkContext::ExemptUrlFromNetworkRevocationForNonce(
|
||||
std::move(callback).Run();
|
||||
}
|
||||
|
||||
void NetworkContext::Prefetch(
|
||||
int32_t request_id,
|
||||
uint32_t options,
|
||||
const ResourceRequest& request,
|
||||
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) {
|
||||
if (!base::FeatureList::IsEnabled(features::kNetworkContextPrefetch)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!prefetch_cache_) {
|
||||
// Lazily initialized to avoid slowing down startup.
|
||||
prefetch_cache_ = std::make_unique<PrefetchCache>();
|
||||
}
|
||||
|
||||
if (!prefetch_url_loader_factory_remote_.is_bound() ||
|
||||
!prefetch_url_loader_factory_remote_.is_connected()) {
|
||||
InitializePrefetchURLLoaderFactory();
|
||||
}
|
||||
|
||||
PrefetchURLLoaderClient* client = prefetch_cache_->Emplace(request);
|
||||
if (!client) {
|
||||
// This is normal if we already have a prefetch in progress for the {NIK,
|
||||
// URL} combination.
|
||||
return;
|
||||
}
|
||||
|
||||
prefetch_url_loader_factory_remote_->CreateLoaderAndStart(
|
||||
client->GetURLLoaderPendingReceiver(), request_id, options, request,
|
||||
client->BindNewPipeAndPassRemote(), traffic_annotation);
|
||||
}
|
||||
|
||||
bool NetworkContext::IsNetworkForNonceAndUrlAllowed(
|
||||
const base::UnguessableToken& nonce,
|
||||
const GURL& url) const {
|
||||
@@ -3128,4 +3218,11 @@ bool NetworkContext::IsNetworkForNonceAndUrlAllowed(
|
||||
return false;
|
||||
}
|
||||
|
||||
void NetworkContext::InitializePrefetchURLLoaderFactory() {
|
||||
auto pending_receiver =
|
||||
prefetch_url_loader_factory_remote_.BindNewPipeAndPassReceiver();
|
||||
CreateURLLoaderFactory(std::move(pending_receiver),
|
||||
CreateURLLoaderFactoryParamsForPrefetch());
|
||||
}
|
||||
|
||||
} // namespace network
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+43
-37
@@ -3411,7 +3411,7 @@ enum WebFeature {
|
||||
|
||||
kAllowPaymentRequestAttributeHasEffect = 4094,
|
||||
kV8PaymentResponse_Retry_Method = 4095,
|
||||
kWebAppManifestUserPreferences = 4096,
|
||||
kOBSOLETE_kWebAppManifestUserPreferences = 4096,
|
||||
kV8HTMLInputElement_ShowPicker_Method = 4097,
|
||||
kLayerXYWithMediaTarget = 4098,
|
||||
kLayerXYWithCanvasTarget = 4099,
|
||||
@@ -3778,12 +3778,12 @@ enum WebFeature {
|
||||
kCSSBackgroundClipBorder = 4436,
|
||||
kCSSBackgroundClipContent = 4437,
|
||||
kCSSBackgroundClipPadding = 4438,
|
||||
kDisableThirdPartySessionStoragePartitioningAfterGeneralPartitioning = 4439,
|
||||
kOBSOLETE_DisableThirdPartySessionStoragePartitioningAfterGeneralPartitioning = 4439,
|
||||
kOBSOLETE_kCSSPseudoHasContainsMixOfValidAndInvalid = 4440,
|
||||
kOBSOLETE_kCSSPseudoIsWhereContainsMixOfValidAndInvalid = 4441,
|
||||
kPrivateNetworkAccessFetchedSubFrame = 4442,
|
||||
kPrivateNetworkAccessFetchedTopFrame = 4443,
|
||||
kDisableThirdPartyStoragePartitioning = 4444,
|
||||
kOBSOLETE_DisableThirdPartyStoragePartitioning = 4444,
|
||||
kServiceWorkerFetchHandlerAddedAfterInitialization = 4445,
|
||||
kObsoleteCreateImageBitmapImageOrientationNone = 4446,
|
||||
kOBSOLETE_kWindowManagementPermissionDescriptorUsed = 4447,
|
||||
@@ -4260,8 +4260,6 @@ enum WebFeature {
|
||||
kQuirksModeCursorHand = 4896,
|
||||
kTrustedTypesCreatePolicyWithEmptyName = 4897,
|
||||
kV8RTCEncodedAudioFrame_Constructor = 4898,
|
||||
|
||||
// Direct Sockets API:
|
||||
kTCPSocketConstructor = 4899,
|
||||
kTCPSocketOpenedAttribute = 4900,
|
||||
kTCPSocketClosedAttribute = 4901,
|
||||
@@ -4274,8 +4272,6 @@ enum WebFeature {
|
||||
kTCPServerSocketOpenedAttribute = 4908,
|
||||
kTCPServerSocketClosedAttribute = 4909,
|
||||
kTCPServerSocketCloseFunction = 4910,
|
||||
|
||||
// Web Printing API:
|
||||
kWebPrintingGetPrintersFunction = 4911,
|
||||
kWebPrinterCachedAttributesFunction = 4912,
|
||||
kWebPrinterFetchAttributesFunction = 4913,
|
||||
@@ -4285,72 +4281,51 @@ enum WebFeature {
|
||||
kWebPrintJobOnJobStateChangeEvent = 4917,
|
||||
kFledgeAuctionReportBuyers = 4918,
|
||||
kFledgeAuctionReportBuyerDebugModeConfig = 4919,
|
||||
|
||||
kFedCmButtonMode = 4920,
|
||||
// The items above roughly this point are available in the M124 branch.
|
||||
|
||||
kHTMLPermissionElement = 4921,
|
||||
|
||||
// Model Execution API:
|
||||
kV8ModelGenericSession_Execute_Method = 4922,
|
||||
kV8ModelGenericSession_ExecuteStreaming_Method = 4923,
|
||||
kV8ModelManager_CanCreateGenericSession_Method = 4924,
|
||||
kV8ModelManager_CreateGenericSession_Method = 4925,
|
||||
|
||||
kOBSOLETE_V8ModelGenericSession_Execute_Method = 4922,
|
||||
kOBSOLETE_V8ModelGenericSession_ExecuteStreaming_Method = 4923,
|
||||
kOBSOLETE_V8ModelManager_CanCreateGenericSession_Method = 4924,
|
||||
kOBSOLETE_V8ModelManager_CreateGenericSession_Method = 4925,
|
||||
kV8Animation_Progress_AttributeGetter = 4926,
|
||||
|
||||
kV8ModelManager_DefaultGenericSessionOptions_Method = 4927,
|
||||
|
||||
kOBSOLETE_V8ModelManager_DefaultGenericSessionOptions_Method = 4927,
|
||||
kQuirksModeCursorHandApplied = 4928,
|
||||
kSkippedPreloadScanning = 4929,
|
||||
kCSSColor_SpaceRGB = 4930,
|
||||
kCSSColor_SpaceRGB_outOfRec2020= 4931,
|
||||
kCSSColor_SpaceOkLxx = 4932,
|
||||
kCSSColor_SpaceOkLxx_outOfRec2020 = 4933,
|
||||
|
||||
// Uses of base URL in sandboxed srcdoc frames:
|
||||
kSandboxedSrcdocFrameResolvesRelativeURL = 4934,
|
||||
|
||||
kV8Ink_RequestPresenter_Method = 4935,
|
||||
kEventTimingOrphanPointerup = 4936,
|
||||
kNavigatorCookieEnabledThirdParty = 4937,
|
||||
|
||||
kFoldableAPIs = 4938,
|
||||
|
||||
// https://drafts.csswg.org/css-scroll-snap-2/#snap-events
|
||||
kSnapEvent = 4939,
|
||||
|
||||
kStaticPropertyInAnimation = 4940,
|
||||
|
||||
kSimplifyLoadingTransparentPlaceholderImage = 4941,
|
||||
|
||||
kIdentityDigitalCredentialsSuccess = 4942,
|
||||
kV8DeviceProperties_UniqueId_AttributeGetter = 4943,
|
||||
// The items above roughly this point are available in the M125 branch.
|
||||
|
||||
kSharedStorageAPI_SelectURLOverallPageloadBudgetInsufficient = 4944,
|
||||
|
||||
kV8LanguageTranslator_Translate_Method = 4945,
|
||||
kV8Translation_CanTranslate_Method = 4946,
|
||||
kV8Translation_CreateTranslator_Method = 4947,
|
||||
|
||||
kIdentityDigitalCredentialsDeepLink = 4948,
|
||||
|
||||
kV8WebView_GetExperimentalMediaIntegrityTokenProvider_Method = 4949,
|
||||
kV8MediaIntegrityTokenProvider_RequestToken_Method = 4950,
|
||||
kCanvas2DLayersFilters = 4951,
|
||||
kCanvas2DLayersCSSFilters = 4952,
|
||||
kCanvas2DLayersFilterObjects = 4953,
|
||||
|
||||
// https://drafts.csswg.org/css-scroll-snap-2/#scroll-start-target
|
||||
kCSSScrollStartTarget = 4954,
|
||||
|
||||
kFedCmContinueOnResponse = 4955,
|
||||
kFedCmMultipleIdentityProviders = 4956,
|
||||
|
||||
kFedCmWithStorageAccessAPI = 4957,
|
||||
kCSSSelectorUserValid = 4958,
|
||||
kCSSSelectorUserInvalid = 4959,
|
||||
|
||||
kCrossShadowAtomicMove = 4960,
|
||||
|
||||
kPrefersReducedMotionMediaFeature = 4961,
|
||||
kPrefersReducedTransparencyMediaFeature = 4962,
|
||||
kPrefersReducedDataMediaFeature = 4963,
|
||||
@@ -4363,10 +4338,41 @@ enum WebFeature {
|
||||
kCaretPositionFromPoint = 4970,
|
||||
kDocumentPolicyIncludeJSCallStacksInCrashReports = 4971,
|
||||
kMaximumHTMLParserDOMTreeDepthHit = 4972,
|
||||
// The items above roughly this point are available in the M126 branch.
|
||||
|
||||
kV8ModelGenericSession_Destroy_Method = 4973,
|
||||
kUsedDeviceScaleAdjustment = 4974,
|
||||
kDisableThirdPartyStoragePartitioning2 = 4975,
|
||||
kLinkRelPayment = 4976,
|
||||
kV8GPUAdapter_RequestAdapterInfo_Method = 4977,
|
||||
kOBSOLETE_V8ModelGenericSession_Destroy_Method = 4978,
|
||||
kV8AITextSession_Execute_Method = 4979,
|
||||
kV8AITextSession_ExecuteStreaming_Method = 4980,
|
||||
kV8AI_CanCreateGenericSession_Method = 4981,
|
||||
kV8AI_CreateGenericSession_Method = 4982,
|
||||
kV8AI_DefaultGenericSessionOptions_Method = 4983,
|
||||
kV8AITextSession_Prompt_Method = 4984,
|
||||
kV8AITextSession_PromptStreaming_Method = 4985,
|
||||
kV8AI_CanCreateTextSession_Method = 4986,
|
||||
kV8AI_CreateTextSession_Method = 4987,
|
||||
kV8AI_DefaultTextSessionOptions_Method = 4988,
|
||||
kV8AITextSession_Destroy_Method = 4989,
|
||||
kImportMapIntegrity = 4990,
|
||||
kSelectElementAppearanceNone = 4991,
|
||||
kRubyPositionAlternate = 4992,
|
||||
kRubyPositionInterCharacter = 4993,
|
||||
kTextSizeAdjustNotAuto = 4994,
|
||||
kTextSizeAdjustPercentNot100 = 4995,
|
||||
kServiceWorkerAutoPreload = 4996,
|
||||
kV8InvalidatedNoUndetectableObjectsProtector = 4997,
|
||||
kV8DocumentAllLegacyCall = 4998,
|
||||
kV8DocumentAllLegacyConstruct = 4999,
|
||||
|
||||
// Add new features immediately above this line. Don't change assigned
|
||||
// numbers of any item, and don't reuse removed slots.
|
||||
// numbers of any item, and don't reuse removed slots. Also don't add extra
|
||||
// spaces or comments in this file. Comments belong next to the usage of
|
||||
// these constants in code.
|
||||
|
||||
// Also, run update_use_counter_feature_enum.py in
|
||||
// chromium/src/tools/metrics/histograms/ to update the UMA mapping.
|
||||
// TODO(dcheng): Fix https://crbug.com/742517 and use the autogenerated
|
||||
|
||||
+1
-1
@@ -270,7 +270,7 @@ MediaQueryOperator MediaQueryParser::ConsumeComparison(
|
||||
return MediaQueryOperator::kGt;
|
||||
}
|
||||
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return MediaQueryOperator::kNone;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -7,8 +7,7 @@
|
||||
|
||||
[RuntimeEnabled=DOMPartsAPI,Exposed=Window]
|
||||
interface AttributePart : NodePart {
|
||||
[RaisesException] constructor(PartRoot root, Element element, DOMString localName, boolean automatic, optional PartInit init = {});
|
||||
[RaisesException] constructor(PartRoot root, Element element, DOMString localName, optional PartInit init = {});
|
||||
// For now, HTML only, don't deal with prefix or namespaceURI.
|
||||
readonly attribute DOMString localName;
|
||||
readonly attribute boolean automatic;
|
||||
};
|
||||
|
||||
Vendored
Executable
+7
@@ -0,0 +1,7 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
dictionary CaretPositionFromPointOptions {
|
||||
sequence<ShadowRoot> shadowRoots = [];
|
||||
};
|
||||
@@ -184,7 +184,7 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
|
||||
[MeasureAs=DocumentCaretRangeFromPoint] Range caretRangeFromPoint(optional long x = 0, optional long y = 0);
|
||||
|
||||
// https://www.w3.org/TR/cssom-view/#dom-document-caretpositionfrompoint
|
||||
[NewObject, MeasureAs=CaretPositionFromPoint, RuntimeEnabled=CaretPositionFromPoint] CaretPosition? caretPositionFromPoint(float x, float y, ShadowRoot... shadowRoots);
|
||||
[NewObject, MeasureAs=CaretPositionFromPoint, RuntimeEnabled=CaretPositionFromPoint] CaretPosition? caretPositionFromPoint(float x, float y, optional CaretPositionFromPointOptions options = {});
|
||||
|
||||
// Text fragment directive API
|
||||
// https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
|
||||
|
||||
@@ -44,7 +44,7 @@ dictionary CheckVisibilityOptions {
|
||||
|
||||
[Affects=Nothing] boolean hasAttributes();
|
||||
[SameObject, PerWorldBindings, ImplementedAs=attributesForBindings] readonly attribute NamedNodeMap attributes;
|
||||
[Affects=Nothing] sequence<DOMString> getAttributeNames();
|
||||
[Affects=Nothing, ImplementedAs=getAttributeNamesForBindings] sequence<DOMString> getAttributeNames();
|
||||
[Affects=Nothing] DOMString? getAttribute(DOMString name);
|
||||
[Affects=Nothing] DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
|
||||
[RaisesException, CEReactions] void setAttribute(DOMString name, DOMString value);
|
||||
@@ -109,7 +109,7 @@ dictionary CheckVisibilityOptions {
|
||||
[Affects=Nothing, MeasureAs=ElementGetInnerHTML, RuntimeEnabled=ElementGetInnerHTML] DOMString getInnerHTML(optional GetInnerHTMLOptions options = {});
|
||||
|
||||
// Declarative Shadow DOM getHTML() function.
|
||||
[Affects=Nothing, MeasureAs=ElementGetHTML, RaisesException, RuntimeEnabled=ElementGetHTML] DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
[Affects=Nothing, MeasureAs=ElementGetHTML, RaisesException] DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
|
||||
// Pointer Lock
|
||||
// https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
|
||||
|
||||
+2
-2
@@ -93,8 +93,8 @@ interface mixin GlobalEventHandlers {
|
||||
attribute EventHandler onseeking;
|
||||
attribute EventHandler onselect;
|
||||
attribute EventHandler onslotchange;
|
||||
[RuntimeEnabled=CSSSnapChangedEvent] attribute EventHandler onsnapchanged;
|
||||
[RuntimeEnabled=CSSSnapChangingEvent] attribute EventHandler onsnapchanging;
|
||||
[RuntimeEnabled=CSSScrollSnapChangeEvent] attribute EventHandler onscrollsnapchange;
|
||||
[RuntimeEnabled=CSSScrollSnapChangingEvent] attribute EventHandler onscrollsnapchanging;
|
||||
//attribute EventHandler onsort;
|
||||
attribute EventHandler onstalled;
|
||||
attribute EventHandler onsubmit;
|
||||
|
||||
@@ -18,17 +18,13 @@ interface mixin PartRootMixin {
|
||||
// document tree is cloned. In the case of a ChildPartRoot, only the children
|
||||
// between `previous_node` and `next_node` are included, inclusive. The
|
||||
// `clone()` method returns the cloned PartRoot.
|
||||
[RaisesException] PartRoot clone(optional PartRootCloneOptions options);
|
||||
[RaisesException] PartRoot clone();
|
||||
// Return the root container for the PartRoot, which is the Document or
|
||||
// DocumentFragment for a DocumentPartRoot, or the parent ContainerNode of
|
||||
// a ChildNodePart.
|
||||
readonly attribute Node rootContainer;
|
||||
};
|
||||
|
||||
dictionary PartRootCloneOptions {
|
||||
sequence<DOMString> attributeValues;
|
||||
};
|
||||
|
||||
DocumentPartRoot includes PartRootMixin;
|
||||
ChildNodePart includes PartRootMixin;
|
||||
|
||||
|
||||
+3
-3
@@ -46,15 +46,15 @@ interface ShadowRoot : DocumentFragment {
|
||||
[Affects=Nothing, MeasureAs=ElementGetInnerHTML, RuntimeEnabled=ElementGetInnerHTML] HTMLString getInnerHTML(optional GetInnerHTMLOptions options = {});
|
||||
|
||||
// Declarative Shadow DOM getHTML() function.
|
||||
[Affects=Nothing, MeasureAs=ElementGetHTML, RaisesException, RuntimeEnabled=ElementGetHTML] HTMLString getHTML(optional GetHTMLOptions options = {});
|
||||
[Affects=Nothing, MeasureAs=ElementGetHTML, RaisesException] HTMLString getHTML(optional GetHTMLOptions options = {});
|
||||
|
||||
// The serializable attribute controls whether the shadow root will be
|
||||
// serialized by getHTML({serializableShadowRoots:true}).
|
||||
[RuntimeEnabled=ElementGetHTML] readonly attribute boolean serializable;
|
||||
readonly attribute boolean serializable;
|
||||
|
||||
// The clonable attribute controls whether the shadow root will be
|
||||
// cloned by DOM cloning operations.
|
||||
[RuntimeEnabled=ShadowRootClonable] readonly attribute boolean clonable;
|
||||
readonly attribute boolean clonable;
|
||||
|
||||
// Scoped element creation APIs
|
||||
// https://wicg.github.io/webcomponents/proposals/Scoped-Custom-Element-Registries#scoped-element-creation-apis
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ dictionary ShadowRootInit {
|
||||
boolean delegatesFocus;
|
||||
SlotAssignmentMode slotAssignment;
|
||||
[RuntimeEnabled=ScopedCustomElementRegistry] CustomElementRegistry registry;
|
||||
[RuntimeEnabled=ElementGetHTML] boolean serializable;
|
||||
[RuntimeEnabled=ShadowRootClonable] boolean clonable;
|
||||
boolean serializable;
|
||||
boolean clonable;
|
||||
// Note: if you add a parameter here, be sure to add it to the list of checks
|
||||
// in Element::attachShadow() for existing declarative shadow roots.
|
||||
};
|
||||
|
||||
+3
-2
@@ -295,8 +295,8 @@
|
||||
"signalingstatechange",
|
||||
"sinkchange",
|
||||
"slotchange",
|
||||
"snapchanged",
|
||||
"snapchanging",
|
||||
"scrollsnapchange",
|
||||
"scrollsnapchanging",
|
||||
"soundend",
|
||||
"soundstart",
|
||||
"sourceclose",
|
||||
@@ -346,6 +346,7 @@
|
||||
"updateready",
|
||||
"updatestart",
|
||||
"upgradeneeded",
|
||||
"validationstatuschange",
|
||||
"versionchange",
|
||||
"visibilitychange",
|
||||
"voiceschanged",
|
||||
|
||||
+53
-62
@@ -57,6 +57,7 @@
|
||||
#include "third_party/blink/public/mojom/frame/frame_replication_state.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/page/draggable_region.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/page/prerender_page_param.mojom.h"
|
||||
#include "third_party/blink/public/mojom/window_features/window_features.mojom-blink.h"
|
||||
#include "third_party/blink/public/platform/interface_registry.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
@@ -402,12 +403,12 @@ ui::mojom::blink::WindowOpenDisposition NavigationPolicyToDisposition(
|
||||
case kNavigationPolicyLinkPreview:
|
||||
NOTREACHED_NORETURN();
|
||||
}
|
||||
NOTREACHED() << "Unexpected NavigationPolicy";
|
||||
NOTREACHED_IN_MIGRATION() << "Unexpected NavigationPolicy";
|
||||
return ui::mojom::blink::WindowOpenDisposition::IGNORE_ACTION;
|
||||
}
|
||||
|
||||
// Records the queuing duration for activation IPC.
|
||||
void RecordPrerenderActivationSignalDelay() {
|
||||
void RecordPrerenderActivationSignalDelay(const String& metric_suffix) {
|
||||
auto* task = base::TaskAnnotator::CurrentTaskForThread();
|
||||
|
||||
// It should be a Mojo call, so `RunTask` executes it as a non-delayed task.
|
||||
@@ -416,8 +417,9 @@ void RecordPrerenderActivationSignalDelay() {
|
||||
base::TimeDelta queueing_time =
|
||||
!task->queue_time.is_null() ? base::TimeTicks::Now() - task->queue_time
|
||||
: base::TimeDelta();
|
||||
base::UmaHistogramTimes("Prerender.Experimental.ActivationIPCDelay",
|
||||
queueing_time);
|
||||
base::UmaHistogramTimes(
|
||||
"Prerender.Experimental.ActivationIPCDelay" + metric_suffix.Ascii(),
|
||||
queueing_time);
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN)
|
||||
@@ -438,7 +440,7 @@ SkFontHinting RendererPreferencesToSkiaHinting(
|
||||
case gfx::FontRenderParams::HINTING_FULL:
|
||||
return SkFontHinting::kNormal;
|
||||
default:
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return SkFontHinting::kNormal;
|
||||
}
|
||||
}
|
||||
@@ -454,7 +456,7 @@ SkFontHinting RendererPreferencesToSkiaHinting(
|
||||
case gfx::FontRenderParams::HINTING_FULL:
|
||||
return SkFontHinting::kFull;
|
||||
default:
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return SkFontHinting::kNormal;
|
||||
}
|
||||
}
|
||||
@@ -467,7 +469,7 @@ SkFontHinting RendererPreferencesToSkiaHinting(
|
||||
WebView* WebView::Create(
|
||||
WebViewClient* client,
|
||||
bool is_hidden,
|
||||
bool is_prerendering,
|
||||
blink::mojom::PrerenderParamPtr prerender_param,
|
||||
bool is_inside_portal,
|
||||
std::optional<blink::FencedFrame::DeprecatedFencedFrameMode>
|
||||
fenced_frame_mode,
|
||||
@@ -485,17 +487,17 @@ WebView* WebView::Create(
|
||||
client,
|
||||
is_hidden ? mojom::blink::PageVisibilityState::kHidden
|
||||
: mojom::blink::PageVisibilityState::kVisible,
|
||||
is_prerendering, is_inside_portal, fenced_frame_mode, compositing_enabled,
|
||||
widgets_never_composited, To<WebViewImpl>(opener), std::move(page_handle),
|
||||
agent_group_scheduler, session_storage_namespace_id,
|
||||
std::move(page_base_background_color), browsing_context_group_info,
|
||||
color_provider_colors);
|
||||
std::move(prerender_param), is_inside_portal, fenced_frame_mode,
|
||||
compositing_enabled, widgets_never_composited, To<WebViewImpl>(opener),
|
||||
std::move(page_handle), agent_group_scheduler,
|
||||
session_storage_namespace_id, std::move(page_base_background_color),
|
||||
browsing_context_group_info, color_provider_colors);
|
||||
}
|
||||
|
||||
WebViewImpl* WebViewImpl::Create(
|
||||
WebViewClient* client,
|
||||
mojom::blink::PageVisibilityState visibility,
|
||||
bool is_prerendering,
|
||||
blink::mojom::PrerenderParamPtr prerender_param,
|
||||
bool is_inside_portal,
|
||||
std::optional<blink::FencedFrame::DeprecatedFencedFrameMode>
|
||||
fenced_frame_mode,
|
||||
@@ -509,8 +511,8 @@ WebViewImpl* WebViewImpl::Create(
|
||||
const BrowsingContextGroupInfo& browsing_context_group_info,
|
||||
const ColorProviderColorMaps* color_provider_colors) {
|
||||
return new WebViewImpl(
|
||||
client, visibility, is_prerendering, is_inside_portal, fenced_frame_mode,
|
||||
compositing_enabled, widgets_never_composited, opener,
|
||||
client, visibility, std::move(prerender_param), is_inside_portal,
|
||||
fenced_frame_mode, compositing_enabled, widgets_never_composited, opener,
|
||||
std::move(page_handle), agent_group_scheduler,
|
||||
session_storage_namespace_id, std::move(page_base_background_color),
|
||||
browsing_context_group_info, color_provider_colors);
|
||||
@@ -566,7 +568,7 @@ void WebViewImpl::CloseWindow() {
|
||||
WebViewImpl::WebViewImpl(
|
||||
WebViewClient* client,
|
||||
mojom::blink::PageVisibilityState visibility,
|
||||
bool is_prerendering,
|
||||
blink::mojom::PrerenderParamPtr prerender_param,
|
||||
bool is_inside_portal,
|
||||
std::optional<blink::FencedFrame::DeprecatedFencedFrameMode>
|
||||
fenced_frame_mode,
|
||||
@@ -612,7 +614,11 @@ WebViewImpl::WebViewImpl(
|
||||
*page_, session_storage_namespace_id_);
|
||||
|
||||
SetVisibilityState(visibility, /*is_initial_state=*/true);
|
||||
page_->SetIsPrerendering(is_prerendering);
|
||||
if (prerender_param) {
|
||||
page_->SetIsPrerendering(true);
|
||||
page_->SetPrerenderMetricSuffix(
|
||||
String(prerender_param->page_metric_suffix));
|
||||
}
|
||||
|
||||
// TODO(crbug.com/40287334): Remove the is_inside_portal parameter.
|
||||
|
||||
@@ -2268,61 +2274,47 @@ void WebViewImpl::AdvanceFocus(bool reverse) {
|
||||
: mojom::blink::FocusType::kForward);
|
||||
}
|
||||
|
||||
double WebViewImpl::ZoomLevel() {
|
||||
return zoom_level_;
|
||||
}
|
||||
|
||||
void WebViewImpl::PropagateZoomFactorToLocalFrameRoots(Frame* frame,
|
||||
float zoom_factor) {
|
||||
auto* local_frame = DynamicTo<LocalFrame>(frame);
|
||||
if (local_frame && local_frame->IsLocalRoot()) {
|
||||
if (Document* document = local_frame->GetDocument()) {
|
||||
auto* plugin_document = DynamicTo<PluginDocument>(document);
|
||||
if (!plugin_document || !plugin_document->GetPluginView()) {
|
||||
local_frame->SetPageZoomFactor(zoom_factor);
|
||||
}
|
||||
}
|
||||
double WebViewImpl::ClampZoomLevel(double zoom_level) {
|
||||
if (zoom_level < minimum_zoom_level_) {
|
||||
return minimum_zoom_level_;
|
||||
}
|
||||
|
||||
for (Frame* child = frame->Tree().FirstChild(); child;
|
||||
child = child->Tree().NextSibling())
|
||||
PropagateZoomFactorToLocalFrameRoots(child, zoom_factor);
|
||||
if (zoom_level > maximum_zoom_level_) {
|
||||
return maximum_zoom_level_;
|
||||
}
|
||||
return zoom_level;
|
||||
}
|
||||
|
||||
double WebViewImpl::SetZoomLevel(double zoom_level) {
|
||||
double old_zoom_level = zoom_level_;
|
||||
if (zoom_level < minimum_zoom_level_)
|
||||
zoom_level_ = minimum_zoom_level_;
|
||||
else if (zoom_level > maximum_zoom_level_)
|
||||
zoom_level_ = maximum_zoom_level_;
|
||||
else
|
||||
zoom_level_ = zoom_level;
|
||||
|
||||
float zoom_factor =
|
||||
zoom_factor_override_
|
||||
? zoom_factor_override_
|
||||
: static_cast<float>(PageZoomLevelToZoomFactor(zoom_level_));
|
||||
double WebViewImpl::SetMainFrameZoomLevel(double zoom_level) {
|
||||
if (zoom_factor_for_device_scale_factor_) {
|
||||
if (compositor_device_scale_factor_override_) {
|
||||
page_->SetInspectorDeviceScaleFactorOverride(
|
||||
zoom_factor_for_device_scale_factor_ /
|
||||
compositor_device_scale_factor_override_);
|
||||
|
||||
zoom_factor *= compositor_device_scale_factor_override_;
|
||||
} else {
|
||||
page_->SetInspectorDeviceScaleFactorOverride(1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
float zoom_factor =
|
||||
zoom_factor_override_
|
||||
? zoom_factor_override_
|
||||
: static_cast<float>(PageZoomLevelToZoomFactor(zoom_level));
|
||||
if (zoom_factor_for_device_scale_factor_) {
|
||||
if (compositor_device_scale_factor_override_) {
|
||||
zoom_factor *= compositor_device_scale_factor_override_;
|
||||
} else {
|
||||
zoom_factor *= zoom_factor_for_device_scale_factor_;
|
||||
}
|
||||
}
|
||||
PropagateZoomFactorToLocalFrameRoots(page_->MainFrame(), zoom_factor);
|
||||
return zoom_factor;
|
||||
}
|
||||
|
||||
if (old_zoom_level != zoom_level_) {
|
||||
for (auto& observer : observers_)
|
||||
observer.OnZoomLevelChanged();
|
||||
CancelPagePopup();
|
||||
void WebViewImpl::RecomputeMainFrameZoomFactor() {
|
||||
if (auto* main_frame = MainFrameImpl()) {
|
||||
if (auto* widget = main_frame->FrameWidgetImpl()) {
|
||||
widget->SetZoomLevel(widget->GetZoomLevel());
|
||||
}
|
||||
}
|
||||
|
||||
return zoom_level_;
|
||||
}
|
||||
|
||||
float WebViewImpl::PageScaleFactor() const {
|
||||
@@ -2377,7 +2369,7 @@ void WebViewImpl::SetZoomFactorForDeviceScaleFactor(
|
||||
// We can't early-return here if these are already equal, because we may
|
||||
// need to propagate the correct zoom factor to newly navigated frames.
|
||||
zoom_factor_for_device_scale_factor_ = zoom_factor_for_device_scale_factor;
|
||||
SetZoomLevel(zoom_level_);
|
||||
RecomputeMainFrameZoomFactor();
|
||||
}
|
||||
|
||||
void WebViewImpl::SetPageLifecycleStateFromNewPageCommit(
|
||||
@@ -3225,7 +3217,7 @@ void WebViewImpl::SetCompositorDeviceScaleFactorOverride(
|
||||
return;
|
||||
compositor_device_scale_factor_override_ = device_scale_factor;
|
||||
if (zoom_factor_for_device_scale_factor_) {
|
||||
SetZoomLevel(ZoomLevel());
|
||||
RecomputeMainFrameZoomFactor();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3419,7 +3411,7 @@ void WebViewImpl::ActivatePrerenderedPage(
|
||||
main_frame_document = local_frame->GetDocument();
|
||||
}
|
||||
if (main_frame_document) {
|
||||
RecordPrerenderActivationSignalDelay();
|
||||
RecordPrerenderActivationSignalDelay(GetPage()->PrerenderMetricSuffix());
|
||||
}
|
||||
|
||||
for (Frame* frame = GetPage()->MainFrame(); frame;
|
||||
@@ -3771,7 +3763,7 @@ void WebViewImpl::SetBackgroundColorOverrideForFullscreenController(
|
||||
|
||||
void WebViewImpl::SetZoomFactorOverride(float zoom_factor) {
|
||||
zoom_factor_override_ = zoom_factor;
|
||||
SetZoomLevel(ZoomLevel());
|
||||
RecomputeMainFrameZoomFactor();
|
||||
}
|
||||
|
||||
Element* WebViewImpl::FocusedElement() const {
|
||||
@@ -4129,5 +4121,4 @@ void WebViewImpl::SetPageAttributionSupport(
|
||||
|
||||
page->SetAttributionSupport(support);
|
||||
}
|
||||
|
||||
} // namespace blink
|
||||
|
||||
+3
-1
@@ -1100,7 +1100,7 @@
|
||||
{
|
||||
name: "preferredRootScrollbarColorScheme",
|
||||
initial: "mojom::blink::PreferredColorScheme::kLight",
|
||||
invalidate: ["ColorScheme"],
|
||||
invalidate: ["Paint"],
|
||||
type: "mojom::blink::PreferredColorScheme",
|
||||
include_paths: [
|
||||
"third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
|
||||
@@ -1203,6 +1203,8 @@
|
||||
name: "bypassCSP",
|
||||
initial: false,
|
||||
},
|
||||
// Enables automatic adjustments of text size on mobile. This enables the
|
||||
// text autosizer, and controls whether text-size-adjust can apply.
|
||||
{
|
||||
name: "textAutosizingEnabled",
|
||||
initial: false,
|
||||
|
||||
+3
-1
@@ -29,7 +29,6 @@
|
||||
interface TextMetrics {
|
||||
// x-direction
|
||||
readonly attribute double width; // advance width
|
||||
[RuntimeEnabled=ExtendedTextMetrics] readonly attribute FrozenArray<double> advances;
|
||||
readonly attribute double actualBoundingBoxLeft;
|
||||
readonly attribute double actualBoundingBoxRight;
|
||||
|
||||
@@ -43,4 +42,7 @@ interface TextMetrics {
|
||||
[RuntimeEnabled=TextMetricsBaselines] readonly attribute double ideographicBaseline;
|
||||
[RuntimeEnabled=ExtendedTextMetrics] readonly attribute double emHeightAscent;
|
||||
[RuntimeEnabled=ExtendedTextMetrics] readonly attribute double emHeightDescent;
|
||||
|
||||
// For selection
|
||||
[RuntimeEnabled=ExtendedTextMetrics, RaisesException] sequence<DOMRectReadOnly> getSelectionRects([EnforceRange] unsigned long start, [EnforceRange] unsigned long end);
|
||||
};
|
||||
|
||||
+4
@@ -7,6 +7,10 @@ interface HTMLPermissionElement : HTMLElement {
|
||||
[HTMLConstructor] constructor();
|
||||
[CEReactions, Reflect] attribute DOMString type;
|
||||
|
||||
readonly attribute boolean isValid;
|
||||
readonly attribute DOMString invalidReason;
|
||||
|
||||
attribute EventHandler onresolve;
|
||||
attribute EventHandler ondismiss;
|
||||
attribute EventHandler onvalidationstatuschange;
|
||||
};
|
||||
|
||||
+3
-3
@@ -42,9 +42,9 @@
|
||||
// to a shadow root; since the template no longer exists, these reflections
|
||||
// don't have anything to reflect.
|
||||
[Reflect,ReflectOnly=("open","closed")] attribute DOMString shadowRootMode;
|
||||
[CEReactions,Reflect,RuntimeEnabled=TemplateDelegatesFocusReflection] attribute boolean shadowRootDelegatesFocus;
|
||||
[CEReactions,Reflect,RuntimeEnabled=ShadowRootClonable] attribute boolean shadowRootClonable;
|
||||
[Reflect, RuntimeEnabled=ElementGetHTML] attribute boolean shadowRootSerializable;
|
||||
[CEReactions,Reflect] attribute boolean shadowRootDelegatesFocus;
|
||||
[CEReactions,Reflect] attribute boolean shadowRootClonable;
|
||||
[Reflect] attribute boolean shadowRootSerializable;
|
||||
|
||||
// Used by the DOM Parts API
|
||||
[Reflect, RuntimeEnabled=DOMPartsAPI] attribute boolean parseparts;
|
||||
|
||||
Vendored
+1
-1
@@ -130,7 +130,7 @@ std::ostream& operator<<(std::ostream& stream, OriginTrialTokenStatus status) {
|
||||
case OriginTrialTokenStatus::kUnknownTrial:
|
||||
return stream << "kUnknownTrial";
|
||||
}
|
||||
NOTREACHED();
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return stream;
|
||||
#else
|
||||
return stream << (static_cast<int>(status));
|
||||
|
||||
Vendored
-1
@@ -10,5 +10,4 @@
|
||||
RuntimeEnabled=PagePopup
|
||||
] interface ColorPagePopupController : PagePopupController {
|
||||
void openEyeDropper();
|
||||
void openSystemColorChooser();
|
||||
};
|
||||
|
||||
+1
-1
@@ -46,5 +46,5 @@
|
||||
// rectangle to fit in the current screen. Popups sometimes need to be
|
||||
// positioned on other screens.
|
||||
void setWindowRect(long x, long y,long width, long height);
|
||||
void setMenuListOptionsBoundsInAXTree(sequence<DOMRect> options_bounds);
|
||||
void setMenuListOptionsBoundsInAXTree(sequence<DOMRect> options_bounds, boolean children_updated);
|
||||
};
|
||||
|
||||
@@ -302,6 +302,7 @@ interface Internals {
|
||||
[RaisesException] void forceCompositingUpdate(Document document);
|
||||
|
||||
void setDarkPreferredColorScheme(Document document);
|
||||
void setDarkPreferredRootScrollbarColorScheme(Document document);
|
||||
void setForcedColorsAndDarkPreferredColorScheme(Document document);
|
||||
|
||||
[RaisesException] void setShouldRevealPassword(Element element, boolean reveal);
|
||||
|
||||
Vendored
+8
@@ -41,6 +41,14 @@ interface PerformanceResourceTiming : PerformanceEntry {
|
||||
readonly attribute DOMString nextHopProtocol;
|
||||
[Measure] readonly attribute DOMString deliveryType;
|
||||
readonly attribute DOMHighResTimeStamp workerStart;
|
||||
[RuntimeEnabled=ServiceWorkerStaticRouterTimingInfo]
|
||||
readonly attribute DOMHighResTimeStamp workerRouterEvaluationStart;
|
||||
[RuntimeEnabled=ServiceWorkerStaticRouterTimingInfo]
|
||||
readonly attribute DOMHighResTimeStamp workerCacheLookupStart;
|
||||
[RuntimeEnabled=ServiceWorkerStaticRouterTimingInfo]
|
||||
readonly attribute DOMString matchedSourceType;
|
||||
[RuntimeEnabled=ServiceWorkerStaticRouterTimingInfo]
|
||||
readonly attribute DOMString finalSourceType;
|
||||
readonly attribute DOMHighResTimeStamp redirectStart;
|
||||
readonly attribute DOMHighResTimeStamp redirectEnd;
|
||||
readonly attribute DOMHighResTimeStamp fetchStart;
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
// Copyright 2024 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(crbug.com/343126579): Add link to spec/explainer.
|
||||
enum AIModelAvailability {
|
||||
"readily",
|
||||
"after-download",
|
||||
"no"
|
||||
};
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=ModelExecutionAPI
|
||||
]
|
||||
interface AI {
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<AIModelAvailability> canCreateTextSession();
|
||||
[
|
||||
Measure,
|
||||
ImplementedAs=canCreateTextSession,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<AIModelAvailability> canCreateGenericSession();
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<AITextSession> createTextSession(
|
||||
optional AITextSessionOptions options = {}
|
||||
);
|
||||
[
|
||||
Measure,
|
||||
ImplementedAs=createTextSession,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<AITextSession> createGenericSession(
|
||||
optional AITextSessionOptions options = {}
|
||||
);
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<AITextSessionOptions> defaultTextSessionOptions();
|
||||
[
|
||||
Measure,
|
||||
ImplementedAs=defaultTextSessionOptions,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<AITextSessionOptions> defaultGenericSessionOptions();
|
||||
};
|
||||
Vendored
Executable
+43
@@ -0,0 +1,43 @@
|
||||
// Copyright 2024 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(crbug.com/343126579): Add link to spec/explainer.
|
||||
[
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=ModelExecutionAPI
|
||||
]
|
||||
interface AITextSession {
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<DOMString> prompt(DOMString input);
|
||||
[
|
||||
Measure,
|
||||
ImplementedAs=prompt,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<DOMString> execute(DOMString input);
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
ReadableStream promptStreaming(DOMString input);
|
||||
[
|
||||
Measure,
|
||||
ImplementedAs=promptStreaming,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<DOMString> executeStreaming(DOMString input);
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
void destroy();
|
||||
};
|
||||
+2
-1
@@ -2,7 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
dictionary ModelGenericSessionOptions {
|
||||
// TODO(crbug.com/343126579): Add link to spec/explainer.
|
||||
dictionary AITextSessionOptions {
|
||||
[EnforceRange] unsigned long topK;
|
||||
float temperature;
|
||||
};
|
||||
Vendored
Executable
+14
@@ -0,0 +1,14 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(crbug.com/343126579): Add link to spec/explainer.
|
||||
[
|
||||
ImplementedAs=DOMAI,
|
||||
RuntimeEnabled=ModelExecutionAPI
|
||||
] partial interface DedicatedWorkerGlobalScope {
|
||||
[
|
||||
Replaceable
|
||||
]
|
||||
readonly attribute AI ai;
|
||||
};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(crbug.com/343126579): Add link to spec/explainer.
|
||||
[
|
||||
ImplementedAs=DOMAI,
|
||||
RuntimeEnabled=ModelExecutionAPI
|
||||
] partial interface Window {
|
||||
[
|
||||
Replaceable
|
||||
]
|
||||
readonly attribute AI ai;
|
||||
// TODO(crbug.com/341851444): Remove after confirming there is no usage.
|
||||
[
|
||||
Replaceable,
|
||||
ImplementedAs=ai
|
||||
]
|
||||
readonly attribute AI model;
|
||||
};
|
||||
+4
-4
@@ -4,11 +4,11 @@
|
||||
|
||||
// https://github.com/fserb/canvas2D/blob/master/spec/webgpu.md
|
||||
[
|
||||
RuntimeEnabled=CanvasWebGPUAccess,
|
||||
RuntimeEnabled=Canvas2dGPUTransfer,
|
||||
Exposed=(Window,Worker),
|
||||
SecureContext
|
||||
] interface mixin CanvasWebGPUAccess {
|
||||
[RaisesException] GPUTexture beginWebGPUAccess(CanvasWebGPUAccessOption options);
|
||||
[RaisesException] undefined endWebGPUAccess();
|
||||
] interface mixin Canvas2dGPUTransfer {
|
||||
[RaisesException] GPUTexture transferToGPUTexture(Canvas2dGPUTransferOption options);
|
||||
[RaisesException] undefined transferBackFromGPUTexture();
|
||||
GPUTextureFormat getTextureFormat();
|
||||
};
|
||||
Vendored
Executable
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Used by method `transferToGPUTexture` as defined in
|
||||
// canvas_2d_gpu_transfer.idl
|
||||
dictionary Canvas2dGPUTransferOption {
|
||||
// This GPUDevice will be given access to the canvas' texture.
|
||||
GPUDevice device;
|
||||
|
||||
// This label will be assigned to the GPUTexture returned by
|
||||
// transferToGPUTexture.
|
||||
DOMString? label;
|
||||
|
||||
// This controls the GPUTextureUsage flags of the GPUTexture returned by
|
||||
// transferToGPUTexture. The default value will return a canvas texture that
|
||||
// is usable as a render attachment, and bindable as a 2D texture.
|
||||
GPUTextureUsageFlags usage = 0x14; // TEXTURE_BINDING | RENDER_ATTACHMENT
|
||||
};
|
||||
+1
-1
@@ -186,4 +186,4 @@ interface CanvasRenderingContext2D {
|
||||
};
|
||||
|
||||
CanvasRenderingContext2D includes CanvasPath;
|
||||
CanvasRenderingContext2D includes CanvasWebGPUAccess;
|
||||
CanvasRenderingContext2D includes Canvas2dGPUTransfer;
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Used by method `beginWebGPUAccess` as defined in canvas_web_gpu_access.idl
|
||||
dictionary CanvasWebGPUAccessOption {
|
||||
// This GPUDevice will be given access to the canvas' texture.
|
||||
GPUDevice device;
|
||||
|
||||
// This label will be assigned to the GPUTexture returned by beginWebGPUAccess.
|
||||
DOMString? label;
|
||||
|
||||
// This controls the GPUTextureUsage flags of the GPUTexture returned by
|
||||
// beginWebGPUAccess. (The returned texture might actually have additional
|
||||
// texture usage flags beyond the requested flags.)
|
||||
// The default value will return a canvas texture that is usable as a render
|
||||
// attachment, and bindable as a 2D texture.
|
||||
GPUTextureUsageFlags usage = 0x14; // TEXTURE_BINDING | RENDER_ATTACHMENT
|
||||
};
|
||||
+1
-1
@@ -125,4 +125,4 @@
|
||||
};
|
||||
|
||||
OffscreenCanvasRenderingContext2D includes CanvasPath;
|
||||
OffscreenCanvasRenderingContext2D includes CanvasWebGPUAccess;
|
||||
OffscreenCanvasRenderingContext2D includes Canvas2dGPUTransfer;
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@ dictionary DigitalCredentialRequestOptions {
|
||||
// https://wicg.github.io/digital-identities/#dom-identityrequestprovider
|
||||
dictionary IdentityRequestProvider {
|
||||
required DOMString protocol;
|
||||
required DOMString request;
|
||||
required (object or DOMString) request;
|
||||
};
|
||||
|
||||
+3
@@ -12,6 +12,9 @@ dictionary IdentityProviderConfig {
|
||||
// Not marked as required to allow implementation of digital credentials.
|
||||
// See crbug.com/1416939.
|
||||
USVString clientId;
|
||||
// The type of Identity Provider that is compatible with the RP.
|
||||
// Used to only use compatible providers.
|
||||
[RuntimeEnabled=FedCmIdPRegistration] DOMString type;
|
||||
};
|
||||
|
||||
dictionary IdentityProviderRequestOptions : IdentityProviderConfig {
|
||||
|
||||
+3
-3
@@ -2,11 +2,11 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(https://crbug.com/1019297): Include spec link.
|
||||
// TODO(https://crbug.com/320563255): Include spec link.
|
||||
|
||||
enum FileSystemChangeType {
|
||||
"created",
|
||||
"deleted",
|
||||
"appeared",
|
||||
"disappeared",
|
||||
"errored",
|
||||
"modified",
|
||||
"moved",
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(https://crbug.com/1019297): Include spec link.
|
||||
// TODO(https://crbug.com/320563255): Include spec link.
|
||||
// TODO(https://crbug.com/1444874): Measure usage.
|
||||
|
||||
[
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(https://crbug.com/1019297): Include spec link.
|
||||
// TODO(https://crbug.com/320563255): Include spec link.
|
||||
|
||||
callback FileSystemObserverCallback = void (
|
||||
sequence<FileSystemChangeRecord> records,
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(https://crbug.com/1019297): Include spec link.
|
||||
// TODO(https://crbug.com/320563255): Include spec link.
|
||||
|
||||
dictionary FileSystemObserverObserveOptions {
|
||||
boolean recursive = false;
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@
|
||||
Exposed=Window,
|
||||
RuntimeEnabled=WebAppLaunchQueue
|
||||
] interface LaunchParams {
|
||||
[RuntimeEnabled=WebAppLaunchHandler] readonly attribute USVString targetURL;
|
||||
readonly attribute USVString targetURL;
|
||||
[RuntimeEnabled=FileHandling] readonly attribute FrozenArray<FileSystemHandle> files;
|
||||
};
|
||||
|
||||
-3
@@ -33,7 +33,6 @@ dictionary MLBatchNormalizationOptions {
|
||||
MLOperand bias;
|
||||
[EnforceRange] unsigned long axis = 1;
|
||||
float epsilon = 1e-5;
|
||||
MLActivation activation;
|
||||
};
|
||||
|
||||
dictionary MLConv2dOptions {
|
||||
@@ -44,7 +43,6 @@ dictionary MLConv2dOptions {
|
||||
MLInputOperandLayout inputLayout = "nchw";
|
||||
MLConv2dFilterOperandLayout filterLayout = "oihw";
|
||||
MLOperand bias;
|
||||
MLActivation activation;
|
||||
};
|
||||
|
||||
dictionary MLConvTranspose2dOptions {
|
||||
@@ -57,7 +55,6 @@ dictionary MLConvTranspose2dOptions {
|
||||
MLInputOperandLayout inputLayout = "nchw";
|
||||
MLConvTranspose2dFilterOperandLayout filterLayout = "iohw";
|
||||
MLOperand bias;
|
||||
MLActivation activation;
|
||||
};
|
||||
|
||||
dictionary MLGatherOptions {
|
||||
|
||||
tools/under-control/src/third_party/blink/renderer/modules/model_execution/model_generic_session.idl
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// Copyright 2024 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
RuntimeEnabled=ModelExecutionAPI,
|
||||
Exposed=Window
|
||||
]
|
||||
interface ModelGenericSession {
|
||||
[Measure, CallWith=ScriptState, RaisesException] Promise<DOMString> execute(DOMString input);
|
||||
[Measure, CallWith=ScriptState, RaisesException] ReadableStream executeStreaming(DOMString input);
|
||||
};
|
||||
Vendored
-36
@@ -1,36 +0,0 @@
|
||||
// Copyright 2024 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
enum GenericModelAvailability {
|
||||
"readily",
|
||||
"after-download",
|
||||
"no"
|
||||
};
|
||||
|
||||
[
|
||||
RuntimeEnabled=ModelExecutionAPI,
|
||||
Exposed=Window
|
||||
]
|
||||
interface ModelManager {
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<GenericModelAvailability> canCreateGenericSession();
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<ModelGenericSession> createGenericSession(
|
||||
optional ModelGenericSessionOptions options = {}
|
||||
);
|
||||
[
|
||||
Measure,
|
||||
CallWith=ScriptState,
|
||||
RaisesException
|
||||
]
|
||||
Promise<ModelGenericSessionOptions> defaultGenericSessionOptions();
|
||||
};
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// TODO(leimy): Add link to spec/explainer?
|
||||
[
|
||||
ImplementedAs=WindowModel,
|
||||
RuntimeEnabled=ModelExecutionAPI
|
||||
] partial interface Window {
|
||||
[Replaceable] readonly attribute ModelManager model;
|
||||
};
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
[
|
||||
Exposed=(Window, DedicatedWorker)
|
||||
] interface RTCEncodedAudioFrame {
|
||||
[RuntimeEnabled=RTCEncodedFrameSetMetadata, Measure, RaisesException]
|
||||
[Measure, RaisesException]
|
||||
constructor (RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameOptions options = {});
|
||||
readonly attribute unsigned long timestamp; // RTP timestamp.
|
||||
attribute ArrayBuffer data;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ enum RTCEncodedVideoFrameType {
|
||||
[
|
||||
Exposed=(Window, DedicatedWorker)
|
||||
] interface RTCEncodedVideoFrame {
|
||||
[RuntimeEnabled=RTCEncodedFrameSetMetadata, Measure, RaisesException]
|
||||
[Measure, RaisesException]
|
||||
constructor (RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameOptions options = {});
|
||||
readonly attribute RTCEncodedVideoFrameType type;
|
||||
readonly attribute unsigned long timestamp; // RTP timestamp.
|
||||
|
||||
Vendored
+2
@@ -138,6 +138,8 @@ enum RTCPeerConnectionState {
|
||||
// https://w3c.github.io/webrtc-pc/#sec.cert-mgmt
|
||||
[RaisesException, CallWith=ScriptState] static Promise<RTCCertificate> generateCertificate(AlgorithmIdentifier keygenAlgorithm);
|
||||
|
||||
[SameObject, RuntimeEnabled=RTCRtpTransport] readonly attribute RTCRtpTransport rtpTransport;
|
||||
|
||||
// Non-standard or removed from the spec:
|
||||
[Measure] sequence<MediaStream> getLocalStreams();
|
||||
[Measure] sequence<MediaStream> getRemoteStreams();
|
||||
|
||||
Vendored
Executable
+6
@@ -0,0 +1,6 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[Exposed=Window, RuntimeEnabled=RTCRtpTransport]
|
||||
interface RTCRtpTransport {};
|
||||
+2
@@ -52,6 +52,8 @@ dictionary AudioSinkOptions {
|
||||
[HighEntropy=Direct, MeasureAs=AudioContextBaseLatency] readonly attribute double baseLatency;
|
||||
[HighEntropy=Direct, MeasureAs=AudioContextOutputLatency] readonly attribute double outputLatency;
|
||||
|
||||
[RuntimeEnabled=AudioContextPlayoutStats, SameObject] readonly attribute AudioPlayoutStats playoutStats;
|
||||
|
||||
[RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
|
||||
[RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
|
||||
[RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaStreamAudioDestinationNode createMediaStreamDestination();
|
||||
|
||||
Vendored
Executable
+15
@@ -0,0 +1,15 @@
|
||||
// Copyright 2024 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[RuntimeEnabled=AudioContextPlayoutStats, Exposed=Window, SecureContext
|
||||
] interface AudioPlayoutStats {
|
||||
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp fallbackFramesDuration;
|
||||
[CallWith=ScriptState] readonly attribute unsigned long fallbackFramesEvents;
|
||||
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp totalFramesDuration;
|
||||
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp averageLatency;
|
||||
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp minimumLatency;
|
||||
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp maximumLatency;
|
||||
[CallWith=ScriptState] void resetLatency();
|
||||
[CallWith=ScriptState] object toJSON();
|
||||
};
|
||||
+1
@@ -5,6 +5,7 @@
|
||||
// https://github.com/WICG/web-codecs
|
||||
|
||||
[
|
||||
SecureContext,
|
||||
Exposed=(Window,DedicatedWorker)
|
||||
] interface ImageTrack {
|
||||
// The number of frames in the image.
|
||||
|
||||
+1
@@ -5,6 +5,7 @@
|
||||
// https://github.com/WICG/web-codecs
|
||||
|
||||
[
|
||||
SecureContext,
|
||||
Exposed=(Window,DedicatedWorker)
|
||||
] interface ImageTrackList {
|
||||
getter ImageTrack([EnforceRange] unsigned long index);
|
||||
|
||||
Vendored
-1
@@ -34,6 +34,5 @@ dictionary VideoEncoderConfig {
|
||||
LatencyMode latencyMode = "quality";
|
||||
|
||||
// MediaStreamTrack Content Hints (https://www.w3.org/TR/mst-content-hint/)
|
||||
[RuntimeEnabled=WebCodecsContentHint]
|
||||
DOMString contentHint = "";
|
||||
};
|
||||
|
||||
-4
@@ -28,8 +28,4 @@
|
||||
[
|
||||
Exposed=(Window,Worker)
|
||||
] interface WebGLTexture : WebGLObject {
|
||||
[RuntimeEnabled=ExtraWebGLVideoTextureMetadata] readonly attribute unsigned long lastUploadedVideoWidth;
|
||||
[RuntimeEnabled=ExtraWebGLVideoTextureMetadata] readonly attribute unsigned long lastUploadedVideoHeight;
|
||||
[RuntimeEnabled=ExtraWebGLVideoTextureMetadata] readonly attribute double lastUploadedVideoTimestamp;
|
||||
[RuntimeEnabled=ExtraWebGLVideoTextureMetadata] readonly attribute boolean lastUploadedVideoFrameWasSkipped;
|
||||
};
|
||||
|
||||
+3
-1
@@ -10,9 +10,11 @@
|
||||
] interface GPUAdapter {
|
||||
[SameObject] readonly attribute GPUSupportedFeatures features;
|
||||
[SameObject] readonly attribute GPUSupportedLimits limits;
|
||||
[SameObject, RuntimeEnabled=WebGPUAdapterInfoAttribute] readonly attribute GPUAdapterInfo info;
|
||||
readonly attribute boolean isFallbackAdapter;
|
||||
[RuntimeEnabled=WebGPUExperimentalFeatures] readonly attribute boolean isCompatibilityMode;
|
||||
|
||||
[CallWith=ScriptState] Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
|
||||
[CallWith=ScriptState] Promise<GPUAdapterInfo> requestAdapterInfo();
|
||||
// TODO(crbug.com/335383516): Remove this once synchronous info attribute is implemented.
|
||||
[CallWith=ScriptState, Measure] Promise<GPUAdapterInfo> requestAdapterInfo();
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@
|
||||
optional GPUSize32 workgroupCountZ = 1);
|
||||
[NoAllocDirectCall] void dispatchWorkgroupsIndirect(GPUBuffer indirectBuffer,
|
||||
GPUSize64 indirectOffset);
|
||||
[RaisesException] void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
|
||||
[RaisesException, NoAllocDirectCall] void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
|
||||
|
||||
[NoAllocDirectCall] void end();
|
||||
};
|
||||
|
||||
Vendored
+3
-3
@@ -5,12 +5,12 @@
|
||||
// https://gpuweb.github.io/gpuweb/
|
||||
|
||||
interface mixin GPUProgrammablePassEncoder {
|
||||
void setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup,
|
||||
[NoAllocDirectCall] void setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup,
|
||||
optional sequence<GPUBufferDynamicOffset> dynamicOffsets);
|
||||
|
||||
[RaisesException] void setBindGroup(
|
||||
[RaisesException, NoAllocDirectCall] void setBindGroup(
|
||||
GPUIndex32 index, GPUBindGroup? bindGroup,
|
||||
[AllowShared, FlexibleArrayBufferView] Uint32Array dynamicOffsetsData,
|
||||
[AllowShared, FlexibleArrayBufferView, BufferSourceTypeNoSizeLimit] Uint32Array dynamicOffsetsData,
|
||||
GPUSize64 dynamicOffsetsDataStart,
|
||||
GPUSize32 dynamicOffsetsDataLength);
|
||||
|
||||
|
||||
+4
-7
@@ -12,30 +12,27 @@
|
||||
|
||||
[CallWith=ScriptState] Promise<undefined> onSubmittedWorkDone();
|
||||
|
||||
// TODO(crbug.com/1088107): Merge these overloads into one with
|
||||
// [AllowShared] BufferSource (or whatever the upstream spec has), which
|
||||
// would expand this to allow SharedArrayBuffer (can't be implemented now).
|
||||
[CallWith=ScriptState, RaisesException] void writeBuffer(
|
||||
GPUBuffer buffer,
|
||||
GPUSize64 bufferOffset,
|
||||
[AllowShared] ArrayBufferView data,
|
||||
[AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView data,
|
||||
optional GPUSize64 dataElementOffset = 0,
|
||||
optional GPUSize64 dataElementCount);
|
||||
[CallWith=ScriptState, RaisesException] void writeBuffer(
|
||||
GPUBuffer buffer,
|
||||
GPUSize64 bufferOffset,
|
||||
ArrayBuffer data,
|
||||
[AllowShared, BufferSourceTypeNoSizeLimit] ArrayBuffer data,
|
||||
optional GPUSize64 dataByteOffset = 0,
|
||||
optional GPUSize64 byteSize);
|
||||
|
||||
[CallWith=ScriptState, RaisesException] void writeTexture(
|
||||
GPUImageCopyTexture destination,
|
||||
[AllowShared] ArrayBufferView data,
|
||||
[AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView data,
|
||||
GPUImageDataLayout dataLayout,
|
||||
GPUExtent3D size);
|
||||
[CallWith=ScriptState, RaisesException] void writeTexture(
|
||||
GPUImageCopyTexture destination,
|
||||
ArrayBuffer data,
|
||||
[AllowShared, BufferSourceTypeNoSizeLimit] ArrayBuffer data,
|
||||
GPUImageDataLayout dataLayout,
|
||||
GPUExtent3D size);
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -23,7 +23,7 @@
|
||||
void executeBundles(sequence<GPURenderBundle> bundles);
|
||||
[NoAllocDirectCall] void beginOcclusionQuery(GPUSize32 queryIndex);
|
||||
[NoAllocDirectCall] void endOcclusionQuery();
|
||||
[RaisesException] void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
|
||||
[RaisesException, NoAllocDirectCall] void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
|
||||
|
||||
[NoAllocDirectCall] void end();
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -21,6 +21,7 @@ enum GPUFeatureName {
|
||||
"chromium-experimental-timestamp-query-inside-passes",
|
||||
"chromium-experimental-subgroups",
|
||||
"chromium-experimental-subgroup-uniform-control-flow",
|
||||
"dual-source-blending",
|
||||
};
|
||||
|
||||
[
|
||||
|
||||
+1
@@ -10,6 +10,7 @@ enum XRDepthUsage {
|
||||
enum XRDepthDataFormat {
|
||||
"luminance-alpha",
|
||||
"float32",
|
||||
"unsigned-short",
|
||||
};
|
||||
|
||||
dictionary XRDepthStateInit {
|
||||
|
||||
Reference in New Issue
Block a user