| 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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // queue. See TaskQueue::Spec::SetShouldReportWhenExecutionBlocked. | 79 // queue. See TaskQueue::Spec::SetShouldReportWhenExecutionBlocked. |
| 80 virtual void OnTriedToExecuteBlockedTask(const TaskQueue& queue, | 80 virtual void OnTriedToExecuteBlockedTask(const TaskQueue& queue, |
| 81 const base::PendingTask& task) = 0; | 81 const base::PendingTask& task) = 0; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 // Called once to set the Observer. This function is called on the main | 84 // Called once to set the Observer. This function is called on the main |
| 85 // thread. If |observer| is null, then no callbacks will occur. | 85 // thread. If |observer| is null, then no callbacks will occur. |
| 86 // Note |observer| is expected to outlive the SchedulerHelper. | 86 // Note |observer| is expected to outlive the SchedulerHelper. |
| 87 void SetObserver(Observer* observer); | 87 void SetObserver(Observer* observer); |
| 88 | 88 |
| 89 // Remove all canceled delayed tasks. |
| 90 void SweepCanceledDelayedTasks(); |
| 91 |
| 89 // Accessor methods. | 92 // Accessor methods. |
| 90 RealTimeDomain* real_time_domain() const; | 93 RealTimeDomain* real_time_domain() const; |
| 91 void RegisterTimeDomain(TimeDomain* time_domain); | 94 void RegisterTimeDomain(TimeDomain* time_domain); |
| 92 void UnregisterTimeDomain(TimeDomain* time_domain); | 95 void UnregisterTimeDomain(TimeDomain* time_domain); |
| 93 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; | 96 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; |
| 94 bool GetAndClearSystemIsQuiescentBit(); | 97 bool GetAndClearSystemIsQuiescentBit(); |
| 95 TaskQueue* CurrentlyExecutingTaskQueue() const; | 98 TaskQueue* CurrentlyExecutingTaskQueue() const; |
| 96 | 99 |
| 97 size_t GetNumberOfPendingTasks() const; | 100 size_t GetNumberOfPendingTasks() const; |
| 98 | 101 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 113 const char* tracing_category_; | 116 const char* tracing_category_; |
| 114 const char* disabled_by_default_tracing_category_; | 117 const char* disabled_by_default_tracing_category_; |
| 115 | 118 |
| 116 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); | 119 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 } // namespace scheduler | 122 } // namespace scheduler |
| 120 } // namespace blink | 123 } // namespace blink |
| 121 | 124 |
| 122 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H
_ | 125 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H
_ |
| OLD | NEW |