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