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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: remove RunsTasksOnCurrentThread() overrided. Created 3 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 unified diff | Download patch
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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Similar to sequence number, but ultimately the |enqueue_order_| is what 126 // Similar to sequence number, but ultimately the |enqueue_order_| is what
127 // the scheduler uses for task ordering. For immediate tasks |enqueue_order| 127 // the scheduler uses for task ordering. For immediate tasks |enqueue_order|
128 // is set when posted, but for delayed tasks it's not defined until they are 128 // is set when posted, but for delayed tasks it's not defined until they are
129 // enqueued on the |delayed_work_queue_|. This is because otherwise delayed 129 // enqueued on the |delayed_work_queue_|. This is because otherwise delayed
130 // tasks could run before an immediate task posted after the delayed task. 130 // tasks could run before an immediate task posted after the delayed task.
131 EnqueueOrder enqueue_order_; 131 EnqueueOrder enqueue_order_;
132 }; 132 };
133 133
134 // TaskQueue implementation. 134 // TaskQueue implementation.
135 void UnregisterTaskQueue() override; 135 void UnregisterTaskQueue() override;
136 bool RunsTasksOnCurrentThread() const override; 136 bool RunsTasksInCurrentSequence() const override;
137 bool PostDelayedTask(const tracked_objects::Location& from_here, 137 bool PostDelayedTask(const tracked_objects::Location& from_here,
138 base::OnceClosure task, 138 base::OnceClosure task,
139 base::TimeDelta delay) override; 139 base::TimeDelta delay) override;
140 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 140 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
141 base::OnceClosure task, 141 base::OnceClosure task,
142 base::TimeDelta delay) override; 142 base::TimeDelta delay) override;
143 std::unique_ptr<QueueEnabledVoter> CreateQueueEnabledVoter() override; 143 std::unique_ptr<QueueEnabledVoter> CreateQueueEnabledVoter() override;
144 bool IsQueueEnabled() const override; 144 bool IsQueueEnabled() const override;
145 bool IsEmpty() const override; 145 bool IsEmpty() const override;
146 size_t GetNumberOfPendingTasks() const override; 146 size_t GetNumberOfPendingTasks() const override;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 const bool should_report_when_execution_blocked_; 387 const bool should_report_when_execution_blocked_;
388 388
389 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); 389 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl);
390 }; 390 };
391 391
392 } // namespace internal 392 } // namespace internal
393 } // namespace scheduler 393 } // namespace scheduler
394 } // namespace blink 394 } // namespace blink
395 395
396 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 396 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698