OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 // https://w3c.github.io/hr-time/#the-performance-interface | 31 // https://w3c.github.io/hr-time/#the-performance-interface |
32 | 32 |
33 // TODO(philipj): This interface should be merged into Performance. | 33 // TODO(foolip): This interface should be merged into Performance. |
34 // TODO(philipj): None of the optional DOMString arguments in this interface | 34 // TODO(foolip): None of the optional DOMString arguments in this interface |
35 // should have a default value. | 35 // should have a default value. |
36 [ | 36 [ |
37 NoInterfaceObject | 37 NoInterfaceObject |
38 ] interface WorkerPerformance : EventTarget { | 38 ] interface WorkerPerformance : EventTarget { |
39 DOMHighResTimeStamp now(); | 39 DOMHighResTimeStamp now(); |
40 | 40 |
41 // Performance Timeline | 41 // Performance Timeline |
42 // https://w3c.github.io/performance-timeline/#the-performance-interface | 42 // https://w3c.github.io/performance-timeline/#the-performance-interface |
43 // TODO(philipj): getEntries() should take an optional FilterOptions argumen
t. | 43 // TODO(foolip): getEntries() should take an optional FilterOptions argument
. |
44 PerformanceEntryList getEntries(); | 44 PerformanceEntryList getEntries(); |
45 PerformanceEntryList getEntriesByType(DOMString entryType); | 45 PerformanceEntryList getEntriesByType(DOMString entryType); |
46 PerformanceEntryList getEntriesByName(DOMString name, optional DOMString ent
ryType = null); | 46 PerformanceEntryList getEntriesByName(DOMString name, optional DOMString ent
ryType = null); |
47 | 47 |
48 // Resource Timing | 48 // Resource Timing |
49 // https://w3c.github.io/resource-timing/#extensions-performance-interface | 49 // https://w3c.github.io/resource-timing/#extensions-performance-interface |
50 void clearResourceTimings(); | 50 void clearResourceTimings(); |
51 void setResourceTimingBufferSize(unsigned long maxSize); | 51 void setResourceTimingBufferSize(unsigned long maxSize); |
52 attribute EventHandler onresourcetimingbufferfull; | 52 attribute EventHandler onresourcetimingbufferfull; |
53 | 53 |
54 // User Timing | 54 // User Timing |
55 // https://w3c.github.io/user-timing/#extensions-performance-interface | 55 // https://w3c.github.io/user-timing/#extensions-performance-interface |
56 [RaisesException] void mark(DOMString markName); | 56 [RaisesException] void mark(DOMString markName); |
57 void clearMarks(optional DOMString markName = null); | 57 void clearMarks(optional DOMString markName = null); |
58 | 58 |
59 [RaisesException] void measure(DOMString measureName, optional DOMString sta
rtMark = null, optional DOMString endMark = null); | 59 [RaisesException] void measure(DOMString measureName, optional DOMString sta
rtMark = null, optional DOMString endMark = null); |
60 void clearMeasures(optional DOMString measureName = null); | 60 void clearMeasures(optional DOMString measureName = null); |
61 | 61 |
62 // TODO(philipj): There is no spec for the Memory Info API, see blink-dev: | 62 // TODO(foolip): There is no spec for the Memory Info API, see blink-dev: |
63 // https://groups.google.com/a/chromium.org/d/msg/blink-dev/g5YRCGpC9vs/b4OJ
z71NmPwJ | 63 // https://groups.google.com/a/chromium.org/d/msg/blink-dev/g5YRCGpC9vs/b4OJ
z71NmPwJ |
64 [RuntimeEnabled=MemoryInfoInWorkers] readonly attribute MemoryInfo memory; | 64 [RuntimeEnabled=MemoryInfoInWorkers] readonly attribute MemoryInfo memory; |
65 }; | 65 }; |
OLD | NEW |