| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_BASE_WORKER_POOL_H_ | 5 #ifndef CC_BASE_WORKER_POOL_H_ |
| 6 #define CC_BASE_WORKER_POOL_H_ | 6 #define CC_BASE_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 virtual bool IsCheap() = 0; | 25 virtual bool IsCheap() = 0; |
| 26 | 26 |
| 27 virtual void Run() = 0; | 27 virtual void Run() = 0; |
| 28 | 28 |
| 29 virtual void RunOnThread(unsigned thread_index) = 0; | 29 virtual void RunOnThread(unsigned thread_index) = 0; |
| 30 | 30 |
| 31 void DidComplete(); | 31 void DidComplete(); |
| 32 | 32 |
| 33 protected: | 33 protected: |
| 34 WorkerPoolTask(const base::Closure& reply); | 34 explicit WorkerPoolTask(const base::Closure& reply); |
| 35 | 35 |
| 36 const base::Closure reply_; | 36 const base::Closure reply_; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace internal | 39 } // namespace internal |
| 40 | 40 |
| 41 class CC_EXPORT WorkerPoolClient { | 41 class CC_EXPORT WorkerPoolClient { |
| 42 public: | 42 public: |
| 43 virtual void DidFinishDispatchingWorkerPoolCompletionCallbacks() = 0; | 43 virtual void DidFinishDispatchingWorkerPoolCompletionCallbacks() = 0; |
| 44 | 44 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Hide the gory details of the worker pool in |inner_|. | 115 // Hide the gory details of the worker pool in |inner_|. |
| 116 const scoped_ptr<Inner> inner_; | 116 const scoped_ptr<Inner> inner_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(WorkerPool); | 118 DISALLOW_COPY_AND_ASSIGN(WorkerPool); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace cc | 121 } // namespace cc |
| 122 | 122 |
| 123 #endif // CC_BASE_WORKER_POOL_H_ | 123 #endif // CC_BASE_WORKER_POOL_H_ |
| OLD | NEW |