Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: components/scheduler/child/web_task_runner_impl.h

Issue 1308183005: Introduce WebTaskRunner Patch 2/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed one rename Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SCHEDULER_CHILD_WEB_TASK_RUNNER_H_
6 #define COMPONENTS_SCHEDULER_CHILD_WEB_TASK_RUNNER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "components/scheduler/scheduler_export.h"
12 #include "third_party/WebKit/public/platform/WebTaskRunner.h"
13
14 namespace base {
15 class SingleThreadTaskRunner;
16 } // namespace base
17
18 namespace scheduler {
19
20 class FrameQueueHolder;
Sami 2015/09/02 14:55:53 Unused?
alex clarke (OOO till 29th) 2015/09/02 15:49:33 Done.
21
22 class SCHEDULER_EXPORT WebTaskRunnerImpl : public blink::WebTaskRunner {
23 public:
24 explicit WebTaskRunnerImpl(
25 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
26
27 ~WebTaskRunnerImpl() override;
28
29 const scoped_refptr<base::SingleThreadTaskRunner>& TaskRunner() const {
Sami 2015/09/02 14:55:53 nit: task_runner()
alex clarke (OOO till 29th) 2015/09/02 15:49:33 Done.
30 return task_runner_;
31 }
32
33 // blink::WebTaskRunner implementation:
34 virtual void postTask(const blink::WebTraceLocation& web_location,
35 blink::WebTaskRunner::Task* task);
36 // TODO(alexclarke): Remove this when possible.
37 virtual void postDelayedTask(const blink::WebTraceLocation& web_location,
38 blink::WebTaskRunner::Task* task,
39 long long delayMs);
40 virtual void postDelayedTask(const blink::WebTraceLocation& web_location,
41 blink::WebTaskRunner::Task* task,
42 double delayMs);
43
44 private:
45 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
46
47 DISALLOW_COPY_AND_ASSIGN(WebTaskRunnerImpl);
48 };
49
50 } // namespace scheduler
51
52 #endif // COMPONENTS_SCHEDULER_CHILD_WEB_TASK_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698