[go: nahoru, domu]

tree: f8d7b9b83ec946c2a752b2d2d48fc9cc82dbed51 [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. curtain/
  20. dbus/
  21. detachable_base/
  22. display/
  23. drag_drop/
  24. events/
  25. fast_ink/
  26. frame/
  27. frame_throttler/
  28. glanceables/
  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. session/
  52. shelf/
  53. shortcut_viewer/
  54. strings/
  55. style/
  56. system/
  57. test/
  58. tooltips/
  59. touch/
  60. tray_action/
  61. utility/
  62. wallpaper/
  63. webui/
  64. wm/
  65. wm_mode/
  66. ash_export.h
  67. ash_interfaces.cc
  68. ash_prefs.cc
  69. ash_strings.grd
  70. autotest_private_api_utils.cc
  71. bluetooth_devices_observer.cc
  72. bluetooth_devices_observer.h
  73. BUILD.gn
  74. cancel_mode.cc
  75. cancel_mode.h
  76. debug.cc
  77. debug.h
  78. DEPS
  79. dip_unittest.cc
  80. DIR_METADATA
  81. extended_desktop_unittest.cc
  82. focus_cycler.cc
  83. focus_cycler.h
  84. focus_cycler_unittest.cc
  85. fullscreen_pixeltest.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.