1234567891011121314151617181920212223242526272829303132333435 |
- # Add --enable-stacked-tab-strip and --enable-tab-adjust-layout flags to tweak tab strip behavior
- --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
- +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
- @@ -65,14 +65,13 @@ using content::WebContents;
- namespace {
-
- bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {
- - *adjust_layout = false;
- - // For ash, always allow entering stacked mode.
- #if defined(OS_CHROMEOS)
- *adjust_layout = true;
- return prefs->GetBoolean(prefs::kTabStripStackedLayout);
- #else
- - return base::CommandLine::ForCurrentProcess()->HasSwitch(
- - switches::kForceStackedTabStripLayout);
- + *adjust_layout = base::CommandLine::ForCurrentProcess()->HasSwitch("enable-tab-adjust-layout");
- + return prefs->GetBoolean(prefs::kTabStripStackedLayout) ||
- + base::CommandLine::ForCurrentProcess()->HasSwitch("enable-stacked-tab-strip");
- #endif
- }
-
- --- a/chrome/browser/about_flags.cc
- +++ b/chrome/browser/about_flags.cc
- @@ -1193,6 +1193,10 @@ const FeatureEntry::Choice kNotification
- //
- // When adding a new choice, add it to the end of the list.
- const FeatureEntry kFeatureEntries[] = {
- + {"enable-stacked-tab-strip",
- + "Enable stacking in tab strip",
- + "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior.",
- + kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")},
- {"ignore-gpu-blacklist", flag_descriptions::kIgnoreGpuBlacklistName,
- flag_descriptions::kIgnoreGpuBlacklistDescription, kOsAll,
- SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)},
|