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