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 CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // They return true iff the thread existed and the task was posted. Note that | 100 // They return true iff the thread existed and the task was posted. Note that |
101 // even if the task is posted, there's no guarantee that it will run, since | 101 // even if the task is posted, there's no guarantee that it will run, since |
102 // the target thread may already have a Quit message in its queue. | 102 // the target thread may already have a Quit message in its queue. |
103 static bool PostTask(ID identifier, | 103 static bool PostTask(ID identifier, |
104 const tracked_objects::Location& from_here, | 104 const tracked_objects::Location& from_here, |
105 const base::Closure& task); | 105 const base::Closure& task); |
106 static bool PostDelayedTask(ID identifier, | 106 static bool PostDelayedTask(ID identifier, |
107 const tracked_objects::Location& from_here, | 107 const tracked_objects::Location& from_here, |
108 const base::Closure& task, | 108 const base::Closure& task, |
109 int64 delay_ms); | 109 int64 delay_ms); |
| 110 static bool PostDelayedTask(ID identifier, |
| 111 const tracked_objects::Location& from_here, |
| 112 const base::Closure& task, |
| 113 base::TimeDelta delay); |
110 static bool PostNonNestableTask(ID identifier, | 114 static bool PostNonNestableTask(ID identifier, |
111 const tracked_objects::Location& from_here, | 115 const tracked_objects::Location& from_here, |
112 const base::Closure& task); | 116 const base::Closure& task); |
113 static bool PostNonNestableDelayedTask( | 117 static bool PostNonNestableDelayedTask( |
114 ID identifier, | 118 ID identifier, |
115 const tracked_objects::Location& from_here, | 119 const tracked_objects::Location& from_here, |
116 const base::Closure& task, | 120 const base::Closure& task, |
117 int64 delay_ms); | 121 int64 delay_ms); |
| 122 static bool PostNonNestableDelayedTask( |
| 123 ID identifier, |
| 124 const tracked_objects::Location& from_here, |
| 125 const base::Closure& task, |
| 126 base::TimeDelta delay); |
118 | 127 |
119 static bool PostTaskAndReply( | 128 static bool PostTaskAndReply( |
120 ID identifier, | 129 ID identifier, |
121 const tracked_objects::Location& from_here, | 130 const tracked_objects::Location& from_here, |
122 const base::Closure& task, | 131 const base::Closure& task, |
123 const base::Closure& reply); | 132 const base::Closure& reply); |
124 | 133 |
125 template <class T> | 134 template <class T> |
126 static bool DeleteSoon(ID identifier, | 135 static bool DeleteSoon(ID identifier, |
127 const tracked_objects::Location& from_here, | 136 const tracked_objects::Location& from_here, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 private: | 262 private: |
254 friend class BrowserThreadImpl; | 263 friend class BrowserThreadImpl; |
255 | 264 |
256 BrowserThread() {} | 265 BrowserThread() {} |
257 DISALLOW_COPY_AND_ASSIGN(BrowserThread); | 266 DISALLOW_COPY_AND_ASSIGN(BrowserThread); |
258 }; | 267 }; |
259 | 268 |
260 } // namespace content | 269 } // namespace content |
261 | 270 |
262 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 271 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
OLD | NEW |