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: components/scheduler/renderer/renderer_scheduler_impl.h

Issue 1368643002: Add a signal to the scheduler that a navigation is expected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename for Sami Created 5 years, 2 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/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "components/scheduler/child/idle_helper.h" 10 #include "components/scheduler/child/idle_helper.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void DidHandleInputEventOnCompositorThread( 47 void DidHandleInputEventOnCompositorThread(
48 const blink::WebInputEvent& web_input_event, 48 const blink::WebInputEvent& web_input_event,
49 InputEventState event_state) override; 49 InputEventState event_state) override;
50 void DidHandleInputEventOnMainThread( 50 void DidHandleInputEventOnMainThread(
51 const blink::WebInputEvent& web_input_event) override; 51 const blink::WebInputEvent& web_input_event) override;
52 void DidAnimateForInputOnCompositorThread() override; 52 void DidAnimateForInputOnCompositorThread() override;
53 void OnRendererHidden() override; 53 void OnRendererHidden() override;
54 void OnRendererVisible() override; 54 void OnRendererVisible() override;
55 void OnRendererBackgrounded() override; 55 void OnRendererBackgrounded() override;
56 void OnRendererForegrounded() override; 56 void OnRendererForegrounded() override;
57 void OnPageLoadStarted() override; 57 void AddPendingNavigation() override;
58 void RemovePendingNavigation() override;
59 void OnNavigationStarted() override;
58 bool IsHighPriorityWorkAnticipated() override; 60 bool IsHighPriorityWorkAnticipated() override;
59 bool ShouldYieldForHighPriorityWork() override; 61 bool ShouldYieldForHighPriorityWork() override;
60 bool CanExceedIdleDeadlineIfRequired() const override; 62 bool CanExceedIdleDeadlineIfRequired() const override;
61 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; 63 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override;
62 void RemoveTaskObserver( 64 void RemoveTaskObserver(
63 base::MessageLoop::TaskObserver* task_observer) override; 65 base::MessageLoop::TaskObserver* task_observer) override;
64 void Shutdown() override; 66 void Shutdown() override;
65 void SuspendTimerQueue() override; 67 void SuspendTimerQueue() override;
66 void ResumeTimerQueue() override; 68 void ResumeTimerQueue() override;
67 void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) override; 69 void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) override;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 234
233 TaskCostEstimator loading_task_cost_estimator; 235 TaskCostEstimator loading_task_cost_estimator;
234 TaskCostEstimator timer_task_cost_estimator; 236 TaskCostEstimator timer_task_cost_estimator;
235 cc::RollingTimeDeltaHistory short_idle_period_duration; 237 cc::RollingTimeDeltaHistory short_idle_period_duration;
236 UseCase current_use_case; 238 UseCase current_use_case;
237 Policy current_policy; 239 Policy current_policy;
238 base::TimeTicks current_policy_expiration_time; 240 base::TimeTicks current_policy_expiration_time;
239 base::TimeTicks estimated_next_frame_begin; 241 base::TimeTicks estimated_next_frame_begin;
240 base::TimeDelta expected_short_idle_period_duration; 242 base::TimeDelta expected_short_idle_period_duration;
241 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero. 243 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero.
244 int navigation_task_expected_count;
242 bool renderer_hidden; 245 bool renderer_hidden;
243 bool renderer_backgrounded; 246 bool renderer_backgrounded;
244 bool timer_queue_suspension_when_backgrounded_enabled; 247 bool timer_queue_suspension_when_backgrounded_enabled;
245 bool timer_queue_suspended_when_backgrounded; 248 bool timer_queue_suspended_when_backgrounded;
246 bool was_shutdown; 249 bool was_shutdown;
247 bool loading_tasks_seem_expensive; 250 bool loading_tasks_seem_expensive;
248 bool timer_tasks_seem_expensive; 251 bool timer_tasks_seem_expensive;
249 bool touchstart_expected_soon; 252 bool touchstart_expected_soon;
250 bool have_seen_a_begin_main_frame; 253 bool have_seen_a_begin_main_frame;
251 }; 254 };
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 314
312 PollableThreadSafeFlag policy_may_need_update_; 315 PollableThreadSafeFlag policy_may_need_update_;
313 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; 316 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_;
314 317
315 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); 318 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl);
316 }; 319 };
317 320
318 } // namespace scheduler 321 } // namespace scheduler
319 322
320 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ 323 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « components/scheduler/renderer/renderer_scheduler.h ('k') | components/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698