
There are two changes between the original and reland CL: 1. Keep `third_party/closure_compiler/externs/virtual_keyboard_private.js` updated since we introduce a new event onColorProviderChanged. 2. Fix the content security policy change by adding style-src 'unsafe-inline' chrome://theme. Futher explanation of the content security policy change: 1. To allow virtual keyboard loading external css files from `chrome/theme/colors.css`, we need to add `chrome://theme` here. 2. `style-src 'unsafe-inline'` is equivalent to `style-src-elem 'unsafe-inline'` and `style-src-attr 'unsafe-inline'`. We need both of them because: a) For `style-src-elem`, in long form handwriting library, we have some usecase which dynamically injects <style> tag from JS runtime. b) For `style-src-attr`, we have many other usecases which dynamically change the style attribute of DOM elements. The original CL does not consider usecase 2.a. That's the root cause of breaking handwriting mode in original CL. This reverts commitc6342d400c
. Reason for revert: Fix the content security policy, modify extern virtual_keyboard_private.js to keep it updated with private api definition and reland the CL Original change's description: > Revert "Ensure Virtual Keyboard extension has the functionality to load UI color dynamically." > > This reverts commitd81b7218c9
. > > Reason for revert: Breaks handwriting tast tests > > Original change's description: > > Ensure Virtual Keyboard extension has the functionality to load UI color dynamically. > > > > 1. Switch from DefaultColorProviderSource to AshColorProviderSource for Chrome Keyboard Web Contents. > > 2. Allow Virtual Keyboard load stylesheets from chrome://theme > > 3. Introduce a new event `onColorProviderChanged` in Virtual Keyboard Private API. > > > > Change-Id: I67443bea00b9f821ff779f1faff38fbc555d1256 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3958460 > > Reviewed-by: Sean Kau <skau@chromium.org> > > Reviewed-by: John Palmer <jopalmer@chromium.org> > > Reviewed-by: Darren Shen <shend@chromium.org> > > Commit-Queue: Grey Wang <greywang@google.com> > > Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> > > Cr-Commit-Position: refs/heads/main@{#1068884} > > BUG=b/258738124 > > Change-Id: I575fb82e760df802f8b8cfd371d986f3eeb9cb9c > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4022327 > Quick-Run: Grey Wang <greywang@google.com> > Commit-Queue: Timothy Loh <timloh@chromium.org> > Owners-Override: Timothy Loh <timloh@chromium.org> > Reviewed-by: John Palmer <jopalmer@chromium.org> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Cr-Commit-Position: refs/heads/main@{#1070182} Bug: b/258738124 Change-Id: Id6877ef613ec479a8f8a5bea92c7aa82fb66eaf3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4023316 Reviewed-by: Sean Kau <skau@chromium.org> Commit-Queue: Grey Wang <greywang@google.com> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: John Palmer <jopalmer@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/main@{#1071438}
This will become a reusable extensions module. It implements the core parts of Chrome's extension system, and can be used with any host of the content module.
Some extensions code that is not Chrome-specific still lives in //chrome/browser/extensions and will be moved here.
Technical Documentation: