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

Side by Side Diff: third_party/WebKit/Source/platform/WebTaskRunner.cpp

Issue 2443103003: Remove unused include in sequenced_worker_pool.h (Closed)
Patch Set: merge up to r429325 Created 4 years, 1 month 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 "public/platform/WebTaskRunner.h" 5 #include "public/platform/WebTaskRunner.h"
6 6
7 #include "base/single_thread_task_runner.h"
8
7 namespace blink { 9 namespace blink {
8 10
9 // This class holds a reference to a TaskHandle to keep it alive while a task is 11 // This class holds a reference to a TaskHandle to keep it alive while a task is
10 // pending in a task queue, and clears the reference on the task disposal, so 12 // pending in a task queue, and clears the reference on the task disposal, so
11 // that it doesn't leave a circular reference like below: 13 // that it doesn't leave a circular reference like below:
12 // struct Foo : GarbageCollected<Foo> { 14 // struct Foo : GarbageCollected<Foo> {
13 // void bar() {} 15 // void bar() {}
14 // RefPtr<TaskHandle> m_handle; 16 // RefPtr<TaskHandle> m_handle;
15 // }; 17 // };
16 // 18 //
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DCHECK(runsTasksOnCurrentThread()); 113 DCHECK(runsTasksOnCurrentThread());
112 RefPtr<TaskHandle> handle = adoptRef(new TaskHandle(std::move(task))); 114 RefPtr<TaskHandle> handle = adoptRef(new TaskHandle(std::move(task)));
113 postDelayedTask(location, 115 postDelayedTask(location,
114 WTF::bind(&TaskHandle::run, handle->asWeakPtr(), 116 WTF::bind(&TaskHandle::run, handle->asWeakPtr(),
115 TaskHandle::CancelOnTaskDestruction(handle)), 117 TaskHandle::CancelOnTaskDestruction(handle)),
116 delayMs); 118 delayMs);
117 return handle; 119 return handle;
118 } 120 }
119 121
120 } // namespace blink 122 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/DEPS ('k') | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698