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

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

Issue 2433323003: Fix TestingPlatformSupportWithMockScheduler::runForPeriodSeconds (Closed)
Patch Set: Fix compile Created 4 years, 1 month 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Returns the currently executing TaskQueue if any. Must be called on the 133 // Returns the currently executing TaskQueue if any. Must be called on the
134 // thread this class was created on. 134 // thread this class was created on.
135 TaskQueue* currently_executing_task_queue() const { 135 TaskQueue* currently_executing_task_queue() const {
136 DCHECK(main_thread_checker_.CalledOnValidThread()); 136 DCHECK(main_thread_checker_.CalledOnValidThread());
137 return currently_executing_task_queue_; 137 return currently_executing_task_queue_;
138 } 138 }
139 139
140 // Return number of pending tasks in task queues. 140 // Return number of pending tasks in task queues.
141 size_t GetNumberOfPendingTasks() const; 141 size_t GetNumberOfPendingTasks() const;
142 142
143 // Returns true if there is a task that could be executed immediately.
144 bool HasImmediateWorkForTesting() const;
145
143 private: 146 private:
144 friend class LazyNow; 147 friend class LazyNow;
145 friend class internal::TaskQueueImpl; 148 friend class internal::TaskQueueImpl;
146 friend class TaskQueueManagerTest; 149 friend class TaskQueueManagerTest;
147 150
148 class DeletionSentinel : public base::RefCounted<DeletionSentinel> { 151 class DeletionSentinel : public base::RefCounted<DeletionSentinel> {
149 private: 152 private:
150 friend class base::RefCounted<DeletionSentinel>; 153 friend class base::RefCounted<DeletionSentinel>;
151 ~DeletionSentinel() {} 154 ~DeletionSentinel() {}
152 }; 155 };
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 scoped_refptr<DeletionSentinel> deletion_sentinel_; 258 scoped_refptr<DeletionSentinel> deletion_sentinel_;
256 base::WeakPtrFactory<TaskQueueManager> weak_factory_; 259 base::WeakPtrFactory<TaskQueueManager> weak_factory_;
257 260
258 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); 261 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
259 }; 262 };
260 263
261 } // namespace scheduler 264 } // namespace scheduler
262 } // namespace blink 265 } // namespace blink
263 266
264 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_ H_ 267 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698