| OLD | NEW |
| 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 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" | 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 void RendererSchedulerImpl::ResetForNavigationLocked() { | 1466 void RendererSchedulerImpl::ResetForNavigationLocked() { |
| 1467 helper_.CheckOnValidThread(); | 1467 helper_.CheckOnValidThread(); |
| 1468 any_thread_lock_.AssertAcquired(); | 1468 any_thread_lock_.AssertAcquired(); |
| 1469 AnyThread().user_model.Reset(helper_.scheduler_tqm_delegate()->NowTicks()); | 1469 AnyThread().user_model.Reset(helper_.scheduler_tqm_delegate()->NowTicks()); |
| 1470 AnyThread().have_seen_touchstart = false; | 1470 AnyThread().have_seen_touchstart = false; |
| 1471 MainThreadOnly().loading_task_cost_estimator.Clear(); | 1471 MainThreadOnly().loading_task_cost_estimator.Clear(); |
| 1472 MainThreadOnly().timer_task_cost_estimator.Clear(); | 1472 MainThreadOnly().timer_task_cost_estimator.Clear(); |
| 1473 MainThreadOnly().idle_time_estimator.Clear(); | 1473 MainThreadOnly().idle_time_estimator.Clear(); |
| 1474 MainThreadOnly().have_seen_a_begin_main_frame = false; | 1474 MainThreadOnly().have_seen_a_begin_main_frame = false; |
| 1475 MainThreadOnly().have_reported_blocking_intervention_since_navigation = false; | 1475 MainThreadOnly().have_reported_blocking_intervention_since_navigation = false; |
| 1476 for (WebViewSchedulerImpl* web_view_scheduler : |
| 1477 MainThreadOnly().web_view_schedulers) { |
| 1478 web_view_scheduler->OnNavigation(); |
| 1479 } |
| 1476 UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED); | 1480 UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED); |
| 1477 } | 1481 } |
| 1478 | 1482 |
| 1479 void RendererSchedulerImpl::SetTopLevelBlameContext( | 1483 void RendererSchedulerImpl::SetTopLevelBlameContext( |
| 1480 base::trace_event::BlameContext* blame_context) { | 1484 base::trace_event::BlameContext* blame_context) { |
| 1481 // Any task that runs in the default task runners belongs to the context of | 1485 // Any task that runs in the default task runners belongs to the context of |
| 1482 // all frames (as opposed to a particular frame). Note that the task itself | 1486 // all frames (as opposed to a particular frame). Note that the task itself |
| 1483 // may still enter a more specific blame context if necessary. | 1487 // may still enter a more specific blame context if necessary. |
| 1484 // | 1488 // |
| 1485 // Per-frame task runners (loading, timers, etc.) are configured with a more | 1489 // Per-frame task runners (loading, timers, etc.) are configured with a more |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 case v8::PERFORMANCE_LOAD: | 1694 case v8::PERFORMANCE_LOAD: |
| 1691 return "load"; | 1695 return "load"; |
| 1692 default: | 1696 default: |
| 1693 NOTREACHED(); | 1697 NOTREACHED(); |
| 1694 return nullptr; | 1698 return nullptr; |
| 1695 } | 1699 } |
| 1696 } | 1700 } |
| 1697 | 1701 |
| 1698 } // namespace scheduler | 1702 } // namespace scheduler |
| 1699 } // namespace blink | 1703 } // namespace blink |
| OLD | NEW |