Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: jingle/glue/thread_wrapper.h

Issue 876433003: Fix JingleThreadWrapper initialization in PNaCl plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@db
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | jingle/glue/thread_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | jingle/glue/thread_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698