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

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

Issue 1314903007: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Record origin in TQM trace event Created 5 years, 3 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 COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ 5 #ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
6 #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ 6 #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
7 7
8 #include "components/scheduler/child/task_queue_manager.h" 8 #include "components/scheduler/child/task_queue_manager.h"
9 #include "components/scheduler/child/task_queue_selector.h" 9 #include "components/scheduler/child/task_queue_selector.h"
10 #include "components/scheduler/scheduler_export.h" 10 #include "components/scheduler/scheduler_export.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Returns true if Shutdown() has been called. Otherwise returns false. 55 // Returns true if Shutdown() has been called. Otherwise returns false.
56 bool IsShutdown() const { return !task_queue_manager_.get(); } 56 bool IsShutdown() const { return !task_queue_manager_.get(); }
57 57
58 void CheckOnValidThread() const { 58 void CheckOnValidThread() const {
59 DCHECK(thread_checker_.CalledOnValidThread()); 59 DCHECK(thread_checker_.CalledOnValidThread());
60 } 60 }
61 61
62 // Creates a new TaskQueue with the given |spec|. 62 // Creates a new TaskQueue with the given |spec|.
63 scoped_refptr<TaskQueue> NewTaskQueue(const TaskQueue::Spec& spec); 63 scoped_refptr<TaskQueue> NewTaskQueue(const TaskQueue::Spec& spec);
64 64
65 // Unregisters a TaskQueue previously created by |NewTaskQueue()|.
66 void UnregisterTaskQueue(scoped_refptr<TaskQueue>& task_queue);
67
65 // Accessor methods. 68 // Accessor methods.
66 base::TimeTicks Now() const; 69 base::TimeTicks Now() const;
67 base::TimeTicks NextPendingDelayedTaskRunTime() const; 70 base::TimeTicks NextPendingDelayedTaskRunTime() const;
68 bool GetAndClearSystemIsQuiescentBit(); 71 bool GetAndClearSystemIsQuiescentBit();
69 72
70 // Test helpers. 73 // Test helpers.
71 void SetTimeSourceForTesting(scoped_ptr<base::TickClock> time_source); 74 void SetTimeSourceForTesting(scoped_ptr<base::TickClock> time_source);
72 void SetWorkBatchSizeForTesting(size_t work_batch_size); 75 void SetWorkBatchSizeForTesting(size_t work_batch_size);
73 TaskQueueManager* GetTaskQueueManagerForTesting(); 76 TaskQueueManager* GetTaskQueueManagerForTesting();
74 77
(...skipping 11 matching lines...) Expand all
86 89
87 const char* tracing_category_; 90 const char* tracing_category_;
88 const char* disabled_by_default_tracing_category_; 91 const char* disabled_by_default_tracing_category_;
89 92
90 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); 93 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper);
91 }; 94 };
92 95
93 } // namespace scheduler 96 } // namespace scheduler
94 97
95 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ 98 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | components/scheduler/child/scheduler_helper.cc » ('j') | components/scheduler/child/task_queue_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698