tree: acbe667bfcaec565095a1a167ec03b98dc87a798 [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_panel/
  56. side_search/
  57. signin/
  58. startup/
  59. supervised_user/
  60. sync/
  61. tab_contents/
  62. tab_sharing/
  63. tabs/
  64. task_manager/
  65. test/
  66. thumbnails/
  67. toolbar/
  68. translate/
  69. user_education/
  70. views/
  71. web_applications/
  72. webauthn/
  73. webid/
  74. webui/
  75. window_name_prompt/
  76. window_sizer/
  77. zoom/
  78. accelerator_utils.h
  79. accessibility_util.h
  80. app_icon_loader.cc
  81. app_icon_loader.h
  82. app_icon_loader_delegate.h
  83. ask_google_for_suggestions_dialog_browsertest.cc
  84. breadcrumb_manager_browser_agent.cc
  85. breadcrumb_manager_browser_agent.h
  86. breadcrumb_manager_browser_agent_unittest.cc
  87. browser.cc
  88. browser.h
  89. browser_browsertest.cc
  90. browser_close_unittest.cc
  91. browser_command_controller.cc
  92. browser_command_controller.h
  93. browser_command_controller_browsertest.cc
  94. browser_command_controller_interactive_browsertest.cc
  95. browser_command_controller_unittest.cc
  96. browser_commands.cc
  97. browser_commands.h
  98. browser_commands_browsertest.cc
  99. browser_commands_chromeos.cc
  100. browser_commands_chromeos.h
  101. browser_commands_mac.h
  102. browser_commands_mac.mm
  103. browser_content_setting_bubble_model_delegate.cc
  104. browser_content_setting_bubble_model_delegate.h
  105. browser_dialogs.cc
  106. browser_dialogs.h
  107. browser_element_identifiers.cc
  108. browser_element_identifiers.h
  109. browser_finder.cc
  110. browser_finder.h
  111. browser_finder_chromeos_browsertest.cc
  112. browser_finder_chromeos_unittest.cc
  113. browser_focus_uitest.cc
  114. browser_instant_controller.cc
  115. browser_instant_controller.h
  116. browser_instant_controller_unittest.cc
  117. browser_list.cc
  118. browser_list.h
  119. browser_list_observer.h
  120. browser_list_unittest.cc
  121. browser_live_tab_context.cc
  122. browser_live_tab_context.h
  123. browser_location_bar_model_delegate.cc
  124. browser_location_bar_model_delegate.h
  125. browser_mac.cc
  126. browser_mac.h
  127. browser_navigator.cc
  128. browser_navigator.h
  129. browser_navigator_browsertest.cc
  130. browser_navigator_browsertest.h
  131. browser_navigator_browsertest_chromeos.cc
  132. browser_navigator_params.cc
  133. browser_navigator_params.h
  134. browser_navigator_params_unittest.cc
  135. browser_navigator_unittest.cc
  136. browser_otr_state.cc
  137. browser_otr_state.h
  138. browser_otr_state_android.cc
  139. browser_tab_menu_model_delegate.cc
  140. browser_tab_menu_model_delegate.h
  141. browser_tab_restorer.cc
  142. browser_tab_strip_model_delegate.cc
  143. browser_tab_strip_model_delegate.h
  144. browser_tab_strip_model_delegate_browsertest.cc
  145. browser_tab_strip_tracker.cc
  146. browser_tab_strip_tracker.h
  147. browser_tab_strip_tracker_delegate.h
  148. browser_tabrestore.cc
  149. browser_tabrestore.h
  150. browser_tabrestore_browsertest.cc
  151. browser_tabstrip.cc
  152. browser_tabstrip.h
  153. browser_tabstrip_browsertest_chromeos.cc
  154. browser_ui_prefs.cc
  155. browser_ui_prefs.h
  156. browser_unittest.cc
  157. browser_user_data.h
  158. browser_view_prefs.cc
  159. browser_view_prefs.h
  160. browser_window.h
  161. browser_window_state.cc
  162. browser_window_state.h
  163. browser_window_state_unittest.cc
  164. bubble_anchor_util.h
  165. BUILD.gn
  166. certificate_dialogs.cc
  167. certificate_dialogs.h
  168. chooser_bubble_testapi.h
  169. chrome_pages.cc
  170. chrome_pages.h
  171. chrome_select_file_policy.cc
  172. chrome_select_file_policy.h
  173. chrome_select_file_policy_unittest.cc
  174. chrome_web_modal_dialog_manager_delegate.cc
  175. chrome_web_modal_dialog_manager_delegate.h
  176. collected_cookies_browsertest.cc
  177. collected_cookies_infobar_delegate.cc
  178. collected_cookies_infobar_delegate.h
  179. color_chooser.h
  180. confirm_bubble.h
  181. confirm_bubble_model.cc
  182. confirm_bubble_model.h
  183. crypto_module_delegate_nss.cc
  184. crypto_module_delegate_nss.h
  185. crypto_module_password_dialog.h
  186. crypto_module_password_dialog_nss.cc
  187. crypto_module_password_dialog_nss.h
  188. cryptuiapi_shim.h
  189. DEPS
  190. enterprise_startup_dialog.h
  191. file_system_access_dialogs.cc
  192. file_system_access_dialogs.h
  193. focus_tab_after_navigation_helper.cc
  194. focus_tab_after_navigation_helper.h
  195. fullscreen_keyboard_browsertest_base.cc
  196. fullscreen_keyboard_browsertest_base.h
  197. hung_plugin_tab_helper.cc
  198. hung_plugin_tab_helper.h
  199. incognito_clear_browsing_data_dialog_interface.h
  200. intent_picker_tab_helper.cc
  201. intent_picker_tab_helper.h
  202. intent_picker_tab_helper_unittest.cc
  203. keyboard_lock_interactive_browsertest.cc
  204. layout_constants.cc
  205. layout_constants.h
  206. managed_ui.cc
  207. managed_ui.h
  208. managed_ui_browsertest.cc
  209. monogram_utils.cc
  210. monogram_utils.h
  211. native_window_tracker.h
  212. native_window_tracker_browsertest.cc
  213. network_profile_bubble.cc
  214. network_profile_bubble.h
  215. OWNERS
  216. platform_keys_certificate_selector_chromeos.h
  217. popup_browsertest.cc
  218. process_singleton_dialog_linux.h
  219. profile_chooser_constants.h
  220. profile_error_browsertest.cc
  221. profile_error_dialog.cc
  222. profile_error_dialog.h
  223. profile_picker.cc
  224. profile_picker.h
  225. profile_picker_unittest.cc
  226. profile_ui_test_utils.h
  227. README.md
  228. recently_audible_helper.cc
  229. recently_audible_helper.h
  230. recently_audible_helper_unittest.cc
  231. renderer_event_injection_browsertest.cc
  232. sad_tab.cc
  233. sad_tab.h
  234. sad_tab_helper.cc
  235. sad_tab_helper.h
  236. sad_tab_types.h
  237. scoped_tabbed_browser_displayer.cc
  238. scoped_tabbed_browser_displayer.h
  239. screen_capture_notification_ui.h
  240. screen_capture_notification_ui_browsertest.cc
  241. screen_capture_notification_ui_stub.cc
  242. send_mouse_move_uitest_win.cc
  243. session_crashed_bubble.h
  244. settings_window_manager_browsertest_chromeos.cc
  245. settings_window_manager_chromeos.cc
  246. settings_window_manager_chromeos.h
  247. settings_window_manager_observer_chromeos.h
  248. signin_intercept_first_run_experience_dialog.cc
  249. signin_intercept_first_run_experience_dialog.h
  250. signin_intercept_first_run_experience_dialog_browsertest.cc
  251. signin_modal_dialog.cc
  252. signin_modal_dialog.h
  253. signin_modal_dialog_impl.cc
  254. signin_modal_dialog_impl.h
  255. signin_reauth_view_controller.cc
  256. signin_reauth_view_controller.h
  257. signin_reauth_view_controller_browsertest.cc
  258. signin_view_controller.cc
  259. signin_view_controller.h
  260. signin_view_controller_delegate.cc
  261. signin_view_controller_delegate.h
  262. signin_view_controller_interactive_uitest.cc
  263. simple_message_box.h
  264. simple_message_box_internal.cc
  265. simple_message_box_internal.h
  266. singleton_tabs.cc
  267. singleton_tabs.h
  268. singleton_tabs_unittest.cc
  269. status_bubble.h
  270. storage_pressure_bubble.h
  271. tab_dialogs.cc
  272. tab_dialogs.h
  273. tab_helpers.cc
  274. tab_helpers.h
  275. tab_modal_confirm_dialog.h
  276. tab_modal_confirm_dialog_browsertest.cc
  277. tab_modal_confirm_dialog_browsertest.h
  278. tab_modal_confirm_dialog_delegate.cc
  279. tab_modal_confirm_dialog_delegate.h
  280. tab_ui_helper.cc
  281. tab_ui_helper.h
  282. tab_ui_helper_browsertest.cc
  283. ui_features.cc
  284. ui_features.h
  285. uma_browsing_activity_observer.cc
  286. uma_browsing_activity_observer.h
  287. uninstall_browser_prompt.h
  288. unload_controller.cc
  289. unload_controller.h
  290. update_chrome_dialog_browsertest.cc
  291. 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.