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

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

Issue 1088933002: Revert of Add a WorkerScheduler and a WebThreadImplForWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 CONTENT_CHILD_SCHEDULER_SCHEDULER_HELPER_H_ 5 #ifndef CONTENT_CHILD_SCHEDULER_SCHEDULER_HELPER_H_
6 #define CONTENT_CHILD_SCHEDULER_SCHEDULER_HELPER_H_ 6 #define CONTENT_CHILD_SCHEDULER_SCHEDULER_HELPER_H_
7 7
8 #include "cc/test/test_now_source.h" 8 #include "cc/test/test_now_source.h"
9 #include "content/child/scheduler/cancelable_closure_holder.h" 9 #include "content/child/scheduler/cancelable_closure_holder.h"
10 #include "content/child/scheduler/single_thread_idle_task_runner.h" 10 #include "content/child/scheduler/single_thread_idle_task_runner.h"
(...skipping 13 matching lines...) Expand all
24 SchedulerHelperDelegate(); 24 SchedulerHelperDelegate();
25 virtual ~SchedulerHelperDelegate(); 25 virtual ~SchedulerHelperDelegate();
26 26
27 // If it's ok to enter a Long Idle period, return true. Otherwise return 27 // If it's ok to enter a Long Idle period, return true. Otherwise return
28 // false and set next_long_idle_period_delay_out so we know when to try 28 // false and set next_long_idle_period_delay_out so we know when to try
29 // again. 29 // again.
30 virtual bool CanEnterLongIdlePeriod( 30 virtual bool CanEnterLongIdlePeriod(
31 base::TimeTicks now, 31 base::TimeTicks now,
32 base::TimeDelta* next_long_idle_period_delay_out) = 0; 32 base::TimeDelta* next_long_idle_period_delay_out) = 0;
33 33
34 // Signals that the Long Idle Period hasn't started yet because the system
35 // isn't quiescent.
36 virtual void IsNotQuiescent() = 0;
37
38 private: 34 private:
39 DISALLOW_COPY_AND_ASSIGN(SchedulerHelperDelegate); 35 DISALLOW_COPY_AND_ASSIGN(SchedulerHelperDelegate);
40 }; 36 };
41 37
42 // NOTE |total_task_queue_count| must be >= TASK_QUEUE_COUNT. 38 // NOTE |total_task_queue_count| must be >= TASK_QUEUE_COUNT.
43 // Category strings must have application lifetime (statics or 39 // Category strings must have application lifetime (statics or
44 // literals). They may not include " chars. 40 // literals). They may not include " chars.
45 SchedulerHelper( 41 SchedulerHelper(
46 scoped_refptr<NestableSingleThreadTaskRunner> main_task_runner, 42 scoped_refptr<NestableSingleThreadTaskRunner> main_task_runner,
47 SchedulerHelperDelegate* scheduler_helper_delegate, 43 SchedulerHelperDelegate* scheduler_helper_delegate,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 195
200 base::WeakPtr<SchedulerHelper> weak_scheduler_ptr_; 196 base::WeakPtr<SchedulerHelper> weak_scheduler_ptr_;
201 base::WeakPtrFactory<SchedulerHelper> weak_factory_; 197 base::WeakPtrFactory<SchedulerHelper> weak_factory_;
202 198
203 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); 199 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper);
204 }; 200 };
205 201
206 } // namespace content 202 } // namespace content
207 203
208 #endif // CONTENT_CHILD_SCHEDULER_SCHEDULER_HELPER_H_ 204 #endif // CONTENT_CHILD_SCHEDULER_SCHEDULER_HELPER_H_
OLDNEW
« no previous file with comments | « content/child/scheduler/null_worker_scheduler.cc ('k') | content/child/scheduler/scheduler_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698