#include "third_party/blink/renderer/core/scheduler/task_attribution_tracker_impl.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/scheduler/script_wrappable_task_state.h"
#include "third_party/blink/renderer/core/scheduler/task_attribution_info_impl.h"
#include "third_party/blink/renderer/core/scheduler/web_scheduling_task_state.h"
#include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_info.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_priority.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
namespace blink::scheduler {
namespace {
perfetto::protos::pbzero::BlinkTaskScope::TaskScopeType ToProtoEnum(
TaskAttributionTracker::TaskScopeType type) { … }
}
std::unique_ptr<TaskAttributionTracker> TaskAttributionTrackerImpl::Create(
v8::Isolate* isolate) { … }
TaskAttributionTrackerImpl::TaskAttributionTrackerImpl(v8::Isolate* isolate)
: … { … }
scheduler::TaskAttributionInfo* TaskAttributionTrackerImpl::RunningTask()
const { … }
TaskAttributionTracker::TaskScope TaskAttributionTrackerImpl::CreateTaskScope(
ScriptState* script_state,
TaskAttributionInfo* task_state,
TaskScopeType type) { … }
TaskAttributionTracker::TaskScope TaskAttributionTrackerImpl::CreateTaskScope(
ScriptState* script_state,
SoftNavigationContext* soft_navigation_context) { … }
TaskAttributionTracker::TaskScope TaskAttributionTrackerImpl::CreateTaskScope(
ScriptState* script_state,
TaskAttributionInfo* task_state,
TaskScopeType type,
AbortSignal* abort_source,
DOMTaskSignal* priority_source) { … }
std::optional<TaskAttributionTracker::TaskScope>
TaskAttributionTrackerImpl::MaybeCreateTaskScopeForCallback(
ScriptState* script_state,
TaskAttributionInfo* task_state) { … }
void TaskAttributionTrackerImpl::OnTaskScopeDestroyed(
const TaskScope& task_scope) { … }
TaskAttributionTracker::ObserverScope
TaskAttributionTrackerImpl::RegisterObserver(Observer* observer) { … }
void TaskAttributionTrackerImpl::OnObserverScopeDestroyed(
const ObserverScope& observer_scope) { … }
void TaskAttributionTrackerImpl::AddSameDocumentNavigationTask(
TaskAttributionInfo* task) { … }
void TaskAttributionTrackerImpl::ResetSameDocumentNavigationTasks() { … }
TaskAttributionInfo* TaskAttributionTrackerImpl::CommitSameDocumentNavigation(
TaskAttributionId task_id) { … }
}