| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |