#include "third_party/blink/renderer/core/scheduler/dom_scheduler.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/common/scheduler/task_attribution_id.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_scheduler_post_task_callback.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_scheduler_post_task_options.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/scheduler/dom_task.h"
#include "third_party/blink/renderer/core/scheduler/dom_task_continuation.h"
#include "third_party/blink/renderer/core/scheduler/dom_task_signal.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/platform/bindings/enumeration_base.h"
#include "third_party/blink/renderer/platform/bindings/exception_code.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_priority.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_queue_type.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_task_queue.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
namespace blink {
const char DOMScheduler::kSupplementName[] = …;
DOMScheduler* DOMScheduler::scheduler(ExecutionContext& context) { … }
DOMScheduler::DOMScheduler(ExecutionContext* context)
: … { … }
void DOMScheduler::ContextDestroyed() { … }
void DOMScheduler::Trace(Visitor* visitor) const { … }
ScriptPromise<IDLAny> DOMScheduler::postTask(
ScriptState* script_state,
V8SchedulerPostTaskCallback* callback_function,
SchedulerPostTaskOptions* options,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> DOMScheduler::yield(
ScriptState* script_state,
ExceptionState& exception_state) { … }
scheduler::TaskAttributionIdType DOMScheduler::taskId(
ScriptState* script_state) { … }
void DOMScheduler::setTaskId(ScriptState* script_state,
scheduler::TaskAttributionIdType task_id) { … }
void DOMScheduler::CreateFixedPriorityTaskQueues(
ExecutionContext* context,
WebSchedulingQueueType queue_type,
FixedPriorityTaskQueueVector& task_queues) { … }
DOMScheduler::DOMTaskQueue* DOMScheduler::CreateDynamicPriorityTaskQueue(
DOMTaskSignal* signal,
WebSchedulingQueueType queue_type) { … }
DOMTaskSignal* DOMScheduler::GetFixedPriorityTaskSignal(
ScriptState* script_state,
WebSchedulingPriority priority) { … }
DOMScheduler::DOMTaskQueue* DOMScheduler::GetTaskQueue(
DOMTaskSignal* task_signal,
WebSchedulingQueueType queue_type) { … }
void DOMScheduler::OnPriorityChange(DOMTaskSignal* signal,
DOMTaskQueue* task_queue) { … }
DOMScheduler::DOMTaskQueue::DOMTaskQueue(
std::unique_ptr<WebSchedulingTaskQueue> task_queue,
WebSchedulingPriority priority)
: … { … }
void DOMScheduler::DOMTaskQueue::Trace(Visitor* visitor) const { … }
void DOMScheduler::DOMTaskQueue::SetPriority(WebSchedulingPriority priority) { … }
DOMScheduler::DOMTaskQueue::~DOMTaskQueue() = default;
}