| OLD | NEW |
| 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/timing/PerformanceObserver.h" | 5 #include "core/timing/PerformanceObserver.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/timing/PerformanceBase.h" | 10 #include "core/timing/PerformanceBase.h" |
| 11 #include "core/timing/PerformanceEntry.h" | 11 #include "core/timing/PerformanceEntry.h" |
| 12 #include "core/timing/PerformanceObserverCallback.h" | 12 #include "core/timing/PerformanceObserverCallback.h" |
| 13 #include "core/timing/PerformanceObserverEntryList.h" | 13 #include "core/timing/PerformanceObserverEntryList.h" |
| 14 #include "core/timing/PerformanceObserverInit.h" | 14 #include "core/timing/PerformanceObserverInit.h" |
| 15 #include "platform/Timer.h" | 15 #include "platform/Timer.h" |
| 16 #include "wtf/MainThread.h" | |
| 17 #include <algorithm> | 16 #include <algorithm> |
| 18 | 17 |
| 19 namespace blink { | 18 namespace blink { |
| 20 | 19 |
| 21 PerformanceObserver* PerformanceObserver::create(PerformanceBase* performance, P
erformanceObserverCallback* callback) | 20 PerformanceObserver* PerformanceObserver::create(PerformanceBase* performance, P
erformanceObserverCallback* callback) |
| 22 { | 21 { |
| 23 ASSERT(isMainThread()); | 22 ASSERT(isMainThread()); |
| 24 return new PerformanceObserver(performance, callback); | 23 return new PerformanceObserver(performance, callback); |
| 25 } | 24 } |
| 26 | 25 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 96 } |
| 98 | 97 |
| 99 DEFINE_TRACE(PerformanceObserver) | 98 DEFINE_TRACE(PerformanceObserver) |
| 100 { | 99 { |
| 101 visitor->trace(m_callback); | 100 visitor->trace(m_callback); |
| 102 visitor->trace(m_performance); | 101 visitor->trace(m_performance); |
| 103 visitor->trace(m_performanceEntries); | 102 visitor->trace(m_performanceEntries); |
| 104 } | 103 } |
| 105 | 104 |
| 106 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |