Remove dependency in //content/child on //components/autofill
This CL removes the dependency in //content/child on //components/autofill, which was used to call blink::WebRuntimeFeatures::EnableSharedAutofill() if autofill::features::kAutofillSharedAutofill is enabled. This CL calls blink::WebRuntimeFeatures::EnableSharedAutofill() manually in ContentRendererClient:: SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() instead. Bug: 1201849 Change-Id: I956082f46a4a1dcc14314bff23f55bd647a90d44 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4760966 Reviewed-by: Nate Fischer <ntfschr@chromium.org> Commit-Queue: Christoph Schwering <schwering@google.com> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/main@{#1181735}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d012db734e
commit
e0ddb01133
android_webview/renderer
chrome/renderer
content/child
weblayer
@ -34,6 +34,7 @@ source_set("renderer") {
|
||||
"//base",
|
||||
"//components/android_system_error_page",
|
||||
"//components/autofill/content/renderer",
|
||||
"//components/autofill/core/common:features",
|
||||
"//components/cdm/renderer",
|
||||
"//components/content_capture/common",
|
||||
"//components/content_capture/renderer",
|
||||
|
@ -6,6 +6,7 @@ include_rules = [
|
||||
|
||||
"+components/android_system_error_page",
|
||||
"+components/autofill/content/renderer",
|
||||
"+components/autofill/core/common",
|
||||
"+components/cdm/renderer",
|
||||
"+components/network_hints/renderer",
|
||||
"+components/page_load_metrics/renderer",
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "components/android_system_error_page/error_page_populator.h"
|
||||
#include "components/autofill/core/common/autofill_features.h"
|
||||
#include "components/cdm/renderer/key_system_support_update.h"
|
||||
#include "components/js_injection/renderer/js_communication.h"
|
||||
#include "components/network_hints/renderer/web_prescient_networking_impl.h"
|
||||
@ -37,6 +38,7 @@
|
||||
#include "mojo/public/cpp/bindings/binder_map.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
#include "third_party/blink/public/platform/web_runtime_features.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_url_request.h"
|
||||
@ -176,6 +178,14 @@ AwContentRendererClient::CreatePrescientNetworking(
|
||||
render_frame);
|
||||
}
|
||||
|
||||
void AwContentRendererClient::
|
||||
SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {
|
||||
if (base::FeatureList::IsEnabled(
|
||||
autofill::features::kAutofillSharedAutofill)) {
|
||||
blink::WebRuntimeFeatures::EnableSharedAutofill(true);
|
||||
}
|
||||
}
|
||||
|
||||
void AwContentRendererClient::WebViewCreated(
|
||||
blink::WebView* web_view,
|
||||
bool was_created_by_renderer,
|
||||
|
@ -65,6 +65,7 @@ class AwContentRendererClient : public content::ContentRendererClient,
|
||||
bool is_redirect) override;
|
||||
std::unique_ptr<blink::WebPrescientNetworking> CreatePrescientNetworking(
|
||||
content::RenderFrame* render_frame) override;
|
||||
void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() override;
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider>
|
||||
CreateURLLoaderThrottleProvider(
|
||||
blink::URLLoaderThrottleProviderType provider_type) override;
|
||||
|
@ -1627,6 +1627,11 @@ void ChromeContentRendererClient::
|
||||
|
||||
MaybeEnableWebShare();
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
autofill::features::kAutofillSharedAutofill)) {
|
||||
blink::WebRuntimeFeatures::EnableSharedAutofill(true);
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(subresource_filter::kAdTagging))
|
||||
blink::WebRuntimeFeatures::EnableAdTagging(true);
|
||||
|
||||
|
@ -68,7 +68,6 @@ target(link_target_type, "child") {
|
||||
"//base",
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//cc/paint",
|
||||
"//components/autofill/core/common:features",
|
||||
"//components/discardable_memory/client",
|
||||
"//components/discardable_memory/public/mojom",
|
||||
"//components/tracing:startup_tracing",
|
||||
|
@ -1,7 +1,6 @@
|
||||
include_rules = [
|
||||
# Allow inclusion of specific components that we depend on.
|
||||
# See comment in content/DEPS for which components are allowed.
|
||||
"+components/autofill/core/common",
|
||||
"+components/tracing",
|
||||
"+components/webcrypto",
|
||||
"+components/services/font/public",
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "cc/base/features.h"
|
||||
#include "components/autofill/core/common/autofill_features.h"
|
||||
#include "content/common/content_navigation_policy.h"
|
||||
#include "content/common/content_switches_internal.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
@ -280,8 +279,6 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
|
||||
{wf::EnableSharedArrayBuffer, raw_ref(features::kSharedArrayBuffer)},
|
||||
{wf::EnableSharedArrayBufferOnDesktop,
|
||||
raw_ref(features::kSharedArrayBufferOnDesktop)},
|
||||
{wf::EnableSharedAutofill,
|
||||
raw_ref(autofill::features::kAutofillSharedAutofill)},
|
||||
{wf::EnableTouchDragAndContextMenu,
|
||||
raw_ref(features::kTouchDragAndContextMenu)},
|
||||
{wf::EnableUserActivationSameOriginVisibility,
|
||||
|
@ -408,6 +408,7 @@ source_set("weblayer_lib_base") {
|
||||
"//components/autofill/content/renderer",
|
||||
"//components/autofill/core/browser",
|
||||
"//components/autofill/core/common",
|
||||
"//components/autofill/core/common:features",
|
||||
"//components/background_fetch",
|
||||
"//components/background_sync",
|
||||
"//components/base32",
|
||||
|
@ -1,5 +1,6 @@
|
||||
include_rules = [
|
||||
"+components/android_system_error_page",
|
||||
"+components/autofill/core/common",
|
||||
"+components/autofill/content/renderer",
|
||||
"+components/cdm/renderer",
|
||||
"+components/content_capture/common",
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "components/autofill/content/renderer/autofill_agent.h"
|
||||
#include "components/autofill/content/renderer/password_autofill_agent.h"
|
||||
#include "components/autofill/core/common/autofill_features.h"
|
||||
#include "components/content_capture/common/content_capture_features.h"
|
||||
#include "components/content_capture/renderer/content_capture_sender.h"
|
||||
#include "components/content_settings/renderer/content_settings_agent_impl.h"
|
||||
@ -237,6 +238,11 @@ void ContentRendererClientImpl::
|
||||
if (base::FeatureList::IsEnabled(subresource_filter::kAdTagging)) {
|
||||
blink::WebRuntimeFeatures::EnableAdTagging(true);
|
||||
}
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
autofill::features::kAutofillSharedAutofill)) {
|
||||
blink::WebRuntimeFeatures::EnableSharedAutofill(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool ContentRendererClientImpl::IsPrefetchOnly(
|
||||
|
Reference in New Issue
Block a user