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

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: Make TestLongIdlePeriodTimeline test quiescence again! 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 idle_task->run((deadline - base::TimeTicks()).InSecondsF()); 80 idle_task->run((deadline - base::TimeTicks()).InSecondsF());
81 } 81 }
82 82
83 void WebThreadBase::postIdleTask(const blink::WebTraceLocation& location, 83 void WebThreadBase::postIdleTask(const blink::WebTraceLocation& location,
84 IdleTask* idle_task) { 84 IdleTask* idle_task) {
85 GetIdleTaskRunner()->PostIdleTask( 85 GetIdleTaskRunner()->PostIdleTask(
86 location, base::Bind(&WebThreadBase::RunWebThreadIdleTask, 86 location, base::Bind(&WebThreadBase::RunWebThreadIdleTask,
87 base::Passed(base::WrapUnique(idle_task)))); 87 base::Passed(base::WrapUnique(idle_task))));
88 } 88 }
89 89
90 void WebThreadBase::postIdleTaskAfterWakeup(
91 const blink::WebTraceLocation& location,
92 IdleTask* idle_task) {
93 GetIdleTaskRunner()->PostIdleTaskAfterWakeup(
94 location, base::Bind(&WebThreadBase::RunWebThreadIdleTask,
95 base::Passed(base::WrapUnique(idle_task))));
96 }
97
98 bool WebThreadBase::isCurrentThread() const { 90 bool WebThreadBase::isCurrentThread() const {
99 return GetTaskRunner()->BelongsToCurrentThread(); 91 return GetTaskRunner()->BelongsToCurrentThread();
100 } 92 }
101 93
102 } // namespace scheduler 94 } // namespace scheduler
103 } // namespace blink 95 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698