tree: 94b7af3587a0be878afa88bde0885c40c3655a54 [path history] [tgz]
  1. android/
  2. app_list/
  3. apps/
  4. ash/
  5. aura/
  6. autofill/
  7. autofill_assistant/
  8. blocked_content/
  9. bluetooth/
  10. bookmarks/
  11. cocoa/
  12. color/
  13. commander/
  14. commerce/
  15. content_settings/
  16. cookie_controls/
  17. dialogs/
  18. docs/
  19. download/
  20. exclusive_access/
  21. extensions/
  22. fast_checkout/
  23. find_bar/
  24. frame/
  25. global_error/
  26. global_media_controls/
  27. hats/
  28. hid/
  29. hung_renderer/
  30. interventions/
  31. javascript_dialogs/
  32. lacros/
  33. lens/
  34. location_bar/
  35. login/
  36. media_router/
  37. messages/
  38. omnibox/
  39. page_action/
  40. page_info/
  41. passwords/
  42. pdf/
  43. permission_bubble/
  44. prefs/
  45. privacy_sandbox/
  46. qrcode_generator/
  47. quick_answers/
  48. read_later/
  49. search/
  50. search_engines/
  51. send_tab_to_self/
  52. serial/
  53. shared_highlighting/
  54. sharing_hub/
  55. side_search/
  56. signin/
  57. startup/
  58. supervised_user/
  59. sync/
  60. tab_contents/
  61. tab_sharing/
  62. tabs/
  63. task_manager/
  64. test/
  65. thumbnails/
  66. toolbar/
  67. translate/
  68. user_education/
  69. views/
  70. web_applications/
  71. webauthn/
  72. webid/
  73. webui/
  74. window_name_prompt/
  75. window_sizer/
  76. zoom/
  77. accelerator_utils.h
  78. accessibility_util.h
  79. app_icon_loader.cc
  80. app_icon_loader.h
  81. app_icon_loader_delegate.h
  82. ask_google_for_suggestions_dialog_browsertest.cc
  83. breadcrumb_manager_browser_agent.cc
  84. breadcrumb_manager_browser_agent.h
  85. breadcrumb_manager_browser_agent_unittest.cc
  86. browser.cc
  87. browser.h
  88. browser_browsertest.cc
  89. browser_close_unittest.cc
  90. browser_command_controller.cc
  91. browser_command_controller.h
  92. browser_command_controller_browsertest.cc
  93. browser_command_controller_interactive_browsertest.cc
  94. browser_command_controller_unittest.cc
  95. browser_commands.cc
  96. browser_commands.h
  97. browser_commands_browsertest.cc
  98. browser_commands_chromeos.cc
  99. browser_commands_chromeos.h
  100. browser_commands_mac.h
  101. browser_commands_mac.mm
  102. browser_content_setting_bubble_model_delegate.cc
  103. browser_content_setting_bubble_model_delegate.h
  104. browser_dialogs.cc
  105. browser_dialogs.h
  106. browser_element_identifiers.cc
  107. browser_element_identifiers.h
  108. browser_finder.cc
  109. browser_finder.h
  110. browser_finder_chromeos_browsertest.cc
  111. browser_finder_chromeos_unittest.cc
  112. browser_focus_uitest.cc
  113. browser_instant_controller.cc
  114. browser_instant_controller.h
  115. browser_instant_controller_unittest.cc
  116. browser_list.cc
  117. browser_list.h
  118. browser_list_observer.h
  119. browser_list_unittest.cc
  120. browser_live_tab_context.cc
  121. browser_live_tab_context.h
  122. browser_location_bar_model_delegate.cc
  123. browser_location_bar_model_delegate.h
  124. browser_mac.cc
  125. browser_mac.h
  126. browser_navigator.cc
  127. browser_navigator.h
  128. browser_navigator_browsertest.cc
  129. browser_navigator_browsertest.h
  130. browser_navigator_browsertest_chromeos.cc
  131. browser_navigator_params.cc
  132. browser_navigator_params.h
  133. browser_navigator_params_unittest.cc
  134. browser_navigator_unittest.cc
  135. browser_otr_state.cc
  136. browser_otr_state.h
  137. browser_otr_state_android.cc
  138. browser_tab_menu_model_delegate.cc
  139. browser_tab_menu_model_delegate.h
  140. browser_tab_restorer.cc
  141. browser_tab_strip_model_delegate.cc
  142. browser_tab_strip_model_delegate.h
  143. browser_tab_strip_model_delegate_browsertest.cc
  144. browser_tab_strip_tracker.cc
  145. browser_tab_strip_tracker.h
  146. browser_tab_strip_tracker_delegate.h
  147. browser_tabrestore.cc
  148. browser_tabrestore.h
  149. browser_tabrestore_browsertest.cc
  150. browser_tabstrip.cc
  151. browser_tabstrip.h
  152. browser_ui_prefs.cc
  153. browser_ui_prefs.h
  154. browser_unittest.cc
  155. browser_user_data.h
  156. browser_view_prefs.cc
  157. browser_view_prefs.h
  158. browser_window.h
  159. browser_window_state.cc
  160. browser_window_state.h
  161. browser_window_state_unittest.cc
  162. bubble_anchor_util.h
  163. BUILD.gn
  164. certificate_dialogs.cc
  165. certificate_dialogs.h
  166. chooser_bubble_testapi.h
  167. chrome_pages.cc
  168. chrome_pages.h
  169. chrome_select_file_policy.cc
  170. chrome_select_file_policy.h
  171. chrome_select_file_policy_unittest.cc
  172. chrome_web_modal_dialog_manager_delegate.cc
  173. chrome_web_modal_dialog_manager_delegate.h
  174. collected_cookies_browsertest.cc
  175. collected_cookies_infobar_delegate.cc
  176. collected_cookies_infobar_delegate.h
  177. color_chooser.h
  178. confirm_bubble.h
  179. confirm_bubble_model.cc
  180. confirm_bubble_model.h
  181. crypto_module_delegate_nss.cc
  182. crypto_module_delegate_nss.h
  183. crypto_module_password_dialog.h
  184. crypto_module_password_dialog_nss.cc
  185. crypto_module_password_dialog_nss.h
  186. cryptuiapi_shim.h
  187. DEPS
  188. enterprise_startup_dialog.h
  189. file_system_access_dialogs.cc
  190. file_system_access_dialogs.h
  191. focus_tab_after_navigation_helper.cc
  192. focus_tab_after_navigation_helper.h
  193. fullscreen_keyboard_browsertest_base.cc
  194. fullscreen_keyboard_browsertest_base.h
  195. hung_plugin_tab_helper.cc
  196. hung_plugin_tab_helper.h
  197. incognito_clear_browsing_data_dialog_interface.h
  198. intent_picker_tab_helper.cc
  199. intent_picker_tab_helper.h
  200. intent_picker_tab_helper_unittest.cc
  201. keyboard_lock_interactive_browsertest.cc
  202. layout_constants.cc
  203. layout_constants.h
  204. managed_ui.cc
  205. managed_ui.h
  206. managed_ui_browsertest.cc
  207. monogram_utils.cc
  208. monogram_utils.h
  209. native_window_tracker.h
  210. native_window_tracker_browsertest.cc
  211. network_profile_bubble.cc
  212. network_profile_bubble.h
  213. OWNERS
  214. platform_keys_certificate_selector_chromeos.h
  215. popup_browsertest.cc
  216. process_singleton_dialog_linux.h
  217. profile_chooser_constants.h
  218. profile_error_browsertest.cc
  219. profile_error_dialog.cc
  220. profile_error_dialog.h
  221. profile_picker.cc
  222. profile_picker.h
  223. profile_picker_unittest.cc
  224. profile_ui_test_utils.h
  225. README.md
  226. recently_audible_helper.cc
  227. recently_audible_helper.h
  228. recently_audible_helper_unittest.cc
  229. renderer_event_injection_browsertest.cc
  230. sad_tab.cc
  231. sad_tab.h
  232. sad_tab_helper.cc
  233. sad_tab_helper.h
  234. sad_tab_types.h
  235. scoped_tabbed_browser_displayer.cc
  236. scoped_tabbed_browser_displayer.h
  237. screen_capture_notification_ui.h
  238. screen_capture_notification_ui_browsertest.cc
  239. screen_capture_notification_ui_stub.cc
  240. send_mouse_move_uitest_win.cc
  241. session_crashed_bubble.h
  242. settings_window_manager_browsertest_chromeos.cc
  243. settings_window_manager_chromeos.cc
  244. settings_window_manager_chromeos.h
  245. settings_window_manager_observer_chromeos.h
  246. signin_intercept_first_run_experience_dialog.cc
  247. signin_intercept_first_run_experience_dialog.h
  248. signin_intercept_first_run_experience_dialog_browsertest.cc
  249. signin_modal_dialog.cc
  250. signin_modal_dialog.h
  251. signin_modal_dialog_impl.cc
  252. signin_modal_dialog_impl.h
  253. signin_reauth_view_controller.cc
  254. signin_reauth_view_controller.h
  255. signin_reauth_view_controller_browsertest.cc
  256. signin_view_controller.cc
  257. signin_view_controller.h
  258. signin_view_controller_delegate.cc
  259. signin_view_controller_delegate.h
  260. signin_view_controller_interactive_uitest.cc
  261. simple_message_box.h
  262. simple_message_box_internal.cc
  263. simple_message_box_internal.h
  264. singleton_tabs.cc
  265. singleton_tabs.h
  266. status_bubble.h
  267. storage_pressure_bubble.h
  268. tab_dialogs.cc
  269. tab_dialogs.h
  270. tab_helpers.cc
  271. tab_helpers.h
  272. tab_modal_confirm_dialog.h
  273. tab_modal_confirm_dialog_browsertest.cc
  274. tab_modal_confirm_dialog_browsertest.h
  275. tab_modal_confirm_dialog_delegate.cc
  276. tab_modal_confirm_dialog_delegate.h
  277. tab_ui_helper.cc
  278. tab_ui_helper.h
  279. tab_ui_helper_browsertest.cc
  280. ui_features.cc
  281. ui_features.h
  282. uma_browsing_activity_observer.cc
  283. uma_browsing_activity_observer.h
  284. uninstall_browser_prompt.h
  285. unload_controller.cc
  286. unload_controller.h
  287. update_chrome_dialog_browsertest.cc
  288. view_ids.h
