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

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)
Patch Set: mac fix Created 3 years, 7 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
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 #include "core/html/canvas/CanvasAsyncBlobCreator.h" 5 #include "core/html/canvas/CanvasAsyncBlobCreator.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/TaskRunnerHelper.h" 9 #include "core/dom/TaskRunnerHelper.h"
10 #include "core/fileapi/Blob.h" 10 #include "core/fileapi/Blob.h"
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 idle_task_status_ == kIdleTaskCompleted); 606 idle_task_status_ == kIdleTaskCompleted);
607 this->SignalAlternativeCodePathFinishedForTesting(); 607 this->SignalAlternativeCodePathFinishedForTesting();
608 } 608 }
609 } 609 }
610 610
611 void CanvasAsyncBlobCreator::PostDelayedTaskToCurrentThread( 611 void CanvasAsyncBlobCreator::PostDelayedTaskToCurrentThread(
612 const WebTraceLocation& location, 612 const WebTraceLocation& location,
613 std::unique_ptr<WTF::Closure> task, 613 std::unique_ptr<WTF::Closure> task,
614 double delay_ms) { 614 double delay_ms) {
615 TaskRunnerHelper::Get(TaskType::kCanvasBlobSerialization, document_) 615 TaskRunnerHelper::Get(TaskType::kCanvasBlobSerialization, document_)
616 ->PostDelayedTask(location, std::move(task), delay_ms); 616 ->PostDelayedTask(location, std::move(task),
617 TimeDelta::FromMillisecondsD(delay_ms));
617 } 618 }
618 619
619 DEFINE_TRACE(CanvasAsyncBlobCreator) { 620 DEFINE_TRACE(CanvasAsyncBlobCreator) {
620 visitor->Trace(document_); 621 visitor->Trace(document_);
621 visitor->Trace(data_); 622 visitor->Trace(data_);
622 visitor->Trace(callback_); 623 visitor->Trace(callback_);
623 visitor->Trace(parent_frame_task_runner_); 624 visitor->Trace(parent_frame_task_runner_);
624 visitor->Trace(script_promise_resolver_); 625 visitor->Trace(script_promise_resolver_);
625 } 626 }
626 627
627 } // namespace blink 628 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698