| 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 "platform/scheduler/renderer/web_frame_scheduler_impl.h" | 5 #include "platform/scheduler/renderer/web_frame_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/trace_event/blame_context.h" | 8 #include "base/trace_event/blame_context.h" |
| 9 #include "platform/RuntimeEnabledFeatures.h" | 9 #include "platform/RuntimeEnabledFeatures.h" |
| 10 #include "platform/scheduler/base/real_time_domain.h" | 10 #include "platform/scheduler/base/real_time_domain.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (!unthrottled_web_task_runner_) { | 189 if (!unthrottled_web_task_runner_) { |
| 190 unthrottled_task_queue_ = renderer_scheduler_->NewUnthrottledTaskQueue( | 190 unthrottled_task_queue_ = renderer_scheduler_->NewUnthrottledTaskQueue( |
| 191 TaskQueue::QueueType::FRAME_UNTHROTTLED); | 191 TaskQueue::QueueType::FRAME_UNTHROTTLED); |
| 192 unthrottled_task_queue_->SetBlameContext(blame_context_); | 192 unthrottled_task_queue_->SetBlameContext(blame_context_); |
| 193 unthrottled_web_task_runner_ = | 193 unthrottled_web_task_runner_ = |
| 194 WebTaskRunnerImpl::Create(unthrottled_task_queue_); | 194 WebTaskRunnerImpl::Create(unthrottled_task_queue_); |
| 195 } | 195 } |
| 196 return unthrottled_web_task_runner_; | 196 return unthrottled_web_task_runner_; |
| 197 } | 197 } |
| 198 | 198 |
| 199 RefPtr<blink::WebTaskRunner> WebFrameSchedulerImpl::CompositorTaskRunner() { |
| 200 return WebTaskRunnerImpl::Create(renderer_scheduler_->CompositorTaskQueue()); |
| 201 } |
| 202 |
| 199 blink::WebViewScheduler* WebFrameSchedulerImpl::GetWebViewScheduler() { | 203 blink::WebViewScheduler* WebFrameSchedulerImpl::GetWebViewScheduler() { |
| 200 return parent_web_view_scheduler_; | 204 return parent_web_view_scheduler_; |
| 201 } | 205 } |
| 202 | 206 |
| 203 void WebFrameSchedulerImpl::DidStartLoading(unsigned long identifier) { | 207 void WebFrameSchedulerImpl::DidStartLoading(unsigned long identifier) { |
| 204 if (parent_web_view_scheduler_) | 208 if (parent_web_view_scheduler_) |
| 205 parent_web_view_scheduler_->DidStartLoading(identifier); | 209 parent_web_view_scheduler_->DidStartLoading(identifier); |
| 206 } | 210 } |
| 207 | 211 |
| 208 void WebFrameSchedulerImpl::DidStopLoading(unsigned long identifier) { | 212 void WebFrameSchedulerImpl::DidStopLoading(unsigned long identifier) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 timer_task_queue_.get()); | 315 timer_task_queue_.get()); |
| 312 } | 316 } |
| 313 } | 317 } |
| 314 | 318 |
| 315 base::WeakPtr<WebFrameSchedulerImpl> WebFrameSchedulerImpl::AsWeakPtr() { | 319 base::WeakPtr<WebFrameSchedulerImpl> WebFrameSchedulerImpl::AsWeakPtr() { |
| 316 return weak_factory_.GetWeakPtr(); | 320 return weak_factory_.GetWeakPtr(); |
| 317 } | 321 } |
| 318 | 322 |
| 319 } // namespace scheduler | 323 } // namespace scheduler |
| 320 } // namespace blink | 324 } // namespace blink |
| OLD | NEW |