Skip to content

Commit

Permalink
Merge pull request #23829 from brave/cr127
Browse files Browse the repository at this point in the history
Upgrade from Chromium 126 to Chromium 127
  • Loading branch information
emerick authored and mkarolin committed Jul 2, 2024
1 parent 2e1d416 commit 7a201f5
Show file tree
Hide file tree
Showing 1,177 changed files with 186,374 additions and 3,238 deletions.
1 change: 1 addition & 0 deletions android/brave_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/site_settings/BraveWalletSolanaConnectedSitesPreference.java",
"../../brave/android/java/org/chromium/chrome/browser/speedreader/BraveSpeedReaderManager.java",
"../../brave/android/java/org/chromium/chrome/browser/speedreader/BraveSpeedReaderUtils.java",
"../../brave/android/java/org/chromium/chrome/browser/suggestions/tile/BraveMostVisitedTilesLayoutBase.java",
"../../brave/android/java/org/chromium/chrome/browser/suggestions/tile/BraveMostVisitedTilesMediator.java",
"../../brave/android/java/org/chromium/chrome/browser/suggestions/tile/BraveTileView.java",
"../../brave/android/java/org/chromium/chrome/browser/sync/BraveSyncDevices.java",
Expand Down
1 change: 0 additions & 1 deletion android/features/tab_ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ android_library("java") {
deps = [
"//base:base_java",
"//chrome/android:chrome_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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,6 @@
To group tabs, touch & hold a tab. Then, drag it onto another tab.
</message>

<!-- Tab Carousel strings -->
<message name="IDS_TAB_SWITCHER_CAROUSEL_TITLE" desc="Title of the Tabs carousel section on the single pane start surface.">
Continue browsing
</message>

<!-- Single Tab module strings -->
<message name="IDS_SINGLE_TAB_MODULE_TITLE" desc="Title of the single Tab module on the magic space of the start surface or NTP home surface.">
Your last tab
Expand All @@ -406,37 +401,6 @@
<ph name="NUMBER_OF_TABS">%1$s<ex>2</ex></ph> tabs seem related. Group them?
</message>

<!-- Tab Cleanup strings -->
<message name="IDS_TAB_CLEANUP_MESSAGE_CARD_TITLE" desc="Header for the Tab Cleanup message card where a user can review suggested tabs to close before closing or just close them outright.">
Want to close old tabs?
</message>
<message name="IDS_TAB_CLEANUP_MESSAGE_CARD_SUBTITLE" desc="Subtitle for the Tab Cleanup message card that indicates the number of suggested tabs a user can review to close before closing or just close them outright.">
{TABS_COUNT, plural,
=1 {You have <ph name="TABS_COUNT_ONE">%1$s<ex>1</ex></ph> tab you haven't used recently}
other {You have <ph name="TABS_COUNT_MANY">%1$s<ex>8</ex></ph> tabs you haven't used recently}
}
</message>
<message name="IDS_TAB_CLEANUP_MESSAGE_CARD_REVIEW_TABS_BUTTON" desc="Button text where a user can review suggested tabs to close before closing.">
Review tabs
</message>
<message name="IDS_TAB_CLEANUP_MESSAGE_CARD_CLOSE_TABS_BUTTON" desc="Button text where a user can close suggested tabs without reviewing them.">
Close without reviewing
</message>

<!-- Tab Declutter strings -->
<message name="IDS_TAB_DECLUTTER_MESSAGE_CARD_TEXT_INFO" desc="Text info for the Tab Declutter message card that indicates the number of archived tabs a user can review to close.">
{TABS_COUNT, plural,
=1 {You have <ph name="TABS_COUNT_ONE">%1$s<ex>1</ex></ph> archived tab}
other {You have <ph name="TABS_COUNT_MANY">%1$s<ex>8</ex></ph> archived tabs}
}
</message>
<message name="IDS_TAB_DECLUTTER_MESSAGE_CARD_REVIEW_SETTINGS_DESCRIPTION" desc="Acessibility string describing the settings icon on the tab declutter message card interface.">
Review the current declutter settings.
</message>
<message name="IDS_TAB_DECLUTTER_MESSAGE_CARD_REVIEW_ARCHIVED_TABS_DESCRIPTION" desc="Acessibility string describing the expand icon for reviewing archived tabs on the tab declutter message card interface.">
Review all archived tabs for declutter by entering this editor.
</message>

<!-- Accessibility strings for Tab Suggestion -->
<message name="IDS_ACCESSIBILITY_TAB_SUGGESTION_REVIEW_BUTTON" desc="The accessibility text to read when the text button 'Review' is focused. The 'Review' button is shown next to the message 'X of your tabs haven't been used lately. Close them?', or 'X tabs seem related. Group them?'. User uses that text button to enter a selection mode where they can see the suggested tabs to close or to group, see the rest of their open tabs, and choose what tabs to close or to group.">
Review the suggestions.
Expand Down Expand Up @@ -587,14 +551,6 @@
<message name="IDS_CLOSE_ALL_TABS_DIALOG_TITLE" desc="When users click the menu item 'Close all tabs' in tab switcher, a dialog will pop up and this text is the title of the dialog.">
Close all tabs?
</message>
<message name="IDS_CLOSE_ALL_TABS_DIALOG_MESSAGE" desc="When users click the menu item 'Close all tabs' in tab switcher, a dialog will pop up and this text is the message of the dialog.">
You can find your closed tabs in Recent tabs under the Brave main menu.
</message>
<message name="IDS_CLOSE_ALL_TABS_DIALOG_MESSAGE_WITH_INCOGNITO_TABS" desc="When users click the menu item 'Close all tabs' in tab switcher, a dialog will pop up and this text is the message of the dialog. If there are any Private tabs opened this message would warn users that those Private tabs would be lost.">
{INCOGNITO_TABS_COUNT, plural,
=1 {You can find your closed tabs in Recent tabs under the Brave main menu. Your Private tab won't be available.}
other {You can find your closed tabs in Recent tabs under the Brave main menu. Your # Private tabs won't be available.}}
</message>
<message name="IDS_CLOSE_ALL_TABS_DIALOG_TITLE_INCOGNITO" desc="When users click the menu item 'Close all tabs' in Private tab switcher, a dialog will pop up and this text is the title of the dialog.">
Close all Private tabs?
</message>
Expand Down Expand Up @@ -766,6 +722,11 @@
<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_DIALOG_MESSAGE_WITH_INCOGNITO_TABS" desc="Description of the action of closing all tabs and group, shown in a confirmation dialog. If there are any Private tabs opened this message would warn users that those Private tabs would be lost.">
{INCOGNITO_TABS_COUNT, plural,
=1 {Your closed tabs and groups can be reopened from the Recent tabs section and the Tab groups section. Your Private tab won't be available.}
other {Your closed tabs and groups can be reopened from the Recent tabs section and the Tab groups section. Your # Private tabs won't be available.}}
</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>
Expand All @@ -775,9 +736,6 @@
<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>
Expand All @@ -787,9 +745,6 @@
<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>
Expand All @@ -808,6 +763,9 @@
<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_GROUPS_EMPTY_STATE_DESCRIPTION_NO_SYNC" desc="The detailed description of the purpose of the tab groups surface. Shown when the user does not currently have any tab groups and is not syncing.">
Create groups to organize your tabs.
</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>
Expand All @@ -817,9 +775,18 @@
<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_FIND_HIDDEN_TAB_GROUP_IPH" desc="IPH text to hint the user to opening the dedicated tab groups UI surface after hiding a tab group.">
You can find all your tab groups here
</message>
<message name="IDS_OPEN_TAB_GROUP_MENU_ITEM" desc="Menu item to open a more detailed view of a tab group.">
Open
</message>
<message name="IDS_TAB_GROUP_ROW_ACCESSIBILITY_TEXT" desc="Content description for accessibility to describe action of tapping on a tab group row.">
Open <ph name="TITLE_OF_GROUP">%s<ex>shopping</ex></ph>
</message>
<message name="IDS_TAB_GROUP_MENU_ACCESSIBILITY_TEXT" desc="Content description for accessibility to describe the action of tapping on the more menu button.">
<ph name="TITLE_OF_GROUP">%s<ex>shopping</ex></ph> tab group options
</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.">
Expand All @@ -828,6 +795,17 @@
<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>

<!-- Archived tabs strings -->
<message name="IDS_ARCHIVED_TABS_DIALOG_TITLE" desc="The toolbar title for the archived tabs dialog.">
{TABS_COUNT, plural,
=1 {<ph name="TABS_COUNT_ONE">%1$d<ex>1</ex></ph> inactive tab}
other {<ph name="TABS_COUNT_MANY">%1$d<ex>8</ex></ph> inactive tabs}
}
</message>
<message name="IDS_ARCHIVED_TABS_DIALOG_CLOSE_ALL_BUTTON" desc="The button title for the archived tabs dialog. Closes all inactive tabs.">
Close all inactive tabs
</message>
</messages>
</release>
</grit>
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@
</translations>
<release seq="1">
<messages fallback_to_english="true">
<message name="IDS_CLOSE_ALL_TABS_DIALOG_MESSAGE_WITH_INCOGNITO_TABS" desc="When users click the menu item 'Close all tabs' in tab switcher, a dialog will pop up and this text is the message of the dialog. If there are any Private tabs opened this message would warn users that those Private tabs would be lost.">
{INCOGNITO_TABS_COUNT, plural,
=1 {You can find your closed tabs in Recent tabs under the Brave main menu. Your Private tab won't be available.}
other {You can find your closed tabs in Recent tabs under the Brave main menu. Your # Private tabs won't be available.}}
</message>
<message name="IDS_CLOSE_ALL_TABS_DIALOG_TITLE_INCOGNITO" desc="When users click the menu item 'Close all tabs' in Private tab switcher, a dialog will pop up and this text is the title of the dialog.">
Close all Private tabs?
</message>
<message name="IDS_CLOSE_ALL_TABS_DIALOG_MESSAGE_INCOGNITO" desc="When users click the menu item 'Close all tabs' in Private tab switcher, a dialog will pop up and this text is the message of the dialog.">
Your activity in these Private tabs will be removed from this device
</message>

<message name="IDS_CLOSE_ALL_TABS_AND_GROUPS_DIALOG_MESSAGE_WITH_INCOGNITO_TABS" desc="Description of the action of closing all tabs and group, shown in a confirmation dialog. If there are any Private tabs opened this message would warn users that those Private tabs would be lost.">
{INCOGNITO_TABS_COUNT, plural,
=1 {Your closed tabs and groups can be reopened from the Recent tabs section and the Tab groups section. Your Private tab won't be available.}
other {Your closed tabs and groups can be reopened from the Recent tabs section and the Tab groups section. Your # Private tabs won't be available.}}
</message>
</messages>
</release>
</grit>
9 changes: 6 additions & 3 deletions android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
*** mMvTilesContainerLayout;
*** mLogoCoordinator;
*** insertSiteSectionView(...);
*** isScrollableMvtEnabled(...);
*** setSearchProviderTopMargin(...);
*** setSearchProviderBottomMargin(...);
*** getLogoMargin(...);
Expand Down Expand Up @@ -122,7 +121,7 @@
public <init>(...);
*** mBottomControlsCoordinatorSupplier;
*** mCallbackController;
*** mBrowserControlsSizer;
*** mBottomControlsStacker;
*** mFullscreenManager;
*** mActivityTabProvider;
*** mAppThemeColorProvider;
Expand Down Expand Up @@ -293,7 +292,7 @@
<init>(...);
*** mBottomControlsHeight;
*** mModel;
*** mBrowserControlsSizer;
*** mBottomControlsStacker;
}

-keep class org.chromium.chrome.browser.toolbar.bottom.BraveBottomControlsMediator {
Expand Down Expand Up @@ -881,3 +880,7 @@
-keep class org.chromium.chrome.browser.password_manager.settings.BraveExportFlow {
public <init>(...);
}

-keep class org.chromium.chrome.browser.suggestions.tile.MostVisitedTilesLayout

-keep class org.chromium.chrome.browser.suggestions.tile.BraveMostVisitedTilesLayoutBase
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.chromium.chrome.browser.app.helpers;

import static org.chromium.chrome.browser.content.WebContentsFactory.DEFAULT_NETWORK_HANDLE;
import static org.chromium.ui.base.ViewUtils.dpToPx;

import android.content.Context;
Expand Down Expand Up @@ -114,8 +115,10 @@ private static void downloadImage(String url, final RequestManager requestManage

WebContentsFactory webContentsFactory = new WebContentsFactory();
WebContents webContents =
webContentsFactory.createWebContentsWithWarmRenderer(profile, true);
webContents.downloadImage(new GURL(validUrl), // Url
webContentsFactory.createWebContentsWithWarmRenderer(
profile, true, DEFAULT_NETWORK_HANDLE);
webContents.downloadImage(
new GURL(validUrl), // Url
false, // isFavIcon
WalletConstants.MAX_BITMAP_SIZE_FOR_DOWNLOAD, // maxBitmapSize
false, // bypassCache
Expand All @@ -141,28 +144,49 @@ private static void downloadImage(String url, final RequestManager requestManage
new BitmapDrawable(resources, bestBitmap);
imageFetcherFacade = new ImageFetcherFacade(bitmapDrawable);
}
loadImage(imageFetcherFacade, requestManager, isCircular, roundedCorners,
imageView, customTarget, callback);
loadImage(
imageFetcherFacade,
requestManager,
isCircular,
roundedCorners,
imageView,
customTarget,
callback);
});
} else {
ImageFetcher imageFetcher = ImageFetcherFactory.createImageFetcher(
ImageFetcherConfig.NETWORK_ONLY, profile.getProfileKey());
ImageFetcher imageFetcher =
ImageFetcherFactory.createImageFetcher(
ImageFetcherConfig.NETWORK_ONLY, profile.getProfileKey());
if (isGif(url)) {
imageFetcher.fetchGif(
Params.create(new GURL(url), UNUSED_CLIENT_NAME), gifImage -> {
Params.create(new GURL(url), UNUSED_CLIENT_NAME),
gifImage -> {
ImageFetcherFacade imageFetcherFacade =
new ImageFetcherFacade(gifImage.getData());
loadImage(imageFetcherFacade, requestManager, isCircular,
roundedCorners, imageView, customTarget, callback);
loadImage(
imageFetcherFacade,
requestManager,
isCircular,
roundedCorners,
imageView,
customTarget,
callback);
});
} else {
imageFetcher.fetchImage(
Params.create(new GURL(url), UNUSED_CLIENT_NAME), bitmap -> {
Params.create(new GURL(url), UNUSED_CLIENT_NAME),
bitmap -> {
BitmapDrawable bitmapDrawable = new BitmapDrawable(resources, bitmap);
ImageFetcherFacade imageFetcherFacade =
new ImageFetcherFacade(bitmapDrawable);
loadImage(imageFetcherFacade, requestManager, isCircular,
roundedCorners, imageView, customTarget, callback);
loadImage(
imageFetcherFacade,
requestManager,
isCircular,
roundedCorners,
imageView,
customTarget,
callback);
});
}
}
Expand Down
Loading

0 comments on commit 7a201f5

Please sign in to comment.