Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Unified Diff: components/scheduler/child/web_task_runner_impl.h

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/scheduler/child/web_task_runner_impl.h
diff --git a/components/scheduler/child/web_task_runner_impl.h b/components/scheduler/child/web_task_runner_impl.h
deleted file mode 100644
index 0773a95e611938e63d13b656dd366a568d066c0d..0000000000000000000000000000000000000000
--- a/components/scheduler/child/web_task_runner_impl.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 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_CHILD_WEB_TASK_RUNNER_H_
-#define COMPONENTS_SCHEDULER_CHILD_WEB_TASK_RUNNER_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/time/time.h"
-#include "components/scheduler/scheduler_export.h"
-#include "third_party/WebKit/public/platform/WebTaskRunner.h"
-
-namespace scheduler {
-class TaskQueue;
-
-class SCHEDULER_EXPORT WebTaskRunnerImpl : public blink::WebTaskRunner {
- public:
- explicit WebTaskRunnerImpl(scoped_refptr<TaskQueue> task_queue);
-
- ~WebTaskRunnerImpl() override;
-
- // blink::WebTaskRunner implementation:
- void postTask(const blink::WebTraceLocation& web_location,
- blink::WebTaskRunner::Task* task) override;
- void postDelayedTask(const blink::WebTraceLocation& web_location,
- blink::WebTaskRunner::Task* task,
- double delayMs) override;
- bool runsTasksOnCurrentThread() override;
- double virtualTimeSeconds() const override;
- double monotonicallyIncreasingVirtualTimeSeconds() const override;
- std::unique_ptr<blink::WebTaskRunner> clone() override;
-
- // blink::WebTaskRunner::Task should be wrapped by base::Passed() when
- // used with base::Bind(). See https://crbug.com/551356.
- // runTask() is a helper to call blink::WebTaskRunner::Task::run from
- // std::unique_ptr<blink::WebTaskRunner::Task>.
- // runTask() is placed here because std::unique_ptr<> cannot be used from
- // Blink.
- static void runTask(std::unique_ptr<blink::WebTaskRunner::Task>);
-
- private:
- base::TimeTicks Now() const;
-
- scoped_refptr<TaskQueue> task_queue_;
-
- DISALLOW_COPY_AND_ASSIGN(WebTaskRunnerImpl);
-};
-
-} // namespace scheduler
-
-#endif // COMPONENTS_SCHEDULER_CHILD_WEB_TASK_RUNNER_H_
« no previous file with comments | « components/scheduler/child/web_scheduler_impl.cc ('k') | components/scheduler/child/web_task_runner_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698