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

Side by Side Diff: webkit/child/worker_task_runner.h

Issue 148333009: Move webkit/child/webkitplatformsupport_child_impl to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for Windows and Android builds, plus fix nits Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/child/webthemeengine_impl_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 WEBKIT_CHILD_WORKER_TASK_RUNNER_H_ 5 #ifndef WEBKIT_CHILD_WORKER_TASK_RUNNER_H_
6 #define WEBKIT_CHILD_WORKER_TASK_RUNNER_H_ 6 #define WEBKIT_CHILD_WORKER_TASK_RUNNER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 virtual ~Observer() {} 30 virtual ~Observer() {}
31 virtual void OnWorkerRunLoopStopped() = 0; 31 virtual void OnWorkerRunLoopStopped() = 0;
32 }; 32 };
33 // Add/Remove an observer that will get notified when the current worker run 33 // Add/Remove an observer that will get notified when the current worker run
34 // loop is stopping. This observer will not get notified when other threads 34 // loop is stopping. This observer will not get notified when other threads
35 // are stopping. It's only valid to call these on a worker thread. 35 // are stopping. It's only valid to call these on a worker thread.
36 void AddStopObserver(Observer* observer); 36 void AddStopObserver(Observer* observer);
37 void RemoveStopObserver(Observer* observer); 37 void RemoveStopObserver(Observer* observer);
38 38
39 void OnWorkerRunLoopStarted(const blink::WebWorkerRunLoop& loop);
40 void OnWorkerRunLoopStopped(const blink::WebWorkerRunLoop& loop);
41
39 private: 42 private:
40 friend class WebKitPlatformSupportChildImpl;
41 friend class WorkerTaskRunnerTest; 43 friend class WorkerTaskRunnerTest;
42 44
43 typedef std::map<int, blink::WebWorkerRunLoop> IDToLoopMap; 45 typedef std::map<int, blink::WebWorkerRunLoop> IDToLoopMap;
44 46
45 ~WorkerTaskRunner(); 47 ~WorkerTaskRunner();
46 void OnWorkerRunLoopStarted(const blink::WebWorkerRunLoop& loop);
47 void OnWorkerRunLoopStopped(const blink::WebWorkerRunLoop& loop);
48 48
49 struct ThreadLocalState; 49 struct ThreadLocalState;
50 base::ThreadLocalPointer<ThreadLocalState> current_tls_; 50 base::ThreadLocalPointer<ThreadLocalState> current_tls_;
51 51
52 base::AtomicSequenceNumber id_sequence_; 52 base::AtomicSequenceNumber id_sequence_;
53 IDToLoopMap loop_map_; 53 IDToLoopMap loop_map_;
54 base::Lock loop_map_lock_; 54 base::Lock loop_map_lock_;
55 }; 55 };
56 56
57 } // namespace webkit_glue 57 } // namespace webkit_glue
58 58
59 #endif // WEBKIT_CHILD_WORKER_TASK_RUNNER_H_ 59 #endif // WEBKIT_CHILD_WORKER_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « webkit/child/webthemeengine_impl_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698