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