#include "third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h"
#include "base/memory/weak_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
namespace blink {
class TaskHandle::Runner : public WTF::ThreadSafeRefCounted<Runner> { … };
}
namespace base {
RunnerMethodType;
template <>
struct CallbackCancellationTraits<
RunnerMethodType,
std::tuple<base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle>> { … };
}
namespace blink {
bool TaskHandle::IsActive() const { … }
void TaskHandle::Cancel() { … }
TaskHandle::TaskHandle() = default;
TaskHandle::~TaskHandle() { … }
TaskHandle::TaskHandle(TaskHandle&&) = default;
TaskHandle& TaskHandle::operator=(TaskHandle&& other) { … }
TaskHandle::TaskHandle(scoped_refptr<Runner> runner)
: … { … }
TaskHandle PostCancellableTask(base::SequencedTaskRunner& task_runner,
const base::Location& location,
base::OnceClosure task) { … }
TaskHandle PostDelayedCancellableTask(base::SequencedTaskRunner& task_runner,
const base::Location& location,
base::OnceClosure task,
base::TimeDelta delay) { … }
TaskHandle PostNonNestableCancellableTask(
base::SequencedTaskRunner& task_runner,
const base::Location& location,
base::OnceClosure task) { … }
TaskHandle PostNonNestableDelayedCancellableTask(
base::SequencedTaskRunner& task_runner,
const base::Location& location,
base::OnceClosure task,
base::TimeDelta delay) { … }
}