| 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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; | 120 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; |
| 121 void RemoveTaskObserver( | 121 void RemoveTaskObserver( |
| 122 base::MessageLoop::TaskObserver* task_observer) override; | 122 base::MessageLoop::TaskObserver* task_observer) override; |
| 123 void Shutdown() override; | 123 void Shutdown() override; |
| 124 void SuspendTimerQueue() override; | 124 void SuspendTimerQueue() override; |
| 125 void ResumeTimerQueue() override; | 125 void ResumeTimerQueue() override; |
| 126 void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) override; | 126 void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) override; |
| 127 void SetTopLevelBlameContext( | 127 void SetTopLevelBlameContext( |
| 128 base::trace_event::BlameContext* blame_context) override; | 128 base::trace_event::BlameContext* blame_context) override; |
| 129 void SetRAILModeObserver(RAILModeObserver* observer) override; | 129 void SetRAILModeObserver(RAILModeObserver* observer) override; |
| 130 bool MainThreadSeemsUnresponsive() override; | 130 bool MainThreadSeemsUnresponsive( |
| 131 base::TimeDelta main_thread_responsiveness_threshold) override; |
| 131 | 132 |
| 132 // RenderWidgetSignals::Observer implementation: | 133 // RenderWidgetSignals::Observer implementation: |
| 133 void SetAllRenderWidgetsHidden(bool hidden) override; | 134 void SetAllRenderWidgetsHidden(bool hidden) override; |
| 134 void SetHasVisibleRenderWidgetWithTouchHandler( | 135 void SetHasVisibleRenderWidgetWithTouchHandler( |
| 135 bool has_visible_render_widget_with_touch_handler) override; | 136 bool has_visible_render_widget_with_touch_handler) override; |
| 136 | 137 |
| 137 // SchedulerHelper::Observer implementation: | 138 // SchedulerHelper::Observer implementation: |
| 138 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; | 139 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; |
| 139 void OnTriedToExecuteBlockedTask(const TaskQueue& queue, | 140 void OnTriedToExecuteBlockedTask(const TaskQueue& queue, |
| 140 const base::PendingTask& task) override; | 141 const base::PendingTask& task) override; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 517 } |
| 517 | 518 |
| 518 // Don't access compositor_thread_only_, instead use CompositorThreadOnly(). | 519 // Don't access compositor_thread_only_, instead use CompositorThreadOnly(). |
| 519 CompositorThreadOnly compositor_thread_only_; | 520 CompositorThreadOnly compositor_thread_only_; |
| 520 CompositorThreadOnly& CompositorThreadOnly() { | 521 CompositorThreadOnly& CompositorThreadOnly() { |
| 521 compositor_thread_only_.CheckOnValidThread(); | 522 compositor_thread_only_.CheckOnValidThread(); |
| 522 return compositor_thread_only_; | 523 return compositor_thread_only_; |
| 523 } | 524 } |
| 524 | 525 |
| 525 PollableThreadSafeFlag policy_may_need_update_; | 526 PollableThreadSafeFlag policy_may_need_update_; |
| 526 // The maximum expected queueing time before the main thread is considered | |
| 527 // unresponsive. | |
| 528 base::TimeDelta main_thread_responsiveness_threshold_; | |
| 529 | 527 |
| 530 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 528 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 531 | 529 |
| 532 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 530 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 533 }; | 531 }; |
| 534 | 532 |
| 535 } // namespace scheduler | 533 } // namespace scheduler |
| 536 } // namespace blink | 534 } // namespace blink |
| 537 | 535 |
| 538 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_IMPL_H_ | 536 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_IMPL_H_ |
| OLD | NEW |