tree: b02848fd08d3effd105b30c4a0b616276b287dba [path history] [tgz]
  1. BUILD.gn
  2. DEPS
  3. DIR_METADATA
  4. OWNERS
  5. README.md
  6. clipboard.cc
  7. clipboard.h
  8. clipboard_android.cc
  9. clipboard_android.h
  10. clipboard_android_test_support.cc
  11. clipboard_buffer.h
  12. clipboard_constants.cc
  13. clipboard_constants.h
  14. clipboard_constants_mac.mm
  15. clipboard_data.cc
  16. clipboard_data.h
  17. clipboard_data_endpoint.cc
  18. clipboard_data_unittest.cc
  19. clipboard_format_type.h
  20. clipboard_format_type_android.cc
  21. clipboard_format_type_aura.cc
  22. clipboard_format_type_mac.mm
  23. clipboard_format_type_win.cc
  24. clipboard_linux.cc
  25. clipboard_mac.h
  26. clipboard_mac.mm
  27. clipboard_mac_unittest.mm
  28. clipboard_metrics.cc
  29. clipboard_metrics.h
  30. clipboard_monitor.cc
  31. clipboard_monitor.h
  32. clipboard_non_backed.cc
  33. clipboard_non_backed.h
  34. clipboard_non_backed_unittest.cc
  35. clipboard_observer.cc
  36. clipboard_observer.h
  37. clipboard_ozone.cc
  38. clipboard_ozone.h
  39. clipboard_test_template.h
  40. clipboard_unittest.cc
  41. clipboard_util_mac.h
  42. clipboard_util_mac.mm
  43. clipboard_util_mac_unittest.mm
  44. clipboard_util_win.cc
  45. clipboard_util_win.h
  46. clipboard_win.cc
  47. clipboard_win.h
  48. clipboard_x11.cc
  49. clipboard_x11.h
  50. custom_data_helper.cc
  51. custom_data_helper.h
  52. custom_data_helper_unittest.cc
  53. scoped_clipboard_writer.cc
  54. scoped_clipboard_writer.h
  55. test/
ui/base/clipboard/README.md

Platform-neutral clipboard abstractions, to access platform-specific clipboards (copy/paste) without platform-specific code.

Interfaces include:

  • Clipboard: reading/pasting from the clipboard.
  • ScopedClipboardWriter: writing/copying to the clipboard.
  • ClipboardObserver: notifications of clipboard events.
  • ClipboardFormatType: specifying clipboard formats.

While most platform-specific behavior should be abstracted away, some may still be exposed. For some notable platform-specific behavior exposed by these interfaces:

  • ClipboardAndroid has a more limited set of supported formats.
  • ClipboardObserver is only supported on some platforms, as other platforms may require (inefficient) polling to implement.
  • ClipboardX11 supports both the usual clipboard buffer, as well as the selection (middle-click) paste buffer.
  • DataTransferPolicyController is only currently exercised in ChromeOS.