From 1178018fe3fa4a17ad61ef931095fe1d0fde93cc Mon Sep 17 00:00:00 2001 From: mkarolin Date: Tue, 10 Dec 2019 15:19:58 -0500 Subject: [PATCH 1/2] Update patches from Chromium 79.0.3945.74 to Chromium 79.0.3945.79 --- patches/chrome-VERSION.patch | 4 ++-- ...um-chrome-browser-toolbar-ToolbarManager.java.patch | 10 +++++----- ...toolbar-bottom-BottomControlsCoordinator.java.patch | 10 +++++----- ...-toolbar-bottom-BottomToolbarCoordinator.java.patch | 4 ++-- ...tom-BrowsingModeBottomToolbarCoordinator.java.patch | 6 +++--- ...ium-chrome-browser-util-FeatureUtilities.java.patch | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/patches/chrome-VERSION.patch b/patches/chrome-VERSION.patch index c8b586a2e97a..a58bb2242d2d 100644 --- a/patches/chrome-VERSION.patch +++ b/patches/chrome-VERSION.patch @@ -1,12 +1,12 @@ diff --git a/chrome/VERSION b/chrome/VERSION -index 66f2dc44203589209cad291151e0d8dd784bcf57..77c21636c91febbeaf759a025ff9ab8d738bccb7 100644 +index 5ccface83986acac44416c37fb272f2e97665210..8cf28f7d51597b2d5debce2304124856e84a5e61 100644 --- a/chrome/VERSION +++ b/chrome/VERSION @@ -1,4 +1,4 @@ MAJOR=79 -MINOR=0 -BUILD=3945 --PATCH=74 +-PATCH=79 +MINOR=1 +BUILD=4 +PATCH=19 diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch index e8814b8b7b21..bb1da76925ec 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -index 72fd16d8323cf2f58e953f7e50c3d6acf20a5294..ef2c84f4fd046843a2cd31f91f5f71b7be195dd5 100644 +index d685d69cd3b481df9f8910e2cf2eb371a5a8a5f3..107212073138e6dec0faafe573b18e5e191c394e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -@@ -757,6 +757,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF +@@ -760,6 +760,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF }; final OnClickListener shareButtonListener = v -> { @@ -10,15 +10,15 @@ index 72fd16d8323cf2f58e953f7e50c3d6acf20a5294..ef2c84f4fd046843a2cd31f91f5f71b7 recordBottomToolbarUseForIPH(); RecordUserAction.record("MobileBottomToolbarShareButton"); boolean isIncognito = false; -@@ -764,6 +765,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF +@@ -767,6 +768,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF isIncognito = mTabModelSelector.getCurrentTab().isIncognito(); } mActivity.onShareMenuItemSelected(false, isIncognito); +*/ mActivity.addOrEditBookmark(mActivity.getActivityTab()); }; - mBottomControlsCoordinator = new BottomControlsCoordinator(mActivity.getFullscreenManager(), -@@ -1780,6 +1782,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF + if (FeatureUtilities.isDuetTabStripIntegrationAndroidEnabled() +@@ -1811,6 +1813,7 @@ public class ToolbarManager implements ScrimObserver, ToolbarTabController, UrlF boolean editingAllowed = currentTab == null || mBookmarkBridge == null || mBookmarkBridge.isEditBookmarksEnabled(); mToolbar.updateBookmarkButton(isBookmarked, editingAllowed); diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomControlsCoordinator.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomControlsCoordinator.java.patch index e8169e141b5c..f0abe8ea8398 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomControlsCoordinator.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomControlsCoordinator.java.patch @@ -1,17 +1,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java -index 0d3bc64d4da5e8cdf8f1cbaf14840fbc8913b1f9..b4831fca19a9f597b74cb0c57a4c1df90e1beb0a 100644 +index 4819771fdf58e526bcf30ad7442f2502e2f9e036..8e2514d14c4cbc9538580fc437cbf947613cd02d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java -@@ -102,7 +102,7 @@ public class BottomControlsCoordinator { +@@ -106,7 +106,7 @@ public class BottomControlsCoordinator { mTabGroupUi = TabManagementModuleProvider.getDelegate().createTabGroupUi( root.findViewById(R.id.bottom_container_slot), themeColorProvider); } else { - mBottomToolbarCoordinator = new BottomToolbarCoordinator( + mBottomToolbarCoordinator = new BraveBottomToolbarCoordinator( root.findViewById(R.id.bottom_toolbar_stub), tabProvider, homeButtonListener, - searchAcceleratorListener, shareButtonListener, themeColorProvider); - } -@@ -231,4 +231,5 @@ public class BottomControlsCoordinator { + searchAcceleratorListener, shareButtonListener, tabSwitcherLongClickListener, + themeColorProvider); +@@ -236,4 +236,5 @@ public class BottomControlsCoordinator { if (mTabGroupUi != null) mTabGroupUi.destroy(); mMediator.destroy(); } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomToolbarCoordinator.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomToolbarCoordinator.java.patch index 484ea302cfbf..7bf290f64fce 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomToolbarCoordinator.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BottomToolbarCoordinator.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarCoordinator.java -index 4200f0f96ffc14dd43f48672805c4949a26b7719..fdf79e002ce1408c17210b079d7cd1e52f0b9b5f 100644 +index 3e6369a1a9a5f72fc4ef352786aced26c60c0902..f55d8e983f815d8b5e56e007281201df7663e520 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarCoordinator.java -@@ -135,4 +135,5 @@ class BottomToolbarCoordinator { +@@ -138,4 +138,5 @@ class BottomToolbarCoordinator { } mThemeColorProvider.destroy(); } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BrowsingModeBottomToolbarCoordinator.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BrowsingModeBottomToolbarCoordinator.java.patch index 0923ad045380..b6ee25a5c308 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BrowsingModeBottomToolbarCoordinator.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-bottom-BrowsingModeBottomToolbarCoordinator.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarCoordinator.java -index c9b1bbc4b15f8dc1cfd52fdbe76c5bd02f44fed3..f8b2075e4a249990d04a24722f4bd76ae081dad5 100644 +index 4535d30d38fcc7ace68618b30dde54c86101b30c..73eabf9e9ebf1b0b72161c107cee249bb7eb2073 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarCoordinator.java -@@ -38,7 +38,7 @@ public class BrowsingModeBottomToolbarCoordinator { +@@ -39,7 +39,7 @@ public class BrowsingModeBottomToolbarCoordinator { private final HomeButton mHomeButton; /** The share button that lives in the bottom toolbar. */ @@ -11,7 +11,7 @@ index c9b1bbc4b15f8dc1cfd52fdbe76c5bd02f44fed3..f8b2075e4a249990d04a24722f4bd76a /** The search accelerator that lives in the bottom toolbar. */ private final SearchAccelerator mSearchAccelerator; -@@ -178,4 +178,5 @@ public class BrowsingModeBottomToolbarCoordinator { +@@ -185,4 +185,5 @@ public class BrowsingModeBottomToolbarCoordinator { mTabSwitcherButtonCoordinator.destroy(); mMenuButton.destroy(); } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-util-FeatureUtilities.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-util-FeatureUtilities.java.patch index 4dc61754432a..08a0298fc19b 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-util-FeatureUtilities.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-util-FeatureUtilities.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java -index 1471794e1fc56768c1e0f14d169f2a539ffdef48..73e70053b280f9fa6cc2d30b0d56d73435f25525 100644 +index ee8d2cf102a85b446092ef87759ca13e72f8f867..340db4f2dbe9549f13db25a460d96a8889ebd64f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java @@ -378,7 +378,7 @@ public class FeatureUtilities { @@ -10,7 +10,7 @@ index 1471794e1fc56768c1e0f14d169f2a539ffdef48..73e70053b280f9fa6cc2d30b0d56d734 + return ChromePreferenceManager.getInstance().isBottomToolbarEnabled() && !DeviceFormFactor.isNonMultiDisplayContextOnTablet( ContextUtils.getApplicationContext()) - && !isTabGroupsAndroidEnabled(); + && (isDuetTabStripIntegrationAndroidEnabled() || !isTabGroupsAndroidEnabled()); @@ -423,7 +423,7 @@ public class FeatureUtilities { * enabled). */ From 02cfb3340b31d6fc5ec51b72187cfc69b3a32e51 Mon Sep 17 00:00:00 2001 From: Max Karolinskiy Date: Wed, 11 Dec 2019 00:27:32 -0500 Subject: [PATCH 2/2] Updated BraveBottomToolbarCoordinator c'tor signature. Chromium change: https://chromium.googlesource.com/chromium/src/+/45cce5fc1f2c2a8f64aceee1e3f97265a21abf9d commit 45cce5fc1f2c2a8f64aceee1e3f97265a21abf9d Author: Lijin Shen Date: Thu Oct 31 23:03:39 2019 +0000 Add tab switcher longpress menu on bottom toolbar Implemented the tab swithcer longpress menu on the bottom. In the meanwhile, decreased the menu width to match the design spec. Bug: 1011012 --- .../toolbar/bottom/BraveBottomToolbarCoordinator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java b/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java index 03a20f3cd072..bac4e792349c 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java @@ -9,6 +9,7 @@ import android.content.res.Resources; import android.view.View; import android.view.View.OnClickListener; +import android.view.View.OnLongClickListener; import android.view.ViewGroup; import android.view.ViewStub; @@ -34,9 +35,10 @@ public class BraveBottomToolbarCoordinator BraveBottomToolbarCoordinator(ViewStub stub, ActivityTabProvider tabProvider, OnClickListener homeButtonListener, OnClickListener searchAcceleratorListener, - OnClickListener shareButtonListener, ThemeColorProvider themeColorProvider) { + OnClickListener shareButtonListener, OnLongClickListener tabsSwitcherLongClickListner, + ThemeColorProvider themeColorProvider) { super(stub, tabProvider, homeButtonListener, searchAcceleratorListener, shareButtonListener, - themeColorProvider); + tabsSwitcherLongClickListner, themeColorProvider); } @Override