tree: dbe6f73f80f463f747acd6afef44db12c47938ca [path history] [tgz]
  1. accelerators/
  2. accelerometer/
  3. accessibility/
  4. ambient/
  5. animation/
  6. app_list/
  7. app_menu/
  8. ash_strings_grd/
  9. assistant/
  10. bubble/
  11. calendar/
  12. capture_mode/
  13. child_accounts/
  14. clipboard/
  15. color_enhancement/
  16. components/
  17. constants/
  18. controls/
  19. dbus/
  20. detachable_base/
  21. display/
  22. drag_drop/
  23. events/
  24. fast_ink/
  25. frame/
  26. frame_throttler/
  27. glanceables/
  28. highlighter/
  29. host/
  30. hud_display/
  31. ime/
  32. in_session_auth/
  33. keyboard/
  34. lock_screen_action/
  35. login/
  36. media/
  37. metrics/
  38. multi_capture/
  39. multi_device_setup/
  40. multi_user/
  41. perftests/
  42. policy/
  43. power/
  44. projector/
  45. public/
  46. quick_pair/
  47. resources/
  48. rgb_keyboard/
  49. rotator/
  50. search_box/
  51. services/
  52. session/
  53. shelf/
  54. shortcut_viewer/
  55. strings/
  56. style/
  57. system/
  58. test/
  59. tooltips/
  60. touch/
  61. tray_action/
  62. utility/
  63. wallpaper/
  64. webui/
  65. wm/
  66. wm_mode/
  67. ash_export.h
  68. ash_interfaces.cc
  69. ash_prefs.cc
  70. ash_strings.grd
  71. autotest_private_api_utils.cc
  72. bluetooth_devices_observer.cc
  73. bluetooth_devices_observer.h
  74. BUILD.gn
  75. cancel_mode.cc
  76. cancel_mode.h
  77. debug.cc
  78. debug.h
  79. DEPS
  80. dip_unittest.cc
  81. DIR_METADATA
  82. extended_desktop_unittest.cc
  83. focus_cycler.cc
  84. focus_cycler.h
  85. focus_cycler_unittest.cc
  86. login_status.h
  87. multi_profile_uma.cc
  88. multi_profile_uma.h
  89. OWNERS
  90. README.md
  91. root_window_controller.cc
  92. root_window_controller.h
  93. root_window_controller_unittest.cc
  94. root_window_settings.cc
  95. root_window_settings.h
  96. scoped_animation_disabler.cc
  97. scoped_animation_disabler.h
  98. screen_util.cc
  99. screen_util.h
  100. screen_util_unittest.cc
  101. shell.cc
  102. shell.h
  103. shell_delegate.cc
  104. shell_delegate.h
  105. shell_init_params.cc
  106. shell_init_params.h
  107. shell_observer.h
  108. shell_tab_handler.cc
  109. shell_tab_handler.h
  110. shell_test_api.cc
  111. shell_unittest.cc
  112. shutdown_controller_impl.cc
  113. shutdown_controller_impl.h
  114. shutdown_reason.cc
  115. shutdown_reason.h
  116. test_media_client.cc
  117. test_media_client.h
  118. test_shell_delegate.cc
  119. test_shell_delegate.h
  120. window_tree_host_lookup.cc
  121. window_user_data.h
  122. window_user_data_unittest.cc
ash/README.md

Ash

Ash is the “Aura Shell”, the window manager and system UI for Chrome OS. Ash uses the views UI toolkit (e.g. views::View, views::Widget, etc.) backed by the aura native widget and layer implementations.

Dependencies

Ash sits below chrome in the dependency graph (i.e. it cannot depend on code in //chrome). For historical reasons, ash has multiple dependency levels:

  • General //ash code is on top (//ash/system, //ash/wm, etc.)
  • //ash/components sit below //ash, see README
  • //ash/constants sit near the bottom of the dependency graph, see README

Access to Ash internals is controlled by DEPS files. Unless explicitly allowed by DEPS, code outside Ash should depend on the interfaces in //ash/public. Check with OWNERS if you have questions.

Tests

Tests should be added to the ash_unittests target.

Tests can bring up most of the ash UI and simulate a login session by deriving from AshTestBase. This is often needed to test code that depends on ash::Shell and the controllers it owns.

Test support code (TestFooDelegate, FooControllerTestApi, etc.) lives in the same directory as the class under test (e.g. //ash/foo rather than //ash/test). Test code uses namespace ash; there is no special “test” namespace.

base::raw_ptr<>

Use of base::raw_ptr<> is allowed but not required in //ash.

Chromium's Windows and Android codebases were converted in mid-2022 to use base:raw_ptr<> for class and struct members as part of the “MiraclePtr” security project. ChromeOS code was not converted, hence //ash was not converted.

Until //ash is bulk converted (no ETA yet), feel free to use traditional pointer members if that would be more consistent with surrounding code.

Prefs

Ash supports both per-user prefs and device-wide prefs. These are called “profile prefs” and “local state” to match the naming conventions in chrome. Ash also supports “signin screen” prefs, bound to a special profile that allows users to toggle features like spoken feedback at the login screen.

Pref names are in //ash/public/cpp so that code in chrome can also use the names. Prefs are registered in the classes that use them because those classes have the best knowledge of default values.

Historical notes

Ash shipped on Windows for a couple years to support Windows 8 Metro mode. Windows support was removed in 2016.

The mash (some times called mus-ash or mustash) project was an effort to move ash into its own process and the browser in its own process. Communication between the two processes was done over mojo. Windowing was done using the window-service (some times called mus), which ran with Ash. Many of the mojo interfaces have been converted to pure virtual interfaces, with the implementation in ash. The mash project was stopped around 4/2019.