Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Dictation commands to use Macros class.
This matches the abstractions in Android Voice Access, where a macro is something that can check whether it can execute and can execute, and is independent from Pumpkin or parsed speech results. In Dictation, a Macro is an abstract class that should be implemented for each semantic tag / action. Several high-level macros are created in this change including a RepeatableKeyPressMacro, used to send the same key press multiple times via an EventGenerator, and an InputTextViewMacro, which can put text into a text field via the chrome.input.ime APIs (in InputController). No functional changes to Dictation commands should result from this change. Checking whether a command can be executed in the given context is mostly left as a TODO. TEST=DictationCommandsExtensionTest AX-Relnotes: N/A Bug: 1247299,1264544 Change-Id: Ied1add45266b8c5ace0a09a685e86022ae93e9dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3265812 Reviewed-by: Akihiro Ota <akihiroota@chromium.org> Commit-Queue: Katie Dektar <katie@chromium.org> Cr-Commit-Position: refs/heads/main@{#940578}
- Loading branch information