tree: 688514835455e6a49e8a4a8d9c84ded83fb80710
  1. accelerators/
  2. clipboard/
  3. cocoa/
  4. cursor/
  5. data_transfer_policy/
  6. dragdrop/
  7. emoji/
  8. glib/
  9. identifier/
  10. idle/
  11. ime/
  12. interaction/
  13. l10n/
  14. linux/
  15. metadata/
  16. models/
  17. mojom/
  18. pointer/
  19. prediction/
  20. resource/
  21. test/
  22. text/
  23. unowned_user_data/
  24. user_activity/
  25. wayland/
  26. webui/
  27. win/
  28. x/
  29. base_window.cc
  30. base_window.h
  31. BUILD.gn
  32. class_properties.cc
  33. class_properties.h
  34. class_property.cc
  35. class_property.h
  36. class_property_unittest.cc
  37. command_id_constants.h
  38. default_style.h
  39. DEPS
  40. device_form_factor.cc
  41. device_form_factor.h
  42. device_form_factor_android.cc
  43. device_form_factor_desktop.cc
  44. device_form_factor_ios.mm
  45. fullscreen_win.cc
  46. fullscreen_win.h
  47. hit_test.cc
  48. hit_test.h
  49. layout.cc
  50. layout.h
  51. menu_source_utils.cc
  52. menu_source_utils.h
  53. nine_image_painter_factory.cc
  54. nine_image_painter_factory.h
  55. owned_window_anchor.h
  56. OWNERS
  57. page_transition_types.cc
  58. page_transition_types.h
  59. README.chromium
  60. README.md
  61. scoped_visibility_tracker.cc
  62. scoped_visibility_tracker.h
  63. scoped_visibility_tracker_unittest.cc
  64. shortcut_mapping_pref_delegate.cc
  65. shortcut_mapping_pref_delegate.h
  66. template_expressions.cc
  67. template_expressions.h
  68. template_expressions_unittest.cc
  69. theme_provider.cc
  70. theme_provider.h
  71. themed_vector_icon.cc
  72. themed_vector_icon.h
  73. themed_vector_icon_unittest.cc
  74. ui_base_exports.cc
  75. ui_base_features.cc
  76. ui_base_features.h
  77. ui_base_paths.cc
  78. ui_base_paths.h
  79. ui_base_switches.h
  80. ui_base_switches_util.cc
  81. ui_base_switches_util.h
  82. ui_base_types.h
  83. ui_features.gni
  84. view_prop.cc
  85. view_prop.h
  86. view_prop_unittest.cc
  87. window_open_disposition.h
  88. window_open_disposition_utils.cc
  89. window_open_disposition_utils.h
  90. wm_role_names_linux.h
ui/base/README.md

//ui/base

This directory contains low-level code that is reused throughout the chromium UI stack. Code in this directory can't depend on most of the rest of //ui (with a few exceptions), and code throughout the rest of //ui can depend on it.

Toolkit-specific libraries in this directory include:

  • cocoa: for working with Cocoa on macOS
  • wayland: for Linux systems with Wayland
  • webui: for WebUI in Chromium
  • win: for Windows systems
  • x: for Linux systems with X11

Platform-independent libraries in this directory include:

  • l10n: localization APIs used throughout all of chromium, especially the widely-used l10n_util::GetString* functions
  • metadata: the implementation of the property/metadata system used throughout views
  • models: toolkit-agnostic types used to represent the data shown in UI controls and dialogs
  • resource: resource bundle APIs, which are used for retrieving icons and raw localized strings from the app package

As with most “base” libraries this is somewhat of a dumping ground of code that is used in a bunch of other places, and there‘s no hard and fast rule to tell what should or shouldn’t be in here. If in doubt, consult with the owners.