Skip to content

Commit a7b82f7

Browse files
authored
Merge pull request #28705 from brave/cr136-1.78.x
Upgrade from Chromium 135 to Chromium 136 (1.78.x)
2 parents 085d94a + 51bb44d commit a7b82f7

File tree

1,234 files changed

+158149
-31621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,234 files changed

+158149
-31621
lines changed

android/brave_java_resources.gni

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ brave_java_resources = [
4040
"java/res/drawable-hdpi/chevron_right.png",
4141
"java/res/drawable-hdpi/chromelogo16.png",
4242
"java/res/drawable-hdpi/copy_paste.png",
43-
"java/res/drawable-hdpi/down_arrow.png",
4443
"java/res/drawable-hdpi/ic_ad_free_videos.png",
4544
"java/res/drawable-hdpi/ic_brave_onboarding.png",
4645
"java/res/drawable-hdpi/ic_chrome.png",
@@ -86,7 +85,6 @@ brave_java_resources = [
8685
"java/res/drawable-mdpi/chevron_right.png",
8786
"java/res/drawable-mdpi/chromelogo16.png",
8887
"java/res/drawable-mdpi/copy_paste.png",
89-
"java/res/drawable-mdpi/down_arrow.png",
9088
"java/res/drawable-mdpi/ic_ad_free_videos.png",
9189
"java/res/drawable-mdpi/ic_brave_onboarding.png",
9290
"java/res/drawable-mdpi/ic_chrome.png",
@@ -154,7 +152,6 @@ brave_java_resources = [
154152
"java/res/drawable-xhdpi/chevron_right.png",
155153
"java/res/drawable-xhdpi/chromelogo16.png",
156154
"java/res/drawable-xhdpi/copy_paste.png",
157-
"java/res/drawable-xhdpi/down_arrow.png",
158155
"java/res/drawable-xhdpi/ic_ad_free_videos.png",
159156
"java/res/drawable-xhdpi/ic_brave_onboarding.png",
160157
"java/res/drawable-xhdpi/ic_chrome.png",

android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveIncognitoTabSwitcherPane.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public BraveIncognitoTabSwitcherPane(
3636
@NonNull DoubleConsumer onToolbarAlphaChange,
3737
@NonNull UserEducationHelper userEducationHelper,
3838
@NonNull ObservableSupplier<EdgeToEdgeController> edgeToEdgeSupplier,
39-
@NonNull ObservableSupplier<CompositorViewHolder> compositorViewHolderSupplier) {
39+
@NonNull ObservableSupplier<CompositorViewHolder> compositorViewHolderSupplier,
40+
@NonNull TabGroupCreationUiFlow tabGroupCreationUiFlow) {
4041
super(
4142
context,
4243
factory,
@@ -46,7 +47,8 @@ public BraveIncognitoTabSwitcherPane(
4647
onToolbarAlphaChange,
4748
userEducationHelper,
4849
edgeToEdgeSupplier,
49-
compositorViewHolderSupplier);
50+
compositorViewHolderSupplier,
51+
tabGroupCreationUiFlow);
5052

5153
ResourceButtonData newReferenceButtonData =
5254
new ResourceButtonData(

android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public BraveTabGroupUiCoordinator(
8989

9090
@Override
9191
public void initializeWithNative(
92-
Activity activity,
9392
BottomControlsCoordinator.BottomControlsVisibilityController visibilityController,
9493
Callback<Object> onModelTokenChange) {
9594
// Fix for the null object crash at TabGroupSyncFeatures.isTabGroupSyncEnabled
@@ -112,22 +111,21 @@ public void onChange() {
112111
if (mTabModelSelector.getModels().size() >= 2
113112
&& mTabModelSelector.getModel(false).getProfile() != null) {
114113
callSuperInitializeWithNative(
115-
activity, visibilityController, onModelTokenChange);
114+
visibilityController, onModelTokenChange);
116115

117116
mTabModelSelector.removeObserver(this);
118117
}
119118
}
120119
});
121120
} else {
122-
callSuperInitializeWithNative(activity, visibilityController, onModelTokenChange);
121+
callSuperInitializeWithNative(visibilityController, onModelTokenChange);
123122
}
124123
}
125124

126125
private void callSuperInitializeWithNative(
127-
Activity activity,
128126
BottomControlsCoordinator.BottomControlsVisibilityController visibilityController,
129127
Callback<Object> onModelTokenChange) {
130-
super.initializeWithNative(activity, visibilityController, onModelTokenChange);
128+
super.initializeWithNative(visibilityController, onModelTokenChange);
131129
}
132130

133131
@Override

android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabSwitcherPaneBase.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ public abstract class BraveTabSwitcherPaneBase extends TabSwitcherPaneBase {
2828
@NonNull DoubleConsumer onToolbarAlphaChange,
2929
@NonNull UserEducationHelper userEducationHelper,
3030
@NonNull ObservableSupplier<EdgeToEdgeController> edgeToEdgeSupplier,
31-
@NonNull ObservableSupplier<CompositorViewHolder> compositorViewHolderSupplier) {
31+
@NonNull ObservableSupplier<CompositorViewHolder> compositorViewHolderSupplier,
32+
@NonNull TabGroupCreationUiFlow tabGroupCreationUiFlow) {
3233
super(
3334
context,
3435
factory,
3536
isIncognito,
3637
onToolbarAlphaChange,
3738
userEducationHelper,
3839
edgeToEdgeSupplier,
39-
compositorViewHolderSupplier);
40+
compositorViewHolderSupplier,
41+
tabGroupCreationUiFlow);
4042
}
4143

4244
@Override

android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,30 @@
306306
other {Group <ph name="TABS_COUNT_MANY">%1$d<ex>8</ex></ph> selected tabs}
307307
}
308308
</message>
309+
<message name="IDS_ADD_TAB_TO_NEW_GROUP_MENU_ITEM" desc="This text menu item is shown in several menus and starts the UI flow for adding a tab to a new group.">
310+
{TABS_COUNT, plural,
311+
=1 {Add tab to new group}
312+
other {Add tabs to new group}
313+
}
314+
</message>
315+
<message name="IDS_ACCESSIBILITY_ADD_TAB_TO_NEW_GROUP_MENU_ITEM" desc="The accessibility text to read when the 'Add tab to new group' menu item is focused. When this menu item is tapped, the selected tab will be added to a new tab group.">
316+
{TABS_COUNT, plural,
317+
=1 {Add <ph name="TABS_COUNT_ONE">%1$d<ex>1</ex></ph> tab to group}
318+
other {Add <ph name="TABS_COUNT_MANY">%1$d<ex>8</ex></ph> tabs to group}
319+
}
320+
</message>
321+
<message name="IDS_ADD_TAB_TO_GROUP_MENU_ITEM" desc="This text menu item is shown in several menus and starts the UI flow for adding one or more tabs to a new or pre-existing group.">
322+
{TABS_COUNT, plural,
323+
=1 {Add tab to group}
324+
other {Add tabs to group}
325+
}
326+
</message>
327+
<message name="IDS_ACCESSIBILITY_ADD_TAB_TO_GROUP_MENU_ITEM" desc="The accessibility text to read when the 'Add tab to group' menu item is focused. When this menu item is tapped, the selected tabs will be added to a new or pre-existing tab group.">
328+
{TABS_COUNT, plural,
329+
=1 {Add <ph name="TABS_COUNT_ONE">%1$d<ex>1</ex></ph> selected tab to group}
330+
other {Add <ph name="TABS_COUNT_MANY">%1$d<ex>8</ex></ph> selected tabs to group}
331+
}
332+
</message>
309333
<message name="IDS_TAB_SELECTION_EDITOR_UNGROUP_TABS" desc="This text menu item is shown in the Tab Selection Editor menu. 'Ungroup' is a verb. When the user taps the menu item, Brave removes the selected tabs from the group. [CHAR_LIMIT=27]">
310334
{TABS_COUNT, plural,
311335
=1 {Ungroup tab}
@@ -367,44 +391,20 @@
367391
</message>
368392
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_ADDED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were only added.">
369393
{NUMBER_OF_TABS_ADDED, plural,
370-
=1 {<ph name="ONE_ADDED">%1$d<ex>1</ex></ph> tab added}
371-
other {<ph name="MANY_ADDED">%1$d<ex>2</ex></ph> tabs added}
372-
}
373-
</message>
374-
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_ADDED_CHANGED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were added, and changed.">
375-
{NUMBER_OF_TABS_ADDED, plural,
376-
=1 {<ph name="ONE_ADDED">%1$d<ex>1</ex></ph> tab added, <ph name="ANY_CHANGED">%2$d<ex>2</ex></ph> changed}
377-
other {<ph name="MANY_ADDED">%1$d<ex>2</ex></ph> tabs added, <ph name="ANY_CHANGED">%2$d<ex>2</ex></ph> changed}
394+
=1 {<ph name="ONE_ADDED">%1$d<ex>1</ex></ph> new tab}
395+
other {<ph name="MANY_ADDED">%1$d<ex>2</ex></ph> new tabs}
378396
}
379397
</message>
380398
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_ADDED_CLOSED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were added, and closed.">
381399
{NUMBER_OF_TABS_ADDED, plural,
382-
=1 {<ph name="ONE_ADDED">%1$d<ex>1</ex></ph> tab added, <ph name="ANY_CLOSED">%3$d<ex>2</ex></ph> closed}
383-
other {<ph name="MANY_ADDED">%1$d<ex>2</ex></ph> tabs added, <ph name="ANY_CLOSED">%3$d<ex>2</ex></ph> closed}
384-
}
385-
</message>
386-
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_ADDED_CHANGED_CLOSED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were added, changed, and closed.">
387-
{NUMBER_OF_TABS_ADDED, plural,
388-
=1 {<ph name="ONE_ADDED">%1$d<ex>1</ex></ph> tab added, <ph name="ANY_CHANGED">%2$d<ex>2</ex></ph> changed, <ph name="ANY_CLOSED">%3$d<ex>2</ex></ph> closed}
389-
other {<ph name="MANY_ADDED">%1$d<ex>2</ex></ph> tabs added, <ph name="ANY_CHANGED">%2$d<ex>2</ex></ph> changed, <ph name="ANY_CLOSED">%3$d<ex>2</ex></ph> closed}
390-
}
391-
</message>
392-
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_CHANGED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were only changed.">
393-
{NUMBER_OF_TABS_CHANGED, plural,
394-
=1 {<ph name="ONE_CHANGED">%2$d<ex>1</ex></ph> tab changed}
395-
other {<ph name="MANY_CHANGED">%2$d<ex>2</ex></ph> tabs changed}
396-
}
397-
</message>
398-
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_CHANGED_CLOSED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were changed, and closed.">
399-
{NUMBER_OF_TABS_CHANGED, plural,
400-
=1 {<ph name="ONE_CHANGED">%2$d<ex>1</ex></ph> tab changed, <ph name="ANY_CLOSED">%3$d<ex>2</ex></ph> closed}
401-
other {<ph name="MANY_CHANGED">%2$d<ex>2</ex></ph> tabs changed, <ph name="ANY_CLOSED">%3$d<ex>2</ex></ph> closed}
400+
=1 {<ph name="ONE_ADDED">%1$d<ex>1</ex></ph> new tab, <ph name="ANY_CLOSED">%2$d<ex>2</ex></ph> closed}
401+
other {<ph name="MANY_ADDED">%1$d<ex>2</ex></ph> new tabs, <ph name="ANY_CLOSED">%2$d<ex>2</ex></ph> closed}
402402
}
403403
</message>
404404
<message name="IDS_TAB_GRID_DIALOG_COLLABORATION_ACTIVITY_TABS_CLOSED" desc="This text shows in a message card in the TabGridDialog if there are activity updates about the state of the tab group such as tabs being added, changed, or closed. This text describes that tabs were only closed.">
405405
{NUMBER_OF_TABS_CLOSED, plural,
406-
=1 {<ph name="ONE_CLOSED">%3$d<ex>1</ex></ph> tab closed}
407-
other {<ph name="MANY_CLOSED">%3$d<ex>2</ex></ph> tabs closed}
406+
=1 {<ph name="ONE_CLOSED">%2$d<ex>1</ex></ph> tab closed}
407+
other {<ph name="MANY_CLOSED">%2$d<ex>2</ex></ph> tabs closed}
408408
}
409409
</message>
410410

@@ -1048,6 +1048,14 @@ If you delete it, everyone will immediately lose access to the "<ph name="TITLE_
10481048
<message name="IDS_ADD_TAB_TO_GROUP" desc="Content description for an action which adds a tab to a group.">
10491049
Add to group
10501050
</message>
1051+
<message name="IDS_ADD_TO_BOOKMARKS" desc="Content description for an action which adds a tab to the bookmarks.">
1052+
Add to bookmarks
1053+
</message>
1054+
<message name="IDS_MOVE_TAB_TO_ANOTHER_WINDOW" desc="Content description for an action which moves a tab to another window.">
1055+
{WINDOW_COUNT, plural,
1056+
=1 {Move to new window}
1057+
other {Move to other window}}
1058+
</message>
10511059

10521060
<!-- Tab Group List Bottom Sheet -->
10531061
<message name="IDS_TAB_GROUP_LIST_BOTTOM_SHEET_TITLE" desc="Title text for a bottom sheet which is used to add a tab to a tab group.">
@@ -1056,6 +1064,9 @@ If you delete it, everyone will immediately lose access to the "<ph name="TITLE_
10561064
<message name="IDS_CREATE_NEW_GROUP_ROW_TITLE" desc="Description text for an option in a bottom sheet to create a new tab group.">
10571065
New tab group
10581066
</message>
1067+
<message name="IDS_TAB_GROUP_LIST_WITH_ADD_BUTTON_BOTTOM_SHEET_CONTENT_DESCRIPTION" desc="The content description for the bottom sheet containing a list of tab groups and the option to create a new tab group.">
1068+
Select tab group or create new tab group
1069+
</message>
10591070
<message name="IDS_TAB_GROUP_LIST_BOTTOM_SHEET_CONTENT_DESCRIPTION" desc="The content description for the bottom sheet containing a list of tab groups.">
10601071
Select tab group
10611072
</message>
@@ -1068,6 +1079,9 @@ If you delete it, everyone will immediately lose access to the "<ph name="TITLE_
10681079
<message name="IDS_TAB_GROUP_LIST_BOTTOM_SHEET_CLOSED" desc="The accessibility announcement made when the bottom sheet containing a list of tab groups is closed.">
10691080
Tab group list closed
10701081
</message>
1082+
<message name="IDS_TAB_GROUP_BOTTOM_SHEET_ROW_ACCESSIBILITY_TEXT" desc="Content description for accessibility to describe action of tapping on a tab group row on the bottom sheet.">
1083+
Add to <ph name="TITLE_OF_GROUP">%s<ex>shopping</ex></ph>
1084+
</message>
10711085
</messages>
10721086
</release>
10731087
</grit>

android/java/apk_for_test.flags

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154
*** mReadAloudControllerSupplier;
155155
*** mTopUiThemeColorProvider;
156156
*** mCurrentOrientation;
157+
*** mInitializedWithNative;
158+
*** mTabGroupUiOneshotSupplier;
157159
*** onOrientationChange(...);
158160
*** updateBookmarkButtonStatus(...);
159161
*** updateReloadState(...);
@@ -430,9 +432,12 @@
430432
public <init>(...);
431433
}
432434

