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

Side by Side Diff: components/scheduler/renderer/web_view_scheduler_impl.cc

Issue 1697523002: Allow immediate tasks to run even when virtual time can't advance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 #include "components/scheduler/renderer/web_view_scheduler_impl.h" 5 #include "components/scheduler/renderer/web_view_scheduler_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/scheduler/base/virtual_time_domain.h" 8 #include "components/scheduler/base/virtual_time_domain.h"
9 #include "components/scheduler/child/scheduler_tqm_delegate.h" 9 #include "components/scheduler/child/scheduler_tqm_delegate.h"
10 #include "components/scheduler/renderer/auto_advancing_virtual_time_domain.h" 10 #include "components/scheduler/renderer/auto_advancing_virtual_time_domain.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool allow_virtual_time_to_advance) { 102 bool allow_virtual_time_to_advance) {
103 if (allow_virtual_time_to_advance_ == allow_virtual_time_to_advance) 103 if (allow_virtual_time_to_advance_ == allow_virtual_time_to_advance)
104 return; 104 return;
105 105
106 allow_virtual_time_to_advance_ = allow_virtual_time_to_advance; 106 allow_virtual_time_to_advance_ = allow_virtual_time_to_advance;
107 107
108 if (virtual_time_domain_) { 108 if (virtual_time_domain_) {
109 virtual_time_domain_->SetCanAdvanceVirtualTime( 109 virtual_time_domain_->SetCanAdvanceVirtualTime(
110 allow_virtual_time_to_advance); 110 allow_virtual_time_to_advance);
111 } 111 }
112
113 for (WebFrameSchedulerImpl* frame_scheduler : frame_schedulers_) {
114 frame_scheduler->OnVirtualTimePumpPolicyChanged();
115 }
116 }
117
118 TaskQueue::PumpPolicy WebViewSchedulerImpl::GetVirtualTimePumpPolicy() const {
119 return allow_virtual_time_to_advance_ ? TaskQueue::PumpPolicy::AUTO
120 : TaskQueue::PumpPolicy::MANUAL;
121 } 112 }
122 113
123 } // namespace scheduler 114 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698