OLD | NEW |
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_RASTER_WORKER_POOL_H_ | 5 #ifndef CONTENT_RENDERER_RASTER_WORKER_POOL_H_ |
6 #define CONTENT_RENDERER_RASTER_WORKER_POOL_H_ | 6 #define CONTENT_RENDERER_RASTER_WORKER_POOL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 friend class RasterWorkerPoolSequencedTaskRunner; | 76 friend class RasterWorkerPoolSequencedTaskRunner; |
77 | 77 |
78 // Simple Task for the TaskGraphRunner that wraps a closure. | 78 // Simple Task for the TaskGraphRunner that wraps a closure. |
79 // This class is used to schedule TaskRunner tasks on the | 79 // This class is used to schedule TaskRunner tasks on the |
80 // |task_graph_runner_|. | 80 // |task_graph_runner_|. |
81 class ClosureTask : public cc::Task { | 81 class ClosureTask : public cc::Task { |
82 public: | 82 public: |
83 explicit ClosureTask(const base::Closure& closure); | 83 explicit ClosureTask(const base::Closure& closure); |
84 | 84 |
85 // Overridden from cc::Task: | 85 // Overridden from cc::Task: |
| 86 void ScheduleOnOriginThread() override{}; |
| 87 void CompleteOnOriginThread() override{}; |
86 void RunOnWorkerThread() override; | 88 void RunOnWorkerThread() override; |
87 | 89 |
88 protected: | 90 protected: |
89 ~ClosureTask() override; | 91 ~ClosureTask() override; |
90 | 92 |
91 private: | 93 private: |
92 base::Closure closure_; | 94 base::Closure closure_; |
93 | 95 |
94 DISALLOW_COPY_AND_ASSIGN(ClosureTask); | 96 DISALLOW_COPY_AND_ASSIGN(ClosureTask); |
95 }; | 97 }; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // Condition variable that is waited on by origin threads until a namespace | 140 // Condition variable that is waited on by origin threads until a namespace |
139 // has finished running all associated tasks. | 141 // has finished running all associated tasks. |
140 base::ConditionVariable has_namespaces_with_finished_running_tasks_cv_; | 142 base::ConditionVariable has_namespaces_with_finished_running_tasks_cv_; |
141 // Set during shutdown. Tells Run() to return when no more tasks are pending. | 143 // Set during shutdown. Tells Run() to return when no more tasks are pending. |
142 bool shutdown_; | 144 bool shutdown_; |
143 }; | 145 }; |
144 | 146 |
145 } // namespace content | 147 } // namespace content |
146 | 148 |
147 #endif // CONTENT_RENDERER_RASTER_WORKER_POOL_H_ | 149 #endif // CONTENT_RENDERER_RASTER_WORKER_POOL_H_ |
OLD | NEW |