Compare commits

..

37 Commits

Author SHA1 Message Date
wukko 0f9df28d13 merge: update to chromium 142.0.7444.162 (#433) 2025-11-13 03:07:23 +06:00
wukko 060fa834e5 revision: bump to 5 2025-11-13 03:01:27 +06:00
wukko be47d96c1f patches: refresh for 142.0.7444.162 2025-11-13 03:00:09 +06:00
wukko f049404ad5 merge: update to ungoogled-chromium 142.0.7444.162 2025-11-13 02:46:38 +06:00
jj 232f940dbd ungoogled/existing-switches: fix webrtc switch flag values (#426)
fixes #425
2025-11-12 20:41:07 +00:00
wukko b3d929f6e2 helium/ui: new experimental layout, refactor tabs & omnibox (#427)
- added new experimental one-line top container UI layout behind `#helium-cat-ui` flag
- updated tab groups ui: fixed margins, updated header colors to be less blinding, and moved the line to top to prevent visual clashing with the location bar
- fixed the tab strip alignment on windows, linux, and in fullscreen mode on macos
- reduced tabs' outer margins & width
- refactored omnibox sizing, removed the glitchy border, fixed the macos-specific positioning issue by applying a fresh upstream fix
- refactored `layout-constants` to be more flexible for new ui layouts
2025-11-13 02:36:13 +06:00
wukko 5f296ba37d helium/ui: finally align the tab strip with toolbar buttons
on windows, linux, and fullscreen on mac
2025-11-13 01:58:15 +06:00
wukko 3668280470 upstream-fixes: fix misplaced omnibox popup due to rect constrains
fixes imputnet/helium-macos/issues/67
2025-11-13 01:58:15 +06:00
wukko 673aaf7698 helium/ui/tabs: update tab group ui, fix ntp button overlap, fix padding
- tab group header is now positioned properly
- tab group header is now colored like bookmarked tab groups
- moved tab underline to top to prevent visual clashing with the location bar, made it skinnier
- new tab button no longer sits on top of tabs, caused by minified outer margins of tabs
- fixed padding inside tabs to be visually 6px everywhere
2025-11-13 01:58:15 +06:00
wukko 9113a4cda7 helium/ui/omnibox: refactor sizing, remove stroke 2025-11-13 01:58:14 +06:00
wukko e9de843abe helium/ui: add experimental compact (one-line) toolbar 2025-11-13 01:58:06 +06:00
Blaise 367118d103 Update to Chromium 142.0.7444.162 2025-11-11 13:21:42 -06:00
wukko 8da7b370f7 helium/ui/tabs: reduce outer margins & width 2025-11-08 20:17:12 +06:00
wukko 06a3ebf3d3 helium/ui/layout-constants: refactor to avoid value duplication
and simplify future maintenance
2025-11-08 20:16:42 +06:00
wukko 4991dcc364 revision: bump to 4 (#415) 2025-11-07 20:31:51 +00:00
wukko 7222174274 helium/toolbar: options for hiding back, reload, and menu buttons (#414)
also:
- refactored related patches
- reordered & sorted toolbar options in the customization side panel
- added "customize helium" option to browser window's context menu
2025-11-08 02:27:05 +06:00
wukko 2315522ef2 helium/core: add "customize helium" option to window's context menu 2025-11-08 02:22:54 +06:00
wukko dc61f5cf4f helium/toolbar: add prefs for hiding back, reload, and main menu buttons 2025-11-08 02:22:47 +06:00
wukko 8486eb8436 helium: merge toolbar prefs, move to ui 2025-11-07 19:06:33 +06:00
jj 537ba368e9 helium/core: return "Google Chrome" as browser brand (#408) 2025-11-07 12:10:20 +00:00
jj 61c7f706eb helium/devtools: fix building with sync ripped out (#409) 2025-11-07 12:55:41 +01:00
jj ee6294e217 patches/upstream-fixes: fix warning when building with py3.14 (#410) 2025-11-07 10:16:07 +01:00
wukko e3bcfa4148 merge: update to chromium 142.0.7444.134 (#402) 2025-11-07 01:06:43 +06:00
wukko 4700d1bc7e patches: refresh and update for 142.0.7444.134
`force-eu-search-features.patch` had notable changes for [7102578](https://chromium-review.googlesource.com/c/chromium/src/+/7102578)
2025-11-07 00:11:50 +06:00
wukko 617bd4b75e merge: update to ungoogled-chromium 142.0.7444.134 2025-11-07 00:11:46 +06:00
wukko 7b31f0b137 extras: update onboarding to 202511061712 (#407) 2025-11-06 17:52:26 +00:00
jj 7815dd5522 helium/devtools: remove "account" section from settings (#405)
Fixes #400
2025-11-06 17:10:15 +00:00
jj 48577b920b helium/core: fix ublock origin being re-enabled when updated (#404) 2025-11-06 17:10:39 +01:00
Blaise a264ac047d Update to Chromium 142.0.7444.134 2025-11-06 06:07:35 -06:00
wukko eaf2714853 helium/ui: add window frame hit test to toolbar (#395)
allows for the toolbar to be the handle for window dragging.
prerequisite for vertical tabs and other UI experiments 👀
2025-11-04 18:12:30 +06:00
wukko cc1db76e65 ungoogled/existing-switches: fix order of webrtc policy pref (#390) 2025-11-04 13:39:10 +06:00
jj ae476a674c patches/upstream-fixes: add fix for connectors_service_ CHECK 2025-11-03 15:44:30 +00:00
Andreas Stieger 74779ebab4 add openSUSE instructions (#3527) 2025-11-02 12:57:24 -06:00
Mrugesh Mohapatra 70627f67f4 github: add well-known funding file for ownership verification (#364) 2025-11-02 17:28:46 +06:00
jj c50904a16e revision: bump to 3 2025-11-01 18:17:51 +00:00
jj 2300b0f239 patches/upstream-fixes: add fix for connectors_service_ CHECK 2025-11-01 18:17:21 +00:00
wukko 19d1c7fa61 helium/core/exclude-flags: remove irrelevant flags added in M142 (#372) 2025-10-31 21:23:50 +00:00
45 changed files with 1613 additions and 601 deletions
@@ -0,0 +1 @@
https://helium.computer/funding.json
+1 -1
View File
@@ -1 +1 @@
142.0.7444.59
142.0.7444.162
+2
View File
@@ -5688,8 +5688,10 @@ third_party/blink/renderer/core/html/forms/html_input_element.idl
third_party/blink/renderer/core/html/forms/html_input_element_test.cc
third_party/blink/renderer/core/html/forms/html_label_element.idl
third_party/blink/renderer/core/html/forms/html_legend_element.idl
third_party/blink/renderer/core/html/forms/html_option_element.cc
third_party/blink/renderer/core/html/forms/html_option_element.idl
third_party/blink/renderer/core/html/forms/html_options_collection.idl
third_party/blink/renderer/core/html/forms/html_select_element.cc
third_party/blink/renderer/core/html/forms/html_select_element.idl
third_party/blink/renderer/core/html/forms/html_text_area_element.idl
third_party/blink/renderer/core/html/forms/select_type.cc
+2 -2
View File
@@ -7,10 +7,10 @@ sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c
output_path = ./third_party/search_engines_data/resources_internal
[onboarding]
version = 202509241653
version = 202511061712
url = https://github.com/imputnet/helium-onboarding/releases/download/%(version)s/helium-onboarding-%(version)s.tar.gz
download_filename = onboarding-page-%(version)s.tar.gz
sha256 = fb23110d391419fbbbe2c8f7c3d96765b9b50aa1c20025343ab7f8bd59f9e7ab
sha256 = 5728d2c6806f3f918f7fd0b358935fd4daa34c1117703c564917ede1dac8e199
output_path = ./components/helium_onboarding
# If you are bumping this, you *NEED* to re-strip the assets.json
@@ -693,7 +693,7 @@
std::vector<base::CallbackListSubscription> tab_subscriptions_;
--- a/chrome/browser/ui/views/user_education/browser_user_education_service.cc
+++ b/chrome/browser/ui/views/user_education/browser_user_education_service.cc
@@ -752,39 +752,6 @@ void MaybeRegisterChromeFeaturePromos(
@@ -786,39 +786,6 @@ void MaybeRegisterChromeFeaturePromos(
.SetBubbleIcon(kLightbulbOutlineIcon)
.SetBubbleTitleText(IDS_PASSWORD_MANAGER_IPH_CREATE_SHORTCUT_TITLE)));
@@ -579,7 +579,7 @@
} // namespace
--- a/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.cc
+++ b/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.cc
@@ -67,8 +67,7 @@ DataProtectionUrlLookupServiceFactory::
@@ -138,8 +138,7 @@ DataProtectionUrlLookupServiceFactory::
// static
DataProtectionUrlLookupServiceFactory*
DataProtectionUrlLookupServiceFactory::GetInstance() {
@@ -591,7 +591,7 @@
// static
--- a/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.h
+++ b/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.h
@@ -50,7 +50,6 @@ class DataProtectionUrlLookupServiceFact
@@ -90,7 +90,6 @@ class DataProtectionUrlLookupServiceFact
private:
DataProtectionUrlLookupServiceFactory();
~DataProtectionUrlLookupServiceFactory() override;
@@ -619,7 +619,7 @@
bool site_isolation_enabled;
--- a/chrome/browser/enterprise/signals/profile_signals_collector.cc
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.cc
@@ -70,12 +70,8 @@ void ProfileSignalsCollector::GetProfile
@@ -77,12 +77,8 @@ void ProfileSignalsCollector::GetProfile
signal_response.chrome_remote_desktop_app_blocked =
device_signals::GetChromeRemoteDesktopAppBlocked(
policy_blocklist_service_);
@@ -9,7 +9,7 @@
#include "components/translate/core/browser/translate_download_manager.h"
#include "components/translate/core/browser/translate_manager.h"
#include "components/translate/core/browser/translate_prefs.h"
@@ -2240,6 +2241,7 @@ void RenderViewContextMenu::AppendPageIt
@@ -2239,6 +2240,7 @@ void RenderViewContextMenu::AppendPageIt
}
if (CanTranslate(/*menu_logging=*/true)) {
@@ -343,7 +343,7 @@
#include "third_party/skia/include/core/SkImage.h"
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2344,6 +2344,12 @@
@@ -2350,6 +2350,12 @@
status: "stable",
},
{
@@ -314,7 +314,7 @@ approach to change color components.
SkJpegEncoder::Options options;
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2350,6 +2350,9 @@
@@ -2356,6 +2356,9 @@
name: "FingerprintingCanvasMeasureTextNoise",
},
{
@@ -78,7 +78,7 @@
#include "third_party/blink/public/common/permissions_policy/document_policy_features.h"
#include "third_party/blink/public/common/switches.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
@@ -611,6 +612,8 @@ void FrameFetchContext::ModifyRequestFor
@@ -613,6 +614,8 @@ void FrameFetchContext::ModifyRequestFor
void FrameFetchContext::AddClientHintsIfNecessary(
const std::optional<float> resource_width,
ResourceRequest& request) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4993,10 +4993,12 @@ const FeatureEntry::FeatureVariation kSe
@@ -5004,10 +5004,12 @@ const FeatureEntry::FeatureVariation kSe
#include "chrome/browser/ungoogled_flag_choices.h"
#include "chrome/browser/bromite_flag_choices.h"
#include "chrome/browser/ungoogled_platform_flag_choices.h"
@@ -15,7 +15,7 @@
#include "build/chromeos_buildflags.h"
--- /dev/null
+++ b/chrome/browser/existing_switch_flag_choices.h
@@ -0,0 +1,19 @@
@@ -0,0 +1,21 @@
+// Copyright (c) 2023 The ungoogled-chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE.ungoogled_chromium file.
@@ -23,16 +23,18 @@
+#ifndef CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
+#define CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
+const FeatureEntry::Choice kWebRTCIPPolicy[] = {
+ {"Disable non proxied udp", "", ""},
+ {"Default public interface only",
+ "",
+ ""},
+ {"Default",
+ "webrtc-ip-handling-policy",
+ "default"},
+ {"Default public and private interfaces",
+ "webrtc-ip-handling-policy",
+ "default_public_and_private_interfaces"},
+ {"Default public interface only",
+ {"Disable non proxied udp",
+ "webrtc-ip-handling-policy",
+ "default_public_interface_only"},
+ "disable_non_proxied_udp"},
+};
+#endif // CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
--- /dev/null
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4989,7 +4989,13 @@ const FeatureEntry::FeatureVariation kSe
@@ -5000,7 +5000,13 @@ const FeatureEntry::FeatureVariation kSe
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
@@ -2,7 +2,7 @@
#
--- a/components/omnibox/common/omnibox_features.cc
+++ b/components/omnibox/common/omnibox_features.cc
@@ -261,7 +261,7 @@ BASE_FEATURE(kOmniboxTouchDownTriggerFor
@@ -274,7 +274,7 @@ BASE_FEATURE(kOmniboxTouchDownTriggerFor
BASE_FEATURE(kOmniboxSiteSearch, DISABLED);
// Enables additional site search providers for the Site search Starter Pack.
@@ -217,7 +217,7 @@
.Append(kVerifiedContentsFilename);
--- a/extensions/browser/renderer_startup_helper.cc
+++ b/extensions/browser/renderer_startup_helper.cc
@@ -608,6 +608,18 @@ void RendererStartupHelper::GetMessageBu
@@ -666,6 +666,18 @@ void RendererStartupHelper::GetMessageBu
paths_to_load.push_back(imported_extension->path());
}
@@ -115,7 +115,7 @@ TODO: guard services_page.html with is_mac
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -367,6 +367,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -361,6 +361,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumSpellcheckEnabled] =
settings_api::PrefType::kBoolean;
@@ -126,7 +126,7 @@ TODO: guard services_page.html with is_mac
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -219,6 +219,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -214,6 +214,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
@@ -0,0 +1,31 @@
--- a/chrome/browser/ui/views/frame/system_menu_model_builder.cc
+++ b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
@@ -8,6 +8,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
#include "chrome/browser/ui/tabs/features.h"
@@ -25,7 +26,6 @@
#if BUILDFLAG(IS_CHROMEOS)
#include "ash/multi_user/multi_user_window_manager.h"
#include "ash/shell.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
@@ -97,6 +97,12 @@ void SystemMenuModelBuilder::BuildSystem
model->AddItemWithStringId(IDC_BOOKMARK_ALL_TABS, IDS_BOOKMARK_ALL_TABS);
model->AddItemWithStringId(IDC_NAME_WINDOW, IDS_NAME_WINDOW);
+
+ if (!browser()->profile()->IsOffTheRecord()) {
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
+ model->AddItemWithStringId(IDC_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL,
+ IDS_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL);
+ }
#if BUILDFLAG(ENABLE_GLIC)
#if BUILDFLAG(IS_WIN)
// On Windows we can not remove an item when showing the menu. So only add
+4 -4
View File
@@ -12,7 +12,7 @@
if (editable) {
AppendOtherEditableItems();
}
@@ -2214,7 +2209,6 @@ void RenderViewContextMenu::AppendPageIt
@@ -2213,7 +2208,6 @@ void RenderViewContextMenu::AppendPageIt
IDS_CONTENT_CONTEXT_SAVEPAGEAS);
menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
AppendLiveCaptionItem();
@@ -20,7 +20,7 @@
if (IsRegionSearchEnabled()) {
AppendRegionSearchItem();
}
@@ -2343,8 +2337,7 @@ void RenderViewContextMenu::AppendMediaR
@@ -2342,8 +2336,7 @@ void RenderViewContextMenu::AppendMediaR
void RenderViewContextMenu::AppendReadAnythingItem() {
// Show Read Anything option if it's not already open in the side panel.
@@ -30,7 +30,7 @@
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE,
IDS_CONTENT_CONTEXT_READING_MODE);
}
@@ -3620,10 +3613,12 @@ void RenderViewContextMenu::ExecuteComma
@@ -3619,10 +3612,12 @@ void RenderViewContextMenu::ExecuteComma
}
void RenderViewContextMenu::AddSpellCheckServiceItem(bool is_checked) {
@@ -43,7 +43,7 @@
if (is_checked) {
menu_model_.AddCheckItemWithStringId(
IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_TOGGLE,
@@ -4000,6 +3995,8 @@ bool RenderViewContextMenu::IsVideoFrame
@@ -3999,6 +3994,8 @@ bool RenderViewContextMenu::IsVideoFrame
bool RenderViewContextMenu::AppendQRCodeGeneratorItem(bool for_image,
bool draw_icon,
bool add_separator) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
+++ b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
@@ -1272,6 +1272,9 @@ gfx::Rect FedCmAccountSelectionView::Get
@@ -1280,6 +1280,9 @@ gfx::Rect FedCmAccountSelectionView::Get
void FedCmAccountSelectionView::ShouldShowDialog(bool& should_show) {
if (dialog_type_ == DialogType::BUBBLE) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -13399,11 +13399,278 @@ const FeatureEntry kFeatureEntries[] = {
@@ -13410,11 +13410,295 @@ const FeatureEntry kFeatureEntries[] = {
// AboutFlagsHistogramTest unit test to verify this process).
};
@@ -39,6 +39,7 @@
+ "ntp-tab-groups-module",
+ "ntp-tab-groups-module-zero-state",
+ "ntp-microsoft-authentication-module",
+ "ntp-realbox-next",
+
+ // Google Account & Sync
+ "use-sync-sandbox",
@@ -73,6 +74,7 @@
+ "ntp-composebox",
+ "composebox-uses-chrome-compose-client",
+ "compose-selection-nudge",
+ "contextual-tasks",
+
+ // Shopping stuff
+ "product-specifications",
@@ -120,6 +122,10 @@
+ "enable-lens-overlay-straight-to-srp",
+ "enable-lens-overlay-force-empty-csb-query",
+ "contextual-search-open-lens-action-uses-thumbnail",
+ "lens-reinvocation-affordance",
+ "lens-search-zero-state-csb",
+ "lens-updated-feedback-entrypoint",
+ "lens-video-citations",
+
+ // Google Assistant
+ "enable-assistant-dsp",
@@ -159,6 +165,12 @@
+ "glic-fre-pre-warming",
+ "browsing-history-actor-integration-M1",
+
+ // Live captions
+ "enable-headless-live-caption",
+
+ // Google Wallet
+ "wallet-service-use-sandbox",
+
+ // Safety Hub
+ "safety-hub",
+ "safety-hub-magic-stack",
@@ -257,6 +269,11 @@
+ "autofill-enable-support-for-home-and-work",
+ "autofill-enable-support-for-name-and-email-profile",
+ "autofill-update-context-for-web-contents",
+ "autofill-prioritize-save-card-over-mandatory-reauth",
+ "autofill-enable-buy-now-pay-later-updated-suggestion-second-line-string",
+ "autofill-and-passwords-in-same-surface",
+ "autofill-enable-ai-based-amount-extraction",
+ "autofill-prefer-buy-now-pay-later-blocklists",
+
+ // Add new entries above this line and categorize them accordingly.
+});
@@ -280,7 +297,7 @@
FlagsStateSingleton(const FlagsStateSingleton&) = delete;
FlagsStateSingleton& operator=(const FlagsStateSingleton&) = delete;
~FlagsStateSingleton() override = default;
@@ -13422,7 +13689,7 @@ class FlagsStateSingleton : public flags
@@ -13433,7 +13717,7 @@ class FlagsStateSingleton : public flags
void RestoreDefaultState() {
flags_state_ =
@@ -289,7 +306,7 @@
}
private:
@@ -13747,7 +14014,7 @@ base::span<const FeatureEntry> GetFeatur
@@ -13758,7 +14042,7 @@ base::span<const FeatureEntry> GetFeatur
!entries_for_testing->empty()) {
return *entries_for_testing;
}
@@ -0,0 +1,16 @@
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -532,9 +532,12 @@ void ExtensionRegistrar::AddComponentExt
if (old_version.IsValid()) {
UnregisterServiceWorkerWithRootScope(extension);
}
+
+ base::flat_set<int> disable_reasons = GetDisableReasonsOnInstalled(extension);
+
// TODO(crbug.com/40508457): If needed, add support for Declarative Net
// Request to component extensions and pass the ruleset install prefs here.
- AddNewOrUpdatedExtension(extension, {}, kInstallFlagNone,
+ AddNewOrUpdatedExtension(extension, std::move(disable_reasons), kInstallFlagNone,
syncer::StringOrdinal(), std::string(),
/*ruleset_install_prefs=*/{});
return;
+1 -1
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4990,11 +4990,13 @@ const FeatureEntry::FeatureVariation kSe
@@ -5001,11 +5001,13 @@ const FeatureEntry::FeatureVariation kSe
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
@@ -1,224 +0,0 @@
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -230,6 +230,10 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kSplitViewDragAndDropEnabled] =
settings_api::PrefType::kBoolean;
+ // Custom toolbar button settings.
+ (*s_allowlist)[::prefs::kShowAvatarButton] =
+ settings_api::PrefType::kBoolean;
+
// Appearance settings.
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
(*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList;
--- a/chrome/browser/ui/actions/chrome_action_id.h
+++ b/chrome/browser/ui/actions/chrome_action_id.h
@@ -558,6 +558,7 @@
#define TOOLBAR_PINNABLE_ACTION_IDS \
E(kActionHome, IDC_HOME) \
E(kActionForward, IDC_FORWARD) \
+ E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -123,6 +123,9 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kPinSplitTabButton, false,
pref_registration_flags);
+ registry->RegisterBooleanPref(
+ prefs::kShowAvatarButton, true);
+
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
@@ -216,6 +216,7 @@ void PinnedToolbarActionsModel::UpdatePi
void PinnedToolbarActionsModel::ResetToDefault() {
pref_service_->ClearPref(prefs::kShowHomeButton);
pref_service_->ClearPref(prefs::kShowForwardButton);
+ pref_service_->ClearPref(prefs::kShowAvatarButton);
pref_service_->ClearPref(prefs::kPinnedActions);
}
@@ -229,7 +230,10 @@ bool PinnedToolbarActionsModel::IsDefaul
const bool forward_is_default =
pref_service_->GetDefaultPrefValue(prefs::kShowForwardButton)
->GetBool() == pref_service_->GetBoolean(prefs::kShowForwardButton);
- return action_are_default && home_is_default && forward_is_default;
+ const bool avatar_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
+ return action_are_default && home_is_default && forward_is_default && avatar_is_default;
}
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -463,8 +463,7 @@ void ToolbarView::Init() {
#else
// DevTools profiles are OffTheRecord, so hide it there.
show_avatar_toolbar_button = browser_->profile()->IsIncognitoProfile() ||
- browser_->profile()->IsGuestSession() ||
- browser_->profile()->IsRegularProfile();
+ browser_->profile()->IsGuestSession();
#endif
const std::string sab_value = base::CommandLine::ForCurrentProcess()->
@@ -533,6 +532,17 @@ void ToolbarView::Init() {
home_->SetVisible(show_home_button_.GetValue());
+ show_avatar_button_.Init(
+ prefs::kShowAvatarButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
+
+ // avatar is always shown in incognito and guest profiles,
+ // but in regular profiles it's managed by the kShowAvatarButton pref
+ if (browser_->profile()->IsRegularProfile()) {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+ }
+
InitLayout();
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
@@ -1253,6 +1263,10 @@ void ToolbarView::OnShowHomeButtonChange
home_->SetVisible(show_home_button_.GetValue());
}
+void ToolbarView::OnShowAvatarButtonChanged() {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+}
+
void ToolbarView::OnTouchUiChanged() {
if (display_mode_ == DisplayMode::NORMAL) {
// Update the internal margins for touch layout.
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -268,6 +268,8 @@ class ToolbarView : public views::Access
void OnShowHomeButtonChanged();
+ void OnShowAvatarButtonChanged();
+
void OnTouchUiChanged();
void UpdateClipPath();
@@ -318,6 +320,8 @@ class ToolbarView : public views::Access
// Controls whether or not a home button should be shown on the toolbar.
BooleanPrefMember show_home_button_;
+ BooleanPrefMember show_avatar_button_;
+
BooleanPrefMember show_chrome_labs_button_;
// The display mode used when laying out the toolbar.
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
@@ -16,6 +16,7 @@ enum ActionId {
kShowSearchCompanion,
kHome,
kForward,
+ kAvatar,
kNewIncognitoWindow,
kShowPasswordManager,
kShowPaymentMethods,
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -50,6 +50,8 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kHome;
case kActionForward:
return side_panel::customize_chrome::mojom::ActionId::kForward;
+ case kActionAvatar:
+ return side_panel::customize_chrome::mojom::ActionId::kAvatar;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
case kActionShowPasswordsBubbleOrPage:
@@ -109,6 +111,8 @@ std::optional<actions::ActionId> ChromeA
return kActionHome;
case side_panel::customize_chrome::mojom::ActionId::kForward:
return kActionForward;
+ case side_panel::customize_chrome::mojom::ActionId::kAvatar:
+ return kActionAvatar;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
@@ -174,6 +178,10 @@ CustomizeToolbarHandler::CustomizeToolba
prefs::kPinSplitTabButton,
base::BindRepeating(&CustomizeToolbarHandler::OnPinSplitTabButtonChanged,
base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowAvatarButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
}
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
@@ -219,6 +227,19 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(home_action));
actions.push_back(std::move(forward_action));
+ auto avatar_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionAvatar).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_PROFILES_MENU_NAME)),
+ prefs()->GetBoolean(prefs::kShowAvatarButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kAccountCircleChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ actions.push_back(std::move(avatar_action));
+
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
MojoActionForChromeAction(kActionSplitTab).value(),
@@ -367,6 +388,9 @@ void CustomizeToolbarHandler::PinAction(
case kActionSplitTab:
prefs()->SetBoolean(prefs::kPinSplitTabButton, pin);
break;
+ case kActionAvatar:
+ prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
+ break;
default:
model_->UpdatePinnedState(chrome_action.value(), pin);
const std::optional<std::string> metrics_name =
@@ -420,6 +444,11 @@ void CustomizeToolbarHandler::OnPinSplit
prefs()->GetBoolean(prefs::kPinSplitTabButton));
}
+void CustomizeToolbarHandler::OnShowAvatarButtonChanged() {
+ OnActionPinnedChanged(kActionAvatar,
+ prefs()->GetBoolean(prefs::kShowAvatarButton));
+}
+
void CustomizeToolbarHandler::OnActionItemChanged() {
client_->NotifyActionsUpdated();
}
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
@@ -54,6 +54,7 @@ class CustomizeToolbarHandler
void OnShowHomeButtonChanged();
void OnShowForwardButtonChanged();
void OnPinSplitTabButtonChanged();
+ void OnShowAvatarButtonChanged();
void OnActionItemChanged();
PrefService* prefs() const;
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1332,6 +1332,10 @@ inline constexpr char kSplitViewDragAndD
inline constexpr char kSplitViewDragAndDropNudgeUsedCount[] =
"browser.split_view_drag_and_drop_nudge_used_count";
+// A boolean pref set to true if the Avatar button should be visible on the
+// toolbar.
+inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
+
// A boolean pref set to true if Gemini integration be enabled. This is managed
// by enterprise policy.
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
@@ -1,234 +0,0 @@
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -233,6 +233,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
// Custom toolbar button settings.
(*s_allowlist)[::prefs::kShowAvatarButton] =
settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowExtensionsButton] =
+ settings_api::PrefType::kBoolean;
// Appearance settings.
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
--- a/chrome/browser/ui/actions/chrome_action_id.h
+++ b/chrome/browser/ui/actions/chrome_action_id.h
@@ -559,6 +559,7 @@
E(kActionHome, IDC_HOME) \
E(kActionForward, IDC_FORWARD) \
E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
+ E(kActionExtensions) \
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -125,6 +125,8 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(
prefs::kShowAvatarButton, true);
+ registry->RegisterBooleanPref(
+ prefs::kShowExtensionsButton, true);
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
@@ -217,6 +217,7 @@ void PinnedToolbarActionsModel::ResetToD
pref_service_->ClearPref(prefs::kShowHomeButton);
pref_service_->ClearPref(prefs::kShowForwardButton);
pref_service_->ClearPref(prefs::kShowAvatarButton);
+ pref_service_->ClearPref(prefs::kShowExtensionsButton);
pref_service_->ClearPref(prefs::kPinnedActions);
}
@@ -233,7 +234,12 @@ bool PinnedToolbarActionsModel::IsDefaul
const bool avatar_is_default =
pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
- return action_are_default && home_is_default && forward_is_default && avatar_is_default;
+ const bool extensions_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowExtensionsButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowExtensionsButton);
+ return action_are_default && home_is_default &&
+ forward_is_default && avatar_is_default &&
+ extensions_is_default;
}
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
@@ -552,7 +552,9 @@ void ExtensionsToolbarContainer::AnchorA
// Fix the position of widgets. Without this fix, extension-installed-bubble
// and extension-uninstall-dialog may be out of the window border on Linux.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
{
views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser_)
->toolbar_button_provider()->GetAppMenuButton();
@@ -962,7 +964,9 @@ void ExtensionsToolbarContainer::UpdateC
}
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
return false;
// The container (and extensions-menu button) should not be visible if we have
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -543,6 +543,14 @@ void ToolbarView::Init() {
avatar_->SetVisible(show_avatar_button_.GetValue());
}
+ if (extensions_container_) {
+ show_extensions_button_.Init(
+ prefs::kShowExtensionsButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+ }
+
InitLayout();
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
@@ -1267,6 +1275,10 @@ void ToolbarView::OnShowAvatarButtonChan
avatar_->SetVisible(show_avatar_button_.GetValue());
}
+void ToolbarView::OnShowExtensionsButtonChanged() {
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+}
+
void ToolbarView::OnTouchUiChanged() {
if (display_mode_ == DisplayMode::NORMAL) {
// Update the internal margins for touch layout.
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -270,6 +270,8 @@ class ToolbarView : public views::Access
void OnShowAvatarButtonChanged();
+ void OnShowExtensionsButtonChanged();
+
void OnTouchUiChanged();
void UpdateClipPath();
@@ -322,6 +324,8 @@ class ToolbarView : public views::Access
BooleanPrefMember show_avatar_button_;
+ BooleanPrefMember show_extensions_button_;
+
BooleanPrefMember show_chrome_labs_button_;
// The display mode used when laying out the toolbar.
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
@@ -17,6 +17,7 @@ enum ActionId {
kHome,
kForward,
kAvatar,
+ kExtensions,
kNewIncognitoWindow,
kShowPasswordManager,
kShowPaymentMethods,
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -52,6 +52,8 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kForward;
case kActionAvatar:
return side_panel::customize_chrome::mojom::ActionId::kAvatar;
+ case kActionExtensions:
+ return side_panel::customize_chrome::mojom::ActionId::kExtensions;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
case kActionShowPasswordsBubbleOrPage:
@@ -113,6 +115,8 @@ std::optional<actions::ActionId> ChromeA
return kActionForward;
case side_panel::customize_chrome::mojom::ActionId::kAvatar:
return kActionAvatar;
+ case side_panel::customize_chrome::mojom::ActionId::kExtensions:
+ return kActionExtensions;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
@@ -182,6 +186,10 @@ CustomizeToolbarHandler::CustomizeToolba
prefs::kShowAvatarButton,
base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowExtensionsButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
}
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
@@ -240,6 +248,19 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(avatar_action));
+ auto extensions_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionExtensions).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_TOOLTIP_EXTENSIONS_BUTTON)),
+ prefs()->GetBoolean(prefs::kShowExtensionsButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kExtensionChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ actions.push_back(std::move(extensions_action));
+
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
MojoActionForChromeAction(kActionSplitTab).value(),
@@ -391,6 +412,9 @@ void CustomizeToolbarHandler::PinAction(
case kActionAvatar:
prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
break;
+ case kActionExtensions:
+ prefs()->SetBoolean(prefs::kShowExtensionsButton, pin);
+ break;
default:
model_->UpdatePinnedState(chrome_action.value(), pin);
const std::optional<std::string> metrics_name =
@@ -449,6 +473,11 @@ void CustomizeToolbarHandler::OnShowAvat
prefs()->GetBoolean(prefs::kShowAvatarButton));
}
+void CustomizeToolbarHandler::OnShowExtensionsButtonChanged() {
+ OnActionPinnedChanged(kActionExtensions,
+ prefs()->GetBoolean(prefs::kShowExtensionsButton));
+}
+
void CustomizeToolbarHandler::OnActionItemChanged() {
client_->NotifyActionsUpdated();
}
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
@@ -55,6 +55,7 @@ class CustomizeToolbarHandler
void OnShowForwardButtonChanged();
void OnPinSplitTabButtonChanged();
void OnShowAvatarButtonChanged();
+ void OnShowExtensionsButtonChanged();
void OnActionItemChanged();
PrefService* prefs() const;
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1336,6 +1336,10 @@ inline constexpr char kSplitViewDragAndD
// toolbar.
inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
+// A boolean pref set to true if the Extensions button should be visible on the
+// toolbar.
+inline constexpr char kShowExtensionsButton[] = "helium.browser.show_extensions_button";
+
// A boolean pref set to true if Gemini integration be enabled. This is managed
// by enterprise policy.
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -37,15 +37,6 @@ MojoActionForChromeAction(actions::Actio
@@ -37,28 +37,12 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kShowBookmarks;
case kActionSidePanelShowHistoryCluster:
return side_panel::customize_chrome::mojom::ActionId::kShowHistoryCluster;
@@ -16,8 +16,7 @@
case kActionHome:
return side_panel::customize_chrome::mojom::ActionId::kHome;
case kActionForward:
@@ -56,13 +47,6 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kExtensions;
return side_panel::customize_chrome::mojom::ActionId::kForward;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
- case kActionShowPasswordsBubbleOrPage:
@@ -30,7 +29,7 @@
case kActionShowDownloads:
return side_panel::customize_chrome::mojom::ActionId::kShowDownloads;
case kActionClearBrowsingData:
@@ -101,14 +85,6 @@ std::optional<actions::ActionId> ChromeA
@@ -97,26 +81,12 @@ std::optional<actions::ActionId> ChromeA
return kActionSidePanelShowBookmarks;
case side_panel::customize_chrome::mojom::ActionId::kShowHistoryCluster:
return kActionSidePanelShowHistoryCluster;
@@ -45,8 +44,7 @@
case side_panel::customize_chrome::mojom::ActionId::kHome:
return kActionHome;
case side_panel::customize_chrome::mojom::ActionId::kForward:
@@ -119,12 +95,6 @@ std::optional<actions::ActionId> ChromeA
return kActionExtensions;
return kActionForward;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
- case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
@@ -58,7 +56,7 @@
case side_panel::customize_chrome::mojom::ActionId::kShowDownloads:
return kActionShowDownloads;
case side_panel::customize_chrome::mojom::ActionId::kClearBrowsingData:
@@ -322,16 +292,8 @@ void CustomizeToolbarHandler::ListAction
@@ -280,16 +250,8 @@ void CustomizeToolbarHandler::ListAction
add_action(kActionNewIncognitoWindow,
side_panel::customize_chrome::mojom::CategoryId::kNavigation);
@@ -75,7 +73,7 @@
add_action(kActionSidePanelShowHistoryCluster,
side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
add_action(kActionShowDownloads,
@@ -345,18 +307,12 @@ void CustomizeToolbarHandler::ListAction
@@ -303,18 +265,12 @@ void CustomizeToolbarHandler::ListAction
}
add_action(kActionPrint,
side_panel::customize_chrome::mojom::CategoryId::kTools);
@@ -43,7 +43,24 @@
static constexpr Program kCountryDerivedPrograms[] = {
#if BUILDFLAG(IS_IOS)
// Only iOS can derive Taiyaki scope directly from the country.
@@ -351,6 +353,7 @@ RegionalCapabilitiesService::GetChoiceSc
@@ -290,14 +292,13 @@ RegionalCapabilitiesService::GetRegional
}
bool RegionalCapabilitiesService::IsInSearchEngineChoiceScreenRegion() {
- return GetChoiceScreenEligibilityConfig().has_value();
+ return true;
}
// static
bool RegionalCapabilitiesService::IsInSearchEngineChoiceScreenRegion(
const country_codes::CountryId& tested_country_id) {
- return GetSettingsForProgram(CountryIdToProgram(tested_country_id))
- .choice_screen_eligibility_config.has_value();
+ return true;
}
bool RegionalCapabilitiesService::
@@ -358,6 +359,7 @@ RegionalCapabilitiesService::GetChoiceSc
}
bool RegionalCapabilitiesService::IsInEeaCountry() {
@@ -51,17 +68,6 @@
// Feature behaviour was directly based on the current country, as a
// decentralised way to express a concept we are now framing as "program
// settings". Here we check for the program reference directly as command line
--- a/components/regional_capabilities/regional_capabilities_utils.cc
+++ b/components/regional_capabilities/regional_capabilities_utils.cc
@@ -55,7 +55,7 @@ void ShufflePrepopulatedEngines(std::vec
} // namespace
bool IsEeaCountry(country_codes::CountryId country_id) {
- return kEeaChoiceCountriesIds.contains(country_id);
+ return true;
}
std::optional<SearchEngineCountryOverride> GetSearchEngineCountryOverride() {
--- a/components/search_engine_choice_strings.grdp
+++ b/components/search_engine_choice_strings.grdp
@@ -106,6 +106,10 @@
@@ -0,0 +1,21 @@
--- a/components/embedder_support/user_agent_utils.cc
+++ b/components/embedder_support/user_agent_utils.cc
@@ -205,17 +205,12 @@ const blink::UserAgentBrandList GetUserA
int major_version_number;
bool parse_result = base::StringToInt(major_version, &major_version_number);
DCHECK(parse_result);
- std::optional<std::string> brand;
-#if !BUILDFLAG(CHROMIUM_BRANDING)
- brand = version_info::GetProductName();
-#endif
-
std::string brand_version =
output_version_type == blink::UserAgentBrandVersionType::kFullVersion
? full_version
: major_version;
- return GenerateBrandVersionList(major_version_number, brand, brand_version,
+ return GenerateBrandVersionList(major_version_number, "Google Chrome", brand_version,
output_version_type,
additional_brand_version);
}
@@ -57,7 +57,7 @@
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -369,6 +369,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -363,6 +363,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumUpdateFetchingEnabled] =
settings_api::PrefType::kBoolean;
@@ -68,7 +68,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -220,6 +220,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -215,6 +215,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -147,7 +147,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -142,7 +142,7 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
+9 -6
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/resources/new_tab_page/app.css
+++ b/chrome/browser/resources/new_tab_page/app.css
@@ -137,6 +137,7 @@ cr-most-visited {
@@ -138,6 +138,7 @@ cr-most-visited {
align-items: center;
display: flex;
flex-direction: column;
@@ -10,7 +10,7 @@
padding-top: var(--ntp-one-google-bar-height);
--- a/chrome/browser/resources/new_tab_page/app.html
+++ b/chrome/browser/resources/new_tab_page/app.html
@@ -1,137 +1,11 @@
@@ -1,140 +1,11 @@
-<!-- #html_wrapper_imports_start
-import {nothing} from '//resources/lit/v3_0/lit.rollup.js';
-#html_wrapper_imports_end -->
@@ -47,9 +47,10 @@
- <ntp-logo id="logo" ?single-colored="${this.singleColoredLogo_}"
- .theme="${this.theme_}" ?hidden="${!this.logoEnabled_}">
- </ntp-logo>
- ${this.ntpRealboxNextEnabled_ && (this.dropdownIsVisible_ || this.showComposebox_) ? html`
- ${this.ntpRealboxNextEnabled_ ? html`
- <div id="scrim"
- @click="${this.showComposebox_ && this.composeboxCloseByClickOutside_ ? this.onComposeboxClickOutside_ : nothing}"></div>
- @click="${this.showComposebox_ && this.composeboxCloseByClickOutside_ ? this.onComposeboxClickOutside_ : nothing}"
- ?hidden="${!this.showScrim_}"></div>
- ` : ''}
- <div id="searchboxContainer">
- <cr-searchbox id="searchbox" ?is-dark="${this.isThemeDark_()}"
@@ -66,7 +67,8 @@
- realbox-layout-mode="${this.realboxLayoutMode_}"
- ?ntp-realbox-next-enabled="${this.ntpRealboxNextEnabled_}"
- ?cycling-placeholders="${this.searchboxCyclingPlaceholders_}"
- @dropdown-visible-changed="${this.onDropdownVisibleChanged_}">
- @dropdown-visible-changed="${this.onDropdownVisibleChanged_}"
- @searchbox-input-focus-changed="${this.onInputFocusChanged_}">
- </cr-searchbox>
- ${this.showComposebox_ ? html`
- <ntp-composebox id="composebox" ?is_collapsible="false"
@@ -74,6 +76,7 @@
- @composebox-initialized="${this.onComposeboxInitialized_}"
- @close-composebox="${this.closeComposebox_}"
- @composebox-dropdown-visible-changed="${this.onDropdownVisibleChanged_}"
- @composebox-input-focus-changed="${this.onInputFocusChanged_}"
- realbox-layout-mode="${this.realboxLayoutMode_}">
- </ntp-composebox>
- ` : ''}
@@ -148,7 +151,7 @@
<ntp-customize-buttons id="customizeButtons"
?modules-shown-to-user="${this.modulesShownToUser}"
?show-background-image="${this.showBackgroundImage_}"
@@ -153,23 +27,3 @@ import {nothing} from '//resources/lit/v
@@ -156,23 +27,3 @@ import {nothing} from '//resources/lit/v
` : ''}
<div id="contentBottomSpacer"></div>
</div>
@@ -0,0 +1,248 @@
--- a/chrome/browser/helium_flag_choices.h
+++ b/chrome/browser/helium_flag_choices.h
@@ -30,6 +30,7 @@ namespace helium {
constexpr const char kCanvasNoiseCommandLine[] = "fingerprinting-canvas-noise";
constexpr const char kAudioContextJitterCommandLine[] = "fingerprinting-audio-context-jitter";
constexpr const char kMiddleClickAutoscrollCommandLine[] = "middle-click-autoscroll";
+ constexpr const char kHeliumCatUiCommandLine[] = "helium-cat-ui";
} // namespace helium
--- a/chrome/browser/helium_flag_entries.h
+++ b/chrome/browser/helium_flag_entries.h
@@ -28,4 +28,8 @@
"Middle Click Autoscroll",
"Enables autoscroll on middle click. Helium flag, Chromium feature.",
kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kHeliumMiddleClickAutoscroll)},
+ {helium::kHeliumCatUiCommandLine,
+ "Helium Compact Action Toolbar UI",
+ "Enables the new experimental UI that merges the tab strip and toolbar into one UI component to save vertical screen estate. Early and buggy, stuff will break and/or look weird. Helium flag.",
+ kOsDesktop, FEATURE_VALUE_TYPE(features::kHeliumCatUi)},
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -17,6 +17,14 @@
namespace features {
+// Helium Compact Action Toolbar UI
+BASE_FEATURE(kHeliumCatUi,
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
+bool IsHeliumCatEnabled() {
+ return base::FeatureList::IsEnabled(kHeliumCatUi);
+}
+
// Enables the tab dragging fallback when full window dragging is not supported
// by the platform (e.g. Wayland). See https://crbug.com/896640
BASE_FEATURE(kAllowWindowDragUsingSystemDragDrop,
--- a/chrome/browser/ui/ui_features.h
+++ b/chrome/browser/ui/ui_features.h
@@ -20,6 +20,9 @@ namespace features {
// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.
+BASE_DECLARE_FEATURE(kHeliumCatUi);
+bool IsHeliumCatEnabled();
+
// TODO(crbug.com/40598679): Remove this when the tab dragging
// interactive_ui_tests pass on Wayland.
BASE_DECLARE_FEATURE(kAllowWindowDragUsingSystemDragDrop);
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -792,8 +792,12 @@ BrowserView::BrowserView(Browser* browse
top_container_ = AddChildView(std::make_unique<TopContainerView>(this));
- tab_strip_region_view_ =
- top_container_->AddChildView(std::make_unique<TabStripRegionView>(this));
+ // When the CAT feature is enabled, tab strip is in the toolbar.
+ // We shouldn't create a duplicate tab strip.
+ if (!features::IsHeliumCatEnabled() || !GetIsNormalType()) {
+ tab_strip_region_view_ =
+ top_container_->AddChildView(std::make_unique<TabStripRegionView>(this));
+ }
if (tabs::IsVerticalTabsFeatureEnabled()) {
auto vertical_tab_strip_container =
@@ -1155,7 +1159,8 @@ bool BrowserView::ShouldDrawTabStrip() c
// since callers may otherwise try to access it. Note that we can't just check
// this alone, as the tabstrip is created unconditionally even for windows
// that won't display it.
- return tab_strip_region_view_->tab_strip() != nullptr;
+ return tab_strip_region_view_ != nullptr &&
+ tab_strip_region_view_->tab_strip() != nullptr;
}
bool BrowserView::GetIncognito() const {
@@ -5097,6 +5102,12 @@ void BrowserView::AddedToWidget() {
toolbar_->Init();
+ // When the CAT feature is enabled, the tab strip is owned by the toolbar.
+ if (features::IsHeliumCatEnabled() && GetIsNormalType()) {
+ tab_strip_region_view_ =
+ static_cast<TabStripRegionView*>(toolbar_->GetTabStripRegionView());
+ }
+
if (!base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button"))
if (GetIsNormalType()) {
if (features::HasTabSearchToolbarButton()) {
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -540,6 +540,13 @@ void BrowserViewLayout::LayoutTabStripRe
tab_strip_region_view_->SetBounds(0, 0, 0, 0);
return;
}
+
+ // If the CAT feature is enabled, then the tab strip is in the toolbar.
+ // We shouldn't layout it here.
+ if (features::IsHeliumCatEnabled()) {
+ return;
+ }
+
// This retrieves the bounds for the tab strip based on whether or not we show
// anything to the left of it, like the incognito avatar.
gfx::Rect tab_strip_region_bounds(
@@ -587,6 +594,12 @@ void BrowserViewLayout::LayoutToolbar(gf
toolbar_bounds.set_width(toolbar_bounds.width() -
BrowserView::kVerticalTabStripWidth);
toolbar_->SetBoundsRect(toolbar_bounds);
+ } else if (features::IsHeliumCatEnabled()) {
+ gfx::Rect tab_strip_region_bounds(
+ delegate_->GetBoundsForToolbarInVerticalTabBrowserView());
+ int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
+ toolbar_->SetBounds(tab_strip_region_bounds.x(), available_bounds.y(),
+ tab_strip_region_bounds.width(), height);
} else {
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
int width = available_bounds.width();
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -57,6 +57,7 @@
#include "chrome/browser/ui/views/extensions/extensions_toolbar_coordinator.h"
#include "chrome/browser/ui/views/frame/browser_frame_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
#include "chrome/browser/ui/views/frame/top_container_background.h"
#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_contextual_menu.h"
#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h"
@@ -144,6 +145,8 @@ DEFINE_UI_CLASS_PROPERTY_KEY(bool, kActi
namespace {
+constexpr int kPreferredCompactWidth = 350;
+
// Gets the display mode for a given browser.
ToolbarView::DisplayMode GetDisplayMode(Browser* browser) {
#if BUILDFLAG(IS_CHROMEOS)
@@ -534,6 +537,26 @@ void ToolbarView::Init() {
reload_->SetVisible(show_reload_button_.GetValue());
+ // Tab strip should be in the toolbar only when the CAT feature is enabled.
+ if (features::IsHeliumCatEnabled()) {
+ auto tab_strip_region_view =
+ std::make_unique<TabStripRegionView>(browser_view_);
+ tab_strip_region_view_ = tab_strip_region_view.get();
+
+ // Add the tab strip region view to the container view right after
+ // the location bar if it's present.
+ auto location_bar_index = location_bar_ ?
+ container_view_->GetIndexOf(location_bar_) :
+ std::nullopt;
+
+ if (location_bar_index) {
+ container_view_->AddChildViewAt(std::move(tab_strip_region_view),
+ *location_bar_index + 1);
+ } else {
+ container_view_->AddChildView(std::move(tab_strip_region_view));
+ }
+ }
+
show_avatar_button_.Init(
prefs::kShowAvatarButton, prefs,
base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
@@ -700,6 +723,24 @@ bool ToolbarView::IsRectInWindowCaption(
return gfx::ToEnclosingRect(rect_in_target_coords_f);
};
+ // Check the tab strip region first if CAT is enabled.
+ if (features::IsHeliumCatEnabled() && tab_strip_region_view_) {
+ const gfx::Rect tab_strip_rect = get_target_rect(tab_strip_region_view_);
+ if (tab_strip_region_view_->GetLocalBounds().Intersects(tab_strip_rect)) {
+ // Check if the rect is actually on the tab strip region view.
+ if (tab_strip_region_view_->HitTestRect(tab_strip_rect)) {
+ auto* tab_strip_region =
+ static_cast<TabStripRegionView*>(tab_strip_region_view_);
+
+ if (tab_strip_region->IsPositionInWindowCaption(tab_strip_rect.origin())) {
+ return true;
+ }
+
+ return false;
+ }
+ }
+ }
+
// Check each child view in container_view_ to see if the rect intersects with
// any clickable elements. If it does, check if the click is actually on that
// element. False if on a clickable element, true if not on a clickable element.
@@ -998,6 +1039,12 @@ void ToolbarView::InitLayout() {
location_bar_->SetProperty(views::kMarginsKey,
gfx::Insets::VH(0, location_bar_margin));
+ if (features::IsHeliumCatEnabled()) {
+ location_bar_->SetPreferredSize(gfx::Size(kPreferredCompactWidth, 0));
+ location_bar_->SetProperty(views::kMarginsKey,
+ gfx::Insets::TLBR(0, location_bar_margin, 0, 0));
+ }
+
if (extensions_container_) {
const views::FlexSpecification extensions_flex_rule =
views::FlexSpecification(
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -146,6 +146,9 @@ class ToolbarView : public views::Access
// Shows a bookmark bubble and anchors it appropriately.
void ShowBookmarkBubble(const GURL& url, bool already_bookmarked);
+ // Returns the tab strip region view if CAT feature is enabled, nullptr otherwise.
+ views::View* GetTabStripRegionView() const { return tab_strip_region_view_.get(); }
+
// Accessors.
Browser* browser() const { return browser_; }
views::Button* GetChromeLabsButton() const;
@@ -322,6 +325,7 @@ class ToolbarView : public views::Access
raw_ptr<BrowserAppMenuButton> app_menu_button_ = nullptr;
raw_ptr<views::View> new_tab_button_ = nullptr;
raw_ptr<PinnedActionToolbarButton> tab_search_button_ = nullptr;
+ raw_ptr<views::View> tab_strip_region_view_ = nullptr;
const raw_ptr<Browser> browser_;
const raw_ptr<BrowserView> browser_view_;
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -187,6 +187,11 @@ gfx::Insets GetLayoutInsets(LayoutInset
case TOOLBAR_INTERIOR_MARGIN: {
const int vert = GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
const int horiz = vert * 2;
+
+ if (features::IsHeliumCatEnabled()) {
+ return gfx::Insets::VH(vert, horiz + vert);
+ }
+
return touch_ui ? gfx::Insets() :
gfx::Insets::TLBR(0, horiz, vert, horiz);
}
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -616,7 +616,7 @@ int OmniboxViewViews::GetUnelidedTextWid
}
gfx::Size OmniboxViewViews::GetMinimumSize() const {
- constexpr int kMinCharacters = 20;
+ constexpr int kMinCharacters = 32;
return gfx::Size(
GetFontList().GetExpectedTextWidth(kMinCharacters) + GetInsets().width(),
GetPreferredSize().height());
@@ -0,0 +1,66 @@
--- a/chrome/browser/ui/views/frame/browser_frame_view_mac.mm
+++ b/chrome/browser/ui/views/frame/browser_frame_view_mac.mm
@@ -186,7 +186,7 @@ gfx::Rect BrowserFrameViewMac::GetBounds
// The bottom curve of the first/last tab swoops into the caption button
// region, so account for this when calculating insets.
const gfx::Insets insets = GetCaptionButtonInsets(
- /*visual_overlap=*/TabStyle::Get()->GetBottomCornerRadius());
+ /*visual_overlap=*/TabStyle::Get()->GetBottomCornerRadius() / 2);
bounds.Inset(insets);
}
--- a/chrome/browser/ui/views/frame/browser_frame_view_win.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_view_win.cc
@@ -234,10 +234,13 @@ bool BrowserFrameViewWin::CaptionButtons
gfx::Rect BrowserFrameViewWin::GetBoundsForTabStripRegion(
const gfx::Size& tabstrip_minimum_size) const {
- const int x = CaptionButtonsOnLeadingEdge() ? CaptionButtonsRegionWidth() : 0;
+ const int x = CaptionButtonsOnLeadingEdge() ?
+ CaptionButtonsRegionWidth() :
+ GetLayoutConstant(TOOLBAR_CORNER_RADIUS);
int end_x = width();
if (!CaptionButtonsOnLeadingEdge()) {
- end_x = std::min(width() - CaptionButtonsRegionWidth(), end_x);
+ end_x = std::min(width() - CaptionButtonsRegionWidth() -
+ GetLayoutConstant(TOOLBAR_CORNER_RADIUS), end_x);
}
return gfx::Rect(x, TopAreaHeight(false), std::max(0, end_x - x),
tabstrip_minimum_size.height());
--- a/chrome/browser/ui/views/frame/browser_frame_view_linux.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_view_linux.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/frame/browser_frame_view_linux.h"
+#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h"
#include "chrome/browser/ui/views/frame/browser_native_widget_aura_linux.h"
@@ -142,5 +143,15 @@ int BrowserFrameViewLinux::GetTranslucen
return 0;
}
+gfx::Rect BrowserFrameViewLinux::GetBoundsForTabStripRegion(
+ const gfx::Size& tabstrip_minimum_size) const {
+ gfx::Insets frame_insets = RestoredMirroredFrameBorderInsets();
+ int x = frame_insets.left() + GetLayoutConstant(TOOLBAR_CORNER_RADIUS);
+ int inset_width = width() - x - frame_insets.right();
+
+ return gfx::Rect(x, frame_insets.top(), inset_width,
+ tabstrip_minimum_size.height());
+}
+
BEGIN_METADATA(BrowserFrameViewLinux)
END_METADATA
--- a/chrome/browser/ui/views/frame/browser_frame_view_linux.h
+++ b/chrome/browser/ui/views/frame/browser_frame_view_linux.h
@@ -38,6 +38,8 @@ class BrowserFrameViewLinux : public Opa
gfx::Insets GetInputInsets() const override;
SkRRect GetRestoredClipRegion() const override;
int GetTranslucentTopAreaHeight() const override;
+ gfx::Rect GetBoundsForTabStripRegion(
+ const gfx::Size& tabstrip_minimum_size) const override;
// Gets the shadow metrics (radius, offset, and number of shadows). This will
// always return shadow values, even if shadows are not actually drawn.
+59 -16
View File
@@ -1,15 +1,24 @@
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -29,7 +29,7 @@ int GetLayoutConstant(LayoutConstant con
@@ -22,6 +22,8 @@
int GetLayoutConstant(LayoutConstant constant) {
const bool touch_ui = ui::TouchUiController::Get()->touch_ui();
switch (constant) {
+ case TOP_BAR_VERTICAL_PADDING:
+ return 3;
case APP_MENU_PROFILE_ROW_AVATAR_ICON_SIZE:
return 24;
case APP_MENU_MAXIMUM_CHARACTER_LENGTH:
@@ -29,7 +31,7 @@ int GetLayoutConstant(LayoutConstant con
case BOOKMARK_BAR_HEIGHT: {
// The fixed margin ensures the bookmark buttons appear centered relative
// to the white space above and below.
- const int bookmark_bar_attached_vertical_margin = 6;
+ const int bookmark_bar_attached_vertical_margin = 3;
+ const int bookmark_bar_attached_vertical_margin = GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
return GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT) +
bookmark_bar_attached_vertical_margin;
}
@@ -52,7 +52,7 @@ int GetLayoutConstant(LayoutConstant con
@@ -52,7 +54,7 @@ int GetLayoutConstant(LayoutConstant con
case LOCATION_BAR_CHILD_INTERIOR_PADDING:
return 3;
case LOCATION_BAR_CHILD_CORNER_RADIUS:
@@ -18,7 +27,7 @@
case LOCATION_BAR_CHIP_ICON_SIZE:
return 16;
case LOCATION_BAR_CHIP_PADDING:
@@ -60,7 +60,7 @@ int GetLayoutConstant(LayoutConstant con
@@ -60,7 +62,7 @@ int GetLayoutConstant(LayoutConstant con
case LOCATION_BAR_ELEMENT_PADDING:
return touch_ui ? 3 : 2;
case LOCATION_BAR_PAGE_INFO_ICON_VERTICAL_PADDING:
@@ -27,7 +36,7 @@
case LOCATION_BAR_LEADING_DECORATION_EDGE_PADDING:
// TODO(manukh): See comment in `LocationBarView::Layout()`. We have too
// many feature permutations that would affect this and other layout
@@ -69,11 +69,11 @@ int GetLayoutConstant(LayoutConstant con
@@ -69,11 +71,11 @@ int GetLayoutConstant(LayoutConstant con
// here once we decide on a permutation.
NOTREACHED();
case LOCATION_BAR_TRAILING_DECORATION_EDGE_PADDING:
@@ -41,7 +50,16 @@
case LOCATION_BAR_ICON_SIZE:
return touch_ui ? 20 : 16;
case LOCATION_BAR_LEADING_ICON_SIZE:
@@ -93,12 +93,12 @@ int GetLayoutConstant(LayoutConstant con
@@ -81,7 +83,7 @@ int GetLayoutConstant(LayoutConstant con
case LOCATION_BAR_TRAILING_ICON_SIZE:
return 20;
case NEW_TAB_BUTTON_LEADING_MARGIN:
- return 0;
+ return 4;
case STAR_RATING_ICON_SIZE:
return 14;
case TAB_AFTER_TITLE_PADDING:
@@ -93,47 +95,43 @@ int GetLayoutConstant(LayoutConstant con
case TAB_CLOSE_BUTTON_SIZE:
return touch_ui ? 24 : 16;
case TAB_HEIGHT:
@@ -52,11 +70,12 @@
GetLayoutConstant(TAB_STRIP_PADDING);
case TAB_STRIP_PADDING:
- return 6;
+ return 3;
+ return GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
case TAB_SEPARATOR_HEIGHT:
return touch_ui ? 24 : 20;
case TAB_PRE_TITLE_PADDING:
@@ -106,28 +106,23 @@ int GetLayoutConstant(LayoutConstant con
- return 8;
+ return 6;
case TAB_STACK_DISTANCE:
return touch_ui ? 4 : 6;
case TABSTRIP_TOOLBAR_OVERLAP:
@@ -76,23 +95,31 @@
return touch_ui ? 20 : 16;
case TOOLBAR_DIVIDER_SPACING:
- return 9;
+ return 6;
+ return GetLayoutConstant(TOP_BAR_VERTICAL_PADDING) * 2;
case TOOLBAR_DIVIDER_WIDTH:
- return 2;
+ return 1;
case TOOLBAR_ELEMENT_PADDING:
- return touch_ui ? 0 : 4;
+ return touch_ui ? 0 : 3;
+ return touch_ui ? 0 : GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
case TOOLBAR_ICON_DEFAULT_MARGIN:
- return touch_ui ? 0 : 2;
+ return touch_ui ? 0 : 3;
+ return touch_ui ? 0 : GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
case TOOLBAR_STANDARD_SPACING:
- return touch_ui ? 12 : 9;
+ return touch_ui ? 12 : 6;
+ return touch_ui ? 12 : GetLayoutConstant(TOP_BAR_VERTICAL_PADDING) * 2;
case PAGE_INFO_ICON_SIZE:
return 20;
case DOWNLOAD_ICON_SIZE:
@@ -167,7 +162,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
return 20;
+ // Used for the tab strip offset.
case TOOLBAR_CORNER_RADIUS:
- return 8;
+ return 2;
case VERTICAL_TAB_STRIP_HORIZONTAL_PADDING:
return 12;
default:
@@ -167,7 +165,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
}
case TOOLBAR_BUTTON:
@@ -101,7 +128,7 @@
case BROWSER_APP_MENU_CHIP_PADDING:
if (touch_ui) {
@@ -183,11 +178,11 @@ gfx::Insets GetLayoutInsets(LayoutInset
@@ -183,11 +181,15 @@ gfx::Insets GetLayoutInsets(LayoutInset
if (touch_ui) {
return GetLayoutInsets(TOOLBAR_BUTTON);
} else {
@@ -109,9 +136,25 @@
+ return gfx::Insets::TLBR(4, 5, 4, 4);
}
case TOOLBAR_INTERIOR_MARGIN:
- case TOOLBAR_INTERIOR_MARGIN:
- return touch_ui ? gfx::Insets::VH(4, 0) : gfx::Insets::VH(6, 5);
+ return touch_ui ? gfx::Insets() : gfx::Insets::TLBR(0, 6, 3, 6);
+ case TOOLBAR_INTERIOR_MARGIN: {
+ const int vert = GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
+ const int horiz = vert * 2;
+ return touch_ui ? gfx::Insets() :
+ gfx::Insets::TLBR(0, horiz, vert, horiz);
+ }
case WEBUI_TAB_STRIP_TOOLBAR_INTERIOR_MARGIN:
return gfx::Insets::VH(4, 0);
--- a/chrome/browser/ui/layout_constants.h
+++ b/chrome/browser/ui/layout_constants.h
@@ -10,6 +10,8 @@
#include "ui/gfx/geometry/size.h"
enum LayoutConstant {
+ // The vertical padding of the tab strip and the toolbar.
+ TOP_BAR_VERTICAL_PADDING,
// The size of the avatar icon in the profile row of the app menu.
APP_MENU_PROFILE_ROW_AVATAR_ICON_SIZE,
+21 -9
View File
@@ -122,7 +122,7 @@
if (!apps::features::ShouldShowLinkCapturingUX()) {
params.types_enabled.push_back(PageActionIconType::kIntentPicker);
}
@@ -440,54 +433,8 @@ void LocationBarView::Init() {
@@ -440,66 +433,8 @@ void LocationBarView::Init() {
params.types_enabled.push_back(PageActionIconType::kZoom);
params.types_enabled.push_back(PageActionIconType::kFileSystemAccess);
@@ -137,13 +137,25 @@
- params.types_enabled.push_back(PageActionIconType::kVirtualCardEnroll);
- params.types_enabled.push_back(PageActionIconType::kMandatoryReauth);
-
- if (browser_ &&
- base::FeatureList::IsEnabled(omnibox::kAiModeOmniboxEntryPoint)) {
- // The state of the AIM eligibility service can change during runtime but the
- // construction of the location bar happens only once, at window creation. In
- // order to accommodate changing eligibility, the AIM entrypoint is always
- // added here and whether it's enabled or not only affects its visibility.
- // Unless the main AIM omnibox entrypoint Feature is explicitly disabled,
- // which can be used as a kill switch in case of any unanticipated issues with
- // this approach.
- auto* feature_list = base::FeatureList::GetInstance();
- bool aim_omnibox_entrypoint_explicitly_disabled =
- feature_list &&
- feature_list->IsFeatureOverridden(
- omnibox::kAiModeOmniboxEntryPoint.name) &&
- !base::FeatureList::IsEnabled(omnibox::kAiModeOmniboxEntryPoint);
- if (!aim_omnibox_entrypoint_explicitly_disabled) {
- // Position in the leading position, like the entrypoint for
- // kLensOverlayHomework below. While both chips may be enabled, they will
- // not appear at the same time due to different focus behavior. The
- // visibility of this entrypoint is dependent on whether or not the user
- // meets AIM eligibility criteria.
- // meets AIM eligibility criteria (checked elsewhere).
- params.types_enabled.insert(params.types_enabled.begin(),
- PageActionIconType::kAiMode);
- }
@@ -177,7 +189,7 @@
if (browser_ && !is_popup_mode_) {
params.types_enabled.push_back(PageActionIconType::kBookmarkStar);
@@ -538,7 +485,7 @@ void LocationBarView::OnPopupOpened() {
@@ -550,7 +485,7 @@ void LocationBarView::OnPopupOpened() {
int LocationBarView::GetBorderRadius() const {
return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
@@ -186,7 +198,7 @@
}
std::unique_ptr<views::Background> LocationBarView::CreateRoundRectBackground(
@@ -738,9 +685,9 @@ void LocationBarView::Layout(PassKey) {
@@ -750,9 +685,9 @@ void LocationBarView::Layout(PassKey) {
// TODO(manukh): Move constants to layout_constants.cc.
// The padding between the left edges of the location bar and the LHS icon,
// e.g. the page info icon, the google G icon, the selected suggestion icon.
@@ -198,7 +210,7 @@
// Apply indentation to align the omnibox input icon and the text with those
// of the suggestions in the popup. However, there are two exceptions where
@@ -759,22 +706,22 @@ void LocationBarView::Layout(PassKey) {
@@ -771,22 +706,22 @@ void LocationBarView::Layout(PassKey) {
!location_icon_view_->ShouldShowLabel() &&
!ShouldShowKeywordBubble();
if (should_indent) {
@@ -225,7 +237,7 @@
}
LocationBarLayout leading_decorations(LocationBarLayout::Position::kLeftEdge,
@@ -1272,7 +1219,7 @@ int LocationBarView::GetMinimumTrailingW
@@ -1284,7 +1219,7 @@ int LocationBarView::GetMinimumTrailingW
}
gfx::Rect LocationBarView::GetLocalBoundsWithoutEndcaps() const {
@@ -234,7 +246,7 @@
gfx::Rect bounds_without_endcaps(GetLocalBounds());
bounds_without_endcaps.Inset(gfx::Insets::VH(0, border_radius));
return bounds_without_endcaps;
@@ -1287,9 +1234,9 @@ void LocationBarView::RefreshBackground(
@@ -1299,9 +1234,9 @@ void LocationBarView::RefreshBackground(
ui::NativeTheme::PreferredContrast::kMore;
const auto* const color_provider = GetColorProvider();
+9 -35
View File
@@ -9,18 +9,7 @@
#if !defined(USE_AURA)
@@ -168,7 +168,9 @@ class TopBackgroundView : public views::
// not antialiased, since the goal is to completely cover the underlying
// pixels, and AA would let those on the edge partly bleed through.
SetBackground(location_bar_->CreateRoundRectBackground(
- SK_ColorTRANSPARENT, background_color, SkBlendMode::kSrc, false));
+ SK_ColorTRANSPARENT, background_color, SkBlendMode::kSrc,
+ /*antialias=*/false,
+ /*should_border_scale=*/true));
}
#if !defined(USE_AURA)
@@ -230,8 +232,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
@@ -230,8 +230,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
LocationBarView* location_bar,
bool include_cutout)
: contents_(contents), include_cutout_(include_cutout) {
@@ -30,15 +19,7 @@
// Host the contents in its own View to simplify layout and customization.
auto contents_host_builder =
views::Builder<views::View>()
@@ -263,6 +264,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
views::BubbleBorder::Shadow::STANDARD_SHADOW);
border->set_rounded_corners(gfx::RoundedCornersF(corner_radius));
border->set_md_shadow_elevation(kElevation);
+ border->set_draw_border_stroke(true);
SetBorder(std::move(border));
AddChildView(std::move(contents_host));
@@ -300,10 +302,10 @@ int RoundedOmniboxResultsFrame::GetNonRe
@@ -300,10 +299,10 @@ int RoundedOmniboxResultsFrame::GetNonRe
// static
gfx::Insets RoundedOmniboxResultsFrame::GetLocationBarAlignmentInsets() {
@@ -47,19 +28,10 @@
return gfx::Insets::TLBR(6, 1, 5, 1);
}
- return gfx::Insets::VH(5, 6);
+ return gfx::Insets::VH(3, 8);
+ return gfx::Insets::TLBR(3, 7, 0, 7);
}
// static
@@ -378,7 +380,7 @@ void RoundedOmniboxResultsFrame::OnMouse
// Insets used to position |contents_| within |contents_host_|.
gfx::Insets RoundedOmniboxResultsFrame::GetContentInsets() {
- return gfx::Insets::TLBR(GetNonResultSectionHeight(include_cutout_), 0, 0, 0);
+ return gfx::Insets::TLBR(GetNonResultSectionHeight(include_cutout_) - 4, 0, 0, 0);
}
BEGIN_METADATA(RoundedOmniboxResultsFrame)
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -198,9 +198,6 @@ OmniboxResultView::OmniboxResultView(Omn
@@ -93,7 +65,7 @@
return views::CreateRoundedRectBackground(
- GetOmniboxBackgroundColorId(part_state), radii);
+ GetOmniboxBackgroundColorId(part_state),
+ kIPHBackgroundBorderRadius);
+ kIPHBackgroundBorderRadius);
}
void OmniboxResultView::SetMatch(const AutocompleteMatch& match) {
@@ -195,7 +167,7 @@
- int extra_bottom_padding =
- GetMatchAtIndex(last_result_index).IsToolbelt() ? 2 : 8;
- popup_height += extra_bottom_padding;
+ popup_height += 2;
+ popup_height += 4;
}
// Add enough space on the top and bottom so it looks like there is the same
@@ -219,18 +191,20 @@
gfx::Insets button_insets_ =
gfx::Insets::TLBR(0, 0, 0,
ChromeLayoutProvider::Get()->GetDistanceMetric(
@@ -299,9 +299,8 @@ class OmniboxSuggestionRowButton : publi
@@ -299,10 +299,9 @@ class OmniboxSuggestionRowButton : publi
ui::EF_MIDDLE_MOUSE_BUTTON);
views::InstallPillHighlightPathGenerator(this);
- SetImageLabelSpacing(8);
- SetCustomPadding(ChromeLayoutProvider::Get()->GetInsetsMetric(
- INSETS_OMNIBOX_PILL_BUTTON));
- SetCornerRadius(GetLayoutConstant(TOOLBAR_CORNER_RADIUS));
+ SetImageLabelSpacing(6);
+ SetCustomPadding(gfx::Insets::VH(3, 8));
SetCornerRadius(GetLayoutConstant(TOOLBAR_CORNER_RADIUS));
+ SetCornerRadius(8);
auto* const ink_drop = views::InkDrop::Get(this);
SetAnimationDuration(base::TimeDelta());
@@ -314,6 +313,7 @@ class OmniboxSuggestionRowButton : publi
CHECK(v);
return v->GetVisible() && v->popup_view_->GetSelection() == v->selection_;
@@ -33,3 +33,119 @@
}
}
--- a/third_party/devtools-frontend/src/front_end/panels/settings/BUILD.gn
+++ b/third_party/devtools-frontend/src/front_end/panels/settings/BUILD.gn
@@ -51,7 +51,6 @@ devtools_module("settings") {
"../../ui/legacy/components/utils:bundle",
"../../ui/lit:bundle",
"../utils:bundle",
- "./components:bundle",
]
}
--- a/third_party/devtools-frontend/src/front_end/panels/settings/SettingsScreen.ts
+++ b/third_party/devtools-frontend/src/front_end/panels/settings/SettingsScreen.ts
@@ -20,7 +20,6 @@ import {html, render} from '../../ui/lit
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
import {PanelUtils} from '../utils/utils.js';
-import * as PanelComponents from './components/components.js';
import type {KeybindsSettingsTab} from './KeybindsSettingsTab.js';
import settingsScreenStyles from './settingsScreen.css.js';
@@ -220,11 +219,8 @@ interface SettingsTab {
}
export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
- private readonly syncSection = new PanelComponents.SyncSection.SyncSection();
private readonly settingToControl = new Map<Common.Settings.Setting<unknown>, HTMLElement>();
private readonly containerElement: HTMLElement;
- #updateSyncSectionTimerId = -1;
- #syncSectionUpdatePromise: Promise<void>|null = null;
constructor() {
super({jslog: `${VisualLogging.pane('preferences')}`});
@@ -293,39 +289,13 @@ export class GenericSettingsTab extends
override wasShown(): void {
UI.Context.Context.instance().setFlavor(GenericSettingsTab, this);
super.wasShown();
- this.updateSyncSection();
}
override willHide(): void {
- if (this.#updateSyncSectionTimerId > 0) {
- window.clearTimeout(this.#updateSyncSectionTimerId);
- this.#updateSyncSectionTimerId = -1;
- }
super.willHide();
UI.Context.Context.instance().setFlavor(GenericSettingsTab, null);
}
- private updateSyncSection(): void {
- if (this.#updateSyncSectionTimerId > 0) {
- window.clearTimeout(this.#updateSyncSectionTimerId);
- this.#updateSyncSectionTimerId = -1;
- }
-
- this.#syncSectionUpdatePromise =
- new Promise<Host.InspectorFrontendHostAPI.SyncInformation>(
- resolve => Host.InspectorFrontendHost.InspectorFrontendHostInstance.getSyncInformation(resolve))
- .then(syncInfo => {
- this.syncSection.data = {
- syncInfo,
- syncSetting: Common.Settings.moduleSetting('sync-preferences') as Common.Settings.Setting<boolean>,
- receiveBadgesSetting: Common.Settings.Settings.instance().moduleSetting('receive-gdp-badges'),
- };
- if (!syncInfo.isSyncActive || !syncInfo.arePreferencesSynced) {
- this.#updateSyncSectionTimerId = window.setTimeout(this.updateSyncSection.bind(this), 500);
- }
- });
- }
-
private createExtensionSection(settings: Common.Settings.SettingRegistration[]): void {
const sectionName = Common.Settings.SettingCategory.EXTENSIONS;
const settingUI = Components.Linkifier.LinkHandlerSettingUI.instance() as UI.SettingsUI.SettingUI;
@@ -340,12 +310,7 @@ export class GenericSettingsTab extends
// Always create the EXTENSIONS section and append the link handling control.
if (category === Common.Settings.SettingCategory.EXTENSIONS) {
this.createExtensionSection(settings);
- } else if (category === Common.Settings.SettingCategory.ACCOUNT && settings.length > 0) {
- const syncCard = createSettingsCard(
- Common.SettingRegistration.getLocalizedSettingsCategory(Common.SettingRegistration.SettingCategory.ACCOUNT),
- this.syncSection);
- this.containerElement.appendChild(syncCard);
- } else if (settings.length > 0) {
+ } else if (category !== Common.Settings.SettingCategory.ACCOUNT && settings.length > 0) {
this.createStandardSectionElement(category, settings);
}
}
@@ -375,10 +340,6 @@ export class GenericSettingsTab extends
const element = this.settingToControl.get(setting);
if (element) {
PanelUtils.highlightElement(element);
- } else if (setting.name === 'receive-gdp-badges') {
- void this.#syncSectionUpdatePromise?.then(() => {
- void this.syncSection.highlightReceiveBadgesSetting();
- });
}
}
}
--- a/third_party/devtools-frontend/src/config/gni/devtools_grd_files.gni
+++ b/third_party/devtools-frontend/src/config/gni/devtools_grd_files.gni
@@ -707,7 +707,6 @@ grd_files_bundled_sources = [
"front_end/panels/security/security.js",
"front_end/panels/sensors/sensors-meta.js",
"front_end/panels/sensors/sensors.js",
- "front_end/panels/settings/components/components.js",
"front_end/panels/settings/emulation/components/components.js",
"front_end/panels/settings/emulation/emulation-meta.js",
"front_end/panels/settings/emulation/emulation.js",
@@ -1867,8 +1866,6 @@ grd_files_unbundled_sources = [
"front_end/panels/settings/SettingsScreen.js",
"front_end/panels/settings/WorkspaceSettingsTab.js",
"front_end/panels/settings/aiSettingsTab.css.js",
- "front_end/panels/settings/components/SyncSection.js",
- "front_end/panels/settings/components/syncSection.css.js",
"front_end/panels/settings/emulation/DevicesSettingsTab.js",
"front_end/panels/settings/emulation/components/UserAgentClientHintsForm.js",
"front_end/panels/settings/emulation/components/userAgentClientHintsForm.css.js",
@@ -19,7 +19,7 @@
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
display_mode_ != DisplayMode::NORMAL);
@@ -841,14 +829,6 @@ void ToolbarView::Layout(PassKey) {
@@ -823,14 +811,6 @@ void ToolbarView::Layout(PassKey) {
// The container view should be the exact same size/position as ToolbarView.
container_view_->SetSize(size());
@@ -34,7 +34,7 @@
if (display_mode_ == DisplayMode::CUSTOM_TAB) {
custom_tab_bar_->SetBounds(0, 0, width(),
custom_tab_bar_->GetPreferredSize().height());
@@ -858,7 +838,6 @@ void ToolbarView::Layout(PassKey) {
@@ -840,7 +820,6 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
@@ -42,7 +42,7 @@
}
if (toolbar_controller_) {
@@ -896,38 +875,6 @@ void ToolbarView::OnThemeChanged() {
@@ -878,38 +857,6 @@ void ToolbarView::OnThemeChanged() {
SchedulePaint();
}
+115 -17
View File
@@ -7,18 +7,18 @@
-constexpr int kChromeRefreshSeparatorThickness = 2;
-constexpr int kChromeRefreshSeparatorHorizontalMargin = 2;
+constexpr int kChromeRefreshSeparatorThickness = 1;
+constexpr int kChromeRefreshSeparatorHorizontalMargin = 1;
+constexpr int kChromeRefreshSeparatorHorizontalMargin = 5;
// TODO (crbug.com/1451400): This constant should be in LayoutConstants.
constexpr int kChromeRefreshSeparatorHeight = 16;
// The padding from the top of the tab to the content area.
constexpr int kChromeRefreshTabVerticalPadding = 6;
-constexpr int kChromeRefreshTabHorizontalPadding = 8;
+constexpr int kChromeRefreshTabHorizontalPadding = 7;
+constexpr int kChromeRefreshTabHorizontalPadding = 2;
// The standard tab width is 232 DIP, excluding separators and overlap.
-constexpr int kTabWidth = 232;
+constexpr int kTabWidth = 200;
+constexpr int kTabWidth = 190;
+
+// Split tabs need more space to be readable
+constexpr int kSplitTabWidth = 250;
@@ -59,7 +59,15 @@
// We'll do the entire path calculation in aligned pixels.
// TODO(dfried): determine if we actually want to use `stroke_thickness` as
// the inset in this case.
@@ -224,11 +222,7 @@ SkPath TabStyleViewsImpl::GetPath(TabSty
@@ -217,18 +215,14 @@ SkPath TabStyleViewsImpl::GetPath(TabSty
// tab width (in DIP), not our new, scaled-and-aligned bounds.
float content_corner_radius =
GetTopCornerRadiusForWidth(tab()->width()) * scale;
- float extension_corner_radius = tab_style()->GetBottomCornerRadius() * scale;
+ float extension_corner_radius = 4 * scale;
const float separator_overlap = (tab_style()->GetSeparatorMargins().width() +
tab_style()->GetSeparatorSize().width()) *
scale;
// Selected, hover, and inactive tab fills are a detached squarcle tab.
@@ -188,28 +196,41 @@
--- a/chrome/browser/ui/views/tabs/tab_group_style.cc
+++ b/chrome/browser/ui/views/tabs/tab_group_style.cc
@@ -32,7 +32,7 @@ constexpr int kAttentionIndicatorWidth =
// The size of the empty chip.
constexpr int kEmptyChipSize = 20;
constexpr int kCornerRadius = 6;
-constexpr int kTabGroupOverlapAdjustment = 2;
+constexpr int kTabGroupOverlapAdjustment = 3;
} // namespace
@@ -91,7 +91,7 @@ gfx::Point TabGroupStyle::GetTitleChipOf
const int total_space = GetLayoutConstant(TAB_STRIP_HEIGHT) -
GetEmptyChipSize() -
GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP);
- return gfx::Point(TabStyle::Get()->GetTabOverlap() - 2, total_space / 2);
+ return gfx::Point(TabStyle::Get()->GetTabOverlap() + 2, total_space / 2);
}
std::unique_ptr<views::Background> TabGroupStyle::GetEmptyTitleChipBackground(
--- a/chrome/browser/ui/views/tabs/tab_group_underline.cc
+++ b/chrome/browser/ui/views/tabs/tab_group_underline.cc
@@ -93,21 +93,17 @@ gfx::Insets TabGroupUnderline::GetInsets
@@ -80,10 +80,7 @@ gfx::Rect TabGroupUnderline::CalculateTa
gfx::Rect group_bounds = ToEnclosingRect(leading_bounds);
group_bounds.UnionEvenIfEmpty(ToEnclosingRect(trailing_bounds));
- const int y =
- group_bounds.bottom() - GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP);
-
- return gfx::Rect(group_bounds.x(), y - kStrokeThickness, group_bounds.width(),
+ return gfx::Rect(group_bounds.x(), 0, group_bounds.width(),
kStrokeThickness);
}
@@ -93,22 +90,19 @@ gfx::Insets TabGroupUnderline::GetInsets
// the group, and may be the right boundary if the group is collapsed.
const TabGroupHeader* const header =
views::AsViewClass<TabGroupHeader>(sibling_view);
+
+ const int left_offset = 3;
+ const int left_offset = 8;
+ const int right_offset = left_offset - 3;
if (header) {
- return gfx::Insets::TLBR(0, TabGroupUnderline::GetStrokeInset(), 0,
- TabGroupUnderline::GetStrokeInset());
+ return gfx::Insets::TLBR(0, TabGroupUnderline::GetStrokeInset() + left_offset,
+ 0, TabGroupUnderline::GetStrokeInset());
+ 0, TabGroupUnderline::GetStrokeInset() + right_offset);
}
const Tab* const tab = views::AsViewClass<Tab>(sibling_view);
@@ -222,11 +243,13 @@
-
- // Inactive tabs are inset like group headers.
- const int left_inset = TabGroupUnderline::GetStrokeInset();
- const int right_inset = TabGroupUnderline::GetStrokeInset();
+ const int left_inset = TabGroupUnderline::GetStrokeInset() + left_offset;
const int right_inset = TabGroupUnderline::GetStrokeInset();
+ const int right_inset = TabGroupUnderline::GetStrokeInset() + right_offset;
return gfx::Insets::TLBR(0, left_inset, 0, right_inset);
@@ -119,8 +115,7 @@ void TabGroupUnderline::MaybeSetVisible(
}
@@ -119,8 +113,7 @@ void TabGroupUnderline::MaybeSetVisible(
// static
int TabGroupUnderline::GetStrokeInset() {
@@ -236,3 +259,78 @@
}
BEGIN_METADATA(TabGroupUnderline)
--- a/chrome/browser/ui/views/tabs/tab_group_underline.h
+++ b/chrome/browser/ui/views/tabs/tab_group_underline.h
@@ -25,8 +25,7 @@ class TabGroupUnderline : public views::
METADATA_HEADER(TabGroupUnderline, views::View)
public:
- static constexpr int kStrokeThickness =
- views::FocusRing::kDefaultHaloThickness;
+ static constexpr int kStrokeThickness = 1;
static int GetStrokeInset();
--- a/chrome/browser/ui/views/tabs/tab_group_header.cc
+++ b/chrome/browser/ui/views/tabs/tab_group_header.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
+#include "chrome/browser/ui/tabs/tab_group_theme.h"
#include "chrome/browser/ui/tabs/tab_style.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h"
@@ -78,6 +79,8 @@ namespace {
// The amount of padding between the label and the sync icon.
constexpr int kSyncIconPaddingFromLabel = 2;
+constexpr int kTabGroupStrokeThickness = 1;
+
bool SupportsDataSharing() {
return data_sharing::features::IsDataSharingFunctionalityEnabled();
}
@@ -419,7 +422,8 @@ bool TabGroupHeader::DoesIntersectRect(c
int TabGroupHeader::GetDesiredWidth() const {
const int overlap_margin = group_style_->GetTabGroupViewOverlap() * 2;
- return overlap_margin + title_chip_->width();
+ const int extra_padding = 8;
+ return overlap_margin + extra_padding + title_chip_->width();
}
void TabGroupHeader::SetCollapsedState() {
@@ -559,7 +563,11 @@ void TabGroupHeader::UpdateTitleView() {
title_->SetText(group_title_);
if (!group_title_.empty()) {
- title_->SetEnabledColor(color_utils::GetColorWithMaxContrast(color_));
+ const SkColor text_color = GetColorProvider()->GetColor(
+ GetSavedTabGroupForegroundColorId(
+ tab_slot_controller_->GetGroupColorId(group().value())));
+
+ title_->SetEnabledColor(text_color);
}
}
@@ -690,8 +698,19 @@ void TabGroupHeader::CreateHeaderWithTit
const int corner_radius = group_style_->GetChipCornerRadius();
title_chip_->SetBounds(title_chip_origin.x(), title_chip_origin.y(),
title_chip_width, text_height);
+
+ const tab_groups::TabGroupColorId group_color_id =
+ tab_slot_controller_->GetGroupColorId(group().value());
+
+ const SkColor background_color =
+ GetColorProvider()->GetColor(GetTabGroupBookmarkColorId(group_color_id));
+ const SkColor stroke_color =
+ GetColorProvider()->GetColor(GetSavedTabGroupOutlineColorId(group_color_id));
+
title_chip_->SetBackground(
- views::CreateRoundedRectBackground(color_, corner_radius));
+ views::CreateRoundedRectBackground(background_color, corner_radius));
+ title_chip_->SetBorder(views::CreateRoundedRectBorder(
+ kTabGroupStrokeThickness, corner_radius, stroke_color));
// Set the bounds of the sync icon first, followed by the title.
const int start_of_sync_icon = title_chip_insets.left();
@@ -0,0 +1,529 @@
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1336,6 +1336,26 @@ inline constexpr char kSplitViewDragAndD
inline constexpr char kSplitViewDragAndDropNudgeUsedCount[] =
"browser.split_view_drag_and_drop_nudge_used_count";
+// A boolean pref set to true if the Back button should be visible on the
+// toolbar.
+inline constexpr char kShowBackButton[] = "helium.browser.show_back_button";
+
+// A boolean pref set to true if the Reload button should be visible on the
+// toolbar.
+inline constexpr char kShowReloadButton[] = "helium.browser.show_reload_button";
+
+// A boolean pref set to true if the Avatar button should be visible on the
+// toolbar.
+inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
+
+// A boolean pref set to true if the Extensions button should be visible on the
+// toolbar.
+inline constexpr char kShowExtensionsButton[] = "helium.browser.show_extensions_button";
+
+// A boolean pref set to true if the Menu button should be visible on the
+// toolbar.
+inline constexpr char kShowMenuButton[] = "helium.browser.show_menu_button";
+
// A boolean pref set to true if Gemini integration be enabled. This is managed
// by enterprise policy.
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -125,6 +125,12 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kPinSplitTabButton, false,
pref_registration_flags);
+ registry->RegisterBooleanPref(prefs::kShowBackButton, true);
+ registry->RegisterBooleanPref(prefs::kShowReloadButton, true);
+ registry->RegisterBooleanPref(prefs::kShowAvatarButton, true);
+ registry->RegisterBooleanPref(prefs::kShowExtensionsButton, true);
+ registry->RegisterBooleanPref(prefs::kShowMenuButton, true);
+
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -234,6 +234,18 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kSplitViewDragAndDropEnabled] =
settings_api::PrefType::kBoolean;
+ // Helium toolbar settings.
+ (*s_allowlist)[::prefs::kShowBackButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowReloadButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowAvatarButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowExtensionsButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowMenuButton] =
+ settings_api::PrefType::kBoolean;
+
// Appearance settings.
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
(*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList;
--- a/chrome/browser/ui/actions/chrome_action_id.h
+++ b/chrome/browser/ui/actions/chrome_action_id.h
@@ -558,6 +558,8 @@
#define TOOLBAR_PINNABLE_ACTION_IDS \
E(kActionHome, IDC_HOME) \
E(kActionForward, IDC_FORWARD) \
+ E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
+ E(kActionExtensions) \
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
@@ -216,6 +216,11 @@ void PinnedToolbarActionsModel::UpdatePi
void PinnedToolbarActionsModel::ResetToDefault() {
pref_service_->ClearPref(prefs::kShowHomeButton);
pref_service_->ClearPref(prefs::kShowForwardButton);
+ pref_service_->ClearPref(prefs::kShowBackButton);
+ pref_service_->ClearPref(prefs::kShowReloadButton);
+ pref_service_->ClearPref(prefs::kShowAvatarButton);
+ pref_service_->ClearPref(prefs::kShowExtensionsButton);
+ pref_service_->ClearPref(prefs::kShowMenuButton);
pref_service_->ClearPref(prefs::kPinnedActions);
}
@@ -229,7 +234,24 @@ bool PinnedToolbarActionsModel::IsDefaul
const bool forward_is_default =
pref_service_->GetDefaultPrefValue(prefs::kShowForwardButton)
->GetBool() == pref_service_->GetBoolean(prefs::kShowForwardButton);
- return action_are_default && home_is_default && forward_is_default;
+ const bool back_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowBackButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowBackButton);
+ const bool reload_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowReloadButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowReloadButton);
+ const bool avatar_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
+ const bool extensions_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowExtensionsButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowExtensionsButton);
+ const bool menu_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowMenuButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowMenuButton);
+ return action_are_default && home_is_default && forward_is_default &&
+ back_is_default && reload_is_default && avatar_is_default &&
+ extensions_is_default && menu_is_default;
}
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -451,8 +451,7 @@ void ToolbarView::Init() {
#else
// DevTools profiles are OffTheRecord, so hide it there.
show_avatar_toolbar_button = browser_->profile()->IsIncognitoProfile() ||
- browser_->profile()->IsGuestSession() ||
- browser_->profile()->IsRegularProfile();
+ browser_->profile()->IsGuestSession();
#endif
const std::string sab_value = base::CommandLine::ForCurrentProcess()->
@@ -521,6 +520,48 @@ void ToolbarView::Init() {
home_->SetVisible(show_home_button_.GetValue());
+ show_back_button_.Init(
+ prefs::kShowBackButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowBackButtonChanged,
+ base::Unretained(this)));
+
+ back_->SetVisible(show_back_button_.GetValue());
+
+ show_reload_button_.Init(
+ prefs::kShowReloadButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowReloadButtonChanged,
+ base::Unretained(this)));
+
+ reload_->SetVisible(show_reload_button_.GetValue());
+
+ show_avatar_button_.Init(
+ prefs::kShowAvatarButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
+
+ // Avatar is always shown in incognito and guest profiles,
+ // but in regular profiles it's managed by kShowAvatarButton pref.
+ if (browser_->profile()->IsRegularProfile()) {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+ }
+
+ if (extensions_container_) {
+ show_extensions_button_.Init(
+ prefs::kShowExtensionsButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+ }
+
+ if (app_menu_button_) {
+ show_menu_button_.Init(
+ prefs::kShowMenuButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowMenuButtonChanged,
+ base::Unretained(this)));
+
+ app_menu_button_->SetVisible(show_menu_button_.GetValue());
+ }
+
InitLayout();
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
@@ -1234,10 +1275,33 @@ void ToolbarView::OnShowForwardButtonCha
InvalidateLayout();
}
+void ToolbarView::OnShowBackButtonChanged() {
+ back_->SetVisible(show_back_button_.GetValue());
+ InvalidateLayout();
+}
+
+void ToolbarView::OnShowReloadButtonChanged() {
+ reload_->SetVisible(show_reload_button_.GetValue());
+ InvalidateLayout();
+}
+
void ToolbarView::OnShowHomeButtonChanged() {
home_->SetVisible(show_home_button_.GetValue());
}
+void ToolbarView::OnShowAvatarButtonChanged() {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+}
+
+void ToolbarView::OnShowExtensionsButtonChanged() {
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+}
+
+void ToolbarView::OnShowMenuButtonChanged() {
+ app_menu_button_->SetVisible(show_menu_button_.GetValue());
+ InvalidateLayout();
+}
+
void ToolbarView::OnTouchUiChanged() {
if (display_mode_ == DisplayMode::NORMAL) {
// Update the internal margins for touch layout.
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -277,6 +277,16 @@ class ToolbarView : public views::Access
void OnShowHomeButtonChanged();
+ void OnShowBackButtonChanged();
+
+ void OnShowReloadButtonChanged();
+
+ void OnShowAvatarButtonChanged();
+
+ void OnShowExtensionsButtonChanged();
+
+ void OnShowMenuButtonChanged();
+
void OnTouchUiChanged();
void UpdateClipPath();
@@ -327,6 +337,16 @@ class ToolbarView : public views::Access
// Controls whether or not a home button should be shown on the toolbar.
BooleanPrefMember show_home_button_;
+ BooleanPrefMember show_back_button_;
+
+ BooleanPrefMember show_reload_button_;
+
+ BooleanPrefMember show_avatar_button_;
+
+ BooleanPrefMember show_extensions_button_;
+
+ BooleanPrefMember show_menu_button_;
+
BooleanPrefMember show_chrome_labs_button_;
// The display mode used when laying out the toolbar.
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
@@ -16,6 +16,11 @@ enum ActionId {
kShowSearchCompanion,
kHome,
kForward,
+ kBack,
+ kReload,
+ kAvatar,
+ kExtensions,
+ kMenu,
kNewIncognitoWindow,
kShowPasswordManager,
kShowPaymentMethods,
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -41,6 +41,16 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kHome;
case kActionForward:
return side_panel::customize_chrome::mojom::ActionId::kForward;
+ case kActionBack:
+ return side_panel::customize_chrome::mojom::ActionId::kBack;
+ case kActionReload:
+ return side_panel::customize_chrome::mojom::ActionId::kReload;
+ case kActionAvatar:
+ return side_panel::customize_chrome::mojom::ActionId::kAvatar;
+ case kActionExtensions:
+ return side_panel::customize_chrome::mojom::ActionId::kExtensions;
+ case kActionShowAppMenu:
+ return side_panel::customize_chrome::mojom::ActionId::kMenu;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
case kActionShowDownloads:
@@ -85,6 +95,16 @@ std::optional<actions::ActionId> ChromeA
return kActionHome;
case side_panel::customize_chrome::mojom::ActionId::kForward:
return kActionForward;
+ case side_panel::customize_chrome::mojom::ActionId::kBack:
+ return kActionBack;
+ case side_panel::customize_chrome::mojom::ActionId::kReload:
+ return kActionReload;
+ case side_panel::customize_chrome::mojom::ActionId::kAvatar:
+ return kActionAvatar;
+ case side_panel::customize_chrome::mojom::ActionId::kExtensions:
+ return kActionExtensions;
+ case side_panel::customize_chrome::mojom::ActionId::kMenu:
+ return kActionShowAppMenu;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
case side_panel::customize_chrome::mojom::ActionId::kShowDownloads:
@@ -144,6 +164,26 @@ CustomizeToolbarHandler::CustomizeToolba
prefs::kPinSplitTabButton,
base::BindRepeating(&CustomizeToolbarHandler::OnPinSplitTabButtonChanged,
base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowBackButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowBackButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowReloadButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowReloadButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowAvatarButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowExtensionsButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowMenuButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowMenuButtonChanged,
+ base::Unretained(this)));
}
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
@@ -186,8 +226,64 @@ void CustomizeToolbarHandler::ListAction
.Rasterize(&provider),
scale_factor)));
- actions.push_back(std::move(home_action));
+ auto back_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionBack).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)),
+ prefs()->GetBoolean(prefs::kShowBackButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kNavigation,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kBackArrowChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto reload_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionReload).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)),
+ prefs()->GetBoolean(prefs::kShowReloadButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kNavigation,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kReloadChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto avatar_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionAvatar).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_PROFILES_MENU_NAME)),
+ prefs()->GetBoolean(prefs::kShowAvatarButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kAccountCircleChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto extensions_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionExtensions).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_TOOLTIP_EXTENSIONS_BUTTON)),
+ prefs()->GetBoolean(prefs::kShowExtensionsButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kExtensionChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto menu_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionShowAppMenu).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_ACCNAME_APP_MENU)),
+ prefs()->GetBoolean(prefs::kShowMenuButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(kBrowserToolsIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ actions.push_back(std::move(back_action));
actions.push_back(std::move(forward_action));
+ actions.push_back(std::move(reload_action));
+ actions.push_back(std::move(home_action));
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
@@ -203,6 +299,10 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(split_tab_action));
}
+ actions.push_back(std::move(extensions_action));
+ actions.push_back(std::move(avatar_action));
+ actions.push_back(std::move(menu_action));
+
const auto add_action =
[&actions, this, &provider, scale_factor, bwi](
actions::ActionId id,
@@ -247,17 +347,16 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(mojo_action));
};
- add_action(kActionNewIncognitoWindow,
- side_panel::customize_chrome::mojom::CategoryId::kNavigation);
-
add_action(kActionSidePanelShowBookmarks,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
add_action(kActionSidePanelShowHistoryCluster,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
add_action(kActionShowDownloads,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
add_action(kActionClearBrowsingData,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
+ add_action(kActionNewIncognitoWindow,
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
if (features::HasTabSearchToolbarButton()) {
add_action(kActionTabSearch,
@@ -323,6 +422,21 @@ void CustomizeToolbarHandler::PinAction(
case kActionSplitTab:
prefs()->SetBoolean(prefs::kPinSplitTabButton, pin);
break;
+ case kActionBack:
+ prefs()->SetBoolean(prefs::kShowBackButton, pin);
+ break;
+ case kActionReload:
+ prefs()->SetBoolean(prefs::kShowReloadButton, pin);
+ break;
+ case kActionAvatar:
+ prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
+ break;
+ case kActionExtensions:
+ prefs()->SetBoolean(prefs::kShowExtensionsButton, pin);
+ break;
+ case kActionShowAppMenu:
+ prefs()->SetBoolean(prefs::kShowMenuButton, pin);
+ break;
default:
model_->UpdatePinnedState(chrome_action.value(), pin);
const std::optional<std::string> metrics_name =
@@ -376,6 +490,31 @@ void CustomizeToolbarHandler::OnPinSplit
prefs()->GetBoolean(prefs::kPinSplitTabButton));
}
+void CustomizeToolbarHandler::OnShowBackButtonChanged() {
+ OnActionPinnedChanged(kActionBack,
+ prefs()->GetBoolean(prefs::kShowBackButton));
+}
+
+void CustomizeToolbarHandler::OnShowReloadButtonChanged() {
+ OnActionPinnedChanged(kActionReload,
+ prefs()->GetBoolean(prefs::kShowReloadButton));
+}
+
+void CustomizeToolbarHandler::OnShowAvatarButtonChanged() {
+ OnActionPinnedChanged(kActionAvatar,
+ prefs()->GetBoolean(prefs::kShowAvatarButton));
+}
+
+void CustomizeToolbarHandler::OnShowExtensionsButtonChanged() {
+ OnActionPinnedChanged(kActionExtensions,
+ prefs()->GetBoolean(prefs::kShowExtensionsButton));
+}
+
+void CustomizeToolbarHandler::OnShowMenuButtonChanged() {
+ OnActionPinnedChanged(kActionShowAppMenu,
+ prefs()->GetBoolean(prefs::kShowMenuButton));
+}
+
void CustomizeToolbarHandler::OnActionItemChanged() {
client_->NotifyActionsUpdated();
}
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
@@ -54,6 +54,11 @@ class CustomizeToolbarHandler
void OnShowHomeButtonChanged();
void OnShowForwardButtonChanged();
void OnPinSplitTabButtonChanged();
+ void OnShowBackButtonChanged();
+ void OnShowReloadButtonChanged();
+ void OnShowAvatarButtonChanged();
+ void OnShowExtensionsButtonChanged();
+ void OnShowMenuButtonChanged();
void OnActionItemChanged();
PrefService* prefs() const;
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
@@ -552,7 +552,9 @@ void ExtensionsToolbarContainer::AnchorA
// Fix the position of widgets. Without this fix, extension-installed-bubble
// and extension-uninstall-dialog may be out of the window border on Linux.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
{
views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser_)
->toolbar_button_provider()->GetAppMenuButton();
@@ -962,7 +964,9 @@ void ExtensionsToolbarContainer::UpdateC
}
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
return false;
// The container (and extensions-menu button) should not be visible if we have
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -10358,6 +10358,9 @@ Keep your key file in a safe place. You
<message name="IDS_ACCNAME_FIND" desc="The accessible name for the find button.">
Find
</message>
+ <message name="IDS_ACCNAME_APP_MENU" desc="The accessible name for the app menu button.">
+ Main Menu
+ </message>
<message name="IDS_ACCNAME_BOOKMARKS" desc="The accessible name for the Bookmarks toolbar.">
Bookmarks
</message>
@@ -0,0 +1,86 @@
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -4868,6 +4868,18 @@ int BrowserView::NonClientHitTest(const
}
}
+ // The empty spaces in toolbar should allow mouse events to fall
+ // through to the caption area.
+ if (toolbar_) {
+ gfx::Point test_point(point);
+ if (ConvertedHitTest(parent(), toolbar_, &test_point)) {
+ if (toolbar_->IsPositionInWindowCaption(test_point)) {
+ return HTCAPTION;
+ }
+ return HTCLIENT;
+ }
+ }
+
// Let the frame handle any events that fall within the bounds of the window
// controls overlay.
if (IsWindowControlsOverlayEnabled() && GetActiveWebContents()) {
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -646,6 +646,44 @@ bool ToolbarView::GetAppMenuFocused() co
return app_menu_button_ && app_menu_button_->HasFocus();
}
+bool ToolbarView::IsRectInWindowCaption(const gfx::Rect& rect) const {
+ // Clickable elements are only in container view. If the container view is not
+ // visible, then the rect is in the window caption.
+ if (!container_view_ || !container_view_->GetVisible()) {
+ return true;
+ }
+
+ const auto get_target_rect = [&](views::View* target) {
+ gfx::RectF rect_in_target_coords_f(rect);
+ views::View::ConvertRectToTarget(this, target, &rect_in_target_coords_f);
+ return gfx::ToEnclosingRect(rect_in_target_coords_f);
+ };
+
+ // Check each child view in container_view_ to see if the rect intersects with
+ // any clickable elements. If it does, check if the click is actually on that
+ // element. False if on a clickable element, true if not on a clickable element.
+ for (views::View* const child : container_view_->children()) {
+ if (!child->GetVisible()) {
+ continue;
+ }
+
+ const gfx::Rect target_rect = get_target_rect(child);
+ if (child->GetLocalBounds().Intersects(target_rect)) {
+ // Check if the rect is actually on the child.
+ if (child->HitTestRect(target_rect)) {
+ return false;
+ }
+ }
+ }
+
+ // The rect is not on any clickable element, so it's in the window caption.
+ return true;
+}
+
+bool ToolbarView::IsPositionInWindowCaption(const gfx::Point& point) const {
+ return IsRectInWindowCaption(gfx::Rect(point, gfx::Size(1, 1)));
+}
+
void ToolbarView::ShowIntentPickerBubble(
std::vector<IntentPickerBubbleView::AppInfo> app_info,
bool show_stay_in_chrome,
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -126,6 +126,15 @@ class ToolbarView : public views::Access
// Returns true if the app menu is focused.
bool GetAppMenuFocused() const;
+ // Returns true if the specified rect is not on a clickable element,
+ // aka container view children: toolbar buttons, location bar, etc.
+ bool IsRectInWindowCaption(const gfx::Rect& rect) const;
+
+ // A convenience function which calls |IsRectInWindowCaption()| with a rect of
+ // size 1x1 and an origin of |point|. |point| is in the local coordinate space
+ // of |this|.
+ bool IsPositionInWindowCaption(const gfx::Point& point) const;
+
void ShowIntentPickerBubble(
std::vector<IntentPickerBubbleView::AppInfo> app_info,
bool show_stay_in_chrome,
@@ -87,7 +87,7 @@
};
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -13303,6 +13303,9 @@ Check your passwords anytime in <ph name
@@ -13306,6 +13306,9 @@ Check your passwords anytime in <ph name
<message name="IDS_EXTENSIONS_INSTALL_LOCATION_SHARED_MODULE" desc="The text explaining the the installation of the extension was because of extensions that depend on this shared module">
Installed because of dependent extension(s).
</message>
+10 -2
View File
@@ -1,6 +1,9 @@
upstream-fixes/glue_core_pools.patch
upstream-fixes/hardware_destructive_interference_size.patch
upstream-fixes/missing-dependencies.patch
upstream-fixes/fix-crash-without-enterprise-cloud-content-analysis.patch
upstream-fixes/fix-python-codecs-deprecation.patch
upstream-fixes/fix-macos-widget-rect.patch
core/inox-patchset/0001-fix-building-without-safebrowsing.patch
core/inox-patchset/0003-disable-autofill-download-manager.patch
@@ -140,10 +143,9 @@ helium/core/disable-user-education-nags.patch
helium/core/replace-default-profile-name.patch
helium/core/disable-live-caption-completely.patch
helium/core/spoof-extension-downloader-platform.patch
helium/core/spoof-chrome-ua-brand.patch
helium/core/add-helium-versioning.patch
helium/core/enable-tab-search-toolbar-button.patch
helium/core/hide-avatar-via-toolbar-prefs.patch
helium/core/hide-extensions-via-toolbar-prefs.patch
helium/core/clean-context-menu.patch
helium/core/split-view.patch
helium/core/fix-tab-sync-unreached-error.patch
@@ -159,6 +161,7 @@ helium/core/disable-outdated-build-detector.patch
helium/core/remove-dead-toolbar-actions.patch
helium/core/add-component-l10n-support.patch
helium/core/add-component-managed-schema-support.patch
helium/core/fix-component-extension-reenablement.patch
helium/core/ublock-setup-sources.patch
helium/core/ublock-install-as-component.patch
helium/core/ublock-reconfigure-defaults.patch
@@ -178,6 +181,7 @@ helium/core/disable-update-toast.patch
helium/core/disable-fedcm-bubble.patch
helium/core/add-middle-click-autoscroll-flag.patch
helium/core/webrtc-default-handling-policy.patch
helium/core/browser-window-context-menu.patch
helium/settings/move-search-suggest.patch
helium/settings/remove-autofill.patch
@@ -208,6 +212,8 @@ helium/ui/layout-constants.patch
helium/ui/tabs.patch
helium/ui/tab-strip-controls.patch
helium/ui/toolbar.patch
helium/ui/toolbar-window-frame-hit-test.patch
helium/ui/toolbar-button-prefs.patch
helium/ui/omnibox.patch
helium/ui/app-menu-style.patch
helium/ui/app-menu-model.patch
@@ -250,3 +256,5 @@ helium/ui/improve-flags-webui.patch
helium/ui/ublock-show-in-settings.patch
helium/ui/licenses-in-credits.patch
helium/ui/remove-autofill-link-to-password-manager.patch
helium/ui/fix-caption-button-tab-strip-align.patch
helium/ui/experiments/compact-action-toolbar.patch
@@ -0,0 +1,79 @@
From ad7a79a81bde832c4c3e1ebac56c5072c5e23fbf Mon Sep 17 00:00:00 2001
From: jj <jj@imput.net>
Date: Sat, 01 Nov 2025 15:28:33 +0100
Subject: [PATCH] Fix failing CHECK on builds with enterprise_cloud_content_analysis=false
Adds additional compile guards to prevent a failing CHECK when Chromium
is built with enterprise_cloud_content_analysis=false, which causes
connectors_service_ to not be initialized.
Bug: 456770303
Change-Id: Iae2978f1faa463c318a2c0cf7c131746c5a399de
---
--- a/chrome/browser/enterprise/signals/profile_signals_collector.cc
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.cc
@@ -22,7 +22,10 @@
#include "components/policy/core/common/cloud/cloud_policy_manager.h"
#include "components/prefs/pref_service.h"
#include "components/version_info/version_info.h"
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
#include "chrome/browser/enterprise/connectors/connectors_service.h"
+#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
namespace device_signals {
@@ -52,7 +55,11 @@ ProfileSignalsCollector::ProfileSignalsC
#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
profile_id_service_(
enterprise::ProfileIdServiceFactory::GetForProfile(profile)) {
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
CHECK(connectors_service_);
+#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
+
CHECK(policy_blocklist_service_);
CHECK(profile_id_service_);
}
@@ -79,6 +86,8 @@ void ProfileSignalsCollector::GetProfile
signal_response.site_isolation_enabled =
device_signals::GetSiteIsolationEnabled();
signal_response.profile_id = profile_id_service_->GetProfileId();
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
signal_response.realtime_url_check_mode =
connectors_service_->GetAppliedRealTimeUrlCheck();
signal_response.security_event_providers =
@@ -97,6 +106,7 @@ void ProfileSignalsCollector::GetProfile
connectors_service_->GetAnalysisServiceProviderNames(
enterprise_connectors::PRINT);
#endif // !BUILDFLAG(IS_ANDROID)
+#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
response.profile_signals_response = std::move(signal_response);
--- a/chrome/browser/enterprise/signals/profile_signals_collector.h
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.h
@@ -8,6 +8,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/device_signals/core/browser/base_signals_collector.h"
+#include "components/enterprise/buildflags/buildflags.h"
class PrefService;
class Profile;
@@ -45,8 +46,12 @@ class ProfileSignalsCollector : public B
const raw_ptr<PolicyBlocklistService> policy_blocklist_service_;
const raw_ptr<PrefService> profile_prefs_;
const raw_ptr<policy::CloudPolicyManager> policy_manager_;
- const raw_ptr<enterprise_connectors::ConnectorsService> connectors_service_;
const raw_ptr<enterprise::ProfileIdService> profile_id_service_;
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
+ const raw_ptr<enterprise_connectors::ConnectorsService> connectors_service_;
+#endif
+
base::WeakPtrFactory<ProfileSignalsCollector> weak_factory_{this};
};
@@ -0,0 +1,75 @@
From 45af583888facfc9bf95ca1cbd6d6169bf5ac3e5 Mon Sep 17 00:00:00 2001
From: Keren Zhu <kerenzhu@chromium.org>
Date: Tue, 11 Nov 2025 21:11:07 -0800
Subject: [PATCH] mac26: fix misplaced omnibox popup due to rect constrains
MacOS 26 adds new restrictions to child NSWindow positioning:
* in fullscreen, prevents child windows to enter the titlebar area
and menubar area.
* in non-fullscreen, prevents child windows from overlapping the
window border.
This becomes a problem for the Omnibox popup, which due to its shadow
area will enter the restricting area in both cases. This CL fixes that
by overriding -constrainFrameRect: to remove the restriction. This fix
was previously applied to only the overlay widget used in fullscreen.
Fixed: 459509266
Change-Id: Ie0a6fa2c099858754b33291a6c3c06919c137a5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7142646
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1543516}
---
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -357,6 +357,16 @@ struct NSEdgeAndCornerThicknesses {
return frameRect;
}
+ if (base::mac::MacOSVersion() >= 26'00'00) {
+ // Since macOS 26.0, when the main window enters full screen, the
+ // overlay child window’s position is automatically adjusted by the system
+ // to just below the menu bar location (even though the menu bar is hidden
+ // at that time). During this process, [NSWindow constrainFrameRect] is
+ // called and returns the system-adjusted position. Override this
+ // function to return the original value frameRect before the adjustment.
+ return frameRect;
+ }
+
return [super constrainFrameRect:frameRect toScreen:screen];
}
--- a/components/remote_cocoa/app_shim/native_widget_mac_overlay_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_overlay_nswindow.mm
@@ -6,8 +6,6 @@
#include <AppKit/AppKit.h>
-#include "base/mac/mac_util.h"
-
// Overlay windows are used to render top chrome components while in immersive
// fullscreen. Those rendered views are hosted in a separate AppKit controlled
// window. The overlay windows are a transparent overlay on top of the AppKit
@@ -28,19 +26,6 @@ constexpr unsigned long kAllowedCollecti
kAllowedCollectionBehaviorMask];
}
-- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
- if (base::mac::MacOSVersion() >= 26'00'00) {
- // Since macOS 26.0, when the main window enters full screen, the
- // overlay child window’s position is automatically adjusted by the system
- // to just below the menu bar location (even though the menu bar is hidden
- // at that time). During this process, [NSWindow constrainFrameRect] is
- // called and returns the system-adjusted position. Override this
- // function to return the original value frameRect before the adjustment.
- return frameRect;
- }
- return [super constrainFrameRect:frameRect toScreen:screen];
-}
-
// Paint the window a mostly opaque color.
- (void)debugWithColor:(NSColor*)color {
self.backgroundColor = color;
@@ -0,0 +1,39 @@
From 9c7aa2956eebd3f739dc9f60d041923cdb9ffa06 Mon Sep 17 00:00:00 2001
From: jj <jj@imput.net>
Date: Thu, 06 Nov 2025 09:27:04 -0800
Subject: [PATCH] Remove unneeded codecs usage in mojom_parser
Python >=3.14 loudly complains on every mojom_parser use, with:
DeprecationWarning: codecs.open() is deprecated. Use open() instead.
`codecs` has not been useful for a long time, so let's drop it,
and simply call open() instead.
Change-Id: Iaf4ab7bcdefb4c2b31aa825bac5d79970db0ba46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7123066
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1541277}
---
--- a/mojo/public/tools/mojom/mojom_parser.py
+++ b/mojo/public/tools/mojom/mojom_parser.py
@@ -12,7 +12,6 @@ generate usable language bindings.
import argparse
import builtins
-import codecs
import errno
import json
import logging
@@ -180,7 +179,7 @@ def _CollectAllowedImportsFromBuildMetad
# multiprocessing helper.
def _ParseAstHelper(mojom_abspath, enabled_features):
- with codecs.open(mojom_abspath, encoding='utf-8') as f:
+ with open(mojom_abspath, encoding='utf-8') as f:
ast = parser.Parse(f.read(), mojom_abspath)
conditional_features.RemoveDisabledDefinitions(ast, enabled_features)
return mojom_abspath, ast
+1 -1
View File
@@ -1 +1 @@
2
5