Exposing navigator.language to web workers.
navigator.language should be supported in workers according to specifications. This CL adds a virtual function for retrieving the accept_language to navigator_language which is then overridden by navigator, who gets the languages from the frame, and woker_navigator, who gets the languages from renderer preferences. From there, navigator_language parses the string and returns either the top prefered language or a vector of all of the preferred languages. In addition, any changes to the language fires an event that notifies all of the worker threads to the change, as per specification. Based on this CL: https://chromium-review.googlesource.com/c/chromium/src/+/1136794 Bug: 276159, 655458 Change-Id: I53bd454f10b5b9b9dc8fd3afa82415b6e93698ca Reviewed-on: https://chromium-review.googlesource.com/c/1255151 Commit-Queue: Ojan Vafai <ojan@chromium.org> Reviewed-by:Ojan Vafai <ojan@chromium.org> Reviewed-by:
Tsuyoshi Horo <horo@chromium.org> Reviewed-by:
Dmitry Gozman <dgozman@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#613381}
Showing
Please register or sign in to comment