#include "third_party/blink/renderer/core/frame/use_counter_impl.h"
#include "base/metrics/histogram_macros.h"
#include "third_party/blink/public/common/scheme_registry.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/use_counter_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/use_counter_feature.mojom-shared.h"
#include "third_party/blink/renderer/core/css/css_style_sheet.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/frame.h"
#include "third_party/blink/renderer/core/frame/frame_console.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
namespace blink {
namespace {
mojom::blink::UseCounterFeatureType ToFeatureType(
UseCounterImpl::CSSPropertyType type) { … }
mojom::blink::UseCounterFeatureType ToFeatureType(
UseCounterImpl::PermissionsPolicyUsageType type) { … }
}
UseCounterMuteScope::UseCounterMuteScope(const Element& element)
: … { … }
UseCounterMuteScope::~UseCounterMuteScope() { … }
UseCounterImpl::UseCounterImpl(Context context, CommitState commit_state)
: … { … }
void UseCounterImpl::MuteForInspector() { … }
void UseCounterImpl::UnmuteForInspector() { … }
bool UseCounterImpl::IsCounted(WebFeature web_feature) const { … }
void UseCounterImpl::ClearMeasurementForTesting(WebFeature web_feature) { … }
bool UseCounterImpl::IsWebDXFeatureCounted(WebDXFeature webdx_feature) const { … }
void UseCounterImpl::ClearMeasurementForTesting(WebDXFeature webdx_feature) { … }
void UseCounterImpl::Trace(Visitor* visitor) const { … }
void UseCounterImpl::DidCommitLoad(const LocalFrame* frame) { … }
bool UseCounterImpl::IsCounted(CSSPropertyID unresolved_property,
CSSPropertyType type) const { … }
bool UseCounterImpl::IsCounted(const UseCounterFeature& feature) const { … }
void UseCounterImpl::AddObserver(Observer* observer) { … }
void UseCounterImpl::Count(const UseCounterFeature& feature,
const LocalFrame* source_frame) { … }
void UseCounterImpl::Count(CSSPropertyID property,
CSSPropertyType type,
const LocalFrame* source_frame) { … }
void UseCounterImpl::Count(WebFeature web_feature,
const LocalFrame* source_frame) { … }
void UseCounterImpl::CountWebDXFeature(WebDXFeature web_feature,
const LocalFrame* source_frame) { … }
void UseCounterImpl::CountPermissionsPolicyUsage(
mojom::blink::PermissionsPolicyFeature feature,
PermissionsPolicyUsageType usage_type,
const LocalFrame& source_frame) { … }
void UseCounterImpl::NotifyFeatureCounted(WebFeature feature) { … }
void UseCounterImpl::CountFeature(WebFeature feature) const { … }
bool UseCounterImpl::ReportMeasurement(const UseCounterFeature& feature,
const LocalFrame* frame) { … }
void UseCounterImpl::TraceMeasurement(const UseCounterFeature& feature) { … }
}