OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 dispatchEvent(Event::create(EventTypeNames::frametimingbufferfull)); | 313 dispatchEvent(Event::create(EventTypeNames::frametimingbufferfull)); |
314 } | 314 } |
315 | 315 |
316 bool PerformanceBase::isFrameTimingBufferFull() { | 316 bool PerformanceBase::isFrameTimingBufferFull() { |
317 return m_frameTimingBuffer.size() >= m_frameTimingBufferSize; | 317 return m_frameTimingBuffer.size() >= m_frameTimingBufferSize; |
318 } | 318 } |
319 | 319 |
320 void PerformanceBase::addLongTaskTiming(double startTime, | 320 void PerformanceBase::addLongTaskTiming(double startTime, |
321 double endTime, | 321 double endTime, |
322 const String& name, | 322 const String& name, |
323 DOMWindow* culpritWindow) { | 323 const String& culpritFrameSrc, |
| 324 const String& culpritFrameId, |
| 325 const String& culpritFrameName) { |
324 if (!hasObserverFor(PerformanceEntry::LongTask)) | 326 if (!hasObserverFor(PerformanceEntry::LongTask)) |
325 return; | 327 return; |
326 PerformanceEntry* entry = PerformanceLongTaskTiming::create( | 328 PerformanceEntry* entry = PerformanceLongTaskTiming::create( |
327 monotonicTimeToDOMHighResTimeStampInMillis(startTime), | 329 monotonicTimeToDOMHighResTimeStampInMillis(startTime), |
328 monotonicTimeToDOMHighResTimeStampInMillis(endTime), name, culpritWindow); | 330 monotonicTimeToDOMHighResTimeStampInMillis(endTime), name, |
| 331 culpritFrameSrc, culpritFrameId, culpritFrameName); |
329 notifyObserversOfEntry(*entry); | 332 notifyObserversOfEntry(*entry); |
330 } | 333 } |
331 | 334 |
332 void PerformanceBase::mark(const String& markName, | 335 void PerformanceBase::mark(const String& markName, |
333 ExceptionState& exceptionState) { | 336 ExceptionState& exceptionState) { |
334 if (!m_userTiming) | 337 if (!m_userTiming) |
335 m_userTiming = UserTiming::create(*this); | 338 m_userTiming = UserTiming::create(*this); |
336 if (PerformanceEntry* entry = m_userTiming->mark(markName, exceptionState)) | 339 if (PerformanceEntry* entry = m_userTiming->mark(markName, exceptionState)) |
337 notifyObserversOfEntry(*entry); | 340 notifyObserversOfEntry(*entry); |
338 } | 341 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 visitor->trace(m_frameTimingBuffer); | 468 visitor->trace(m_frameTimingBuffer); |
466 visitor->trace(m_resourceTimingBuffer); | 469 visitor->trace(m_resourceTimingBuffer); |
467 visitor->trace(m_userTiming); | 470 visitor->trace(m_userTiming); |
468 visitor->trace(m_observers); | 471 visitor->trace(m_observers); |
469 visitor->trace(m_activeObservers); | 472 visitor->trace(m_activeObservers); |
470 visitor->trace(m_suspendedObservers); | 473 visitor->trace(m_suspendedObservers); |
471 EventTargetWithInlineData::trace(visitor); | 474 EventTargetWithInlineData::trace(visitor); |
472 } | 475 } |
473 | 476 |
474 } // namespace blink | 477 } // namespace blink |
OLD | NEW |