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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h

Issue 2259013003: Move and rename TaskTimeTracker to public interface exposed to WebThread, use in WebPerf Agent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remaining fixes for remove observer Created 4 years, 4 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_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"
11 #include "platform/scheduler/base/long_task_tracker.h"
12 #include "platform/scheduler/base/pollable_thread_safe_flag.h" 11 #include "platform/scheduler/base/pollable_thread_safe_flag.h"
13 #include "platform/scheduler/base/queueing_time_estimator.h" 12 #include "platform/scheduler/base/queueing_time_estimator.h"
14 #include "platform/scheduler/base/task_time_tracker.h" 13 #include "platform/scheduler/base/task_time_tracker.h"
15 #include "platform/scheduler/child/idle_helper.h" 14 #include "platform/scheduler/child/idle_helper.h"
16 #include "platform/scheduler/child/scheduler_helper.h" 15 #include "platform/scheduler/child/scheduler_helper.h"
17 #include "platform/scheduler/renderer/deadline_task_runner.h" 16 #include "platform/scheduler/renderer/deadline_task_runner.h"
18 #include "platform/scheduler/renderer/idle_time_estimator.h" 17 #include "platform/scheduler/renderer/idle_time_estimator.h"
19 #include "platform/scheduler/renderer/render_widget_signals.h" 18 #include "platform/scheduler/renderer/render_widget_signals.h"
20 #include "public/platform/scheduler/renderer/renderer_scheduler.h" 19 #include "public/platform/scheduler/renderer/renderer_scheduler.h"
21 #include "platform/scheduler/renderer/task_cost_estimator.h" 20 #include "platform/scheduler/renderer/task_cost_estimator.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 141
143 void RegisterTimeDomain(TimeDomain* time_domain); 142 void RegisterTimeDomain(TimeDomain* time_domain);
144 void UnregisterTimeDomain(TimeDomain* time_domain); 143 void UnregisterTimeDomain(TimeDomain* time_domain);
145 144
146 // Tells the scheduler that all TaskQueues should use virtual time. 145 // Tells the scheduler that all TaskQueues should use virtual time.
147 void EnableVirtualTime(); 146 void EnableVirtualTime();
148 147
149 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); 148 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler);
150 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); 149 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler);
151 150
152 LongTaskTracker::LongTaskTiming GetLongTaskTiming(); 151 void AddTaskTimeObserver(WebThread::TaskTimeObserver* task_time_observer);
152 void RemoveTaskTimeObserver(WebThread::TaskTimeObserver* task_time_observer);
153 153
154 // Test helpers. 154 // Test helpers.
155 SchedulerHelper* GetSchedulerHelperForTesting(); 155 SchedulerHelper* GetSchedulerHelperForTesting();
156 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); 156 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting();
157 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); 157 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting();
158 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); 158 IdleTimeEstimator* GetIdleTimeEstimatorForTesting();
159 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; 159 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const;
160 void RunIdleTasksForTesting(const base::Closure& callback); 160 void RunIdleTasksForTesting(const base::Closure& callback);
161 void EndIdlePeriodForTesting(const base::Closure& callback, 161 void EndIdlePeriodForTesting(const base::Closure& callback,
162 base::TimeTicks time_remaining); 162 base::TimeTicks time_remaining);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 struct MainThreadOnly { 374 struct MainThreadOnly {
375 MainThreadOnly(RendererSchedulerImpl* renderer_scheduler_impl, 375 MainThreadOnly(RendererSchedulerImpl* renderer_scheduler_impl,
376 const scoped_refptr<TaskQueue>& compositor_task_runner, 376 const scoped_refptr<TaskQueue>& compositor_task_runner,
377 base::TickClock* time_source); 377 base::TickClock* time_source);
378 ~MainThreadOnly(); 378 ~MainThreadOnly();
379 379
380 TaskCostEstimator loading_task_cost_estimator; 380 TaskCostEstimator loading_task_cost_estimator;
381 TaskCostEstimator timer_task_cost_estimator; 381 TaskCostEstimator timer_task_cost_estimator;
382 QueueingTimeEstimator queueing_time_estimator; 382 QueueingTimeEstimator queueing_time_estimator;
383 LongTaskTracker long_task_tracker;
384 IdleTimeEstimator idle_time_estimator; 383 IdleTimeEstimator idle_time_estimator;
385 UseCase current_use_case; 384 UseCase current_use_case;
386 Policy current_policy; 385 Policy current_policy;
387 base::TimeTicks current_policy_expiration_time; 386 base::TimeTicks current_policy_expiration_time;
388 base::TimeTicks estimated_next_frame_begin; 387 base::TimeTicks estimated_next_frame_begin;
389 base::TimeDelta compositor_frame_interval; 388 base::TimeDelta compositor_frame_interval;
390 base::TimeDelta longest_jank_free_task_duration; 389 base::TimeDelta longest_jank_free_task_duration;
391 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero. 390 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero.
392 int navigation_task_expected_count; 391 int navigation_task_expected_count;
393 ExpensiveTaskPolicy expensive_task_policy; 392 ExpensiveTaskPolicy expensive_task_policy;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 PollableThreadSafeFlag policy_may_need_update_; 477 PollableThreadSafeFlag policy_may_need_update_;
479 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; 478 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_;
480 479
481 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); 480 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl);
482 }; 481 };
483 482
484 } // namespace scheduler 483 } // namespace scheduler
485 } // namespace blink 484 } // namespace blink
486 485
487 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_IMPL_H_ 486 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698