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

Side by Side Diff: third_party/WebKit/public/platform/WebTaskRunner.h

Issue 2357043003: Remove WebCallbackTask (Closed)
Patch Set: fix Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 WebTaskRunner_h 5 #ifndef WebTaskRunner_h
6 #define WebTaskRunner_h 6 #define WebTaskRunner_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "public/platform/WebTraceLocation.h" 9 #include "public/platform/WebTraceLocation.h"
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 }; 33 };
34 34
35 // Schedule a task to be run on the the associated WebThread. 35 // Schedule a task to be run on the the associated WebThread.
36 // Takes ownership of |Task|. Can be called from any thread. 36 // Takes ownership of |Task|. Can be called from any thread.
37 virtual void postTask(const WebTraceLocation&, Task*) = 0; 37 virtual void postTask(const WebTraceLocation&, Task*) = 0;
38 38
39 // Schedule a task to be run after |delayMs| on the the associated WebThread . 39 // Schedule a task to be run after |delayMs| on the the associated WebThread .
40 // Takes ownership of |Task|. Can be called from any thread. 40 // Takes ownership of |Task|. Can be called from any thread.
41 virtual void postDelayedTask(const WebTraceLocation&, Task*, double delayMs) = 0; 41 virtual void postDelayedTask(const WebTraceLocation&, Task*, double delayMs) = 0;
42 42
43 // Schedule a task to be run on the the associated WebThread.
44 // Can be called from any thread.
45 virtual void postTask(const WebTraceLocation&, const base::Closure&) = 0;
alex clarke (OOO till 29th) 2016/09/21 10:38:40 Getting rid of WebCallbackTask is a good idea, but
tzik 2016/09/21 14:32:08 Ah, right. Updated. We can use SingleThreadTaskRun
46
43 // Schedule a task to be run after |delayMs| on the the associated WebThread . 47 // Schedule a task to be run after |delayMs| on the the associated WebThread .
44 // Can be called from any thread. 48 // Can be called from any thread.
45 virtual void postDelayedTask(const WebTraceLocation&, const base::Closure&, double delayMs) = 0; 49 virtual void postDelayedTask(const WebTraceLocation&, const base::Closure&, double delayMs) = 0;
46 50
47 // Returns a clone of the WebTaskRunner. 51 // Returns a clone of the WebTaskRunner.
48 virtual std::unique_ptr<WebTaskRunner> clone() = 0; 52 virtual std::unique_ptr<WebTaskRunner> clone() = 0;
49 53
50 // Returns true if the current thread is a thread on which a task may be run . 54 // Returns true if the current thread is a thread on which a task may be run .
51 // Can be called from any thread. 55 // Can be called from any thread.
52 virtual bool runsTasksOnCurrentThread() = 0; 56 virtual bool runsTasksOnCurrentThread() = 0;
(...skipping 28 matching lines...) Expand all
81 85
82 // For same-thread posting. Must be called from the associated WebThread. 86 // For same-thread posting. Must be called from the associated WebThread.
83 void postTask(const WebTraceLocation&, std::unique_ptr<WTF::Closure>); 87 void postTask(const WebTraceLocation&, std::unique_ptr<WTF::Closure>);
84 void postDelayedTask(const WebTraceLocation&, std::unique_ptr<WTF::Closure>, long long delayMs); 88 void postDelayedTask(const WebTraceLocation&, std::unique_ptr<WTF::Closure>, long long delayMs);
85 #endif 89 #endif
86 }; 90 };
87 91
88 } // namespace blink 92 } // namespace blink
89 93
90 #endif // WebTaskRunner_h 94 #endif // WebTaskRunner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698