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 COMPONENTS_HTML_VIEWER_WEB_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_WEB_SCHEDULER_IMPL_H_ |
6 #define COMPONENTS_HTML_VIEWER_WEB_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_HTML_VIEWER_WEB_SCHEDULER_IMPL_H_ |
7 | 7 |
8 #include "third_party/WebKit/public/platform/WebScheduler.h" | 8 #include "third_party/WebKit/public/platform/WebScheduler.h" |
9 #include "third_party/WebKit/public/platform/WebThread.h" | 9 #include "third_party/WebKit/public/platform/WebThread.h" |
10 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 10 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
11 | 11 |
12 namespace html_viewer { | 12 namespace html_viewer { |
13 | 13 |
14 class WebSchedulerImpl : public blink::WebScheduler { | 14 class WebSchedulerImpl : public blink::WebScheduler { |
15 public: | 15 public: |
16 explicit WebSchedulerImpl( | 16 explicit WebSchedulerImpl( |
17 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 17 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
18 virtual ~WebSchedulerImpl(); | 18 virtual ~WebSchedulerImpl(); |
19 | 19 |
20 private: | 20 private: |
21 // blink::WebScheduler overrides. | 21 // blink::WebScheduler overrides. |
22 virtual void postIdleTask(const blink::WebTraceLocation& location, | 22 virtual void postIdleTask(const blink::WebTraceLocation& location, |
23 blink::WebThread::IdleTask* task); | 23 blink::WebThread::IdleTask* task); |
24 virtual void postLoadingTask(const blink::WebTraceLocation& location, | 24 virtual void postLoadingTask(const blink::WebTraceLocation& location, |
25 blink::WebThread::Task* task); | 25 blink::WebThread::Task* task); |
26 virtual void postTimerTask(const blink::WebTraceLocation& location, | 26 virtual void postTimerTask(const blink::WebTraceLocation& location, |
27 blink::WebThread::Task* task, | 27 blink::WebThread::Task* task, |
28 long long delayMs); | 28 long long delayMs); |
| 29 virtual void postShutdownTask(const blink::WebTraceLocation& location, |
| 30 blink::WebThread::Task* task, |
| 31 long long delayMs); |
| 32 virtual void preShutdown(); |
29 | 33 |
30 static void RunIdleTask(scoped_ptr<blink::WebThread::IdleTask> task); | 34 static void RunIdleTask(scoped_ptr<blink::WebThread::IdleTask> task); |
31 static void RunTask(scoped_ptr<blink::WebThread::Task> task); | 35 static void RunTask(scoped_ptr<blink::WebThread::Task> task); |
32 | 36 |
33 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 37 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
34 | 38 |
35 DISALLOW_COPY_AND_ASSIGN(WebSchedulerImpl); | 39 DISALLOW_COPY_AND_ASSIGN(WebSchedulerImpl); |
36 }; | 40 }; |
37 | 41 |
38 } // namespace html_viewer | 42 } // namespace html_viewer |
39 | 43 |
40 #endif // COMPONENTS_HTML_VIEWER_WEB_SCHEDULER_IMPL_H_ | 44 #endif // COMPONENTS_HTML_VIEWER_WEB_SCHEDULER_IMPL_H_ |
OLD | NEW |