Index: content/browser/browser_thread.h |
=================================================================== |
--- content/browser/browser_thread.h (revision 85766) |
+++ content/browser/browser_thread.h (working copy) |
@@ -6,13 +6,15 @@ |
#define CONTENT_BROWSER_BROWSER_THREAD_H_ |
#pragma once |
-#if defined(UNIT_TEST) |
-#include "base/logging.h" |
-#endif // UNIT_TEST |
+#include "base/callback.h" |
#include "base/synchronization/lock.h" |
#include "base/task.h" |
#include "base/threading/thread.h" |
+#if defined(UNIT_TEST) |
+#include "base/logging.h" |
+#endif // UNIT_TEST |
+ |
namespace base { |
class MessageLoopProxy; |
} |
@@ -105,6 +107,23 @@ |
// the target thread may already have a Quit message in its queue. |
static bool PostTask(ID identifier, |
const tracked_objects::Location& from_here, |
+ const base::Closure& task); |
+ static bool PostDelayedTask(ID identifier, |
+ const tracked_objects::Location& from_here, |
+ const base::Closure& task, |
+ int64 delay_ms); |
+ static bool PostNonNestableTask(ID identifier, |
+ const tracked_objects::Location& from_here, |
+ const base::Closure& task); |
+ static bool PostNonNestableDelayedTask( |
+ ID identifier, |
+ const tracked_objects::Location& from_here, |
+ const base::Closure& task, |
+ int64 delay_ms); |
+ |
+ // TODO(brettw) remove these when Task->Closure conversion is done. |
+ static bool PostTask(ID identifier, |
+ const tracked_objects::Location& from_here, |
Task* task); |
static bool PostDelayedTask(ID identifier, |
const tracked_objects::Location& from_here, |
@@ -203,12 +222,19 @@ |
// Common initialization code for the constructors. |
void Initialize(); |
+ // TODO(brettw) remove this variant when Task->Closure migration is complete. |
static bool PostTaskHelper( |
ID identifier, |
const tracked_objects::Location& from_here, |
Task* task, |
int64 delay_ms, |
bool nestable); |
+ static bool PostTaskHelper( |
+ ID identifier, |
+ const tracked_objects::Location& from_here, |
+ const base::Closure& task, |
+ int64 delay_ms, |
+ bool nestable); |
// The identifier of this thread. Only one thread can exist with a given |
// identifier at a given time. |