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

Unified Diff: content/child/worker_task_runner.h

Issue 393283003: Add WorkerThread based methods for start/stop of worker threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add math.h to make gn build happy. Created 6 years, 5 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 | « content/child/webthread_impl.cc ('k') | content/child/worker_task_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/worker_task_runner.h
diff --git a/content/child/worker_task_runner.h b/content/child/worker_task_runner.h
index 6230551989b5d457677df988acb9d954c6fb8bf7..3d720934e48edbfb646bac8c308662e1c8088ad3 100644
--- a/content/child/worker_task_runner.h
+++ b/content/child/worker_task_runner.h
@@ -12,6 +12,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/thread_local.h"
#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebThread.h"
#include "third_party/WebKit/public/platform/WebWorkerRunLoop.h"
namespace content {
@@ -39,10 +40,14 @@ class CONTENT_EXPORT WorkerTaskRunner {
void OnWorkerRunLoopStarted(const blink::WebWorkerRunLoop& loop);
void OnWorkerRunLoopStopped(const blink::WebWorkerRunLoop& loop);
+ void OnWorkerThreadStarted(blink::WebThread* thread);
+ void OnWorkerThreadStopped(blink::WebThread* thread);
+
private:
friend class WorkerTaskRunnerTest;
typedef std::map<int, blink::WebWorkerRunLoop> IDToLoopMap;
+ typedef std::map<int, blink::WebThread*> IDToThreadMap;
~WorkerTaskRunner();
@@ -51,6 +56,7 @@ class CONTENT_EXPORT WorkerTaskRunner {
base::AtomicSequenceNumber id_sequence_;
IDToLoopMap loop_map_;
+ IDToThreadMap thread_map_;
base::Lock loop_map_lock_;
};
« no previous file with comments | « content/child/webthread_impl.cc ('k') | content/child/worker_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698