| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_SEQUENCED_TASKRUNNER_H_ | 5 #ifndef BASE_SEQUENCED_TASKRUNNER_H_ |
| 6 #define BASE_SEQUENCED_TASKRUNNER_H_ | 6 #define BASE_SEQUENCED_TASKRUNNER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/base_export.h" | 9 #include "base/base_export.h" |
| 10 #include "base/sequenced_task_runner_helpers.h" | 10 #include "base/sequenced_task_runner_helpers.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // below. | 109 // below. |
| 110 | 110 |
| 111 bool PostNonNestableTask(const tracked_objects::Location& from_here, | 111 bool PostNonNestableTask(const tracked_objects::Location& from_here, |
| 112 const Closure& task); | 112 const Closure& task); |
| 113 | 113 |
| 114 virtual bool PostNonNestableDelayedTask( | 114 virtual bool PostNonNestableDelayedTask( |
| 115 const tracked_objects::Location& from_here, | 115 const tracked_objects::Location& from_here, |
| 116 const Closure& task, | 116 const Closure& task, |
| 117 int64 delay_ms) = 0; | 117 int64 delay_ms) = 0; |
| 118 | 118 |
| 119 virtual bool PostNonNestableDelayedTask( |
| 120 const tracked_objects::Location& from_here, |
| 121 const Closure& task, |
| 122 base::TimeDelta delay) = 0; |
| 123 |
| 119 // Submits a non-nestable task to delete the given object. Returns | 124 // Submits a non-nestable task to delete the given object. Returns |
| 120 // true if the object may be deleted at some point in the future, | 125 // true if the object may be deleted at some point in the future, |
| 121 // and false if the object definitely will not be deleted. | 126 // and false if the object definitely will not be deleted. |
| 122 template <class T> | 127 template <class T> |
| 123 bool DeleteSoon(const tracked_objects::Location& from_here, | 128 bool DeleteSoon(const tracked_objects::Location& from_here, |
| 124 const T* object) { | 129 const T* object) { |
| 125 return | 130 return |
| 126 subtle::DeleteHelperInternal<T, bool>::DeleteViaSequencedTaskRunner( | 131 subtle::DeleteHelperInternal<T, bool>::DeleteViaSequencedTaskRunner( |
| 127 this, from_here, object); | 132 this, from_here, object); |
| 128 } | 133 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 147 const void* object); | 152 const void* object); |
| 148 | 153 |
| 149 bool ReleaseSoonInternal(const tracked_objects::Location& from_here, | 154 bool ReleaseSoonInternal(const tracked_objects::Location& from_here, |
| 150 void(*releaser)(const void*), | 155 void(*releaser)(const void*), |
| 151 const void* object); | 156 const void* object); |
| 152 }; | 157 }; |
| 153 | 158 |
| 154 } // namespace base | 159 } // namespace base |
| 155 | 160 |
| 156 #endif // BASE_SEQUENCED_TASKRUNNER_H_ | 161 #endif // BASE_SEQUENCED_TASKRUNNER_H_ |
| OLD | NEW |