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 <functional> | 8 #include <functional> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 16 matching lines...) Expand all Loading... |
27 DefaultPlatform(); | 27 DefaultPlatform(); |
28 virtual ~DefaultPlatform(); | 28 virtual ~DefaultPlatform(); |
29 | 29 |
30 void SetThreadPoolSize(int thread_pool_size); | 30 void SetThreadPoolSize(int thread_pool_size); |
31 | 31 |
32 void EnsureInitialized(); | 32 void EnsureInitialized(); |
33 | 33 |
34 bool PumpMessageLoop(v8::Isolate* isolate); | 34 bool PumpMessageLoop(v8::Isolate* isolate); |
35 | 35 |
36 // v8::Platform implementation. | 36 // v8::Platform implementation. |
| 37 size_t NumberOfAvailableBackgroundThreads() override; |
37 void CallOnBackgroundThread(Task* task, | 38 void CallOnBackgroundThread(Task* task, |
38 ExpectedRuntime expected_runtime) override; | 39 ExpectedRuntime expected_runtime) override; |
39 void CallOnForegroundThread(v8::Isolate* isolate, Task* task) override; | 40 void CallOnForegroundThread(v8::Isolate* isolate, Task* task) override; |
40 void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, | 41 void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, |
41 double delay_in_seconds) override; | 42 double delay_in_seconds) override; |
42 void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) override; | 43 void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) override; |
43 bool IdleTasksEnabled(Isolate* isolate) override; | 44 bool IdleTasksEnabled(Isolate* isolate) override; |
44 double MonotonicallyIncreasingTime() override; | 45 double MonotonicallyIncreasingTime() override; |
45 const uint8_t* GetCategoryGroupEnabled(const char* name) override; | 46 const uint8_t* GetCategoryGroupEnabled(const char* name) override; |
46 const char* GetCategoryGroupName( | 47 const char* GetCategoryGroupName( |
(...skipping 28 matching lines...) Expand all Loading... |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(DefaultPlatform); | 77 DISALLOW_COPY_AND_ASSIGN(DefaultPlatform); |
77 }; | 78 }; |
78 | 79 |
79 | 80 |
80 } // namespace platform | 81 } // namespace platform |
81 } // namespace v8 | 82 } // namespace v8 |
82 | 83 |
83 | 84 |
84 #endif // V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ | 85 #endif // V8_LIBPLATFORM_DEFAULT_PLATFORM_H_ |
OLD | NEW |