Origin Trial features status should be queryable from content layer |
||
Issue descriptionInside of /content/, given a WebFrame, or a WebDocument, it should be possible to query the document as to whether a particular origin trial is enabled in that document. This is immediatley useful for the VP8 acceleration origin trial, but could be generally useful in the future for any features which are primarily implemented in the content layer.
,
May 24 2018
Also, the UseCounter::Count should take blink::WebLocalFrame or blink::WebDocument instead of ExecutionContext.
,
May 24 2018
talking of WebFrame and WebDocument suggests you're talking about content/renderer and content/child, not content/browser? Which also means you're talking about layers of code that ultimately should hopefully disappear entirely or almost entirely. But I guess if you have a need for it now it might still be worth adding....
,
May 25 2018
Yes, it's in /content/renderer/media/webrtc. Where is a work-around now and it's a little hacky (origin trial is queried by third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc, which exposes the result). It would made sense to implement new origin-trials API for WebFrame in a long run. But if there's some big change coming soon, then we can leave it as is.
,
May 25 2018
Oh, and re #2, not sure why you would need UseCounter::Count to take a WebLocalFrame? You can already just call WebLocalFrame::BlinkFeatureUsageReport for use counting from content.
,
Jun 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467 commit 3697ff39b0ff0b31ae68f8040b8c1f5d786d1467 Author: Ian Clelland <iclelland@chromium.org> Date: Thu Jun 07 16:03:43 2018 Allow origin trials to be queried from /content/renderer This adds a WebOriginTrials interface, which can be used to query the state of an origin trial given a WebDocument. Bug: 845995 Change-Id: Ifbaed167bcfd2588436bd32f6f03d3f57171434c Reviewed-on: https://chromium-review.googlesource.com/1088310 Commit-Queue: Ian Clelland <iclelland@chromium.org> Reviewed-by: Jason Chase <chasej@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#565283} [modify] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/content/renderer/render_view_browsertest.cc [add] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/third_party/blink/public/web/web_origin_trials.h [add] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/third_party/blink/renderer/build/scripts/make_web_origin_trials.py [add] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/third_party/blink/renderer/build/scripts/templates/web_origin_trials.cc.tmpl [modify] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/third_party/blink/renderer/core/BUILD.gn [modify] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/third_party/blink/renderer/core/exported/web_document_test.cc [add] https://crrev.com/3697ff39b0ff0b31ae68f8040b8c1f5d786d1467/third_party/blink/renderer/core/testing/data/origin-trial-dummy.html
,
Jul 6
|
||
►
Sign in to add a comment |
||
Comment 1 by iclell...@chromium.org
, May 23 2018