Chromium Code Reviews| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 void RemoveTaskTimeObserver(TaskTimeObserver* task_time_observer); | 57 void RemoveTaskTimeObserver(TaskTimeObserver* task_time_observer); |
| 58 | 58 |
| 59 // Shuts down the scheduler by dropping any remaining pending work in the work | 59 // Shuts down the scheduler by dropping any remaining pending work in the work |
| 60 // queues. After this call any work posted to the task runners will be | 60 // queues. After this call any work posted to the task runners will be |
| 61 // silently dropped. | 61 // silently dropped. |
| 62 void Shutdown(); | 62 void Shutdown(); |
| 63 | 63 |
| 64 // Returns true if Shutdown() has been called. Otherwise returns false. | 64 // Returns true if Shutdown() has been called. Otherwise returns false. |
| 65 bool IsShutdown() const { return !task_queue_manager_.get(); } | 65 bool IsShutdown() const { return !task_queue_manager_.get(); } |
| 66 | 66 |
| 67 void CheckOnValidThread() const { | 67 inline void CheckOnValidThread() const { |
|
alex clarke (OOO till 29th)
2016/09/07 15:13:07
Out of curiosity why was this needed? Did it actua
altimin
2016/09/09 15:43:57
I was thinking about calling CheckOnValidThread in
| |
| 68 DCHECK(thread_checker_.CalledOnValidThread()); | 68 DCHECK(thread_checker_.CalledOnValidThread()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Creates a new TaskQueue with the given |spec|. | 71 // Creates a new TaskQueue with the given |spec|. |
| 72 scoped_refptr<TaskQueue> NewTaskQueue(const TaskQueue::Spec& spec); | 72 scoped_refptr<TaskQueue> NewTaskQueue(const TaskQueue::Spec& spec); |
| 73 | 73 |
| 74 class BLINK_PLATFORM_EXPORT Observer { | 74 class BLINK_PLATFORM_EXPORT Observer { |
| 75 public: | 75 public: |
| 76 virtual ~Observer() {} | 76 virtual ~Observer() {} |
| 77 | 77 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 const char* tracing_category_; | 115 const char* tracing_category_; |
| 116 const char* disabled_by_default_tracing_category_; | 116 const char* disabled_by_default_tracing_category_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); | 118 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace scheduler | 121 } // namespace scheduler |
| 122 } // namespace blink | 122 } // namespace blink |
| 123 | 123 |
| 124 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H _ | 124 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H _ |
| OLD | NEW |