Commit f0627b97 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Add a build file for ChromeVox Classic

This is the on-going process to finish up the fork of ChromeVox Classic.

Adding a build file will allow us to:
- compress the ChromeVox Classic source*
- remove deps.js which is a maintenance burden *
- share string resources *
- migrate all tests only for ChromeVox Classic to ui/accessibility/extensions
- delete all Classic only js, assets from mainline ChromeVox

* denotes things that happened in this change.

Change-Id: I317be0ff2107eeb1f688da8690c38d191a55310b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874256
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708822}
parent a9552714
......@@ -9,6 +9,7 @@ import("//chromecast/chromecast.gni")
import("//testing/test.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("run_jsbundler.gni")
import("strings/chromevox_strings.gni")
assert(is_chromeos || is_chromecast)
......@@ -230,8 +231,8 @@ group("chromevox") {
":chromevox_copied_files",
":chromevox_guest_manifest",
":chromevox_manifest",
":chromevox_strings",
"//chrome/browser/resources/chromeos/braille_ime:braille_ime_manifest",
"//chrome/browser/resources/chromeos/chromevox/strings:chromevox_strings",
"//third_party/chromevox:chromevox_third_party_resources",
"//third_party/liblouis",
]
......@@ -388,6 +389,10 @@ manifest("chromevox_guest_manifest") {
is_guest_manifest = true
}
chromevox_strings("chromevox_strings") {
out_dir = chromevox_out_dir
}
template("generate_deps_js") {
if (defined(invoker.rewrite_rules)) {
rewrite_rules = invoker.rewrite_rules
......@@ -533,7 +538,7 @@ action("chromevox_test_messages_js") {
output_file,
]
deps = [
"strings:chromevox_strings",
":chromevox_strings",
]
args = [
"-o",
......
......@@ -8,15 +8,12 @@ assert(is_chromeos || is_chromecast)
closure_library_dir =
"//third_party/chromevox/third_party/closure-library/closure/goog"
jsbundler_modules = rebase_path([
"depstree.py",
"source.py",
"treescan.py",
],
".",
"$closure_library_dir/../bin/build")
jsbundler_modules +=
[ "//third_party/devtools-frontend/src/scripts/build/rjsmin.py" ]
jsbundler_modules = [
"//third_party/chromevox/third_party/closure-library/closure/bin/build/depstree.py",
"//third_party/chromevox/third_party/closure-library/closure/bin/build/source.py",
"//third_party/chromevox/third_party/closure-library/closure/bin/build/treescan.py",
"//third_party/devtools-frontend/src/scripts/build/rjsmin.py",
]
template("run_jsbundler") {
assert(defined(invoker.mode))
......
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")
chromevox_out_dir = "$root_out_dir/resources/chromeos/chromevox"
grit("chromevox_strings") {
source = "chromevox_strings.grd"
defines = chrome_grit_defines
outputs = [
"_locales/am/messages.json",
"_locales/ar/messages.json",
"_locales/bg/messages.json",
"_locales/bn/messages.json",
"_locales/ca/messages.json",
"_locales/cs/messages.json",
"_locales/da/messages.json",
"_locales/de/messages.json",
"_locales/el/messages.json",
"_locales/en_GB/messages.json",
"_locales/en/messages.json",
"_locales/es/messages.json",
"_locales/es_419/messages.json",
"_locales/et/messages.json",
"_locales/fa/messages.json",
"_locales/fi/messages.json",
"_locales/fil/messages.json",
"_locales/fr/messages.json",
"_locales/gu/messages.json",
"_locales/he/messages.json",
"_locales/hi/messages.json",
"_locales/hr/messages.json",
"_locales/hu/messages.json",
"_locales/id/messages.json",
"_locales/it/messages.json",
"_locales/ja/messages.json",
"_locales/kn/messages.json",
"_locales/ko/messages.json",
"_locales/lt/messages.json",
"_locales/lv/messages.json",
"_locales/ml/messages.json",
"_locales/mr/messages.json",
"_locales/ms/messages.json",
"_locales/nl/messages.json",
"_locales/nb/messages.json",
"_locales/pl/messages.json",
"_locales/pt_BR/messages.json",
"_locales/pt_PT/messages.json",
"_locales/ro/messages.json",
"_locales/ru/messages.json",
"_locales/sk/messages.json",
"_locales/sl/messages.json",
"_locales/sr/messages.json",
"_locales/sv/messages.json",
"_locales/sw/messages.json",
"_locales/ta/messages.json",
"_locales/te/messages.json",
"_locales/th/messages.json",
"_locales/tr/messages.json",
"_locales/uk/messages.json",
"_locales/vi/messages.json",
"_locales/zh_CN/messages.json",
"_locales/zh_TW/messages.json",
]
output_dir = chromevox_out_dir
# Don't polute the extension directory with stamp and .d files.
depfile_dir = target_out_dir
resource_ids = ""
}
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")
template("chromevox_strings") {
grit(target_name) {
source = "//chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd"
defines = chrome_grit_defines
outputs = [
"_locales/am/messages.json",
"_locales/ar/messages.json",
"_locales/bg/messages.json",
"_locales/bn/messages.json",
"_locales/ca/messages.json",
"_locales/cs/messages.json",
"_locales/da/messages.json",
"_locales/de/messages.json",
"_locales/el/messages.json",
"_locales/en_GB/messages.json",
"_locales/en/messages.json",
"_locales/es/messages.json",
"_locales/es_419/messages.json",
"_locales/et/messages.json",
"_locales/fa/messages.json",
"_locales/fi/messages.json",
"_locales/fil/messages.json",
"_locales/fr/messages.json",
"_locales/gu/messages.json",
"_locales/he/messages.json",
"_locales/hi/messages.json",
"_locales/hr/messages.json",
"_locales/hu/messages.json",
"_locales/id/messages.json",
"_locales/it/messages.json",
"_locales/ja/messages.json",
"_locales/kn/messages.json",
"_locales/ko/messages.json",
"_locales/lt/messages.json",
"_locales/lv/messages.json",
"_locales/ml/messages.json",
"_locales/mr/messages.json",
"_locales/ms/messages.json",
"_locales/nl/messages.json",
"_locales/nb/messages.json",
"_locales/pl/messages.json",
"_locales/pt_BR/messages.json",
"_locales/pt_PT/messages.json",
"_locales/ro/messages.json",
"_locales/ru/messages.json",
"_locales/sk/messages.json",
"_locales/sl/messages.json",
"_locales/sr/messages.json",
"_locales/sv/messages.json",
"_locales/sw/messages.json",
"_locales/ta/messages.json",
"_locales/te/messages.json",
"_locales/th/messages.json",
"_locales/tr/messages.json",
"_locales/uk/messages.json",
"_locales/vi/messages.json",
"_locales/zh_CN/messages.json",
"_locales/zh_TW/messages.json",
]
output_dir = invoker.out_dir
# Don't polute the extension directory with stamp and .d files.
depfile_dir = target_out_dir
resource_ids = ""
}
}
......@@ -9,6 +9,9 @@ group("extensions") {
":caretbrowsing",
":colorenhancer",
]
if (is_chromeos) {
deps += [ "chromevoxclassic:chromevox" ]
}
}
locale_files = [
......
This diff is collapsed.
......@@ -4,20 +4,31 @@
ChromeVox Classic is a screen reader built utilizing only web api's available
through the use of a content script (e.g. DOM).
Over time, this project diverged from the approach taken by ChromeVox in Chrome
OS, which takes an approach closer to other OS-level screen readers which talk
to each renderering surface directly without direct knowledge of the specifics
within each renderer (due to an accessibility api abstraction).
Over time, this project diverged from the approach taken by ChromeVox
in Chrome OS, which acts upon Chrome's intermediate accessibility api
layer. ChromeVox on Chrome OS talks to each renderering surface
through this middle accessibility layer whereas ChromeVox Classic
talks directly to a webpage DOM.
## Building
This directly contains everything you need. It can be loaded into Chrome as an
unpacked extension and ready to use. Go to chrome://extensions, and click "Load
Unpacked".
ChromeVox Classic uses the same compression script as ChromeVox for
Chrome OS. You can build it by executing
ninja -C out/Release ui/accessibility/extensions
The final extension, including all json, image, html, css, and other
assets, gets placed in
out/Release/chromevoxclassic.
#Loading and Testing
Go to chrome://extensions, and click "Load
Unpacked". Select out/Release/chromevoxclassic.
## Maintenance/Contributions
Tooling is minimal for this fork of ChromeVox. Much of what's available for
ChromeVox in Chrome OS (chrome/browser/resources/chromeos/chromevox/tools is
applicable) including deps.js generation, but requires adaptation.
applicable.
## Release/Testing
Load ChromeVox Classic on at least Mac and Linux Chrome. Verify web content and
......@@ -25,4 +36,4 @@ the chrome of Chrome both speak (e.g. google.com, the address bar). These two
paths are verbalized using entirely different code paths.
Once confirmed, the entire directory can be uploaded once zipped to the Chrome
webstore.
\ No newline at end of file
webstore.
This diff is collapsed.
{
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEGBi/oD7Yl/Y16w3+gee/95/EUpRZ2U6c+8orV5ei+3CRsBsoXI/DPGBauZ3rWQ47aQnfoG00sXigFdJA2NhNK9OgmRA2evnsRRbjYm2BG1twpaLsgQPPus3PyczbDCvhFu8k24wzFyEtxLrfxAGBseBPb9QrCz7B4k2QgxD/CwIDAQAB",
"manifest_version": 2,
"name": "__MSG_CHROMEVOX_NAME__",
"version": "78.0.3902.0",
"description": "__MSG_CHROMEVOX_DESCRIPTION__",
"background": {
"page": "cvox2/background/background.html"
},
"permissions": [
"accessibilityPrivate",
"bookmarks",
"brailleDisplayPrivate",
"commands.accessibility",
"commandLinePrivate",
"experimental",
"history",
"notifications",
"storage",
"tabs",
"tts",
"virtualKeyboardPrivate",
"<all_urls>"
],
"content_scripts": [
{
"matches": [ "<all_urls>" ],
"exclude_globs": [ ],
"all_frames": true,
"js": [
"closure/closure_preinit.js",
"closure/base.js",
"deps.js",
"chromevox/injected/loader.js"
]
}
],
"web_accessible_resources": [
"chromevox/background/keymaps/next_keymap.json",
"chromevox/injected/api.js",
"chromevox/injected/api_util.js",
"chromevox/injected/mathjax.js",
"chromevox/injected/mathjax_external_util.js"
],
"automation": {
"desktop": true
},
"commands": {
"nextObject": {
"description": "__MSG_CHROMEVOX_NEXT_OBJECT__",
"suggested_key": {
"default": "Alt+Shift+Right"
}
},
"previousObject": {
"description": "__MSG_CHROMEVOX_PREVIOUS_OBJECT__",
"suggested_key": {
"default": "Alt+Shift+Left"
}
},
"performDefaultAction": {
"description": "__MSG_CHROMEVOX_PERFORM_DEFAULT_ACTION__",
"suggested_key": {
"default": "Alt+Shift+Space"
}
},
"toggleChromeVoxVersion": {
"description": "__MSG_CHROMEVOX_TOGGLE_CHROMEVOX__",
"suggested_key": {
"default": "Alt+Shift+Q"
}
},
"readFromHere": {
"description": "__MSG_CHROMEVOX_READ_FROM_HERE__",
"suggested_key": {
"default": "Alt+Shift+R"
}
}
},
"options_page": "chromevox/background/options.html",
"default_locale": "en",
"icons": {
"16": "images/chromevox-16.png",
"48": "images/chromevox-48.png",
"128": "images/chromevox-128.png"
}
}
{
"automation": {
"desktop": true
},
"background": {
"page": "cvox2/background/background.html"
},
"commands": {
"nextObject": {
"description": "__MSG_CHROMEVOX_NEXT_OBJECT__",
"suggested_key": {
"default": "Alt+Shift+Right"
}
},
"performDefaultAction": {
"description": "__MSG_CHROMEVOX_PERFORM_DEFAULT_ACTION__",
"suggested_key": {
"default": "Alt+Shift+Space"
}
},
"previousObject": {
"description": "__MSG_CHROMEVOX_PREVIOUS_OBJECT__",
"suggested_key": {
"default": "Alt+Shift+Left"
}
},
"readFromHere": {
"description": "__MSG_CHROMEVOX_READ_FROM_HERE__",
"suggested_key": {
"default": "Alt+Shift+R"
}
},
"toggleChromeVoxVersion": {
"description": "__MSG_CHROMEVOX_TOGGLE_CHROMEVOX__",
"suggested_key": {
"default": "Alt+Shift+Q"
}
}
},
"content_scripts": [ {
"all_frames": true,
"exclude_globs": [ ],
"js": [ "chromeVoxChromePageScript.js" ],
"matches": [ "\u003Call_urls>" ]
} ],
"default_locale": "en",
"description": "__MSG_CHROMEVOX_DESCRIPTION__",
"icons": {
"128": "images/chromevox-128.png",
"16": "images/chromevox-16.png",
"48": "images/chromevox-48.png"
},
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEGBi/oD7Yl/Y16w3+gee/95/EUpRZ2U6c+8orV5ei+3CRsBsoXI/DPGBauZ3rWQ47aQnfoG00sXigFdJA2NhNK9OgmRA2evnsRRbjYm2BG1twpaLsgQPPus3PyczbDCvhFu8k24wzFyEtxLrfxAGBseBPb9QrCz7B4k2QgxD/CwIDAQAB",
"manifest_version": 2,
"name": "__MSG_CHROMEVOX_NAME__",
"options_page": "chromevox/background/options.html",
"permissions": [ "accessibilityPrivate", "bookmarks", "brailleDisplayPrivate", "commands.accessibility", "commandLinePrivate", "experimental", "history", "notifications", "storage", "tabs", "tts", "virtualKeyboardPrivate", "\u003Call_urls>" ],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "53.0.2784.6",
"web_accessible_resources": [ "chromevox/background/keymaps/next_keymap.json", "chromevox/injected/api.js", "chromevox/injected/api_util.js", "chromevox/injected/mathjax.js", "chromevox/injected/mathjax_external_util.js" ]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment