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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 ~Performance(); | 57 ~Performance(); |
58 | 58 |
59 virtual const AtomicString& interfaceName() const; | 59 virtual const AtomicString& interfaceName() const; |
60 virtual ScriptExecutionContext* scriptExecutionContext() const; | 60 virtual ScriptExecutionContext* scriptExecutionContext() const; |
61 | 61 |
62 PassRefPtr<MemoryInfo> memory() const; | 62 PassRefPtr<MemoryInfo> memory() const; |
63 PerformanceNavigation* navigation() const; | 63 PerformanceNavigation* navigation() const; |
64 PerformanceTiming* timing() const; | 64 PerformanceTiming* timing() const; |
65 double now() const; | 65 double now() const; |
66 | 66 |
67 Vector<RefPtr<PerformanceEntry> > webkitGetEntries() const; | 67 Vector<RefPtr<PerformanceEntry> > getEntries() const; |
68 Vector<RefPtr<PerformanceEntry> > webkitGetEntriesByType(const String& entry
Type); | 68 Vector<RefPtr<PerformanceEntry> > getEntriesByType(const String& entryType); |
69 Vector<RefPtr<PerformanceEntry> > webkitGetEntriesByName(const String& name,
const String& entryType); | 69 Vector<RefPtr<PerformanceEntry> > getEntriesByName(const String& name, const
String& entryType); |
70 | 70 |
71 void webkitClearResourceTimings(); | 71 void webkitClearResourceTimings(); |
72 void webkitSetResourceTimingBufferSize(unsigned int); | 72 void webkitSetResourceTimingBufferSize(unsigned int); |
73 | 73 |
74 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); | 74 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); |
75 | 75 |
76 void addResourceTiming(const String& initiatorName, Document*, const Resourc
eRequest&, const ResourceResponse&, double initiationTime, double finishTime); | 76 void addResourceTiming(const String& initiatorName, Document*, const Resourc
eRequest&, const ResourceResponse&, double initiationTime, double finishTime); |
77 | 77 |
78 using RefCounted<Performance>::ref; | 78 using RefCounted<Performance>::ref; |
79 using RefCounted<Performance>::deref; | 79 using RefCounted<Performance>::deref; |
80 | 80 |
81 void webkitMark(const String& markName, ExceptionCode&); | 81 void mark(const String& markName, ExceptionCode&); |
82 void webkitClearMarks(const String& markName); | 82 void clearMarks(const String& markName); |
83 | 83 |
84 void webkitMeasure(const String& measureName, const String& startMark, const
String& endMark, ExceptionCode&); | 84 void measure(const String& measureName, const String& startMark, const Strin
g& endMark, ExceptionCode&); |
85 void webkitClearMeasures(const String& measureName); | 85 void clearMeasures(const String& measureName); |
86 | 86 |
87 private: | 87 private: |
88 explicit Performance(Frame*); | 88 explicit Performance(Frame*); |
89 | 89 |
90 virtual void refEventTarget() { ref(); } | 90 virtual void refEventTarget() { ref(); } |
91 virtual void derefEventTarget() { deref(); } | 91 virtual void derefEventTarget() { deref(); } |
92 virtual EventTargetData* eventTargetData(); | 92 virtual EventTargetData* eventTargetData(); |
93 virtual EventTargetData* ensureEventTargetData(); | 93 virtual EventTargetData* ensureEventTargetData(); |
94 bool isResourceTimingBufferFull(); | 94 bool isResourceTimingBufferFull(); |
95 | 95 |
96 EventTargetData m_eventTargetData; | 96 EventTargetData m_eventTargetData; |
97 | 97 |
98 mutable RefPtr<PerformanceNavigation> m_navigation; | 98 mutable RefPtr<PerformanceNavigation> m_navigation; |
99 mutable RefPtr<PerformanceTiming> m_timing; | 99 mutable RefPtr<PerformanceTiming> m_timing; |
100 | 100 |
101 Vector<RefPtr<PerformanceEntry> > m_resourceTimingBuffer; | 101 Vector<RefPtr<PerformanceEntry> > m_resourceTimingBuffer; |
102 unsigned m_resourceTimingBufferSize; | 102 unsigned m_resourceTimingBufferSize; |
103 | 103 |
104 RefPtr<UserTiming> m_userTiming; | 104 RefPtr<UserTiming> m_userTiming; |
105 }; | 105 }; |
106 | 106 |
107 } | 107 } |
108 | 108 |
109 #endif // Performance_h | 109 #endif // Performance_h |
OLD | NEW |