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

Side by Side Diff: content/renderer/categorized_worker_pool.h

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/child/worker_thread_registry.cc ('k') | content/renderer/categorized_worker_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_CATEGORIZED_WORKER_POOL_H_ 5 #ifndef CONTENT_RENDERER_CATEGORIZED_WORKER_POOL_H_
6 #define CONTENT_RENDERER_CATEGORIZED_WORKER_POOL_H_ 6 #define CONTENT_RENDERER_CATEGORIZED_WORKER_POOL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 20 matching lines...) Expand all
31 // in parallel with other instances of sequenced task runners. 31 // in parallel with other instances of sequenced task runners.
32 class CONTENT_EXPORT CategorizedWorkerPool : public base::TaskRunner, 32 class CONTENT_EXPORT CategorizedWorkerPool : public base::TaskRunner,
33 public cc::TaskGraphRunner { 33 public cc::TaskGraphRunner {
34 public: 34 public:
35 CategorizedWorkerPool(); 35 CategorizedWorkerPool();
36 36
37 // Overridden from base::TaskRunner: 37 // Overridden from base::TaskRunner:
38 bool PostDelayedTask(const tracked_objects::Location& from_here, 38 bool PostDelayedTask(const tracked_objects::Location& from_here,
39 base::OnceClosure task, 39 base::OnceClosure task,
40 base::TimeDelta delay) override; 40 base::TimeDelta delay) override;
41 bool RunsTasksOnCurrentThread() const override; 41 bool RunsTasksInCurrentSequence() const override;
42 42
43 // Overridden from cc::TaskGraphRunner: 43 // Overridden from cc::TaskGraphRunner:
44 cc::NamespaceToken GenerateNamespaceToken() override; 44 cc::NamespaceToken GenerateNamespaceToken() override;
45 void ScheduleTasks(cc::NamespaceToken token, cc::TaskGraph* graph) override; 45 void ScheduleTasks(cc::NamespaceToken token, cc::TaskGraph* graph) override;
46 void WaitForTasksToFinishRunning(cc::NamespaceToken token) override; 46 void WaitForTasksToFinishRunning(cc::NamespaceToken token) override;
47 void CollectCompletedTasks(cc::NamespaceToken token, 47 void CollectCompletedTasks(cc::NamespaceToken token,
48 cc::Task::Vector* completed_tasks) override; 48 cc::Task::Vector* completed_tasks) override;
49 49
50 // Runs a task from one of the provided categories. Categories listed first 50 // Runs a task from one of the provided categories. Categories listed first
51 // have higher priority. 51 // have higher priority.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Condition variable that is waited on by origin threads until a namespace 143 // Condition variable that is waited on by origin threads until a namespace
144 // has finished running all associated tasks. 144 // has finished running all associated tasks.
145 base::ConditionVariable has_namespaces_with_finished_running_tasks_cv_; 145 base::ConditionVariable has_namespaces_with_finished_running_tasks_cv_;
146 // Set during shutdown. Tells Run() to return when no more tasks are pending. 146 // Set during shutdown. Tells Run() to return when no more tasks are pending.
147 bool shutdown_; 147 bool shutdown_;
148 }; 148 };
149 149
150 } // namespace content 150 } // namespace content
151 151
152 #endif // CONTENT_RENDERER_CATEGORIZED_WORKER_POOL_H_ 152 #endif // CONTENT_RENDERER_CATEGORIZED_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « content/child/worker_thread_registry.cc ('k') | content/renderer/categorized_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698