Index: jingle/glue/thread_wrapper.h |
diff --git a/jingle/glue/thread_wrapper.h b/jingle/glue/thread_wrapper.h |
index 6a045bf8a365842a3698c9511303d87539a08cab..7969d2bc6af88ce7a59eff020c80b112263b872f 100644 |
--- a/jingle/glue/thread_wrapper.h |
+++ b/jingle/glue/thread_wrapper.h |
@@ -35,13 +35,15 @@ class JingleThreadWrapper : public base::MessageLoop::DestructionObserver, |
// MessageLoop is destroyed. |
static void EnsureForCurrentMessageLoop(); |
- // Returns thread wrapper for the current thread. NULL is returned |
- // if EnsureForCurrentMessageLoop() has never been called for this |
- // thread. |
+ // Creates JingleThreadWrapper for |task_runner| that runs tasks on the |
+ // current thread. |
+ static scoped_ptr<JingleThreadWrapper> WrapTaskRunner( |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
+ |
+ // Returns thread wrapper for the current thread or nullptr if it doesn't |
+ // exist. |
static JingleThreadWrapper* current(); |
- explicit JingleThreadWrapper( |
- scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
~JingleThreadWrapper() override; |
// Sets whether the thread can be used to send messages |
@@ -95,6 +97,9 @@ class JingleThreadWrapper : public base::MessageLoop::DestructionObserver, |
typedef std::map<int, rtc::Message> MessagesQueue; |
struct PendingSend; |
+ explicit JingleThreadWrapper( |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
+ |
void PostTaskInternal( |
int delay_ms, rtc::MessageHandler* handler, |
uint32 message_id, rtc::MessageData* data); |