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

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

Issue 2442663002: Add ResumeRenderer to RendererScheduler for Purge+Suspend. (Closed)
Patch Set: Fixed comment. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void DidCommitFrameToCompositor() override; 98 void DidCommitFrameToCompositor() override;
99 void DidHandleInputEventOnCompositorThread( 99 void DidHandleInputEventOnCompositorThread(
100 const WebInputEvent& web_input_event, 100 const WebInputEvent& web_input_event,
101 InputEventState event_state) override; 101 InputEventState event_state) override;
102 void DidHandleInputEventOnMainThread( 102 void DidHandleInputEventOnMainThread(
103 const WebInputEvent& web_input_event) override; 103 const WebInputEvent& web_input_event) override;
104 void DidAnimateForInputOnCompositorThread() override; 104 void DidAnimateForInputOnCompositorThread() override;
105 void OnRendererBackgrounded() override; 105 void OnRendererBackgrounded() override;
106 void OnRendererForegrounded() override; 106 void OnRendererForegrounded() override;
107 void SuspendRenderer() override; 107 void SuspendRenderer() override;
108 void ResumeRenderer() override;
108 void AddPendingNavigation(WebScheduler::NavigatingFrameType type) override; 109 void AddPendingNavigation(WebScheduler::NavigatingFrameType type) override;
109 void RemovePendingNavigation(WebScheduler::NavigatingFrameType type) override; 110 void RemovePendingNavigation(WebScheduler::NavigatingFrameType type) override;
110 void OnNavigationStarted() override; 111 void OnNavigationStarted() override;
111 bool IsHighPriorityWorkAnticipated() override; 112 bool IsHighPriorityWorkAnticipated() override;
112 bool ShouldYieldForHighPriorityWork() override; 113 bool ShouldYieldForHighPriorityWork() override;
113 bool CanExceedIdleDeadlineIfRequired() const override; 114 bool CanExceedIdleDeadlineIfRequired() const override;
114 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; 115 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override;
115 void RemoveTaskObserver( 116 void RemoveTaskObserver(
116 base::MessageLoop::TaskObserver* task_observer) override; 117 base::MessageLoop::TaskObserver* task_observer) override;
117 void Shutdown() override; 118 void Shutdown() override;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 base::TimeTicks now, 320 base::TimeTicks now,
320 base::TimeDelta* expected_use_case_duration) const; 321 base::TimeDelta* expected_use_case_duration) const;
321 322
322 // An input event of some sort happened, the policy may need updating. 323 // An input event of some sort happened, the policy may need updating.
323 void UpdateForInputEventOnCompositorThread(WebInputEvent::Type type, 324 void UpdateForInputEventOnCompositorThread(WebInputEvent::Type type,
324 InputEventState input_event_state); 325 InputEventState input_event_state);
325 326
326 // Helpers for safely suspending/resuming the timer queue after a 327 // Helpers for safely suspending/resuming the timer queue after a
327 // background/foreground signal. 328 // background/foreground signal.
328 void SuspendTimerQueueWhenBackgrounded(); 329 void SuspendTimerQueueWhenBackgrounded();
329 void ResumeTimerQueueWhenForegrounded(); 330 void ResumeTimerQueueWhenForegroundedOrResumed();
330 331
331 // The task cost estimators and the UserModel need to be reset upon page 332 // The task cost estimators and the UserModel need to be reset upon page
332 // nagigation. This function does that. Must be called from the main thread. 333 // nagigation. This function does that. Must be called from the main thread.
333 void ResetForNavigationLocked(); 334 void ResetForNavigationLocked();
334 335
335 // Estimates the maximum task length that won't cause a jank based on the 336 // Estimates the maximum task length that won't cause a jank based on the
336 // current system state. Must be called from the main thread. 337 // current system state. Must be called from the main thread.
337 base::TimeDelta EstimateLongestJankFreeTaskDuration() const; 338 base::TimeDelta EstimateLongestJankFreeTaskDuration() const;
338 339
339 // Report an intervention to all WebViews in this process. 340 // Report an intervention to all WebViews in this process.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 PollableThreadSafeFlag policy_may_need_update_; 480 PollableThreadSafeFlag policy_may_need_update_;
480 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; 481 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_;
481 482
482 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); 483 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl);
483 }; 484 };
484 485
485 } // namespace scheduler 486 } // namespace scheduler
486 } // namespace blink 487 } // namespace blink
487 488
488 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_IMPL_H_ 489 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698