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

Unified Diff: Source/platform/scheduler/Scheduler.cpp

Issue 876623002: Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/scheduler/Scheduler.h ('k') | Source/wtf/WeakPtr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scheduler/Scheduler.cpp
diff --git a/Source/platform/scheduler/Scheduler.cpp b/Source/platform/scheduler/Scheduler.cpp
index 535f114114da747340502f20efd830cbf81440d0..60e42d04443736ca6a4ae5ec49ce85ac1003036f 100644
--- a/Source/platform/scheduler/Scheduler.cpp
+++ b/Source/platform/scheduler/Scheduler.cpp
@@ -13,13 +13,15 @@
namespace blink {
class IdleTaskRunner : public WebScheduler::IdleTask {
+ WTF_MAKE_NONCOPYABLE(IdleTaskRunner);
+
public:
explicit IdleTaskRunner(PassOwnPtr<Scheduler::IdleTask> task)
: m_task(task)
{
}
- virtual ~IdleTaskRunner()
+ ~IdleTaskRunner() override
{
}
@@ -64,6 +66,12 @@ void Scheduler::postIdleTask(const TraceLocation& location, PassOwnPtr<IdleTask>
m_webScheduler->postIdleTask(WebTraceLocation(location), new IdleTaskRunner(idleTask));
}
+void Scheduler::postLoadingTask(const TraceLocation& location, WebThread::Task* task)
+{
+ if (m_webScheduler)
+ m_webScheduler->postLoadingTask(WebTraceLocation(location), task);
+}
+
bool Scheduler::shouldYieldForHighPriorityWork() const
{
if (m_webScheduler)
« no previous file with comments | « Source/platform/scheduler/Scheduler.h ('k') | Source/wtf/WeakPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698