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

Side by Side Diff: components/scheduler/child/task_queue_manager.h

Issue 1250613002: scheduler: Remove task observer shenanigans (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a failing test. Created 5 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SCHEDULER_TASK_QUEUE_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_
6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ 6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_
7 7
8 #include "base/atomic_sequence_num.h" 8 #include "base/atomic_sequence_num.h"
9 #include "base/debug/task_annotator.h" 9 #include "base/debug/task_annotator.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // this. 196 // this.
197 bool UpdateWorkQueues(bool should_trigger_wakeup, 197 bool UpdateWorkQueues(bool should_trigger_wakeup,
198 const base::PendingTask* previous_task); 198 const base::PendingTask* previous_task);
199 199
200 // Chooses the next work queue to service. Returns true if |out_queue_index| 200 // Chooses the next work queue to service. Returns true if |out_queue_index|
201 // indicates the queue from which the next task should be run, false to 201 // indicates the queue from which the next task should be run, false to
202 // avoid running any tasks. 202 // avoid running any tasks.
203 bool SelectWorkQueueToService(size_t* out_queue_index); 203 bool SelectWorkQueueToService(size_t* out_queue_index);
204 204
205 // Runs a single nestable task from the work queue designated by 205 // Runs a single nestable task from the work queue designated by
206 // |queue_index|. If |has_previous_task| is true, |previous_task| should 206 // |queue_index|. On exit, |out_task| will contain the task which was
207 // contain the previous task in this work batch. Non-nestable task are 207 // executed. Non-nestable task are reposted on the run loop. The queue must
208 // reposted on the run loop. The queue must not be empty. 208 // not be empty. Returns true if the TaskQueueManager got deleted, and false
209 // Returns true if the TaskQueueManager got deleted, and false otherwise. 209 // otherwise.
210 bool ProcessTaskFromWorkQueue(size_t queue_index, 210 bool ProcessTaskFromWorkQueue(size_t queue_index,
211 bool has_previous_task, 211 base::PendingTask* out_task);
212 base::PendingTask* previous_task);
213 212
214 bool RunsTasksOnCurrentThread() const; 213 bool RunsTasksOnCurrentThread() const;
215 bool PostDelayedTask(const tracked_objects::Location& from_here, 214 bool PostDelayedTask(const tracked_objects::Location& from_here,
216 const base::Closure& task, 215 const base::Closure& task,
217 base::TimeDelta delay); 216 base::TimeDelta delay);
218 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 217 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
219 const base::Closure& task, 218 const base::Closure& task,
220 base::TimeDelta delay); 219 base::TimeDelta delay);
221 internal::TaskQueueImpl* Queue(size_t queue_index) const; 220 internal::TaskQueueImpl* Queue(size_t queue_index) const;
222 221
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 255
257 scoped_refptr<DeletionSentinel> deletion_sentinel_; 256 scoped_refptr<DeletionSentinel> deletion_sentinel_;
258 base::WeakPtrFactory<TaskQueueManager> weak_factory_; 257 base::WeakPtrFactory<TaskQueueManager> weak_factory_;
259 258
260 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); 259 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
261 }; 260 };
262 261
263 } // namespace scheduler 262 } // namespace scheduler
264 263
265 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ 264 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/scheduler/child/scheduler_task_runner_delegate_impl.cc ('k') | components/scheduler/child/task_queue_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698