Skip to content

Commit

Permalink
Merge pull request #23233 from brave/cr126
Browse files Browse the repository at this point in the history
Upgrade from Chromium 125 to Chromium 126
  • Loading branch information
emerick committed May 25, 2024
1 parent 84ad7d5 commit 21a6c8d
Show file tree
Hide file tree
Showing 604 changed files with 4,508 additions and 2,305 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ test_get_pkgs
build/config/gclient_args.gni
third_party/rust/target
xcuserdata

# buffer exclusion file generated locally during sync
build/config/unsafe_buffers_paths.txt
2 changes: 1 addition & 1 deletion android/brave_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/night_mode/settings/BraveRadioButtonGroupThemePreference.java",
"../../brave/android/java/org/chromium/chrome/browser/night_mode/settings/BraveThemePreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/BraveNotificationPlatformBridge.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/BraveNotificationSettingsBridge.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/BraveNotificationWarningDialog.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/BraveOnboardingNotification.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/BravePermissionUtils.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/channels/BraveSiteChannelsManagerBridge.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/permissions/BraveNotificationPermissionRationaleDialog.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/permissions/BraveNotificationPermissionRationaleDialogController.java",
"../../brave/android/java/org/chromium/chrome/browser/notifications/retention/RetentionNotification.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.chromium.chrome.tab_ui.R;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
import org.chromium.components.browser_ui.widget.scrim.ScrimCoordinator;
import org.chromium.ui.modaldialog.ModalDialogManager;
import org.chromium.ui.resources.dynamics.DynamicResourceLoader;
import org.chromium.ui.widget.ChromeImageView;

Expand Down Expand Up @@ -56,7 +57,8 @@ public BraveTabGroupUiCoordinator(
@NonNull Supplier<DynamicResourceLoader> dynamicResourceLoaderSupplier,
@NonNull TabCreatorManager tabCreatorManager,
@NonNull OneshotSupplier<LayoutStateProvider> layoutStateProviderSupplier,
@NonNull SnackbarManager snackbarManager) {
@NonNull SnackbarManager snackbarManager,
@NonNull ModalDialogManager modalDialogManager) {
super(
activity,
parentView,
Expand All @@ -73,7 +75,8 @@ public BraveTabGroupUiCoordinator(
dynamicResourceLoaderSupplier,
tabCreatorManager,
layoutStateProviderSupplier,
snackbarManager);
snackbarManager,
modalDialogManager);

mIncognitoStateProvider = incognitoStateProvider;

Expand Down
117 changes: 112 additions & 5 deletions android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@
</message>

<!-- Tab Group Tab Switcher strings -->
<message name="IDS_TABSWITCHER_CREATE_GROUP" desc="This flat button is shown in the Tab Switcher, under an open tab. When the user taps the button, Brave creates a new group of tabs that includes the existing tab. It's okay to use any of the following verbs in order to keep the text under 45 characters: Create, Make, Add.">
Create group
</message>
<message name="IDS_ACCESSIBILITY_TAB_SWITCHER" desc="Accessibility string for Tab Switcher view. This string is announced when the Tab Switcher is shown to screen.">
Tab Switcher
</message>
Expand Down Expand Up @@ -609,7 +606,7 @@
<message name="IDS_TAB_GROUP_CREATION_DIALOG_TITLE" desc="When users create a new tab group, a dialog will pop up and this text is the title of the dialog. [CHAR_LIMIT=24]">
New tab group
</message>
<message name="IDS_TAB_GROUP_CREATION_MISSING_TITLE" desc="Error message appearing when a user tries to create a tab group without a title. s[CHAR_LIMIT=32]">
<message name="IDS_TAB_GROUP_VISUAL_DATA_MISSING_TITLE" desc="Error message appearing when a user tries to create a tab group without a title. s[CHAR_LIMIT=32]">
Title required
</message>
<message name="IDS_TAB_GROUP_CREATION_POSITIVE_BUTTON_TEXT" desc="Text for creating a new tab group from the merged tabs after confirming the editable details">
Expand Down Expand Up @@ -678,7 +675,7 @@
}
</message>

