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

Unified Diff: content/child/scheduler/single_thread_idle_task_runner.h

Issue 1058873010: Move blink scheduler implementation into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 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: content/child/scheduler/single_thread_idle_task_runner.h
diff --git a/content/child/scheduler/single_thread_idle_task_runner.h b/content/child/scheduler/single_thread_idle_task_runner.h
deleted file mode 100644
index b5281a57389139a8a33ea8e13cb8b1bf7c6e947b..0000000000000000000000000000000000000000
--- a/content/child/scheduler/single_thread_idle_task_runner.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 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 CONTENT_CHILD_SCHEDULER_SINGLE_THREAD_IDLE_TASK_RUNNER_H_
-#define CONTENT_CHILD_SCHEDULER_SINGLE_THREAD_IDLE_TASK_RUNNER_H_
-
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/memory/ref_counted.h"
-#include "base/single_thread_task_runner.h"
-#include "base/time/time.h"
-
-namespace content {
-
-// A SingleThreadIdleTaskRunner is a task runner for running idle tasks. Idle
-// tasks have an unbound argument which is bound to a deadline
-// (in base::TimeTicks) when they are run. The idle task is expected to
-// complete by this deadline.
-class SingleThreadIdleTaskRunner
- : public base::RefCountedThreadSafe<SingleThreadIdleTaskRunner> {
- public:
- typedef base::Callback<void(base::TimeTicks)> IdleTask;
-
- // NOTE Category strings must have application lifetime (statics or
- // literals). They may not include " chars.
- SingleThreadIdleTaskRunner(
- scoped_refptr<base::SingleThreadTaskRunner> idle_priority_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> after_wakeup_task_runner,
- base::Callback<void(base::TimeTicks*)> deadline_supplier,
- const char* tracing_category);
-
- virtual void PostIdleTask(const tracked_objects::Location& from_here,
- const IdleTask& idle_task);
-
- virtual void PostNonNestableIdleTask(
- const tracked_objects::Location& from_here,
- const IdleTask& idle_task);
-
- virtual void PostIdleTaskAfterWakeup(
- const tracked_objects::Location& from_here,
- const IdleTask& idle_task);
-
- bool RunsTasksOnCurrentThread() const;
-
- protected:
- virtual ~SingleThreadIdleTaskRunner();
-
- private:
- friend class base::RefCountedThreadSafe<SingleThreadIdleTaskRunner>;
-
- void RunTask(IdleTask idle_task);
-
- scoped_refptr<base::SingleThreadTaskRunner> idle_priority_task_runner_;
- scoped_refptr<base::SingleThreadTaskRunner> after_wakeup_task_runner_;
- base::Callback<void(base::TimeTicks*)> deadline_supplier_;
- const char* tracing_category_;
- base::WeakPtr<SingleThreadIdleTaskRunner> weak_scheduler_ptr_;
- base::WeakPtrFactory<SingleThreadIdleTaskRunner> weak_factory_;
- DISALLOW_COPY_AND_ASSIGN(SingleThreadIdleTaskRunner);
-};
-
-} // namespace content
-
-#endif // CONTENT_CHILD_SCHEDULER_SINGLE_THREAD_IDLE_TASK_RUNNER_H_
« no previous file with comments | « content/child/scheduler/scheduler_message_loop_delegate.cc ('k') | content/child/scheduler/single_thread_idle_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698