Chromium/zh-cn

Chromium 是Article description::Google [[Chrome 网络浏览器的开源版本. ]] 它具有最小的用户界面、强大的网络开发工具和内置的任务管理器. Chromium 项目处于实施新 Web 标准的最前沿.

Because Chromium is open source it is legally unable to include several features that the proprietary Google Chrome browser includes by default. Namely automatic updates. A complete list of the differences can be found in the chromium repository.

l10n (语言)
Chromium 中的 USE_EXPAND 有许多可用的语言. 事实上，它们多到维基无法显示所有. 要获得完整的语言列表，请运行：

有关本地化的更多信息，请参阅 本地化文章.

Emerge
根据需要设置 USE 标志后，使用以下命令 Chromium：

Clang
To build Chromium with Clang, first see.

For Chromium specifically, the following env settings are needed:

Then enable it (note that we take the base Clang config from the other article, then add the settings we just defined):

HiDPI
Chromium 的视觉输出通常不与 Desktop environment 的 DPI 缩放关联. 可以使用  命令行选项指示它以缩放模式启动. 此选项可以传递一个整数或十进制值. 标准缩放从 1.0 开始. 例如，要将 Chromium 的 UI 放大 1.5 倍：

可以在 此处 找到命令行开关的完整列表.

本地 Wayland 支持
从版本 87 开始，可以通过传递以下 选项 来启用 Chromium 中的原生 Wayland 支持：

要将 Chromium 设置为每次使用 Wayland 后端启动，请在用户的 Chromium 配置文件中附加以下几行：

Enable dark theme for pages (prefers-color-scheme)
Because of bug in May 2022 Chromium on GTK do not understand that user want to see dark pages. But you can set this preference manually:

First is for regular pages, the second is for internal chrome:// pages.

禁用标签悬停卡
从版本 91.0.4472.77 开始，不再可能在 Chrome 标志中禁用标签悬停卡. Google 也似乎没有优先考虑重新添加此功能. 为了禁用它们，你可以将此补丁添加到 Portage：

{{FileBox|filename=/etc/portage/patches/www-client/chromium/hover-card.patch|lang=diff|1= diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc index 59e2d1e1fc..d94947109c 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc @@ -2119,6 +2119,7 @@ void TabStrip::OnMouseEventInTab(views::View* source, } void TabStrip::UpdateHoverCard(Tab* tab, HoverCardUpdateType update_type) { + return;   // We don't want to show a hover card while the tabstrip is animating.   if (bounds_animator_.IsAnimating) {     // Once we're animating the hover card should already be hidden. }}

另请参阅 添加标签悬停卡的设置.

Policies
It is possible to set specific policies for chromium. This can be useful especially if the browser should be accessible by users, but the content should be restricted to trusted sites. It can also be configured to restrict the access to specified URIs, like the  protocol, to prevent users from surfing the file system.

Chromium looks in for existing policies. There are two types of policies which can be defined:
 * managed
 * recommended

Generally managed policies are maintained by an administrator and recommended policies are recommended for users but not required. For further information about the two policy types the documentation should be referred on the Google Chrome support page.

The following example assumes managed policies. However, the procedure for recommended policies is very similar and can be found in the Chromium documentation.

Creating of managed policies
To set custom managed policies, a JSON file must be created in

The structure of the JSON file is the same for all chromium based browsers (Chrome, Chromium, Brave etc). An example JSON file could look like this:

This prevents the user from surfing on the file system using the file protocol, incognito mode, blocks the listed URIs and URLs, and the location and notifications. More settings, can be found in the policy list: https://www.chromium.org/administrators/policy-list-3/. If configured for other users as a service, it is recommended to block all sites at first and then define the allowed sites, to avoid abuse of the service. Please note that this only blocks the user from visiting specified locations. It does not disable the protocols on the system, so other applications must be configured separately.

If the policy was configured properly can be proofed on the special page:.

For a better structure, it is also possible to spread the policies over multiple JSON files. In this case it is indispensable to ensure that the same policy occurs only once per all files! If a policy is defined multiple times across the JSON files than the state of the policy will be undefined and it would be unclear which rule would be used!

Meaningful filenames and a simple grep across the files in case of doubt can help to prevent such misconfigurations.

Chrome 网址
与 Firefox 非常相似，Chromium 有许多内部 Chrome 网址（特殊页面），用于额外配置、故障排除、任务管理等. 可以通过导航到以下位置访问特殊页面的详尽列表：

突出的特殊页面包括：


 * - Shows enabled components and provides a button to check for updates for each of them. It is sometimes necessary to manually update the PPAPI Adobe flash module via this interfaces when using.
 * - Displays the About page which includes version information.
 * - A page to manage extensions.
 * - Enable/disable experimental features.
 * - Displays special information about the Adobe Flash Player (if it is accessible by Chromium).
 * - Displays information about use of graphics acceleration.
 * - Displays web history. Also accessible through the sandwich menu or by pressing +.
 * - Measure the memory usage of the browser and per-tab usage.
 * - Lots of information on network connections.
 * - Shows a list of plugins. Enable/disable them from this interface. (Deprecated in Chrome version 57 .)
 * - Displays more version information than the  page.

标签页崩溃
Chromium 中的标签页偶尔会崩溃. 这可能由很多原因引起，但最常见的原因之一是系统内存不足. 在 Gentoo 上，如果系统正在编译更新 包同时运行 Chromium，这种情况大概率会发生.

命令可用于查看系统上有多少可用内存：

解决方案是释放内存，直到大的包编译完成. 打开资源监视器并关闭占用大量内存的应用程序.