| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "core/frame/DOMTimer.h" | 27 #include "core/frame/DOMTimer.h" |
| 28 | 28 |
| 29 #include "core/dom/ExecutionContext.h" | 29 #include "core/dom/ExecutionContext.h" |
| 30 #include "core/inspector/InspectorInstrumentation.h" | 30 #include "core/inspector/InspectorInstrumentation.h" |
| 31 #include "core/inspector/InspectorTraceEvents.h" | 31 #include "core/inspector/InspectorTraceEvents.h" |
| 32 #include "platform/TraceEvent.h" | 32 #include "platform/tracing/TraceEvent.h" |
| 33 #include "wtf/CurrentTime.h" | 33 #include "wtf/CurrentTime.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 static const int maxIntervalForUserGestureForwarding = | 37 static const int maxIntervalForUserGestureForwarding = |
| 38 1000; // One second matches Gecko. | 38 1000; // One second matches Gecko. |
| 39 static const int maxTimerNestingLevel = 5; | 39 static const int maxTimerNestingLevel = 5; |
| 40 static const double oneMillisecond = 0.001; | 40 static const double oneMillisecond = 0.001; |
| 41 // Chromium uses a minimum timer interval of 4ms. We'd like to go | 41 // Chromium uses a minimum timer interval of 4ms. We'd like to go |
| 42 // lower; however, there are poorly coded websites out there which do | 42 // lower; however, there are poorly coded websites out there which do |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 WebTaskRunner* DOMTimer::timerTaskRunner() const { | 173 WebTaskRunner* DOMTimer::timerTaskRunner() const { |
| 174 return getExecutionContext()->timers()->timerTaskRunner(); | 174 return getExecutionContext()->timers()->timerTaskRunner(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 DEFINE_TRACE(DOMTimer) { | 177 DEFINE_TRACE(DOMTimer) { |
| 178 visitor->trace(m_action); | 178 visitor->trace(m_action); |
| 179 SuspendableTimer::trace(visitor); | 179 SuspendableTimer::trace(visitor); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace blink | 182 } // namespace blink |
| OLD | NEW |