[go: nahoru, domu]

MSE-in-Workers: Part 1: Add experimental visibility of API in workers

Adds runtime experimental exposure of JS MediaSource constructor on
workers context.

This change does not include the actual constructor's implementation (later
changes will add functionality behind this new feature flag).

To differentiate from pre-existing JS MediaSource construction on the Window
(blink main) thread, this change also adds a MediaSourceStable feature for use
in the IDL for the constructor.

This change also includes recording UMA for each execution context's
thread type (window, dedicated worker, shared worker) that constructs
a MediaSource instance.

Anticipating the eventual need for recording a UseCounter in later
changes to differentiate MSE objectUrl construction on main thread
versus worker contexts, this change also includes the definition of that
UseCounter. See the prototype combined full change
(https://chromium-review.googlesource.com/c/chromium/src/+/1405697/) for
expected usage of this new UseCounter from url_media_source.cc.

Intent-to-implement:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/CNRywDqgKjY/F0nnA4tTAwAJ

BUG=878133

Change-Id: I793a9d4f3a609352df773a96e3befd4d1bd66f5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1674413
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Auto-Submit: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672647}
8 files changed