<!-- Tab Group Pane Strings -->
<!-- Tab Group Pane and Sync Strings -->
<message name="IDS_ACCESSIBILITY_TAB_GROUPS" desc="Content description for the button to show tab groups UI.">
Tab groups
</message>
Expand Down Expand Up @@ -721,6 +718,116 @@
other {Created <ph name="NUM_YEARS_MANY">%d<ex>2</ex></ph> years ago}
}
</message>
<message name="IDS_PLUS_HIDDEN_TAB_COUNT" desc="A string to show how many other tabs are contained in a tab group who's favicons are not shown. [CHAR_LIMIT=5]">
+<ph name="HIDDEN_TABS_COUNT">%1$s<ex>3</ex></ph>
</message>
<message name="IDS_DELETE_TAB_GROUP_DIALOG_TITLE" desc="Title of a dialog asking if the user really wants to delete a tab group.">
Delete tab group?
</message>
<message name="IDS_DELETE_TAB_GROUP_DESCRIPTION" desc="Description of the action of deleting a tab group, shown in a confirmation dialog.">
This will delete the group from all devices signed into <ph name="USER_EMAIL">%1$s<ex>test@gmail.com</ex></ph>
</message>
<message name="IDS_DELETE_TAB_GROUP_NO_SYNC_DESCRIPTION" desc="Description of the action of deleting a tab group, shown in a confirmation dialog.">
This will permanently delete the group from your device
</message>
<message name="IDS_CONFIRMATION_STOP_SHOWING" desc="Text next to a checkbox asking if confirmation should not be shown again. Used for various tab operations.">
Don't ask again
</message>
<message name="IDS_DELETE_TAB_GROUP_ACTION" desc="Button text in a confirmation dialog which will delete a tab group.">
Delete group
</message>
<message name="IDS_DELETE_TAB_GROUP_MENU_ITEM" desc="Menu item text which will prompt a confirmation dialog to delete a tab group.">
Delete
</message>
<message name="IDS_UNGROUP_TAB_GROUP_DIALOG_TITLE" desc="Title of a dialog asking if the user really wants to ungroup all tabs in a group.">
Ungroup tab group?
</message>
<message name="IDS_UNGROUP_TAB_GROUP_DESCRIPTION" desc="Description of the impact of ungrouping the tabs in a group, shown in a confirmation dialog.">
The tabs will remain open on this device but the group will be deleted from all devices signed into <ph name="USER_EMAIL">%1$s<ex>test@gmail.com</ex></ph>
</message>
<message name="IDS_UNGROUP_TAB_GROUP_NO_SYNC_DESCRIPTION" desc="Description of the impact of ungrouping the tabs in a group, shown in a confirmation dialog.">
The tabs will remain open on this device but the group will be permanently deleted
</message>
<message name="IDS_UNGROUP_TAB_GROUP_ACTION" desc="Button text in a confirmation dialog which will ungroup tabs in a group.">
Ungroup
</message>
<message name="IDS_UNGROUP_TAB_GROUP_MENU_ITEM" desc="Menu item text which will prompt a confirmation dialog to ungroup a tab group.">
Ungroup
</message>
<message name="IDS_TAB_GROUP_RENAME_DIALOG_TITLE" desc="When users edit an existing tab group, a dialog will pop up and this text is the title of that dialog. [CHAR_LIMIT=24]">
Rename tab group
</message>
<message name="IDS_TAB_GROUP_RENAME_POSITIVE_BUTTON_TEXT" desc="When users edit an existing tab group, a dialog will pop up and this text represents the button to accept the current selections. [CHAR_LIMIT=24]">
Continue
</message>
<message name="IDS_TAB_GROUP_RENAME_NEGATIVE_BUTTON_TEXT" desc="When users edit an existing tab group, a dialog will pop up and this text represents the button to decline the current selections. [CHAR_LIMIT=24]">
Cancel
</message>
<message name="IDS_CLOSE_ALL_TABS_AND_GROUPS_DIALOG_MESSAGE" desc="Description of the action of closing all tabs and groups, shown in a confirmation dialog.">
Your closed tabs and groups can be reopened from the Recent tabs section and the Tab groups section.
</message>
<message name="IDS_CLOSE_ALL_TABS_AND_GROUPS_ACTION" desc="Button text in a confirmation dialog which will close all tabs and groups.">
Close all tabs and groups
</message>
<message name="IDS_REMOVE_FROM_GROUP_DIALOG_MESSAGE" desc="Title of a dialog asking if the user really wants to remove all tabs in a group.">
Remove tab(s) and delete group?
</message>
<message name="IDS_REMOVE_FROM_GROUP_DESCRIPTION" desc="Descirotion of the action of removing all tabs in a group, shown in a confirmation dialog.">
This will delete the group from all devices signed into <ph name="USER_EMAIL">%1$s<ex>test@gmail.com</ex></ph>
</message>
<message name="IDS_CLOSE_FROM_GROUP_DIALOG_TITLE" desc="Title of a dialog asking if the user really wants to close a tab and group.">
Close tab and delete group?
</message>
<message name="IDS_CLOSE_TAB_GROUP_MENU_ITEM" desc="Menu item text which will prompt a confirmation dialog to close a tab group.">
Close
</message>
<message name="IDS_RENAME_TAB_GROUP_MENU_ITEM" desc="Menu item text which will prompt a confirmation dialog to rename a tab group.">
Rename
</message>
<message name="IDS_ACCESSIBILITY_OPEN_TAB_GROUP_OVERFLOW_MENU_WITH_GROUP_NAME" desc="Accessibility string for opening the overflow menu on a tab group, which will allow the user to perform several actions on the tab group. TITLE_OF_GROUP is the title of the group.">
Open the tab group action menu for tab group <ph name="TITLE_OF_GROUP">%1$s<ex>Shopping cart</ex></ph>
</message>
<message name="IDS_CLOSE_FROM_GROUP_DESCRIPTION" desc="Description of the ation of deleting a tab and a group, shown in a confirmation dialog.">
This will delete the group from all devices signed into <ph name="USER_EMAIL">%1$s<ex>test@gmail.com</ex></ph>
</message>
<message name="IDS_REMOVE_LAST_TAB_ACTION" desc="The text shown on the bottom bar when the user is dragging the last tab of a group around. Indicates removing this tab will also delete the group.">
Remove tab and delete group
</message>
<message name="IDS_TAB_GROUP_CREATION_DIALOG_SYNC_DESCRIPTION" desc="Description of tab group sync functionality shown for syncing users in the tab group creation dialog.">
Your tab groups automatically save and update across all your signed-in devices
</message>
<message name="IDS_TAB_GROUPS_CATEGORY" desc="Used as a section heading for tab group data when deleting local data.">
Tab groups
</message>
<message name="IDS_SAVED_TAB_GROUPS_DATA_SUMMARY" desc="A summary of the tab groups data you have and what will happen when it is deleted.">
<ph name="USER_EMAIL">%1$s<ex>3</ex></ph> groups saved (will close tabs and delete groups)
</message>
<message name="IDS_TAB_GROUPS_EMPTY_HEADER" desc="The header text explaining the purpose of the tab groups UI surface. Shown when the user does not currently have any tab groups.">
You'll find your tab groups here
</message>
<message name="IDS_TAB_GROUPS_EMPTY_STATE_DESCRIPTION" desc="The detailed description of the purpose of the tab groups surface. Shown when the user does not currently have any tab groups.">
Tab groups automatically save and update across all your devices
</message>
<message name="IDS_TAB_GROUP_SURFACE_IPH_WITH_SYNC" desc="IPH text to hint the user to opening the dedicated tab groups UI surface when syncing tab groups is enabled.">
Your tab groups are saved here and get updated across all your signed-in devices
</message>
<message name="IDS_TAB_GROUP_SURFACE_IPH_NO_SYNC" desc="IPH text to hint the user to opening the dedicated tab groups UI surface when tab groups is only local.">
Your tab groups are saved here
</message>
<message name="IDS_NEWLY_SYNCED_TAB_GROUP_IPH" desc="IPH text highlighting a tab group that was synced from another device">
New group from your other device
</message>
<message name="IDS_OPEN_TAB_GROUP_MENU_ITEM" desc="Menu item to open a more detailed view of a tab group.">
Open
</message>

