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

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

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest Created 5 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 CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_
6 #define CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ 6 #define CONTENT_RENDERER_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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Called when |queue| is unregistered. 93 // Called when |queue| is unregistered.
94 virtual void OnUnregisterTaskQueue( 94 virtual void OnUnregisterTaskQueue(
95 const scoped_refptr<internal::TaskQueueImpl>& queue) = 0; 95 const scoped_refptr<internal::TaskQueueImpl>& queue) = 0;
96 }; 96 };
97 97
98 // Called once to set the Observer. This function is called on the main 98 // Called once to set the Observer. This function is called on the main
99 // thread. If |observer| is null, then no callbacks will occur. 99 // thread. If |observer| is null, then no callbacks will occur.
100 // Note |observer| is expected to outlive the SchedulerHelper. 100 // Note |observer| is expected to outlive the SchedulerHelper.
101 void SetObserver(Observer* observer); 101 void SetObserver(Observer* observer);
102 102
103 // Returns the TickClock used by the TaskQueueManager. 103 // Returns the delegate used by the TaskQueueManager.
104 base::TickClock* tick_clock() const; 104 const scoped_refptr<TaskQueueManagerDelegate>& delegate() const;
105 105
106 private: 106 private:
107 friend class internal::LazyNow; 107 friend class internal::LazyNow;
108 friend class internal::TaskQueueImpl; 108 friend class internal::TaskQueueImpl;
109 friend class TaskQueueManagerTest; 109 friend class TaskQueueManagerTest;
110 110
111 class DeletionSentinel : public base::RefCounted<DeletionSentinel> { 111 class DeletionSentinel : public base::RefCounted<DeletionSentinel> {
112 private: 112 private:
113 friend class base::RefCounted<DeletionSentinel>; 113 friend class base::RefCounted<DeletionSentinel>;
114 ~DeletionSentinel() {} 114 ~DeletionSentinel() {}
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 Observer* observer_; // NOT OWNED 242 Observer* observer_; // NOT OWNED
243 scoped_refptr<DeletionSentinel> deletion_sentinel_; 243 scoped_refptr<DeletionSentinel> deletion_sentinel_;
244 base::WeakPtrFactory<TaskQueueManager> weak_factory_; 244 base::WeakPtrFactory<TaskQueueManager> weak_factory_;
245 245
246 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); 246 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
247 }; 247 };
248 248
249 } // namespace scheduler 249 } // namespace scheduler
250 250
251 #endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ 251 #endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/scheduler/base/task_queue_impl.cc ('k') | components/scheduler/base/task_queue_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698