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

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

Issue 1219673003: Sync core/timing/ interfaces with their specs, or lack thereof (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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
« no previous file with comments | « Source/core/timing/MemoryInfo.idl ('k') | Source/core/timing/PerformanceCompositeTiming.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/Performance.idl
diff --git a/Source/core/timing/Performance.idl b/Source/core/timing/Performance.idl
index 2c04c8a2c45554cb3b5e7cffbc466fb768024c9b..6a8fab6b0030ec60e72d6f7d0230919d69f66bae 100644
--- a/Source/core/timing/Performance.idl
+++ b/Source/core/timing/Performance.idl
@@ -29,33 +29,53 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// See: http://www.w3.org/TR/navigation-timing/
+// https://w3c.github.io/hr-time/#the-performance-interface
+
+// TODO(philipj): This interface should be [Exposed=(Window,Worker)]. Doing that
+// would allow the WorkerPerformance interface to be merged into this.
+// TODO(philipj): None of the optional DOMString arguments in this interface
+// should have a default value.
interface Performance : EventTarget {
- readonly attribute PerformanceNavigation navigation;
- readonly attribute PerformanceTiming timing;
- readonly attribute MemoryInfo memory;
+ DOMHighResTimeStamp now();
- [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntries();
- [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByType(DOMString entryType);
- [MeasureAs=UnprefixedPerformanceTimeline] 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.
+ [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntries();
+ [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntriesByType(DOMString entryType);
+ [MeasureAs=UnprefixedPerformanceTimeline] PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType = null);
+ // Resource Timing
+ // https://w3c.github.io/resource-timing/#extensions-performance-interface
+ // TODO(philipj): Unprefix these APIs.
[MeasureAs=PrefixedPerformanceClearResourceTimings] void webkitClearResourceTimings();
[MeasureAs=PrefixedPerformanceSetResourceTimingBufferSize] void webkitSetResourceTimingBufferSize(unsigned long maxSize);
-
- [MeasureAs=PerformanceFrameTiming,RuntimeEnabled=FrameTimingSupport] void clearFrameTimings();
- [MeasureAs=PerformanceFrameTiming,RuntimeEnabled=FrameTimingSupport] void setFrameTimingBufferSize(unsigned long maxSize);
-
attribute EventHandler onwebkitresourcetimingbufferfull;
- [RuntimeEnabled=FrameTimingSupport] attribute EventHandler onframetimingbufferfull;
+ // Navigation Timing
+ // http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
+ // TODO(philipj): The Navigation Timing Rec. defines the (not partial)
+ // Performance interface, while https://w3c.github.io/navigation-timing/ has
+ // changed the interface in an incompatible way:
+ // https://github.com/w3c/navigation-timing/issues/22
+ [Measure] readonly attribute PerformanceTiming timing;
+ [Measure] readonly attribute PerformanceNavigation navigation;
- // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
- [RaisesException,MeasureAs=UnprefixedUserTiming] void mark(DOMString markName);
+ // User Timing
+ // https://w3c.github.io/user-timing/#extensions-performance-interface
+ [MeasureAs=UnprefixedUserTiming, RaisesException] void mark(DOMString markName);
[MeasureAs=UnprefixedUserTiming] void clearMarks(optional DOMString markName = null);
- [RaisesException,MeasureAs=UnprefixedUserTiming] void measure(DOMString measureName, optional DOMString startMark = null, optional DOMString endMark = null);
+ [MeasureAs=UnprefixedUserTiming, RaisesException] void measure(DOMString measureName, optional DOMString startMark = null, optional DOMString endMark = null);
[MeasureAs=UnprefixedUserTiming] void clearMeasures(optional DOMString measureName = null);
- // See http://www.w3.org/TR/hr-time/ for details.
- double now();
+ // Frame Timing
+ // https://w3c.github.io/frame-timing/#extensions-performance-interface
+ [RuntimeEnabled=FrameTimingSupport, MeasureAs=PerformanceFrameTiming] void clearFrameTimings();
+ [RuntimeEnabled=FrameTimingSupport, MeasureAs=PerformanceFrameTiming] void setFrameTimingBufferSize(unsigned long maxSize);
+ [RuntimeEnabled=FrameTimingSupport] attribute EventHandler onframetimingbufferfull;
+
+ // 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
+ [Measure] readonly attribute MemoryInfo memory;
};
« no previous file with comments | « Source/core/timing/MemoryInfo.idl ('k') | Source/core/timing/PerformanceCompositeTiming.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698