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