Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from Chromium 117 to Chromium 118 #19765

Merged
merged 76 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
23dabc4
Update from Chromium 117.0.5938.88 to Chromium 118.0.5993.21.
cdesouza-chromium Aug 18, 2023
fb3f8eb
Conflict-resolved patches from Chromium 117.0.5938.88 to Chromium 118…
cdesouza-chromium Aug 11, 2023
67ab611
Update patches from Chromium 117.0.5938.88 to Chromium 118.0.5993.21.
cdesouza-chromium Sep 7, 2023
525f9b5
Updated strings for Chromium 118.0.5993.21.
cdesouza-chromium Aug 18, 2023
42c0af4
Use `IsSyncFeatureEnabled` from `SyncService`
cdesouza-chromium Aug 14, 2023
925f01f
IWYU fixes
cdesouza-chromium Aug 14, 2023
2b43ae7
Reanchoring `SchemefulSite` overrides
cdesouza-chromium Aug 14, 2023
3878a87
`ParsedCookie` added block truncated argument
cdesouza-chromium Aug 14, 2023
2a6b547
Add `BraveSidePanel` override to `BrowserViewTest`
cdesouza-chromium Aug 16, 2023
b3178dc
Make adjustments for upstream browser tests
emerick Aug 21, 2023
a62242f
Make adjustments for upstream unit tests
emerick Aug 21, 2023
e7c9422
[Android] Minor code adjustments to the C118 upstream changes
samartnik Aug 21, 2023
955dafd
Mac-specific logging moved to apple path
cdesouza-chromium Aug 17, 2023
96270cd
Fix `scoped_objc_class_swizzler` path
cdesouza-chromium Aug 17, 2023
604c623
DIPS now moved into content
cdesouza-chromium Aug 21, 2023
6644167
Reanchoring `GpuServiceImpl` overrides
cdesouza-chromium Aug 21, 2023
da9cdff
Mac-specific code move under `apple` namespace
cdesouza-chromium Aug 21, 2023
e4a5cbf
Profile headers for signin moved to new path
cdesouza-chromium Aug 21, 2023
427548a
Add overrides for enhanced protection links
cdesouza-chromium Aug 21, 2023
76d57ec
Fix inclusion for `native_web_keyboard_event.h`
cdesouza-chromium Aug 21, 2023
ada99a4
Fix autofill experiments overrides
cdesouza-chromium Aug 23, 2023
1e9980e
kCaptionButtonWidth was replaced with GetCaptionButtonWidth()
emerick Aug 28, 2023
0b3b994
Add new include_dxc argument to CopyAllFilesToStagingDir override
emerick Aug 28, 2023
fc230fc
scoped_nsautorelease_pool.h moved under apple/ (was previously under …
emerick Aug 28, 2023
29a8acb
[Android] New Touch-to-Fill UI
samartnik Aug 28, 2023
1b054d0
Add missing chrome://webui-test to CSP
emerick Aug 28, 2023
dfe193e
showPreloadingSubPage_ -> showPreloadingSubpage
emerick Aug 29, 2023
a884ab7
Update `ExtensionManagement` override to return a unique ptr
cdesouza-chromium Aug 22, 2023
b374126
`ScopedCFTypeRef` now under `base::apple::`
cdesouza-chromium Aug 23, 2023
8761602
Fix broken size override for `PageInfoMainView`
cdesouza-chromium Aug 28, 2023
97a5f35
Always use "brave" as branding_path_product, fix strings generation.
goodov Aug 29, 2023
47d840b
`GetAllProfilesAttributesSortedByName` renamed
cdesouza-chromium Sep 1, 2023
7aa7f65
`PermissionManagerFactory` with non-deprecated builder
cdesouza-chromium Sep 1, 2023
5889ca1
`PrivacySandboxSettingsFactory` with non-deprecated builder
cdesouza-chromium Sep 1, 2023
88b69ca
`GAIAInfoUpdateServiceFactory` with non-deprecated builder
cdesouza-chromium Sep 1, 2023
d3cee1d
Reanchoring `TemplateURLServiceFactory` override
cdesouza-chromium Sep 1, 2023
921b817
Reanchoring `BrowserFrame` overrides
cdesouza-chromium Sep 1, 2023
8170f0d
Correcting the `GetSecurityVectorIcon` override
cdesouza-chromium Sep 1, 2023
2769b7f
`TimeFormatWithPattern` renamed to indicate localisation
cdesouza-chromium Sep 1, 2023
0b5e513
`TextMetrics` has baseline members
cdesouza-chromium Sep 1, 2023
b696a5b
Provide stub for `DownloadDisplay` test fake
cdesouza-chromium Sep 1, 2023
d2924e2
`application_context` target moved to `model` subfolder
cdesouza-chromium Sep 1, 2023
83d21ab
[ios] Browser `bookmarks` moved into a model subfolder
cdesouza-chromium Sep 1, 2023
5c7110e
[ios] `ChromeBrowserStateRemovalController` deleted upstream
cdesouza-chromium Sep 1, 2023
40e91a3
Downstreaming deleted rust deps
cdesouza-chromium Sep 1, 2023
0f62fbb
Pref `kCloudPrintSubmitEnabled` removed
cdesouza-chromium Sep 6, 2023
b5b050e
Use bundling structs on Permissions overrides
cdesouza-chromium Sep 6, 2023
2749a48
TreeNode observers renamed in `SiteSettingsHandler`
cdesouza-chromium Sep 6, 2023
73da713
Fix cookie settings override argument list
cdesouza-chromium Sep 6, 2023
0e4ffb3
Fix `ExtensionWebRequestEventRouter` overrides
cdesouza-chromium Sep 6, 2023
43dc73f
Fix obsolete use of `cargo_manifest_dir`
cdesouza-chromium Sep 6, 2023
1ef6bc7
Add handleapi to features stanza
emerick Sep 6, 2023
2aeb8fa
[Android] Remove isGridTabSwitcherEnabled and isTabGroupsAndroidEnabled
samartnik Sep 7, 2023
ec9d4f2
Explicit include for website_preference_bridge
samartnik Sep 7, 2023
398087d
prefs::kUsesSystemThemeDeprecated was removed
emerick Sep 7, 2023
f2cc84b
[ios] Add `chromium_photos` provider
cdesouza-chromium Sep 7, 2023
de111ae
Move anti-fingerprinting measure text override
cdesouza-chromium Sep 9, 2023
3b43913
Fix access to V8 objects
cdesouza-chromium Sep 11, 2023
d39de7b
Fix access to `AutofillManager` from the driver
cdesouza-chromium Sep 12, 2023
bdb1a34
Preempt substitutions in `ChromeAutofillClient`
cdesouza-chromium Sep 12, 2023
b25c2c1
IWYU `StringPiece` fixes
cdesouza-chromium Sep 12, 2023
bbd1fb6
GetIsPinnedToTaskbarState no longer takes error callback parameter
emerick Sep 12, 2023
c4af807
Adjust resource_ids.spec to avoid duplicate resources with upstream
emerick Sep 12, 2023
1b587ae
[Android] Replace setHandler with setSafetyNetApiHandler
samartnik Sep 12, 2023
474f871
[Android] Changes for omnibox suggestions
samartnik Sep 12, 2023
60217f5
[Android] Rename onUrlFocusChange to onOmniboxSessionStateChange
samartnik Sep 12, 2023
d284f96
Disable net::features::kThirdPartyPartitionedStorageAllowedByDefault
emerick Sep 13, 2023
5f57f88
[Android] New signature for loadUrlForOmniboxMatch
samartnik Sep 13, 2023
c07c034
Add use_dwm_frame_color() to FakeAccentColorObserver
emerick Sep 14, 2023
d344fe7
[Android] Fixes for unit tests
samartnik Sep 15, 2023
b5e94a7
Disable features flagged by privacy/security team
emerick Sep 18, 2023
a013297
[Android] Fix for the status view icon
samartnik Sep 19, 2023
9808a30
Override USE_GOOGLE_UPDATE_INTEGRATION macro
emerick Sep 22, 2023
5588d54
[Android] Changes for omibox focus behaviour
samartnik Sep 25, 2023
1b6a16f
[Android] Fixes for the presubmit errors
samartnik Sep 25, 2023
438a3eb
Add should_show_sync_icon parameter to TabGroupStyle::GetInsetsForHea…
emerick Sep 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions android/features/tab_ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ android_library("java") {
"//chrome/android/features/tab_ui:tab_suggestions_java",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/browser_controls/android:java",
"//chrome/browser/commerce/merchant_viewer/android:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/ui/android/layouts:java",
"//chrome/browser/ui/android/theme:java",
"//chrome/browser/ui/android/toolbar:java",
"//chrome/browser/ui/messages/android:java",
Expand Down
10 changes: 1 addition & 9 deletions android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@
public <init>(...);
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.editurl.EditUrlSuggestionProcessor {
public <init>(...);
*** mHasClearedOmniboxForFocus;
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.editurl.BraveEditUrlSuggestionProcessor {
public <init>(...);
}

-keep class org.chromium.chrome.browser.sync.settings.ManageSyncSettings {
*** mGoogleActivityControls;
*** mSyncEncryption;
Expand Down Expand Up @@ -590,6 +581,7 @@
*** mIsTablet;
*** mNativeInitialized;
*** mIsLocationBarFocusedFromNtpScroll;
*** mShouldClearOmniboxOnFocus;
*** mContext;
*** mBrandedColorScheme;
*** mAssistantVoiceSearchServiceSupplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void alwaysOnTriggered() {
}
});
// Set a handler for SafeBrowsing. It has to be done only once for a process lifetime.
SafeBrowsingApiBridge.setHandler(BraveSafeBrowsingApiHandler.getInstance());
SafeBrowsingApiBridge.setSafetyNetApiHandler(BraveSafeBrowsingApiHandler.getInstance());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.OnScrollListener;

import org.chromium.base.Log;
import org.chromium.base.supplier.ObservableSupplierImpl;
Expand All @@ -40,6 +41,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.function.Consumer;

class BraveBookmarkManagerMediator
extends BookmarkManagerMediator implements BraveBookmarkDelegate {
Expand All @@ -61,12 +63,12 @@ class BraveBookmarkManagerMediator
BookmarkUndoController bookmarkUndoController, ModelList modelList,
BookmarkUiPrefs bookmarkUiPrefs, Runnable hideKeyboardRunnable,
BookmarkImageFetcher bookmarkImageFetcher, ShoppingService shoppingService,
SnackbarManager snackbarManager) {
SnackbarManager snackbarManager, Consumer<OnScrollListener> onScrollListenerConsumer) {
super(context, bookmarkModel, bookmarkOpener, selectableListLayout, selectionDelegate,
recyclerView, dragReorderableRecyclerViewAdapter, largeIconBridge, isDialogUi,
isIncognito, backPressStateSupplier, profile, bookmarkUndoController, modelList,
bookmarkUiPrefs, hideKeyboardRunnable, bookmarkImageFetcher, shoppingService,
snackbarManager);
snackbarManager, onScrollListenerConsumer);
}

public void setWindow(ActivityWindowAndroid window) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ class BraveBookmarkToolbarCoordinator extends BookmarkToolbarCoordinator {
DragReorderableRecyclerViewAdapter dragReorderableRecyclerViewAdapter,
boolean isDialogUi, OneshotSupplier<BookmarkDelegate> bookmarkDelegateSupplier,
BookmarkModel bookmarkModel, BookmarkOpener bookmarkOpener,
BookmarkUiPrefs bookmarkUiPrefs, ModalDialogManager modalDialogManager) {
BookmarkUiPrefs bookmarkUiPrefs, ModalDialogManager modalDialogManager,
Runnable endSearchRunnable) {
super(context, selectableListLayout, selectionDelegate, searchDelegate,
dragReorderableRecyclerViewAdapter, isDialogUi, bookmarkDelegateSupplier,
bookmarkModel, bookmarkOpener, bookmarkUiPrefs, modalDialogManager);
bookmarkModel, bookmarkOpener, bookmarkUiPrefs, modalDialogManager,
endSearchRunnable);

if (mToolbar instanceof BraveBookmarkToolbar) {
((BraveBookmarkToolbar) mToolbar).setBraveBookmarkDelegate(bookmarkDelegateSupplier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1092,11 +1092,11 @@ public void initialize(NewTabPageManager manager, Activity activity, Delegate ti
FeedSurfaceScrollDelegate scrollDelegate, TouchEnabledDelegate touchEnabledDelegate,
UiConfig uiConfig, ActivityLifecycleDispatcher lifecycleDispatcher, NewTabPageUma uma,
boolean isIncognito, WindowAndroid windowAndroid, boolean isNtpAsHomeSurfaceEnabled,
boolean isSurfacePolishEnabled, boolean isSurfacePolishOmniboxSizeEnabled) {
boolean isSurfacePolishEnabled, boolean isSurfacePolishOmniboxColorEnabled) {
super.initialize(manager, activity, tileGroupDelegate, searchProviderHasLogo,
searchProviderIsGoogle, scrollDelegate, touchEnabledDelegate, uiConfig,
lifecycleDispatcher, uma, isIncognito, windowAndroid, isNtpAsHomeSurfaceEnabled,
isSurfacePolishEnabled, isSurfacePolishOmniboxSizeEnabled);
isSurfacePolishEnabled, isSurfacePolishOmniboxColorEnabled);

assert mMvTilesContainerLayout != null : "Something has changed in the upstream!";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.chromium.chrome.browser.share.ShareDelegate;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.IncognitoStateProvider;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tabmodel.TabWindowManager;
import org.chromium.components.omnibox.action.OmniboxActionDelegate;
import org.chromium.ui.base.WindowAndroid;
Expand Down Expand Up @@ -66,7 +67,8 @@ public BraveLocationBarCoordinator(View locationBarLayout, View autocompleteAnch
@Nullable BackPressManager backPressManager,
@NonNull OmniboxSuggestionsDropdownScrollListener
omniboxSuggestionsDropdownScrollListener,
@Nullable OpenHistoryClustersDelegate openHistoryClustersDelegate) {
@Nullable OpenHistoryClustersDelegate openHistoryClustersDelegate,
@Nullable ObservableSupplier<TabModelSelector> tabModelSelectorSupplier) {
super(locationBarLayout, autocompleteAnchorView, profileObservableSupplier,
privacyPreferencesManager, locationBarDataProvider, actionModeCallback,
windowDelegate, windowAndroid, activityTabSupplier, modalDialogManagerSupplier,
Expand All @@ -76,7 +78,8 @@ public BraveLocationBarCoordinator(View locationBarLayout, View autocompleteAnch
tabWindowManagerSupplier, bookmarkState, isToolbarMicEnabledSupplier,
merchantTrustSignalsCoordinatorSupplier, omniboxActionDelegate,
browserControlsVisibilityDelegate, reportExceptionCallback, backPressManager,
omniboxSuggestionsDropdownScrollListener, openHistoryClustersDelegate);
omniboxSuggestionsDropdownScrollListener, openHistoryClustersDelegate,
tabModelSelectorSupplier);

if (mLocationBarMediator instanceof BraveLocationBarMediator) {
mQRButton = locationBarLayout.findViewById(R.id.qr_button);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import androidx.core.widget.ImageViewCompat;

import org.chromium.chrome.browser.omnibox.status.StatusView;

public class BraveLocationBarLayout extends LocationBarLayout {
private ImageButton mQRButton;

Expand All @@ -25,6 +27,14 @@ public BraveLocationBarLayout(Context context, AttributeSet attrs, int layoutId)
mQRButton = findViewById(R.id.qr_button);
}

@Override
protected void onFinishInflate() {
super.onFinishInflate();

StatusView statusView = findViewById(R.id.location_bar_status);
statusView.setBackgroundDrawable(null);
}

void setQRButtonTint(ColorStateList colorStateList) {
ImageViewCompat.setImageTintList(mQRButton, colorStateList);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import org.chromium.base.supplier.ObservableSupplier;
Expand All @@ -20,6 +21,7 @@
import org.chromium.chrome.browser.locale.LocaleManager;
import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManager;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.theme.ThemeUtils;
import org.chromium.chrome.browser.ui.theme.BrandedColorScheme;
import org.chromium.components.search_engines.TemplateUrlService;
Expand All @@ -36,6 +38,7 @@ public class BraveLocationBarMediator extends LocationBarMediator {
private boolean mIsTablet;
private boolean mNativeInitialized;
private boolean mIsLocationBarFocusedFromNtpScroll;
private boolean mShouldClearOmniboxOnFocus;
private Context mContext;
private @BrandedColorScheme int mBrandedColorScheme = BrandedColorScheme.APP_DEFAULT;

Expand All @@ -52,12 +55,13 @@ public BraveLocationBarMediator(@NonNull Context context,
@NonNull LensController lensController,
@NonNull SaveOfflineButtonState saveOfflineButtonState, @NonNull OmniboxUma omniboxUma,
@NonNull BooleanSupplier isToolbarMicEnabledSupplier,
@NonNull OmniboxSuggestionsDropdownEmbedderImpl dropdownEmbedder) {
@NonNull OmniboxSuggestionsDropdownEmbedderImpl dropdownEmbedder,
@Nullable ObservableSupplier<TabModelSelector> tabModelSelectorSupplier) {
super(context, locationBarLayout, locationBarDataProvider, profileSupplier,
privacyPreferencesManager, overrideUrlLoadingDelegate, localeManager,
templateUrlServiceSupplier, backKeyBehavior, windowAndroid, isTablet,
searchEngineLogoUtils, lensController, saveOfflineButtonState, omniboxUma,
isToolbarMicEnabledSupplier, dropdownEmbedder);
isToolbarMicEnabledSupplier, dropdownEmbedder, tabModelSelectorSupplier);
}

public static Class<OmniboxUma> getOmniboxUmaClass() {
Expand Down Expand Up @@ -165,4 +169,11 @@ private void openQRCodeDialog() {
"BraveLocationBarQRDialogFragment");
}
}

@Override
/*package */ void onUrlFocusChange(boolean hasFocus) {
// We don't want to clear omnibox for focus.
mShouldClearOmniboxOnFocus = false;
super.onUrlFocusChange(hasFocus);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.chromium.chrome.browser.omnibox.LocationBarDataProvider;
import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider;
import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState;
import org.chromium.chrome.browser.omnibox.suggestions.brave_search.BraveSearchBannerProcessor;
import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.profiles.ProfileManager;
Expand Down Expand Up @@ -57,28 +56,28 @@ public BraveAutocompleteMediator(@NonNull Context context,
}

@Override
public void onTextChanged(String textWithoutAutocomplete, String textWithAutocomplete) {
public void onTextChanged(String textWithoutAutocomplete) {
if (ProfileManager.isInitialized()
&& !UserPrefs.get(Profile.getLastUsedRegularProfile())
.getBoolean(AUTOCOMPLETE_ENABLED)) {
return;
}

super.onTextChanged(textWithoutAutocomplete, textWithAutocomplete);
super.onTextChanged(textWithoutAutocomplete);
}

@Override
public void onUrlFocusChange(boolean hasFocus) {
public void onOmniboxSessionStateChange(boolean activated) {
if (!mNativeInitialized) return;

super.onUrlFocusChange(hasFocus);
super.onOmniboxSessionStateChange(activated);
}

@Override
public void removeBraveSearchSuggestion() {
if (mDropdownViewInfoListManager instanceof BraveDropdownItemViewInfoListManager) {
((BraveDropdownItemViewInfoListManager) mDropdownViewInfoListManager)
.removeSuggestionsForGroup(BraveSearchBannerProcessor.BRAVE_SEARCH_PROMO_GROUP);
.removeBraveSearchSuggestion();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@

class BraveAutocompleteMediatorBase {
void loadUrlForOmniboxMatch(int matchIndex, @NonNull AutocompleteMatch suggestion,
@NonNull GURL url, long inputStart, boolean inVisibleSuggestionList) {
@NonNull GURL url, long inputStart, boolean inVisibleSuggestionList,
boolean openInNewTab) {
BraveReflectionUtil.InvokeMethod(AutocompleteMediator.class, this, "loadUrlForOmniboxMatch",
int.class, matchIndex, AutocompleteMatch.class, suggestion, GURL.class, url,
long.class, inputStart, boolean.class, inVisibleSuggestionList);
long.class, inputStart, boolean.class, inVisibleSuggestionList, boolean.class,
openInNewTab);
if (suggestion.getType() == OmniboxSuggestionType.SEARCH_WHAT_YOU_TYPED
|| suggestion.getType() == OmniboxSuggestionType.SEARCH_SUGGEST) {
Context context = (Context) BraveReflectionUtil.getField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tasks.tab_management.TabGroupUi;
import org.chromium.chrome.browser.tasks.tab_management.TabManagementDelegateProvider;
import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities;
import org.chromium.chrome.browser.theme.TopUiThemeColorProvider;
import org.chromium.chrome.browser.toolbar.bottom.BottomControlsCoordinator;
import org.chromium.chrome.browser.toolbar.bottom.BottomToolbarConfiguration;
Expand Down Expand Up @@ -211,16 +210,13 @@ public void enableBottomControls() {
(ViewStub) mActivity.findViewById(R.id.bottom_controls_stub);
mBottomControls =
(BraveScrollingBottomViewResourceFrameLayout) bottomControlsStub.inflate();
if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(mActivity)) {
mTabGroupUi = TabManagementDelegateProvider.getDelegate().createTabGroupUi(
mActivity, mBottomControls.findViewById(R.id.bottom_container_slot),
mBrowserControlsSizer, mIncognitoStateProvider, mScrimCoordinator,
mOmniboxFocusStateSupplier, mBottomSheetController,
mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier, mTabModelSelector,
mTabContentManager, mCompositorViewHolder,
mCompositorViewHolder::getDynamicResourceLoader, mTabCreatorManager,
mLayoutStateProviderSupplier, mSnackbarManager);
}
mTabGroupUi = TabManagementDelegateProvider.getDelegate().createTabGroupUi(mActivity,
mBottomControls.findViewById(R.id.bottom_container_slot), mBrowserControlsSizer,
mIncognitoStateProvider, mScrimCoordinator, mOmniboxFocusStateSupplier,
mBottomSheetController, mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier,
mTabModelSelector, mTabContentManager, mCompositorViewHolder,
mCompositorViewHolder::getDynamicResourceLoader, mTabCreatorManager,
mLayoutStateProviderSupplier, mSnackbarManager);
mBottomControlsCoordinatorSupplier.set(new BraveBottomControlsCoordinator(
mLayoutStateProviderSupplier,
BottomTabSwitcherActionMenuCoordinator.createOnLongClickListener(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.chromium.chrome.browser.omnibox.OmniboxFocusReason;
import org.chromium.chrome.browser.tabmodel.IncognitoStateProvider;
import org.chromium.chrome.browser.tasks.ReturnToChromeUtil;
import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities;
import org.chromium.chrome.browser.theme.ThemeColorProvider;
import org.chromium.chrome.browser.toolbar.HomeButton;
import org.chromium.chrome.browser.toolbar.LocationBarModel;
Expand Down Expand Up @@ -277,15 +276,7 @@ public void onStartedHiding(@LayoutType int layoutType) {
*/
void setBottomToolbarVisible(boolean isVisible) {
if (mTabSwitcherModeCoordinator != null) {
try {
ChromeActivity activity = BraveActivity.getBraveActivity();
mTabSwitcherModeCoordinator.showToolbarOnTop(
!isVisible, TabUiFeatureUtilities.isGridTabSwitcherEnabled(activity));
} catch (BraveActivity.BraveActivityNotFoundException e) {
Log.e(TAG, "setBottomToolbarVisible " + e);
mTabSwitcherModeCoordinator.showToolbarOnTop(
!isVisible, TabUiFeatureUtilities.isGridTabSwitcherEnabled(mContext));
}
mTabSwitcherModeCoordinator.showToolbarOnTop(!isVisible, true);
}
mBrowsingModeCoordinator.onVisibilityChanged(isVisible);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ class BraveTabSwitcherModeTTCoordinator extends TabSwitcherModeTTCoordinator {
private MenuButtonCoordinator mBraveMenuButtonCoordinator;

BraveTabSwitcherModeTTCoordinator(ViewStub tabSwitcherToolbarStub,
ViewStub tabSwitcherFullscreenToolbarStub, MenuButtonCoordinator menuButtonCoordinator,
boolean isGridTabSwitcherEnabled, boolean isTabToGtsAnimationEnabled,
MenuButtonCoordinator menuButtonCoordinator, boolean isTabToGtsAnimationEnabled,
BooleanSupplier isIncognitoModeEnabledSupplier,
ToolbarColorObserverManager toolbarColorObserverManager) {
super(tabSwitcherToolbarStub, tabSwitcherFullscreenToolbarStub, menuButtonCoordinator,
isGridTabSwitcherEnabled, isTabToGtsAnimationEnabled,
super(tabSwitcherToolbarStub, menuButtonCoordinator, isTabToGtsAnimationEnabled,
isIncognitoModeEnabledSupplier, toolbarColorObserverManager);

mBraveMenuButtonCoordinator = menuButtonCoordinator;
Expand Down
Loading