clipboard_history.mojom 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2021 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. import "ui/gfx/geometry/mojom/geometry.mojom";
  6. import "ui/base/mojom/ui_base_types.mojom";
  7. // The different ways the multipaste menu can be shown. These values are
  8. // written to logs. New enum values can be added, but existing enums must
  9. // never be renumbered, deleted, or reused. If adding an enum, add it at the
  10. // bottom.
  11. [Stable, Extensible]
  12. enum ClipboardHistoryControllerShowSource {
  13. // Shown by the accelerator(search + v).
  14. kAccelerator,
  15. // Shown by a render view's context menu.
  16. kRenderViewContextMenu,
  17. // Shown by a textfield context menu.
  18. kTextfieldContextMenu,
  19. // Shown by the virtual keyboard.
  20. kVirtualKeyboard,
  21. // Used as a default value in case of version skew.
  22. [Default] kUnknown
  23. };
  24. // This interface is implemented by Ash-Chrome.
  25. // ClipboardHistory (//ash/clipboard) is an Ash-Chrome feature that shows the
  26. // last few things copied. It is shown by accelerator and contextual menu. This
  27. // allows Lacros-Chrome to show the ClipboardHistory menu by contextual menu.
  28. [Stable, Uuid="2dc3f126-d79f-4d9e-a7a7-0989c1be8acd"]
  29. interface ClipboardHistory {
  30. // Shows a menu in Ash-Chrome with the last few things copied.
  31. ShowClipboard@0(gfx.mojom.Rect anchor_point,
  32. ui.mojom.MenuSourceType menu_source_type,
  33. crosapi.mojom.ClipboardHistoryControllerShowSource show_source);
  34. };