diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index d8b802ae5..eb9954d67 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -276,6 +276,7 @@ Timezone-customization.patch 00Always-allow-inspect-fallback.patch 00Add-cromite-flags-support.patch 00Add-PartialLowEndModeOnMidRangeDevices-flag.patch +00Use-list-mode-for-tab-switcher.patch 00Temp-PerformanceNavigationTiming-privacy-fix.patch 00Temp-disable-predictive-back-gesture.patch diff --git a/build/patches/00Use-list-mode-for-tab-switcher.patch b/build/patches/00Use-list-mode-for-tab-switcher.patch new file mode 100644 index 000000000..1edf6ddb8 --- /dev/null +++ b/build/patches/00Use-list-mode-for-tab-switcher.patch @@ -0,0 +1,70 @@ +From: uazo +Date: Tue, 12 Dec 2023 16:38:10 +0000 +Subject: Use list mode for tab switcher + +Added a setting for the option + +need: Add-cromite-flags-support.patch +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + .../tasks/tab_management/TabUiFeatureUtilities.java | 2 +- + chrome/android/java/res/xml/privacy_preferences.xml | 7 +++++++ + .../Use-list-mode-for-tab-switcher.grdp | 9 +++++++++ + .../chrome_feature_list_cc/tab-switcher-list-mode.inc | 3 +++ + 4 files changed, 20 insertions(+), 1 deletion(-) + create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Use-list-mode-for-tab-switcher.grdp + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/tab-switcher-list-mode.inc + +diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiFeatureUtilities.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiFeatureUtilities.java +--- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiFeatureUtilities.java ++++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiFeatureUtilities.java +@@ -116,7 +116,7 @@ public class TabUiFeatureUtilities { + */ + public static boolean shouldUseListMode(Context context) { + // Low-end forces list mode. +- return SysUtils.isLowEndDevice(); ++ return ChromeFeatureList.isEnabled("TabSwitcherListMode"); + } + + /** +diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml +--- a/chrome/android/java/res/xml/privacy_preferences.xml ++++ b/chrome/android/java/res/xml/privacy_preferences.xml +@@ -73,6 +73,13 @@ found in the LICENSE file. + android:summary="@string/settings_incognito_tab_lock_summary_android_setting_off" + android:persistent="false" /> + ++ ++ + +diff --git a/chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Use-list-mode-for-tab-switcher.grdp b/chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Use-list-mode-for-tab-switcher.grdp +new file mode 100644 +--- /dev/null ++++ b/chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Use-list-mode-for-tab-switcher.grdp +@@ -0,0 +1,9 @@ ++ ++ ++ ++ Use list mode for tab switcher ++ ++ ++ Activates the list view of tabs in the tab switcher ++ ++ +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/tab-switcher-list-mode.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/tab-switcher-list-mode.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/tab-switcher-list-mode.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kTabSwitcherListMode, ++ "TabSwitcherListMode", ++ base::FEATURE_DISABLED_BY_DEFAULT); +-- +2.25.1