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 16 matching lines...) Expand all Loading... |
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(philipj): This interface should be merged into Performance. |
34 // TODO(philipj): None of the optional DOMString arguments in this interface | 34 // TODO(philipj): None of the optional DOMString arguments in this interface |
35 // should have a default value. | 35 // should have a default value. |
36 [ | 36 [ |
37 GarbageCollected, | |
38 NoInterfaceObject | 37 NoInterfaceObject |
39 ] interface WorkerPerformance : EventTarget { | 38 ] interface WorkerPerformance : EventTarget { |
40 DOMHighResTimeStamp now(); | 39 DOMHighResTimeStamp now(); |
41 | 40 |
42 // Performance Timeline | 41 // Performance Timeline |
43 // https://w3c.github.io/performance-timeline/#the-performance-interface | 42 // https://w3c.github.io/performance-timeline/#the-performance-interface |
44 // TODO(philipj): getEntries() should take an optional FilterOptions argumen
t. | 43 // TODO(philipj): getEntries() should take an optional FilterOptions argumen
t. |
45 PerformanceEntryList getEntries(); | 44 PerformanceEntryList getEntries(); |
46 PerformanceEntryList getEntriesByType(DOMString entryType); | 45 PerformanceEntryList getEntriesByType(DOMString entryType); |
47 PerformanceEntryList getEntriesByName(DOMString name, optional DOMString ent
ryType = null); | 46 PerformanceEntryList getEntriesByName(DOMString name, optional DOMString ent
ryType = null); |
48 | 47 |
49 // Resource Timing | 48 // Resource Timing |
50 // https://w3c.github.io/resource-timing/#extensions-performance-interface | 49 // https://w3c.github.io/resource-timing/#extensions-performance-interface |
51 void clearResourceTimings(); | 50 void clearResourceTimings(); |
52 void setResourceTimingBufferSize(unsigned long maxSize); | 51 void setResourceTimingBufferSize(unsigned long maxSize); |
53 attribute EventHandler onresourcetimingbufferfull; | 52 attribute EventHandler onresourcetimingbufferfull; |
54 | 53 |
55 // User Timing | 54 // User Timing |
56 // https://w3c.github.io/user-timing/#extensions-performance-interface | 55 // https://w3c.github.io/user-timing/#extensions-performance-interface |
57 [RaisesException] void mark(DOMString markName); | 56 [RaisesException] void mark(DOMString markName); |
58 void clearMarks(optional DOMString markName = null); | 57 void clearMarks(optional DOMString markName = null); |
59 | 58 |
60 [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); |
61 void clearMeasures(optional DOMString measureName = null); | 60 void clearMeasures(optional DOMString measureName = null); |
62 | 61 |
63 // TODO(philipj): There is no spec for the Memory Info API, see blink-dev: | 62 // TODO(philipj): There is no spec for the Memory Info API, see blink-dev: |
64 // 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 |
65 [RuntimeEnabled=MemoryInfoInWorkers] readonly attribute MemoryInfo memory; | 64 [RuntimeEnabled=MemoryInfoInWorkers] readonly attribute MemoryInfo memory; |
66 }; | 65 }; |
OLD | NEW |