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 PerformanceTiming* timing() const; | 74 PerformanceTiming* timing() const; |
75 double now() const; | 75 double now() const; |
76 | 76 |
77 PerformanceEntryVector getEntries() const; | 77 PerformanceEntryVector getEntries() const; |
78 PerformanceEntryVector getEntriesByType(const String& entryType); | 78 PerformanceEntryVector getEntriesByType(const String& entryType); |
79 PerformanceEntryVector getEntriesByName(const String& name, const String& en
tryType); | 79 PerformanceEntryVector getEntriesByName(const String& name, const String& en
tryType); |
80 | 80 |
81 void webkitClearResourceTimings(); | 81 void webkitClearResourceTimings(); |
82 void webkitSetResourceTimingBufferSize(unsigned); | 82 void webkitSetResourceTimingBufferSize(unsigned); |
83 | 83 |
| 84 void webkitClearSmoothnessTimings(); |
| 85 void webkitSetSmoothnessTimingBufferSize(unsigned); |
| 86 |
84 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); | 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); |
85 | 88 |
| 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitsmoothnesstimingbufferfull); |
| 90 |
86 void addResourceTiming(const ResourceTimingInfo&, Document*); | 91 void addResourceTiming(const ResourceTimingInfo&, Document*); |
87 | 92 |
| 93 void addSmoothnessTiming(const String&, Document*, unsigned, double); |
| 94 |
88 void mark(const String& markName, ExceptionState&); | 95 void mark(const String& markName, ExceptionState&); |
89 void clearMarks(const String& markName); | 96 void clearMarks(const String& markName); |
90 | 97 |
91 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&); |
92 void clearMeasures(const String& measureName); | 99 void clearMeasures(const String& measureName); |
93 | 100 |
94 virtual void trace(Visitor*) OVERRIDE; | 101 virtual void trace(Visitor*) OVERRIDE; |
95 | 102 |
96 private: | 103 private: |
97 explicit Performance(LocalFrame*); | 104 explicit Performance(LocalFrame*); |
98 | 105 |
99 bool isResourceTimingBufferFull(); | 106 bool isResourceTimingBufferFull(); |
100 void addResourceTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry>); | 107 void addResourceTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry>); |
101 | 108 |
| 109 bool isSmoothnessTimingBufferFull(); |
| 110 void addSmoothnessTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry>); |
| 111 |
102 mutable RefPtrWillBeMember<PerformanceNavigation> m_navigation; | 112 mutable RefPtrWillBeMember<PerformanceNavigation> m_navigation; |
103 mutable RefPtrWillBeMember<PerformanceTiming> m_timing; | 113 mutable RefPtrWillBeMember<PerformanceTiming> m_timing; |
104 | 114 |
105 PerformanceEntryVector m_resourceTimingBuffer; | 115 PerformanceEntryVector m_resourceTimingBuffer; |
106 unsigned m_resourceTimingBufferSize; | 116 unsigned m_resourceTimingBufferSize; |
| 117 PerformanceEntryVector m_smoothnessTimingBuffer; |
| 118 unsigned m_smoothnessTimingBufferSize; |
107 double m_referenceTime; | 119 double m_referenceTime; |
108 | 120 |
109 RefPtrWillBeMember<UserTiming> m_userTiming; | 121 RefPtrWillBeMember<UserTiming> m_userTiming; |
110 }; | 122 }; |
111 | 123 |
112 } // namespace blink | 124 } // namespace blink |
113 | 125 |
114 #endif // Performance_h | 126 #endif // Performance_h |
OLD | NEW |