OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_TASK_RUNNER_IMPL_
H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_TASK_RUNNER_IMPL_
H_ |
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_TASK_RUNNER_IMPL_
H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_TASK_RUNNER_IMPL_
H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 // WebTaskRunner implementation: | 25 // WebTaskRunner implementation: |
26 void PostDelayedTask(const WebTraceLocation&, | 26 void PostDelayedTask(const WebTraceLocation&, |
27 base::OnceClosure, | 27 base::OnceClosure, |
28 double delay_ms) override; | 28 double delay_ms) override; |
29 bool RunsTasksOnCurrentThread() override; | 29 bool RunsTasksOnCurrentThread() override; |
30 double VirtualTimeSeconds() const override; | 30 double VirtualTimeSeconds() const override; |
31 double MonotonicallyIncreasingVirtualTimeSeconds() const override; | 31 double MonotonicallyIncreasingVirtualTimeSeconds() const override; |
32 base::SingleThreadTaskRunner* ToSingleThreadTaskRunner() override; | 32 base::SingleThreadTaskRunner* ToSingleThreadTaskRunner() override; |
33 | 33 |
| 34 TaskQueue* GetTaskQueue() const { return task_queue_.get(); } |
| 35 |
34 private: | 36 private: |
35 explicit WebTaskRunnerImpl(scoped_refptr<TaskQueue> task_queue); | 37 explicit WebTaskRunnerImpl(scoped_refptr<TaskQueue> task_queue); |
36 ~WebTaskRunnerImpl() override; | 38 ~WebTaskRunnerImpl() override; |
37 | 39 |
38 base::TimeTicks Now() const; | 40 base::TimeTicks Now() const; |
39 | 41 |
40 scoped_refptr<TaskQueue> task_queue_; | 42 scoped_refptr<TaskQueue> task_queue_; |
41 | 43 |
42 DISALLOW_COPY_AND_ASSIGN(WebTaskRunnerImpl); | 44 DISALLOW_COPY_AND_ASSIGN(WebTaskRunnerImpl); |
43 }; | 45 }; |
44 | 46 |
45 } // namespace scheduler | 47 } // namespace scheduler |
46 } // namespace blink | 48 } // namespace blink |
47 | 49 |
48 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_TASK_RUNNER_IM
PL_H_ | 50 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_TASK_RUNNER_IM
PL_H_ |
OLD | NEW |