tree: 32e4b2d1fd1d42c9d640eeffb7b132a8404b479a
  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.h
  41. device_form_factor_android.cc
  42. device_form_factor_desktop.cc
  43. device_form_factor_ios.mm
  44. fullscreen_win.cc
  45. fullscreen_win.h
  46. hit_test.cc
  47. hit_test.h
  48. layout.cc
  49. layout.h
  50. menu_source_utils.cc
  51. menu_source_utils.h
  52. nine_image_painter_factory.cc
  53. nine_image_painter_factory.h
  54. owned_window_anchor.h
  55. OWNERS
  56. page_transition_types.cc
  57. page_transition_types.h
  58. README.chromium
  59. README.md
  60. scoped_visibility_tracker.cc
  61. scoped_visibility_tracker.h
  62. scoped_visibility_tracker_unittest.cc
  63. shortcut_mapping_pref_delegate.cc
  64. shortcut_mapping_pref_delegate.h
  65. template_expressions.cc
  66. template_expressions.h
  67. template_expressions_unittest.cc
  68. theme_provider.cc
  69. theme_provider.h
  70. themed_vector_icon.cc
  71. themed_vector_icon.h
  72. themed_vector_icon_unittest.cc
  73. ui_base_exports.cc
  74. ui_base_features.cc
  75. ui_base_features.h
  76. ui_base_paths.cc
  77. ui_base_paths.h
  78. ui_base_switches.h
  79. ui_base_switches_util.cc
  80. ui_base_switches_util.h
  81. ui_base_types.h
  82. ui_features.gni
  83. view_prop.cc
  84. view_prop.h
  85. view_prop_unittest.cc
  86. window_open_disposition.h
  87. window_open_disposition_utils.cc
  88. window_open_disposition_utils.h
  89. 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.