| 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_frame_scheduler_impl.h" | 5 #include "components/scheduler/renderer/web_frame_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "components/scheduler/base/real_time_domain.h" | 7 #include "components/scheduler/base/real_time_domain.h" |
| 8 #include "components/scheduler/base/virtual_time_domain.h" | 8 #include "components/scheduler/base/virtual_time_domain.h" |
| 9 #include "components/scheduler/child/web_task_runner_impl.h" | 9 #include "components/scheduler/child/web_task_runner_impl.h" |
| 10 #include "components/scheduler/renderer/auto_advancing_virtual_time_domain.h" | 10 #include "components/scheduler/renderer/auto_advancing_virtual_time_domain.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 if (loading_task_queue_) { | 120 if (loading_task_queue_) { |
| 121 loading_task_queue_->SetTimeDomain( | 121 loading_task_queue_->SetTimeDomain( |
| 122 parent_web_view_scheduler_->virtual_time_domain()); | 122 parent_web_view_scheduler_->virtual_time_domain()); |
| 123 loading_task_queue_->SetPumpPolicy( | 123 loading_task_queue_->SetPumpPolicy( |
| 124 parent_web_view_scheduler_->GetVirtualTimePumpPolicy()); | 124 parent_web_view_scheduler_->GetVirtualTimePumpPolicy()); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 void WebFrameSchedulerImpl::OnVirtualTimePumpPolicyChanged() { | 128 void WebFrameSchedulerImpl::OnVirtualTimePumpPolicyChanged() { |
| 129 DCHECK(parent_web_view_scheduler_); |
| 129 if (!parent_web_view_scheduler_->virtual_time_domain()) | 130 if (!parent_web_view_scheduler_->virtual_time_domain()) |
| 130 return; | 131 return; |
| 131 | 132 |
| 132 if (timer_task_queue_) { | 133 if (timer_task_queue_) { |
| 133 timer_task_queue_->SetPumpPolicy( | 134 timer_task_queue_->SetPumpPolicy( |
| 134 parent_web_view_scheduler_->GetVirtualTimePumpPolicy()); | 135 parent_web_view_scheduler_->GetVirtualTimePumpPolicy()); |
| 135 } | 136 } |
| 136 | 137 |
| 137 if (loading_task_queue_) { | 138 if (loading_task_queue_) { |
| 138 loading_task_queue_->SetPumpPolicy( | 139 loading_task_queue_->SetPumpPolicy( |
| 139 parent_web_view_scheduler_->GetVirtualTimePumpPolicy()); | 140 parent_web_view_scheduler_->GetVirtualTimePumpPolicy()); |
| 140 } | 141 } |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace scheduler | 144 } // namespace scheduler |
| OLD | NEW |