This directory contains the implementation of the Chromium UI. There are subdirectories with implementations for specific toolkits and OSes.
This directory is often referred to in conversation as “cbui” or “c/b/ui”, pronounced “sea bee you eye”.
Important subdirectories:
Historically, the goal of this directory was to be platform agnostic, with platform-specific logic in the above sub-directories. This didn‘t work and attempting to maintain this structure was causing more problems than it was solving, so we’ve removed this requirement.
In the event that a feature does need platform-specific implementations, use the following structure:
//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.