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 GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_ | 5 #ifndef GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_ |
6 #define GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_ | 6 #define GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "v8/include/v8-platform.h" | 8 #include "v8/include/v8-platform.h" |
10 | 9 |
11 namespace gin { | 10 namespace gin { |
12 | 11 |
13 // A V8IdleTaskRunner is a task runner for running idle tasks. | 12 // A V8IdleTaskRunner is a task runner for running idle tasks. |
14 // Idle tasks have an unbound argument which is bound to a deadline in | 13 // Idle tasks have an unbound argument which is bound to a deadline in |
15 // (v8::Platform::MonotonicallyIncreasingTime) when they are run. | 14 // (v8::Platform::MonotonicallyIncreasingTime) when they are run. |
16 // The idle task is expected to complete by this deadline. | 15 // The idle task is expected to complete by this deadline. |
17 class GIN_EXPORT V8IdleTaskRunner { | 16 class GIN_EXPORT V8IdleTaskRunner { |
18 public: | 17 public: |
19 virtual void PostIdleTask(v8::IdleTask* task) = 0; | 18 virtual void PostIdleTask(v8::IdleTask* task) = 0; |
20 | 19 |
21 virtual ~V8IdleTaskRunner() {} | 20 virtual ~V8IdleTaskRunner() {} |
22 }; | 21 }; |
23 | 22 |
24 } // namespace gin | 23 } // namespace gin |
25 | 24 |
26 #endif // GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_ | 25 #endif // GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_ |
OLD | NEW |