| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 PerformanceEntryVector getEntries() const; | 75 PerformanceEntryVector getEntries() const; |
| 76 PerformanceEntryVector getEntriesByType(const String& entryType); | 76 PerformanceEntryVector getEntriesByType(const String& entryType); |
| 77 PerformanceEntryVector getEntriesByName(const String& name, const String& en
tryType); | 77 PerformanceEntryVector getEntriesByName(const String& name, const String& en
tryType); |
| 78 | 78 |
| 79 void webkitClearResourceTimings(); | 79 void webkitClearResourceTimings(); |
| 80 void webkitSetResourceTimingBufferSize(unsigned); | 80 void webkitSetResourceTimingBufferSize(unsigned); |
| 81 | 81 |
| 82 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); | 82 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); |
| 83 | 83 |
| 84 void clearFrameTimings(); |
| 85 void setFrameTimingBufferSize(unsigned); |
| 86 |
| 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(frametimingbufferfull); |
| 88 |
| 84 void addResourceTiming(const ResourceTimingInfo&, Document*); | 89 void addResourceTiming(const ResourceTimingInfo&, Document*); |
| 85 | 90 |
| 91 void addRenderTiming(Document*, unsigned, double); |
| 92 |
| 93 void addCompositeTiming(Document*, unsigned, double); |
| 94 |
| 86 void mark(const String& markName, ExceptionState&); | 95 void mark(const String& markName, ExceptionState&); |
| 87 void clearMarks(const String& markName); | 96 void clearMarks(const String& markName); |
| 88 | 97 |
| 89 void measure(const String& measureName, const String& startMark, const Strin
g& endMark, ExceptionState&); | 98 void measure(const String& measureName, const String& startMark, const Strin
g& endMark, ExceptionState&); |
| 90 void clearMeasures(const String& measureName); | 99 void clearMeasures(const String& measureName); |
| 91 | 100 |
| 92 DECLARE_VIRTUAL_TRACE(); | 101 DECLARE_VIRTUAL_TRACE(); |
| 93 | 102 |
| 94 private: | 103 private: |
| 95 explicit Performance(LocalFrame*); | 104 explicit Performance(LocalFrame*); |
| 96 | 105 |
| 97 bool isResourceTimingBufferFull(); | 106 bool isResourceTimingBufferFull(); |
| 98 void addResourceTimingBuffer(PerformanceEntry*); | 107 void addResourceTimingBuffer(PerformanceEntry*); |
| 99 | 108 |
| 100 mutable Member<PerformanceNavigation> m_navigation; | 109 mutable Member<PerformanceNavigation> m_navigation; |
| 101 mutable Member<PerformanceTiming> m_timing; | 110 mutable Member<PerformanceTiming> m_timing; |
| 102 | 111 |
| 112 bool isFrameTimingBufferFull(); |
| 113 void addFrameTimingBuffer(PerformanceEntry*); |
| 114 |
| 115 PerformanceEntryVector m_frameTimingBuffer; |
| 116 unsigned m_frameTimingBufferSize; |
| 103 PerformanceEntryVector m_resourceTimingBuffer; | 117 PerformanceEntryVector m_resourceTimingBuffer; |
| 104 unsigned m_resourceTimingBufferSize; | 118 unsigned m_resourceTimingBufferSize; |
| 105 double m_referenceTime; | 119 double m_referenceTime; |
| 106 | 120 |
| 107 Member<MemoryInfo> m_memoryInfo; | 121 Member<MemoryInfo> m_memoryInfo; |
| 108 Member<UserTiming> m_userTiming; | 122 Member<UserTiming> m_userTiming; |
| 109 }; | 123 }; |
| 110 | 124 |
| 111 } // namespace blink | 125 } // namespace blink |
| 112 | 126 |
| 113 #endif // Performance_h | 127 #endif // Performance_h |
| OLD | NEW |