#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/frame/dactyloscoper.h"
#include "base/trace_event/typed_macros.h"
#include "base/tracing/protos/chrome_track_event.pbzero.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/renderer/bindings/core/v8/capture_source_location.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/svg/svg_string_list_tear_off.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/fonts/font_description.h"
#include "third_party/blink/renderer/platform/fonts/font_selection_types.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
#include "third_party/perfetto/include/perfetto/tracing/event_context.h"
#include "v8/include/v8-function-callback.h"
namespace blink {
Dactyloscoper::Dactyloscoper() = default;
namespace {
bool ShouldSample(WebFeature feature) { … }
CalledJsApi;
JSFunctionArgument;
ArgumentType;
ChromeTrackEvent;
HighEntropyAPI;
ExecutionContextProto;
SourceLocationProto;
FontLookup;
FontLookupType;
ArgumentType GetArgumentType(v8::Local<v8::Value> value) { … }
String V8ValueToString(v8::Local<v8::Context> current_context,
v8::Isolate* isolate,
const v8::Local<v8::Value>& value) { … }
FontLookupType ToTypeProto(Dactyloscoper::FontLookupType lookup_type) { … }
}
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
WebFeature feature,
const IdentifiableToken& value) { … }
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
WebFeature feature,
const String& str) { … }
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
WebFeature feature,
const Vector<String>& strs) { … }
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
WebFeature feature,
const DOMArrayBufferView* buffer) { … }
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
WebFeature feature,
SVGStringListTearOff* strings) { … }
void Dactyloscoper::TraceFontLookup(ExecutionContext* execution_context,
const AtomicString& name,
const FontDescription& font_description,
Dactyloscoper::FontLookupType lookup_type) { … }
Dactyloscoper::HighEntropyTracer::HighEntropyTracer(
const char* called_api_name,
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
Dactyloscoper::HighEntropyTracer::~HighEntropyTracer() { … }
}