#include "components/fingerprinting_protection_filter/renderer/renderer_agent.h"
#include <memory>
#include <utility>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/fingerprinting_protection_filter/mojom/fingerprinting_protection_filter.mojom.h"
#include "components/fingerprinting_protection_filter/renderer/renderer_url_loader_throttle.h"
#include "components/fingerprinting_protection_filter/renderer/unverified_ruleset_dealer.h"
#include "components/subresource_filter/content/shared/common/subresource_filter_utils.h"
#include "components/subresource_filter/content/shared/renderer/web_document_subresource_filter_impl.h"
#include "components/subresource_filter/core/common/memory_mapped_ruleset.h"
#include "components/subresource_filter/core/mojom/subresource_filter.mojom.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_thread.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/platform/web_document_subresource_filter.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_local_frame_client.h"
#include "url/gurl.h"
namespace fingerprinting_protection_filter {
namespace {
bool IsFencedFrameRoot(content::RenderFrame* render_frame) { … }
}
subresource_filter::mojom::ActivationState
RendererAgent::GetInheritedActivationState(content::RenderFrame* render_frame) { … }
GURL RendererAgent::GetMainDocumentUrl() { … }
bool RendererAgent::IsTopLevelMainFrame() { … }
RendererAgent::RendererAgent(content::RenderFrame* render_frame,
UnverifiedRulesetDealer* ruleset_dealer)
: … { … }
RendererAgent::~RendererAgent() { … }
void RendererAgent::RequestActivationState() { … }
void RendererAgent::Initialize() { … }
void RendererAgent::DidCreateNewDocument() { … }
void RendererAgent::DidFailProvisionalLoad() { … }
void RendererAgent::WillDetach(blink::DetachReason detach_reason) { … }
void RendererAgent::OnDestruct() { … }
void RendererAgent::AddThrottle(RendererURLLoaderThrottle* throttle) { … }
void RendererAgent::DeleteThrottle(RendererURLLoaderThrottle* throttle) { … }
void RendererAgent::DeleteAllThrottles() { … }
void RendererAgent::OnSubresourceDisallowed() { … }
void RendererAgent::OnActivationComputed(
subresource_filter::mojom::ActivationStatePtr activation_state) { … }
mojom::FingerprintingProtectionHost*
RendererAgent::GetFingerprintingProtectionHost() { … }
void RendererAgent::SetFilterForCurrentDocument(
std::unique_ptr<blink::WebDocumentSubresourceFilter> filter) { … }
void RendererAgent::MaybeCreateNewFilter() { … }
}