| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project 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 V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ | 5 #ifndef V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ |
| 6 #define V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ | 6 #define V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "include/v8-platform.h" | 10 #include "include/v8-platform.h" |
| 11 #include "src/base/macros.h" | 11 #include "src/base/macros.h" |
| 12 #include "src/base/platform/mutex.h" | 12 #include "src/base/platform/mutex.h" |
| 13 #include "src/libplatform/task-queue.h" | 13 #include "src/libplatform/task-queue.h" |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace platform { |
| 17 | 17 |
| 18 class TaskQueue; | 18 class TaskQueue; |
| 19 class Thread; | 19 class Thread; |
| 20 class WorkerThread; | 20 class WorkerThread; |
| 21 | 21 |
| 22 class DefaultPlatform : public Platform { | 22 class DefaultPlatform : public Platform { |
| 23 public: | 23 public: |
| 24 DefaultPlatform(); | 24 DefaultPlatform(); |
| 25 virtual ~DefaultPlatform(); | 25 virtual ~DefaultPlatform(); |
| 26 | 26 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 40 base::Mutex lock_; | 40 base::Mutex lock_; |
| 41 bool initialized_; | 41 bool initialized_; |
| 42 int thread_pool_size_; | 42 int thread_pool_size_; |
| 43 std::vector<WorkerThread*> thread_pool_; | 43 std::vector<WorkerThread*> thread_pool_; |
| 44 TaskQueue queue_; | 44 TaskQueue queue_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(DefaultPlatform); | 46 DISALLOW_COPY_AND_ASSIGN(DefaultPlatform); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 | 49 |
| 50 } } // namespace v8::internal | 50 } } // namespace v8::platform |
| 51 | 51 |
| 52 | 52 |
| 53 #endif // V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ | 53 #endif // V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ |
| OLD | NEW |