| Index: components/scheduler/promises/single_thread_promise_executor.h
|
| diff --git a/components/scheduler/promises/single_thread_promise_executor.h b/components/scheduler/promises/single_thread_promise_executor.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bf3ca01ea5ce4c2d57dcefcb294ac1323d5c4db6
|
| --- /dev/null
|
| +++ b/components/scheduler/promises/single_thread_promise_executor.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_SCHEDULER_PROMISES_SINGLE_THREAD_PROMISE_EXECUTOR_H_
|
| +#define COMPONENTS_SCHEDULER_PROMISES_SINGLE_THREAD_PROMISE_EXECUTOR_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/single_thread_task_runner.h"
|
| +#include "components/scheduler/promises/promise_executor.h"
|
| +
|
| +namespace promise {
|
| +namespace internal {
|
| +
|
| +class SCHEDULER_EXPORT SingleThreadPromiseExecutor : public PromiseExecutor {
|
| + public:
|
| + explicit SingleThreadPromiseExecutor(
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
|
| + ~SingleThreadPromiseExecutor() override;
|
| +
|
| + // PromiseExecutor implementation:
|
| + void StartResolveInternal(PromiseBase* promise) override;
|
| + bool OnPromiseResolved(PromiseBase* promise) override;
|
| + bool OnPromiseRejected(PromiseBase* promise) override;
|
| +
|
| + private:
|
| + void ResolveImpl();
|
| + void DispatchResolveImpl();
|
| +
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SingleThreadPromiseExecutor);
|
| +};
|
| +
|
| +} // namespace internal
|
| +} // namespace promise
|
| +
|
| +#endif // COMPONENTS_SCHEDULER_PROMISES_SINGLE_THREAD_PROMISE_EXECUTOR_H_
|
|
|