Commit 1a327015 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Add/update READMEs for various directories I own.

As requested in https://bit.ly/chromium-readme-tracker .

Bug: none
Change-Id: Ib25c6c9cb7a72ffbbca308b61295aab6018012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336181
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795020}
parent 67177957
......@@ -2,10 +2,13 @@ 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.
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", pronounced "sea
bee you eye".
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
......@@ -35,3 +38,8 @@ This pattern often looks like this:
//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.
The country codes component deals with 2-letter country codes (aka ISO 3166-1).
Its primary purpose is to interface with platform-specific functionality to
provide a unified API to find out "what is the system's current country code".
The Google component deals with Google- (and Google-owned-property-)specific
URLs and utilities. This includes functions that determine if URLs are various
types of Google URLs, getters for Google search URLs, and various URL
manipulation functions.
Since Chrome should serve users of all search engines, URLs, and products well,
be hesitant before keying behavior to these functions. Consider whether the
proposed behavior would appear innocuous and appealing if you worked for a
direct Google competitor, as well as whether you'd want a standardized mechanism
for other sites to achieve the same results.
- Infobars is a layered component
(https://sites.google.com/a/chromium.org/dev/developers/design-documents/layered-components-design)
to enable it to be shared cleanly on iOS.
Directory structure:
core/: shared code that does not depend on src/content/
content/: Driver for the shared code based on the content layer.
The infobars component contains the core types for infobars, a UI surface that
shows informative but generally nonblocking updates to users related to their
current page content. This is used on both desktop and mobile, though the
presentation and available infobars both differ. On desktop, for example,
infobars are a thin bar atop the page, while on Android an "infobar" is a
larger, popup-like surface at screen bottom.
Infobars are a problematic UI design for various reasons (spoofability,
dynamically modifying content area size, not being visually anchored and scoped
well), and are occasionally used for purposes outside their original intent
(e.g. the "default browser" infobar, which does not relate to the page content).
Be cautious about adding new ones.
Infobars is a layered component
(https://sites.google.com/a/chromium.org/dev/developers/design-documents/layered-components-design)
to enable it to be shared cleanly on iOS.
Directory structure:
android/: Android-specific specializations
core/: Shared code that does not depend on src/content/
content/: Driver for the shared code based on the content layer
The URL Formatter component contains utilities to convert between URLs and
human-entered/human-readable strings. Broadly, consuming human-entered URLs
happens via "fixup", which tries to make "reasonable" adjustments to strings to
convert them into URLs (e.g. auto-prepending schemes, but also many more, some
of which may be surprising). Producing human-readable URLs happens via
"formatting", which can strip unimportant parts of the URL, unescape/decode
sections, etc.
These functions are meant to work in conjunction with the stricter, more limited
capabilities of GURL, and were originally designed for use with the omnibox,
though they've since been used in other parts of the UI as well.
Because these functions are powerful, it's possible to introduce security risks
with incautious use. Be sure you understand what you need and what they're
doing before using them; don't just copy existing callers.
WebData is not allowed to depend on content/, because it is used by iOS.
If dependences on content/ need to be added to WebData, it will have to be made
into a layered component: see
http://www.chromium.org/developers/design-documents/layered-components-design
for more information.
The webdata component manages the "web database", a SQLite database stored in
the user's profile containing various webpage-related metadata such as autofill
and web search engine data.
This component is not allowed to depend on content/, because it is used by iOS.
If dependencies on content/ need to be added, this component will have to be
made into a layered component: see
https://www.chromium.org/developers/design-documents/layered-components-design .
The webdata services component contains the wrappers used to access the specific
services built atop the web database (see //components/webdata/). Because there
is a single database instance, the various services accessing different tables
are created and destroyed together, and this component is what does that tying
together.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment