#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/scheduler/main_thread/frame_task_queue_controller.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/functional/callback.h"
#include "base/not_fatal_until.h"
#include "base/trace_event/traced_value.h"
#include "third_party/blink/renderer/platform/scheduler/common/tracing_helper.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_task_queue.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_priority.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
namespace blink {
namespace scheduler {
TaskQueue;
QueueTraits;
QueueEnabledVoter;
FrameTaskQueueController::FrameTaskQueueController(
MainThreadSchedulerImpl* main_thread_scheduler_impl,
FrameSchedulerImpl* frame_scheduler_impl,
Delegate* delegate)
: … { … }
FrameTaskQueueController::~FrameTaskQueueController() = default;
scoped_refptr<MainThreadTaskQueue>
FrameTaskQueueController::GetTaskQueue(
MainThreadTaskQueue::QueueTraits queue_traits) { … }
const Vector<FrameTaskQueueController::TaskQueueAndEnabledVoterPair>&
FrameTaskQueueController::GetAllTaskQueuesAndVoters() const { … }
scoped_refptr<MainThreadTaskQueue>
FrameTaskQueueController::NewWebSchedulingTaskQueue(
QueueTraits queue_traits,
WebSchedulingQueueType queue_type,
WebSchedulingPriority priority) { … }
void FrameTaskQueueController::RemoveWebSchedulingTaskQueue(
MainThreadTaskQueue* queue) { … }
void FrameTaskQueueController::CreateTaskQueue(
QueueTraits queue_traits) { … }
void FrameTaskQueueController::TaskQueueCreated(
const scoped_refptr<MainThreadTaskQueue>& task_queue) { … }
void FrameTaskQueueController::RemoveTaskQueueAndVoter(
MainThreadTaskQueue* queue) { … }
base::sequence_manager::TaskQueue::QueueEnabledVoter*
FrameTaskQueueController::GetQueueEnabledVoter(
const scoped_refptr<MainThreadTaskQueue>& task_queue) { … }
void FrameTaskQueueController::WriteIntoTrace(
perfetto::TracedValue context) const { … }
MainThreadTaskQueue::QueueType
FrameTaskQueueController::QueueTypeFromQueueTraits(QueueTraits queue_traits) { … }
}
}