<!-- Tabs Settings Strings -->
<message name="IDS_TABS_SETTINGS_TITLE" desc="A title to show in the top toolbar when the Tabs settings page is open.">
Tabs
</message>
<message name="IDS_AUTO_OPEN_SYNCED_TAB_GROUPS_SUMMARY" desc="A title to show in the top toolbar when the Tabs settings page is open.">
Automatically open tab groups from other devices
</message>
</messages>
</release>
</grit>
4 changes: 4 additions & 0 deletions android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*** mLogoCoordinator;
*** insertSiteSectionView(...);
*** isScrollableMvtEnabled(...);
*** setSearchProviderTopMargin(...);
*** setSearchProviderBottomMargin(...);
*** getLogoMargin(...);
}

-keep class org.chromium.chrome.browser.suggestions.tile.MostVisitedTilesMediator {
Expand Down Expand Up @@ -143,6 +146,7 @@
*** mTabContentManager;
*** mTabCreatorManager;
*** mSnackbarManager;
*** mModalDialogManagerSupplier;
*** mTabObscuringHandler;
*** mReadAloudControllerSupplier;
*** onOrientationChange(...);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import org.chromium.chrome.browser.partnercustomizations.CloseBraveManager;

// see org.brave.bytecode.BraveHomepageManagerClassAdapter
public class BraveHomepageManager {
public static boolean shouldCloseAppWithZeroTabs() {
public class BraveHomepageManager extends HomepageManager {
@Override
public boolean shouldCloseAppWithZeroTabs() {
return CloseBraveManager.shouldCloseAppWithZeroTabs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
if (homepageSwitch.isVisible()) return;
// Show homepage switch if it is hidden.
homepageSwitch.setVisible(true);
boolean isHomepageEnabled = HomepageManager.isHomepageEnabled();
boolean isHomepageEnabled = mHomepageManager.isHomepageEnabled();
homepageSwitch.setChecked(isHomepageEnabled);
homepageSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
mHomepageManager.setPrefHomepageEnabled((boolean) newValue);
return true;
});
homepageSwitch.setOnPreferenceChangeListener(
(preference, newValue) -> {
mHomepageManager.setPrefHomepageEnabled((boolean) newValue);
return true;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
import android.app.Activity;

import org.chromium.base.supplier.ObservableSupplier;
import org.chromium.base.supplier.Supplier;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.app.tabmodel.TabModelOrchestrator;
import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.ui.desktop_windowing.DesktopWindowStateProvider;
import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar;
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarController;
Expand All @@ -34,15 +36,15 @@ class BraveMultiInstanceManagerApi31 extends MultiInstanceManagerApi31 {
ActivityLifecycleDispatcher activityLifecycleDispatcher,
ObservableSupplier<ModalDialogManager> modalDialogManagerSupplier,
MenuOrKeyboardActionController menuOrKeyboardActionController,
ObservableSupplier<Boolean> desktopWindowModeSupplier) {
Supplier<DesktopWindowStateProvider> desktopWindowStateProviderSupplier) {
super(
activity,
tabModelOrchestratorSupplier,
multiWindowModeStateDispatcher,
activityLifecycleDispatcher,
modalDialogManagerSupplier,
menuOrKeyboardActionController,
desktopWindowModeSupplier);
desktopWindowStateProviderSupplier);
}

@Override
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

package org.chromium.chrome.browser.notifications.channels;

import org.jni_zero.CalledByNative;

import org.chromium.chrome.browser.notifications.NotificationChannelStatus;

/**
* This class provides our native code to access SiteChannelsManager without patching
* notification_channels_provider_android.cc/h.
*/
public class BraveSiteChannelsManagerBridge {
@CalledByNative
static @NotificationChannelStatus int getChannelStatus(String channelId) {
return SiteChannelsManager.getInstance().getChannelStatus(channelId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1174,8 +1174,6 @@ public void initialize(
Profile profile,
WindowAndroid windowAndroid,
boolean isSurfacePolishEnabled,
boolean isSurfacePolishOmniboxColorEnabled,
boolean isSurfacePolishLessBrandSpaceEnabled,
boolean isTablet,
ObservableSupplier<Integer> tabStripHeightSupplier) {
super.initialize(
Expand All @@ -1192,8 +1190,6 @@ public void initialize(
profile,
windowAndroid,
isSurfacePolishEnabled,
isSurfacePolishOmniboxColorEnabled,
isSurfacePolishLessBrandSpaceEnabled,
isTablet,
tabStripHeightSupplier);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ interface IncognitoNewTabPageManager {
/** Tells the caller whether a new snapshot is required or not. */
boolean shouldCaptureThumbnail();

/** Whether the new version of the Incognito NTP should be shown. */
boolean shouldShowRevampedIncognitoNtp();

/** Whether to show the tracking protection UI on the NTP. */
boolean shouldShowTrackingProtectionNtp();

Expand Down
Loading

0 comments on commit 21a6c8d

Please sign in to comment.