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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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/dom/ScriptedIdleTaskController.h" 5 #include "core/dom/ScriptedIdleTaskController.h"
6 6
7 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
8 #include "core/dom/IdleRequestCallback.h" 8 #include "core/dom/IdleRequestCallback.h"
9 #include "core/dom/IdleRequestOptions.h" 9 #include "core/dom/IdleRequestOptions.h"
10 #include "core/inspector/InspectorTraceEvents.h" 10 #include "core/inspector/InspectorTraceEvents.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 double deadlineSeconds, 137 double deadlineSeconds,
138 IdleDeadline::CallbackType callbackType) { 138 IdleDeadline::CallbackType callbackType) {
139 if (!m_callbacks.contains(id)) 139 if (!m_callbacks.contains(id))
140 return; 140 return;
141 141
142 if (m_suspended) { 142 if (m_suspended) {
143 if (callbackType == IdleDeadline::CallbackType::CalledByTimeout) { 143 if (callbackType == IdleDeadline::CallbackType::CalledByTimeout) {
144 // Queue for execution when we are resumed. 144 // Queue for execution when we are resumed.
145 m_pendingTimeouts.append(id); 145 m_pendingTimeouts.append(id);
146 } 146 }
147 // Just drop callbacks called while suspended, these will be reposted on the idle task queue when we are resumed. 147 // Just drop callbacks called while suspended, these will be reposted on the
148 // idle task queue when we are resumed.
148 return; 149 return;
149 } 150 }
150 151
151 runCallback(id, deadlineSeconds, callbackType); 152 runCallback(id, deadlineSeconds, callbackType);
152 } 153 }
153 154
154 void ScriptedIdleTaskController::runCallback( 155 void ScriptedIdleTaskController::runCallback(
155 CallbackId id, 156 CallbackId id,
156 double deadlineSeconds, 157 double deadlineSeconds,
157 IdleDeadline::CallbackType callbackType) { 158 IdleDeadline::CallbackType callbackType) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 RefPtr<internal::IdleRequestCallbackWrapper> callbackWrapper = 209 RefPtr<internal::IdleRequestCallbackWrapper> callbackWrapper =
209 internal::IdleRequestCallbackWrapper::create(callback.key, this); 210 internal::IdleRequestCallbackWrapper::create(callback.key, this);
210 m_scheduler->postIdleTask( 211 m_scheduler->postIdleTask(
211 BLINK_FROM_HERE, 212 BLINK_FROM_HERE,
212 WTF::bind(&internal::IdleRequestCallbackWrapper::idleTaskFired, 213 WTF::bind(&internal::IdleRequestCallbackWrapper::idleTaskFired,
213 callbackWrapper)); 214 callbackWrapper));
214 } 215 }
215 } 216 }
216 217
217 } // namespace blink 218 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698