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

Unified Diff: content/renderer/scheduler/nestable_single_thread_task_runner.h

Issue 970473004: [content] Add support for Non nestable idle tasks the the RendererScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix contentperftests Created 5 years, 9 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
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/scheduler/nestable_task_runner_for_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/scheduler/nestable_single_thread_task_runner.h
diff --git a/content/renderer/scheduler/nestable_single_thread_task_runner.h b/content/renderer/scheduler/nestable_single_thread_task_runner.h
new file mode 100644
index 0000000000000000000000000000000000000000..6cb827d5edbf7b49a08d272446ae0409cdbcd4a1
--- /dev/null
+++ b/content/renderer/scheduler/nestable_single_thread_task_runner.h
@@ -0,0 +1,31 @@
+// 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 CONTENT_RENDERER_SCHEDULER_NESTABLE_SINGLE_THREAD_TASK_RUNNER_H_
+#define CONTENT_RENDERER_SCHEDULER_NESTABLE_SINGLE_THREAD_TASK_RUNNER_H_
+
+#include "base/single_thread_task_runner.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+// A single thread task runner which exposes whether it is running nested.
+class CONTENT_EXPORT NestableSingleThreadTaskRunner
+ : public base::SingleThreadTaskRunner {
+ public:
+ NestableSingleThreadTaskRunner() {}
+
+ // Returns true if the task runner is nested (i.e., running a run loop within
+ // a nested task).
+ virtual bool IsNested() const = 0;
+
+ protected:
+ ~NestableSingleThreadTaskRunner() override {}
+
+ DISALLOW_COPY_AND_ASSIGN(NestableSingleThreadTaskRunner);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_SCHEDULER_NESTABLE_SINGLE_THREAD_TASK_RUNNER_H_
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/scheduler/nestable_task_runner_for_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698