433-
-keep class org.chromium.components.browser_ui.site_settings.ContentSettingsResources$ResourceItem {
434-
public <init>(...);
435-
}
435+
# Rules for inner class constructor match
436+
-keepattributes InnerClasses, EnclosingMethod
437+
-keep class org.chromium.components.browser_ui.site_settings.ContentSettingsResources**
438+
-keep class org.chromium.components.browser_ui.site_settings.BraveContentSettingsResources**
439+
-keepclassmembers class org.chromium.components.browser_ui.site_settings.BraveContentSettingsResources** { *; }
440+
-keepclassmembers class org.chromium.components.browser_ui.site_settings.ContentSettingsResources** { *; }
436441

437442
-keep class org.chromium.components.browser_ui.site_settings.WebsitePermissionsFetcher {
438443
*** getPermissionsType(...);
@@ -951,3 +956,5 @@
951956
-keep class org.chromium.chrome.browser.fullscreen.BraveFullscreenHtmlApiHandlerLegacy {
952957
public <init>(...);
953958
}
959+
960+
-keep class org.chromium.chrome.browser.suggestions.tile.TilesLinearLayout { *; }

android/java/org/chromium/chrome/browser/billing/sources.gni

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ brave_app_billing_deps =
1414

1515
brave_java_base_module_billing_deps = [
1616
"//brave/third_party/android_deps:com_android_billingclient_java",
17-
"//brave/third_party/android_deps:com_google_android_datatransport_transport_backend_cct_java",
18-
"//brave/third_party/android_deps:com_google_android_datatransport_transport_runtime_java",
17+
"//third_party/android_deps:google_android_datatransport_transport_backend_cct_java",
18+
"//third_party/android_deps:google_android_datatransport_transport_runtime_java",
1919
]

android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkManagerCoordinator.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
package org.chromium.chrome.browser.bookmarks;
77

8-
import android.content.ComponentName;
98
import android.content.Context;
109

1110
import androidx.annotation.NonNull;
1211
import androidx.annotation.Nullable;
1312

13+
import org.chromium.chrome.browser.price_tracking.PriceDropNotificationManager;
1414
import org.chromium.chrome.browser.profiles.Profile;
1515
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
1616
import org.chromium.ui.base.ActivityWindowAndroid;
@@ -26,15 +26,17 @@ public BraveBookmarkManagerCoordinator(
2626
@NonNull Profile profile,
2727
@NonNull BookmarkUiPrefs bookmarkUiPrefs,
2828
@NonNull BookmarkOpener bookmarkOpener,
29-
@Nullable ComponentName openBookmarkComponentName) {
29+
@Nullable BookmarkManagerOpener bookmarkManagerOpener,
30+
@NonNull PriceDropNotificationManager priceDropNotificationManager) {
3031
super(
3132
context,
3233
isDialogUi,
3334
snackbarManager,
3435
profile,
3536
bookmarkUiPrefs,
3637
bookmarkOpener,
37-
openBookmarkComponentName);
38+
bookmarkManagerOpener,
39+
priceDropNotificationManager);
3840
}
3941

