blob: 240d40311ef99d083c5ea082830a120a30a9879c [file] [log] [blame] [view]
Erik Chen598410c2024-04-11 21:05:511This directory contains the implementation of the Chromium UI. There are
2subdirectories with implementations for specific toolkits and OSes.
Elly Fong-Jones03efb302020-06-29 21:06:273
Peter Kasting1a327012020-08-05 14:57:124This directory is often referred to in conversation as "cbui" or "c/b/ui",
5pronounced "sea bee you eye".
Elly Fong-Jones03efb302020-06-29 21:06:276
7Important subdirectories:
Scott Violet9a540f3e2020-07-13 15:13:458* views - the Views implementation of the UI, used on Windows, Mac, Linux, and
Di Wu2c057082025-04-07 00:10:249 ChromeOS. This includes features like Omnibox, downloads.
Scott Violet9a540f3e2020-07-13 15:13:4510* cocoa - the remaining Cocoa UI, used only on Mac. This directory used to
Elly Fong-Jones03efb302020-06-29 21:06:2711 contain a separate full implementation of the UI, parallel to the
12 Views implementation.
Scott Violet9a540f3e2020-07-13 15:13:4513* android - part of the Android implementation of the UI. See also
Elly Fong-Jones03efb302020-06-29 21:06:2714 //chrome/browser/android.
Scott Violet9a540f3e2020-07-13 15:13:4515* webui - the WebUI parts of the browser UI. This includes things like the
Elly Fong-Jones03efb302020-06-29 21:06:2716 chrome://settings page and other WebUI pages.
17
Erik Chen598410c2024-04-11 21:05:5118Historically, the goal of this directory was to be platform agnostic, with
19platform-specific logic in the above sub-directories. This didn't work and
20attempting to maintain this structure was causing more problems than it was
21solving, so we've removed this requirement.
Elly Fong-Jones03efb302020-06-29 21:06:2722
Erik Chen598410c2024-04-11 21:05:5123In the event that a feature does need platform-specific implementations, use the
24following structure:
Elly Fong-Jones03efb302020-06-29 21:06:2725
Erik Chen598410c2024-04-11 21:05:5126[//chrome/browser/ui/browser_dialogs.h](browser_dialogs.h):
Scott Violet9a540f3e2020-07-13 15:13:4527 void ShowMyDialog(...);
Elly Fong-Jones03efb302020-06-29 21:06:2728
Erik Chen598410c2024-04-11 21:05:5129//chrome/browser/ui/views/my_dialog_views.cc:
Scott Violet9a540f3e2020-07-13 15:13:4530 void ShowMyDialog(...) { ... }
Elly Fong-Jones03efb302020-06-29 21:06:2731
Erik Chen598410c2024-04-11 21:05:5132//chrome/browser/ui/android/my_dialog_android.cc:
Scott Violet9a540f3e2020-07-13 15:13:4533 void ShowMyDialog(...) { ... }
Peter Kasting1a327012020-08-05 14:57:1234
35Because "Chromium UI" is such a large surface area, do not add new files
36directly to this directory; instead, add subdirectories with more specific
37OWNERS and place new features and files in them. Cleanup of existing scattered
38files is also welcome.