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

Side by Side Diff: components/scheduler/renderer/renderer_scheduler_impl.h

Issue 1832673002: Add testRunner.runIdleTasks() to force idle tasks to run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 9 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 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 COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_
6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); 98 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler);
99 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); 99 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler);
100 100
101 // Test helpers. 101 // Test helpers.
102 SchedulerHelper* GetSchedulerHelperForTesting(); 102 SchedulerHelper* GetSchedulerHelperForTesting();
103 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); 103 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting();
104 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); 104 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting();
105 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); 105 IdleTimeEstimator* GetIdleTimeEstimatorForTesting();
106 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; 106 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const;
107 void RunIdleTasksForTesting(const base::Closure&);
107 108
108 base::TickClock* tick_clock() const; 109 base::TickClock* tick_clock() const;
109 110
110 RealTimeDomain* real_time_domain() const { 111 RealTimeDomain* real_time_domain() const {
111 return helper_.real_time_domain(); 112 return helper_.real_time_domain();
112 } 113 }
113 114
114 ThrottlingHelper* throttling_helper() { return throttling_helper_.get(); } 115 ThrottlingHelper* throttling_helper() { return throttling_helper_.get(); }
115 116
116 private: 117 private:
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 410
410 PollableThreadSafeFlag policy_may_need_update_; 411 PollableThreadSafeFlag policy_may_need_update_;
411 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; 412 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_;
412 413
413 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); 414 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl);
414 }; 415 };
415 416
416 } // namespace scheduler 417 } // namespace scheduler
417 418
418 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ 419 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698