| 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 COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_DOMAIN_H_ |
| 6 #define COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_DOMAIN_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "components/scheduler/base/lazy_now.h" | 16 #include "platform/scheduler/base/lazy_now.h" |
| 17 #include "components/scheduler/base/task_queue_impl.h" | 17 #include "platform/scheduler/base/task_queue_impl.h" |
| 18 #include "components/scheduler/scheduler_export.h" | |
| 19 | 18 |
| 19 namespace blink { |
| 20 namespace scheduler { | 20 namespace scheduler { |
| 21 namespace internal { | 21 namespace internal { |
| 22 class TaskQueueImpl; | 22 class TaskQueueImpl; |
| 23 } // internal | 23 } // internal |
| 24 class TaskQueueManager; | 24 class TaskQueueManager; |
| 25 class TaskQueueManagerDelegate; | 25 class TaskQueueManagerDelegate; |
| 26 | 26 |
| 27 class SCHEDULER_EXPORT TimeDomain { | 27 class BLINK_PLATFORM_EXPORT TimeDomain { |
| 28 public: | 28 public: |
| 29 class SCHEDULER_EXPORT Observer { | 29 class BLINK_PLATFORM_EXPORT Observer { |
| 30 public: | 30 public: |
| 31 virtual ~Observer() {} | 31 virtual ~Observer() {} |
| 32 | 32 |
| 33 // Called when an empty TaskQueue registered with this TimeDomain has a task | 33 // Called when an empty TaskQueue registered with this TimeDomain has a task |
| 34 // enqueued. | 34 // enqueued. |
| 35 virtual void OnTimeDomainHasImmediateWork() = 0; | 35 virtual void OnTimeDomainHasImmediateWork() = 0; |
| 36 | 36 |
| 37 // Called when a TaskQueue registered with this TimeDomain has a delayed | 37 // Called when a TaskQueue registered with this TimeDomain has a delayed |
| 38 // task enqueued. | 38 // task enqueued. |
| 39 virtual void OnTimeDomainHasDelayedWork() = 0; | 39 virtual void OnTimeDomainHasDelayedWork() = 0; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 std::set<internal::TaskQueueImpl*> updatable_queue_set_; | 146 std::set<internal::TaskQueueImpl*> updatable_queue_set_; |
| 147 | 147 |
| 148 Observer* observer_; // NOT OWNED. | 148 Observer* observer_; // NOT OWNED. |
| 149 | 149 |
| 150 base::ThreadChecker main_thread_checker_; | 150 base::ThreadChecker main_thread_checker_; |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(TimeDomain); | 152 DISALLOW_COPY_AND_ASSIGN(TimeDomain); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace scheduler | 155 } // namespace scheduler |
| 156 } // namespace blink |
| 156 | 157 |
| 157 #endif // COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 158 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_DOMAIN_H_ |
| OLD | NEW |