ResourceTiming: Enable FetchEventWorkerTiming for subresources
This patch is a part of FetchEvent WorkerTiming patches. This feature enables a service worker to attach PerformanceMark/PerformanceMeasure timings to a request during the fetch event handler. The timings will then be exposed to the page using blink::PerformanceResourceTiming. This patch passes a Mojo pending receiver for WorkerTimingContainer to blink::PerformanceResourceTiming by TakePendingWorkerTimingReceiver() when the request is completed. In order to achieve it, this patch adds receiver to blink::ResourceTimingInfo as a mutable member variable and extends all AddResourceTiming() to pass receivers. The reason of the mutable variable is that it must be passed to blink::PerformanceResourceTiming by move semantics but blink::ResourceTimingInfo is passed only by const reference. blink::ResourceTimingInfo can't be changed to pass by value because blink::ResourceTimingInfo is created by scoped_refptr and it passes its pointer to PerformanceNavigationTiming now. Explainer : https://github.com/wanderview/fetchevent-worker-timing/blob/master/explainer.md Design doc: https://docs.google.com/document/d/1-ebnv7OFiVd3k2-jbtQGO5s3BKHIp7lRx3ujhgNKvB0 Bug: 900700 Change-Id: I04bee9dc1990564db3c102b5f2ce64266cb76a2c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1923869 Commit-Queue: Yuta Kasai <yutakasai@google.com> Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Makoto Shimazu <shimazu@chromium.org> Reviewed-by:
Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#719091}
Showing
Please register or sign in to comment