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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/webthread_base.cc

Issue 2276353002: Remove after wakeup logic and replace PumpTask with Fences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Slight simplification Created 4 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // An implementation of WebThread in terms of base::MessageLoop and 5 // An implementation of WebThread in terms of base::MessageLoop and
6 // base::Thread 6 // base::Thread
7 7
8 #include "public/platform/scheduler/child/webthread_base.h" 8 #include "public/platform/scheduler/child/webthread_base.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 idle_task->run((deadline - base::TimeTicks()).InSecondsF()); 88 idle_task->run((deadline - base::TimeTicks()).InSecondsF());
89 } 89 }
90 90
91 void WebThreadBase::postIdleTask(const blink::WebTraceLocation& location, 91 void WebThreadBase::postIdleTask(const blink::WebTraceLocation& location,
92 IdleTask* idle_task) { 92 IdleTask* idle_task) {
93 GetIdleTaskRunner()->PostIdleTask( 93 GetIdleTaskRunner()->PostIdleTask(
94 location, base::Bind(&WebThreadBase::RunWebThreadIdleTask, 94 location, base::Bind(&WebThreadBase::RunWebThreadIdleTask,
95 base::Passed(base::WrapUnique(idle_task)))); 95 base::Passed(base::WrapUnique(idle_task))));
96 } 96 }
97 97
98 void WebThreadBase::postIdleTaskAfterWakeup(
99 const blink::WebTraceLocation& location,
100 IdleTask* idle_task) {
101 GetIdleTaskRunner()->PostIdleTaskAfterWakeup(
102 location, base::Bind(&WebThreadBase::RunWebThreadIdleTask,
103 base::Passed(base::WrapUnique(idle_task))));
104 }
105
106 bool WebThreadBase::isCurrentThread() const { 98 bool WebThreadBase::isCurrentThread() const {
107 return GetTaskRunner()->BelongsToCurrentThread(); 99 return GetTaskRunner()->BelongsToCurrentThread();
108 } 100 }
109 101
110 } // namespace scheduler 102 } // namespace scheduler
111 } // namespace blink 103 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698