4042
public void setWindow(ActivityWindowAndroid window) {

android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkManagerMediator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.chromium.base.task.PostTask;
2525
import org.chromium.base.task.TaskTraits;
2626
import org.chromium.chrome.R;
27+
import org.chromium.chrome.browser.price_tracking.PriceDropNotificationManager;
2728
import org.chromium.chrome.browser.profiles.Profile;
2829
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
2930
import org.chromium.components.bookmarks.BookmarkId;
@@ -77,7 +78,9 @@ class BraveBookmarkManagerMediator extends BookmarkManagerMediator
7778
SnackbarManager snackbarManager,
7879
BooleanSupplier canShowSigninPromo,
7980
Consumer<OnScrollListener> onScrollListenerConsumer,
80-
BookmarkMoveSnackbarManager bookmarkMoveSnackbarManager) {
81+
BookmarkMoveSnackbarManager bookmarkMoveSnackbarManager,
82+
BookmarkManagerOpener bookmarkManagerOpener,
83+
PriceDropNotificationManager priceDropNotificationManager) {
8184
super(
8285
activity,
8386
lifecycleOwner,
@@ -100,7 +103,9 @@ class BraveBookmarkManagerMediator extends BookmarkManagerMediator
100103
snackbarManager,
101104
canShowSigninPromo,
102105
onScrollListenerConsumer,
103-
bookmarkMoveSnackbarManager);
106+
bookmarkMoveSnackbarManager,
107+
bookmarkManagerOpener,
108+
priceDropNotificationManager);
104109
}
105110

106111
public void setWindow(ActivityWindowAndroid window) {

android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkToolbarCoordinator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class BraveBookmarkToolbarCoordinator extends BookmarkToolbarCoordinator {
3737
ModalDialogManager modalDialogManager,
3838
Runnable endSearchRunnable,
3939
BookmarkMoveSnackbarManager bookmarkMoveSnackbarManager,
40-
BooleanSupplier incognitoEnabledSupplier) {
40+
BooleanSupplier incognitoEnabledSupplier,
41+
BookmarkManagerOpener bookmarkManagerOpener) {
4142
super(
4243
context,
4344
profile,
@@ -53,7 +54,8 @@ class BraveBookmarkToolbarCoordinator extends BookmarkToolbarCoordinator {
5354
modalDialogManager,
5455
endSearchRunnable,
5556
bookmarkMoveSnackbarManager,
56-
incognitoEnabledSupplier);
57+
incognitoEnabledSupplier,
58+
bookmarkManagerOpener);
5759

5860
if (mToolbar instanceof BraveBookmarkToolbar) {
5961
((BraveBookmarkToolbar) mToolbar).setBraveBookmarkDelegate(bookmarkDelegateSupplier);

0 commit comments

Comments
 (0)