Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Unified Diff: Source/core/timing/WorkerPerformance.idl

Issue 1219673003: Sync core/timing/ interfaces with their specs, or lack thereof (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/timing/WorkerPerformance.idl
diff --git a/Source/core/timing/WorkerPerformance.idl b/Source/core/timing/WorkerPerformance.idl
index 4352b5e1adb382c63ecbefb78e6b76255ae9225e..c0445ea3152952445eecb9713f9befdfc1ca8427 100644
--- a/Source/core/timing/WorkerPerformance.idl
+++ b/Source/core/timing/WorkerPerformance.idl
@@ -28,29 +28,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// TODO(philipj): There is no spec for Performance in workers:
+// https://github.com/w3c/hr-time/issues/10
+// For now, this interface is a subset of the Performance interface.
+
+// https://w3c.github.io/hr-time/#the-performance-interface
+
+// TODO(philipj): None of the optional DOMString arguments in this interface
+// should have a default value.
[
GarbageCollected,
NoInterfaceObject
] interface WorkerPerformance : EventTarget {
- // See https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime2/Overview.html for details.
- double now();
+ DOMHighResTimeStamp now();
- [RuntimeEnabled=ServiceWorkerPerformanceTimeline] sequence<PerformanceEntry> getEntries();
- [RuntimeEnabled=ServiceWorkerPerformanceTimeline] sequence<PerformanceEntry> getEntriesByType(DOMString entryType);
- [RuntimeEnabled=ServiceWorkerPerformanceTimeline] sequence<PerformanceEntry> getEntriesByName(DOMString name, optional DOMString entryType = null);
+ // Performance Timeline
+ // https://w3c.github.io/performance-timeline/#the-performance-interface
+ // TODO(philipj): getEntries() should take an optional FilterOptions argument.
+ [RuntimeEnabled=ServiceWorkerPerformanceTimeline] PerformanceEntryList getEntries();
+ [RuntimeEnabled=ServiceWorkerPerformanceTimeline] PerformanceEntryList getEntriesByType(DOMString entryType);
+ [RuntimeEnabled=ServiceWorkerPerformanceTimeline] PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType = null);
- // See http://www.w3.org/TR/resource-timing/
+ // Resource Timing
+ // https://w3c.github.io/resource-timing/#extensions-performance-interface
+ // TODO(philipj): Unprefix thes APIs.
[RuntimeEnabled=ServiceWorkerPerformanceTimeline, MeasureAs=PrefixedPerformanceClearResourceTimings] void webkitClearResourceTimings();
[RuntimeEnabled=ServiceWorkerPerformanceTimeline, MeasureAs=PrefixedPerformanceSetResourceTimingBufferSize] void webkitSetResourceTimingBufferSize(unsigned long maxSize);
[RuntimeEnabled=ServiceWorkerPerformanceTimeline] attribute EventHandler onwebkitresourcetimingbufferfull;
- // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
+ // User Timing
+ // https://w3c.github.io/user-timing/#extensions-performance-interface
[RuntimeEnabled=ServiceWorkerPerformanceTimeline, RaisesException] void mark(DOMString markName);
[RuntimeEnabled=ServiceWorkerPerformanceTimeline] void clearMarks(optional DOMString markName = null);
[RuntimeEnabled=ServiceWorkerPerformanceTimeline, RaisesException] void measure(DOMString measureName, optional DOMString startMark = null, optional DOMString endMark = null);
[RuntimeEnabled=ServiceWorkerPerformanceTimeline] void clearMeasures(optional DOMString measureName = null);
+ // TODO(philipj): There is no spec for the Memory Info API, see blink-dev:
+ // https://groups.google.com/a/chromium.org/d/msg/blink-dev/g5YRCGpC9vs/b4OJz71NmPwJ
[RuntimeEnabled=MemoryInfoInWorkers] readonly attribute MemoryInfo memory;
};
-

Powered by Google App Engine
This is Rietveld 408576698