This patch combine three patch which is related to "--gcov" flag.
[platform/framework/web/chromium-efl.git] / gin / v8_foreground_task_runner.h
1 // Copyright 2017 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GIN_V8_FOREGROUND_TASK_RUNNER_H_
6 #define GIN_V8_FOREGROUND_TASK_RUNNER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "gin/v8_foreground_task_runner_base.h"
10
11 namespace base {
12 class SingleThreadTaskRunner;
13 }
14
15 namespace gin {
16
17 class V8ForegroundTaskRunner : public V8ForegroundTaskRunnerBase {
18  public:
19   V8ForegroundTaskRunner(
20       scoped_refptr<base::SingleThreadTaskRunner> task_runner);
21
22   ~V8ForegroundTaskRunner() override;
23
24   // v8::Platform implementation.
25   void PostTask(std::unique_ptr<v8::Task> task) override;
26
27   void PostNonNestableTask(std::unique_ptr<v8::Task> task) override;
28
29   void PostDelayedTask(std::unique_ptr<v8::Task> task,
30                        double delay_in_seconds) override;
31
32   void PostNonNestableDelayedTask(std::unique_ptr<v8::Task> task,
33                                   double delay_in_seconds) override;
34
35   void PostIdleTask(std::unique_ptr<v8::IdleTask> task) override;
36
37   bool NonNestableTasksEnabled() const override;
38   bool NonNestableDelayedTasksEnabled() const override;
39
40  private:
41   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
42 };
43
44 }  // namespace gin
45
46 #endif  // GIN_V8_FOREGROUND_TASK_RUNNER_H_