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

Side by Side Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/inspector/ThreadDebugger.h" 5 #include "core/inspector/ThreadDebugger.h"
6 6
7 #include "bindings/core/v8/SourceLocation.h" 7 #include "bindings/core/v8/SourceLocation.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/core/v8/V8DOMException.h" 9 #include "bindings/core/v8/V8DOMException.h"
10 #include "bindings/core/v8/V8DOMTokenList.h" 10 #include "bindings/core/v8/V8DOMTokenList.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 if (m_timerData[index] == data) { 366 if (m_timerData[index] == data) {
367 m_timers[index]->stop(); 367 m_timers[index]->stop();
368 m_timerCallbacks.remove(index); 368 m_timerCallbacks.remove(index);
369 m_timers.remove(index); 369 m_timers.remove(index);
370 m_timerData.remove(index); 370 m_timerData.remove(index);
371 return; 371 return;
372 } 372 }
373 } 373 }
374 } 374 }
375 375
376 void ThreadDebugger::onTimer(Timer<ThreadDebugger>* timer) 376 void ThreadDebugger::onTimer(TimerBase* timer)
377 { 377 {
378 for (size_t index = 0; index < m_timers.size(); ++index) { 378 for (size_t index = 0; index < m_timers.size(); ++index) {
379 if (m_timers[index].get() == timer) { 379 if (m_timers[index].get() == timer) {
380 m_timerCallbacks[index](m_timerData[index]); 380 m_timerCallbacks[index](m_timerData[index]);
381 return; 381 return;
382 } 382 }
383 } 383 }
384 } 384 }
385 385
386 } // namespace blink 386 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698