chromium/third_party/blink/renderer/platform/scheduler/common/blink_scheduler_single_thread_task_runner.h

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_BLINK_SCHEDULER_SINGLE_THREAD_TASK_RUNNER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_BLINK_SCHEDULER_SINGLE_THREAD_TASK_RUNNER_H_

#include "base/functional/callback_forward.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/delayed_task_handle.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "third_party/blink/renderer/platform/platform_export.h"

namespace base {
class Location;
}  // namespace base

namespace blink::scheduler {

// TaskRunner used in the scheduler.
//
// This class specializes the DeleteSoon/ReleaseSoon implementation to prevent
// the object from leaking when possible (see DeleteOrReleaseSoonInternal). This
// is needed in Blink since frame and worker schedulers can get torn down long
// before the process shuts down.
//
// All other task-posting functionality is forwarded to to an underlying task
// runner.
class PLATFORM_EXPORT BlinkSchedulerSingleThreadTaskRunner
    : public base::SingleThreadTaskRunner {};

}  // namespace blink::scheduler

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_BLINK_SCHEDULER_SINGLE_THREAD_TASK_RUNNER_H_