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 11 matching lines...) Expand all Loading... |
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
| 32 // http://w3c.github.io/performance-timeline/#entryType/index.html#idl-def-Perfo
rmanceEntryType |
| 33 enum PerformanceEntryType { |
| 34 "composite", |
| 35 "mark", |
| 36 "measure", |
| 37 "navigation", |
| 38 "render", |
| 39 "resource", |
| 40 "server" |
| 41 }; |
| 42 |
| 43 // http://w3c.github.io/performance-timeline/#idl-def-PerformanceObserverCallbac
k |
| 44 callback PerformanceObserverCallback = void (PerformanceObserverEntryList entrie
s, PerformanceObserver observer); |
| 45 |
32 // https://w3c.github.io/hr-time/#the-performance-interface | 46 // https://w3c.github.io/hr-time/#the-performance-interface |
33 | 47 |
34 // TODO(philipj): This interface should be [Exposed=(Window,Worker)]. Doing that | 48 // TODO(philipj): This interface should be [Exposed=(Window,Worker)]. Doing that |
35 // would allow the WorkerPerformance interface to be merged into this. | 49 // would allow the WorkerPerformance interface to be merged into this. |
36 // TODO(philipj): None of the optional DOMString arguments in this interface | 50 // TODO(philipj): None of the optional DOMString arguments in this interface |
37 // should have a default value. | 51 // should have a default value. |
38 interface Performance : EventTarget { | 52 [ |
| 53 GarbageCollected |
| 54 ] interface Performance : EventTarget { |
39 DOMHighResTimeStamp now(); | 55 DOMHighResTimeStamp now(); |
40 | 56 |
41 // Performance Timeline | 57 // Performance Timeline |
42 // https://w3c.github.io/performance-timeline/#the-performance-interface | 58 // https://w3c.github.io/performance-timeline/#the-performance-interface |
43 // TODO(philipj): getEntries() should take an optional FilterOptions argumen
t. | 59 // TODO(philipj): getEntries() should take an optional FilterOptions argumen
t. |
44 [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntries(); | 60 [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntries(); |
45 [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntriesByT
ype(DOMString entryType); | 61 [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntriesByT
ype(PerformanceEntryType entryType); |
46 [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntriesByN
ame(DOMString name, optional DOMString entryType = null); | 62 [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntriesByN
ame(DOMString name, optional PerformanceEntryType entryType = null); |
47 | 63 |
48 // Resource Timing | 64 // Resource Timing |
49 // https://w3c.github.io/resource-timing/#extensions-performance-interface | 65 // https://w3c.github.io/resource-timing/#extensions-performance-interface |
50 // TODO(philipj): Unprefix these APIs. | 66 // TODO(philipj): Unprefix these APIs. |
51 [MeasureAs=PrefixedPerformanceClearResourceTimings] void webkitClearResource
Timings(); | 67 [MeasureAs=PrefixedPerformanceClearResourceTimings] void webkitClearResource
Timings(); |
52 [MeasureAs=PrefixedPerformanceSetResourceTimingBufferSize] void webkitSetRes
ourceTimingBufferSize(unsigned long maxSize); | 68 [MeasureAs=PrefixedPerformanceSetResourceTimingBufferSize] void webkitSetRes
ourceTimingBufferSize(unsigned long maxSize); |
53 attribute EventHandler onwebkitresourcetimingbufferfull; | 69 attribute EventHandler onwebkitresourcetimingbufferfull; |
54 | 70 |
55 // Navigation Timing | 71 // Navigation Timing |
56 // http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute | 72 // http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute |
(...skipping 11 matching lines...) Expand all Loading... |
68 | 84 |
69 [MeasureAs=UnprefixedUserTiming, RaisesException] void measure(DOMString mea
sureName, optional DOMString startMark = null, optional DOMString endMark = null
); | 85 [MeasureAs=UnprefixedUserTiming, RaisesException] void measure(DOMString mea
sureName, optional DOMString startMark = null, optional DOMString endMark = null
); |
70 [MeasureAs=UnprefixedUserTiming] void clearMeasures(optional DOMString measu
reName = null); | 86 [MeasureAs=UnprefixedUserTiming] void clearMeasures(optional DOMString measu
reName = null); |
71 | 87 |
72 // Frame Timing | 88 // Frame Timing |
73 // https://w3c.github.io/frame-timing/#extensions-performance-interface | 89 // https://w3c.github.io/frame-timing/#extensions-performance-interface |
74 [RuntimeEnabled=FrameTimingSupport, MeasureAs=PerformanceFrameTiming] void c
learFrameTimings(); | 90 [RuntimeEnabled=FrameTimingSupport, MeasureAs=PerformanceFrameTiming] void c
learFrameTimings(); |
75 [RuntimeEnabled=FrameTimingSupport, MeasureAs=PerformanceFrameTiming] void s
etFrameTimingBufferSize(unsigned long maxSize); | 91 [RuntimeEnabled=FrameTimingSupport, MeasureAs=PerformanceFrameTiming] void s
etFrameTimingBufferSize(unsigned long maxSize); |
76 [RuntimeEnabled=FrameTimingSupport] attribute EventHandler onframetimingbuff
erfull; | 92 [RuntimeEnabled=FrameTimingSupport] attribute EventHandler onframetimingbuff
erfull; |
77 | 93 |
| 94 // Performance Observer |
| 95 // http://w3c.github.io/performance-timeline/#extensions-to-the-performance-
interface-1 |
| 96 [Custom, RuntimeEnabled=PerformanceObserverSupport] PerformanceObserver crea
tePerformanceObserver(PerformanceObserverCallback callback); |
| 97 |
78 // TODO(philipj): There is no spec for the Memory Info API, see blink-dev: | 98 // TODO(philipj): There is no spec for the Memory Info API, see blink-dev: |
79 // https://groups.google.com/a/chromium.org/d/msg/blink-dev/g5YRCGpC9vs/b4OJ
z71NmPwJ | 99 // https://groups.google.com/a/chromium.org/d/msg/blink-dev/g5YRCGpC9vs/b4OJ
z71NmPwJ |
80 [Measure] readonly attribute MemoryInfo memory; | 100 [Measure] readonly attribute MemoryInfo memory; |
81 }; | 101 }; |
OLD | NEW |