chrome/browser/ui/README.md

This directory contains the implementation of the Chromium UI. Code in the root of this directory is toolkit- and platform-independent. There are subdirectories with implementations for specific toolkits and OSes. Code in the root of this directory should not be aware of platform-specific implementation details or reach into the platform implementation subdirectories. This directory also should not contain browser-process-scoped items that are not UI-specific, such as parts of the startup logic; these sorts of things belong elsewhere in chrome/browser/.

This directory is often referred to in conversation as “cbui” or “c/b/ui”, pronounced “sea bee you eye”.

Important subdirectories:

  • views - the Views implementation of the UI, used on Windows, Mac, Linux, and ChromeOS. This includes things like the browser window itself, tabs, dialogs, etc.
  • cocoa - the remaining Cocoa UI, used only on Mac. This directory used to contain a separate full implementation of the UI, parallel to the Views implementation.
  • android - part of the Android implementation of the UI. See also //chrome/browser/android.
  • webui - the WebUI parts of the browser UI. This includes things like the chrome://settings page and other WebUI pages.

A common pattern is for code in //chrome/browser/ui to define a platform-independent interface which then has implementations in //chrome/browser/ui/views and //chrome/browser/ui/android. This pattern is often followed even for features that don't exist on Android, in which case the Android implementation is often a stub.

This pattern often looks like this:

//chrome/browser/ui/browser_dialogs.h:
void ShowMyDialog(...);

//chrome/browser/ui/views/my_dialog_views.cc:
void ShowMyDialog(...) { ... }

//chrome/browser/ui/android/my_dialog_android.cc:
void ShowMyDialog(...) { ... }

Because “Chromium UI” is such a large surface area, do not add new files directly to this directory; instead, add subdirectories with more specific OWNERS and place new features and files in them. Cleanup of existing scattered files is also welcome.