Skip to content

Commit 9accd99

Browse files
committed
helium/ui: add MRU tab cycling popup behind experimental flag
Add a centered popup overlay for MRU tab cycling, gated behind the --helium-tab-cycling-popup chrome://flags entry (disabled by default). When the flag is enabled and Ctrl+Tab is pressed with MRU cycling active, a popup lists tabs in most-recently-used order. The highlight moves with each Tab press and activation is deferred until Ctrl is released. When the flag is disabled, tab cycling behaves as before with immediate activation on each step.
1 parent 5e21690 commit 9accd99

4 files changed

Lines changed: 654 additions & 0 deletions

File tree

i18n/source.gen.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,24 @@
557557
"context": "Description for the zen mode toggle in appearance settings.",
558558
"message": "Hide toolbar and tab strip until hovering near their edges"
559559
},
560+
{
561+
"name": "IDS_TAB_CYCLING_POPUP_ACCESSIBLE_NAME",
562+
"source": "chrome/app/settings_strings.grdp",
563+
"context": "Screen reader label for the MRU tab cycling popup.",
564+
"message": "Recently used tabs"
565+
},
566+
{
567+
"name": "IDS_TAB_CYCLING_AND_MORE_TABS",
568+
"source": "chrome/app/settings_strings.grdp",
569+
"context": "Footer shown at the bottom of the MRU tab cycling popup when additional tabs are not visible.",
570+
"message": "{COUNT, plural,=1 {and 1 more...}other {and # more...}}"
571+
},
572+
{
573+
"name": "IDS_TAB_CYCLING_UNTITLED_TAB",
574+
"source": "chrome/app/settings_strings.grdp",
575+
"context": "Fallback label in the MRU tab cycling popup when a tab has no title.",
576+
"message": "Untitled"
577+
},
560578
{
561579
"name": "IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY",
562580
"source": "chrome/app/settings_chromium_strings.grdp",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--- a/chrome/browser/ui/ui_features.cc
2+
+++ b/chrome/browser/ui/ui_features.cc
3+
@@ -32,6 +32,12 @@ bool IsHeliumZenModeFeatureEnabled() {
4+
return base::FeatureList::IsEnabled(kHeliumZenMode);
5+
}
6+
7+
+BASE_FEATURE(kHeliumTabCyclingPopup, base::FEATURE_DISABLED_BY_DEFAULT);
8+
+
9+
+bool IsHeliumTabCyclingPopupFeatureEnabled() {
10+
+ return base::FeatureList::IsEnabled(kHeliumTabCyclingPopup);
11+
+}
12+
+
13+
// Enables the use of WGC for the Eye Dropper screen capture.
14+
BASE_FEATURE(kAllowEyeDropperWGCScreenCapture,
15+
#if BUILDFLAG(IS_WIN)
16+
--- a/chrome/browser/ui/ui_features.h
17+
+++ b/chrome/browser/ui/ui_features.h
18+
@@ -25,6 +25,9 @@ bool HeliumUseCompactLocationWidth();
19+
BASE_DECLARE_FEATURE(kHeliumZenMode);
20+
bool IsHeliumZenModeFeatureEnabled();
21+
22+
+BASE_DECLARE_FEATURE(kHeliumTabCyclingPopup);
23+
+bool IsHeliumTabCyclingPopupFeatureEnabled();
24+
+
25+
BASE_DECLARE_FEATURE(kAllowEyeDropperWGCScreenCapture);
26+
27+
BASE_DECLARE_FEATURE(kBrowserWidgetCacheThemeService);
28+
--- a/chrome/browser/helium_flag_choices.h
29+
+++ b/chrome/browser/helium_flag_choices.h
30+
@@ -38,6 +38,8 @@ namespace helium {
31+
constexpr const char kHeliumCompactLocationWidthCommandLine[] =
32+
"helium-compact-location-width";
33+
constexpr const char kHeliumZenModeCommandLine[] = "helium-zen-mode";
34+
+ constexpr const char kHeliumTabCyclingPopupCommandLine[] =
35+
+ "helium-tab-cycling-popup";
36+
} // namespace helium
37+
38+
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
39+
--- a/chrome/browser/helium_flag_entries.h
40+
+++ b/chrome/browser/helium_flag_entries.h
41+
@@ -46,4 +46,9 @@
42+
"Hides browser chrome (toolbar, tab strip, bookmarks bar) and reveals it "
43+
"on hover near the window edges. Helium flag.",
44+
kOsDesktop, FEATURE_VALUE_TYPE(features::kHeliumZenMode)},
45+
+ {helium::kHeliumTabCyclingPopupCommandLine,
46+
+ "Tab Cycling Popup",
47+
+ "Shows a popup to select which tab to switch to when cycling tabs "
48+
+ "in most recently used order. Helium flag.",
49+
+ kOsDesktop, FEATURE_VALUE_TYPE(features::kHeliumTabCyclingPopup)},
50+
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */

0 commit comments

Comments
 (0)