Roll src/third_party/WebKit fe3d0ed:840e60d (svn 202350:202351)
[chromium-blink-merge.git] / gin / public / v8_idle_task_runner.h
blobf0662d19639249e859a5224db63393e53b998b86
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
3 // found in the LICENSE file.
5 #ifndef GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_
6 #define GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_
8 #include "base/basictypes.h"
9 #include "v8/include/v8-platform.h"
11 namespace gin {
13 // A V8IdleTaskRunner is a task runner for running idle tasks.
14 // Idle tasks have an unbound argument which is bound to a deadline in
15 // (v8::Platform::MonotonicallyIncreasingTime) when they are run.
16 // The idle task is expected to complete by this deadline.
17 class GIN_EXPORT V8IdleTaskRunner {
18 public:
19 virtual void PostIdleTask(v8::IdleTask* task) = 0;
21 virtual ~V8IdleTaskRunner() {}
24 } // namespace gin
26 #endif // GIN_PUBLIC_V8_IDLE_TASK_RUNNER_H_