virtual_keyboard.mojom 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. module crosapi.mojom;
  5. // The virtual keyboard features that RestrictFeatures API can control, this
  6. // should align with the definition of FeatureRestrictions in
  7. // extensions/common/api/virtual_keyboard.idl
  8. [Stable, Extensible]
  9. enum VirtualKeyboardFeature {
  10. [Default] NONE = 0, // invalid restriction type
  11. AUTOCOMPLETE = 1,
  12. AUTOCORRECT = 2,
  13. HANDWRITING = 3,
  14. SPELL_CHECK = 4,
  15. VOICE_INPUT = 5,
  16. };
  17. // A list of enabled features and a list of disabled features that users want to
  18. // change. Ideally no feature should appear in both lists, but if it happens, it
  19. // will be disabled. VirtualKeyboardFeature::NONE should not be in any of the
  20. // lists.
  21. [Stable]
  22. struct VirtualKeyboardRestrictions {
  23. // A list of features we want to enable.
  24. array<VirtualKeyboardFeature> enabled_features;
  25. // A list of features we want to disable.
  26. array<VirtualKeyboardFeature> disabled_features;
  27. };
  28. // VirtualKeyboard is a service that allows trusted extensions in Lacros
  29. // to control the virtual keyboard.
  30. [Stable, Uuid="1236c20e-5ddd-4ecd-bacf-37c2f5d112fe"]
  31. interface VirtualKeyboard {
  32. // Sets restrictions on features provided by the virtual keyboard.
  33. RestrictFeatures@0(VirtualKeyboardRestrictions restrictions) =>
  34. (VirtualKeyboardRestrictions updated);
  35. };