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