Skip to content

Commit

Permalink
Upgrade from Chromium 120 to Chromium 121 (1.62.x). (#21593)
Browse files Browse the repository at this point in the history
* Merge pull request #21134 from brave/cr121

Upgrade from Chromium 120 to Chromium 121.

* Remove the assert for patch_ffmpeg.py (#21184)

* Merge pull request #21539 from brave/ffmpeg-dynamic-alloc

Use dynamic allocation for ffmpeg fft tables on Windows.

* Merge pull request #21585 from brave/issues/35318

Remove dynamic allocation of ffmpeg ff_tx tables.

* Disables a flaky upstream browser test.

* Merge pull request #21584 from brave/fix_new_tab_button_plus_misaligned

Fixed new tab button's plus icon is mis-aligned with horizontal tab

* Merge pull request #21600 from brave/121.0.6167.75_master

Upgrade from Chromium 121.0.6167.57 to Chromium 121.0.6167.75.

* Merge pull request #21628 from brave/maxk-disable-reading-mode

Hides `Open in Reading Mode` context menu item.

* [Uplift 1.62.x] AI chat issues cr121 1.62.x (#21629)

* aichat: input is growable (#21124)

* aichat: scroll is interruptable (#21235)

* aichat: model maker text shouldnt look like a link (#21220)

* aichat: code formatting (#21342)

* make claude output formatted code (#21599)

---------

Co-authored-by: Mikhail <[email protected]>
Co-authored-by: Aleksey Khoroshilov <[email protected]>
Co-authored-by: Simon Hong <[email protected]>
Co-authored-by: taher <[email protected]>
  • Loading branch information
5 people authored Jan 20, 2024
1 parent 63aec0a commit 777a6f4
Show file tree
Hide file tree
Showing 670 changed files with 12,626 additions and 8,898 deletions.
5 changes: 0 additions & 5 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ hooks = [
'--source-dir', '.',
'--filter', '^[0-9]\{{1,\}}\.[0-9]\{{1,\}}\.[0-9]\{{1,\}}$'],
},
{
'name': 'patch_ffmpeg',
'pattern': '.',
'action': ['vpython3', 'script/patch_ffmpeg.py'],
},
]

include_rules = [
Expand Down
1 change: 1 addition & 0 deletions android/brave_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkPage.java",
"../../brave/android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkToolbar.java",
"../../brave/android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkToolbarCoordinator.java",
"../../brave/android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkUiPrefs.java",
"../../brave/android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkUtils.java",
"../../brave/android/java/org/chromium/chrome/browser/brave_leo/BraveLeoActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/brave_leo/BraveLeoSettingsLauncherHelper.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,23 @@
<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>

<!-- 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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import androidx.annotation.Nullable;

import org.chromium.chrome.browser.feed.sort_ui.FeedOptionsCoordinator;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.browser_ui.widget.displaystyle.UiConfig;
import org.chromium.ui.modelutil.PropertyModel;

Expand All @@ -27,7 +28,8 @@ public class BraveFeedSurfaceMediator extends FeedSurfaceMediator {
@FeedSurfaceCoordinator.StreamTabId int openingTabId,
FeedActionDelegate actionDelegate,
FeedOptionsCoordinator optionsCoordinator,
@Nullable UiConfig uiConfig) {
@Nullable UiConfig uiConfig,
Profile profile) {
super(
coordinator,
context,
Expand All @@ -36,7 +38,8 @@ public class BraveFeedSurfaceMediator extends FeedSurfaceMediator {
openingTabId,
actionDelegate,
optionsCoordinator,
uiConfig);
uiConfig,
profile);
}

@Override
Expand Down
46 changes: 23 additions & 23 deletions android/java/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:name="org.chromium.chrome.browser.rewards.tipping.RewardsTippingBannerActivity"
android:theme="@style/TippingBraveTranslucent"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"
tools:ignore="LockedOrientationActivity,DiscouragedApi"
android:exported="false" />

<activity
Expand All @@ -35,119 +35,119 @@
android:name="org.chromium.chrome.browser.onboarding.OnboardingActivity"
android:theme="@style/Theme.Chromium.Activity.Fullscreen"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>
<activity
android:name="org.chromium.chrome.browser.onboarding.SearchActivity"
android:theme="@style/Theme.Chromium.Activity.Fullscreen"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.firstrun.WelcomeOnboardingActivity"
android:theme="@style/Theme.Chromium.Activity.Fullscreen"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.BraveWalletActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AssetDetailActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AddAccountActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AccountDetailActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AccountPrivateKeyActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AccountDetailsWithQrActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.NetworkSelectorActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AccountSelectorActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AddAssetActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.AdvanceTxSettingActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.BraveWalletDAppsActivity"
android:theme="@style/BraveTranslucentMaterial"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.crypto_wallet.activities.NftDetailActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.vpn.split_tunnel.SplitTunnelActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.vpn.activities.BraveVpnPlansActivity"
android:theme="@style/Theme.Chromium.Activity"
android:noHistory="true"
android:launchMode="singleTask"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.vpn.activities.BraveVpnProfileActivity"
android:theme="@style/Theme.Chromium.Activity"
android:noHistory="true"
android:launchMode="singleTask"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.vpn.activities.BraveVpnParentActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.vpn.activities.BraveVpnSupportActivity"
android:theme="@style/Theme.Chromium.Activity"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity
android:name="org.chromium.chrome.browser.playlist.PlaylistHostActivity"
android:theme="@style/Theme.Chromium.Activity.Fullscreen"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<activity android:name="org.chromium.chrome.browser.settings.BraveSettingsActivity"
android:theme="@style/Theme.Chromium.Settings"
Expand Down Expand Up @@ -176,7 +176,7 @@
android:theme="@style/BraveProxyBillingActivityTheme"
android:exported="false"
android:screenOrientation="sensorPortrait"
tools:ignore="LockedOrientationActivity"/>
tools:ignore="LockedOrientationActivity,DiscouragedApi"/>

<!-- Upgrade related -->
<receiver android:name="org.chromium.chrome.browser.upgrade.BravePackageReplacedBroadcastReceiver"
Expand Down
19 changes: 10 additions & 9 deletions android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
*** mOverlayPanelVisibilitySupplier;
*** mTabModelSelector;
*** mIncognitoStateProvider;
*** mTabCountProvider;
*** mTabGroupUi;
*** mBottomSheetController;
*** mActivityLifecycleDispatcher;
Expand Down Expand Up @@ -203,11 +202,13 @@
-keep class org.chromium.chrome.browser.bookmarks.BraveBookmarkUtils {
*** addOrEditBookmark(...);
*** showBookmarkManagerOnPhone(...);
*** isSpecialFolder(...);
}

-keep class org.chromium.chrome.browser.bookmarks.BookmarkUtils {
*** addOrEditBookmark(...);
*** showBookmarkManagerOnPhone(...);
*** isSpecialFolder(...);
}

-keep class org.chromium.chrome.browser.bookmarks.BookmarkToolbar {
Expand Down Expand Up @@ -476,14 +477,6 @@
*** getResourceItem(...);
}

-keep class org.chromium.components.browser_ui.site_settings.FourStateCookieSettingsPreference {
public <init>(...);
}

-keep class org.chromium.components.browser_ui.site_settings.BraveFourStateCookieSettingsPreferenceBase {
public <init>(...);
}

-keep class org.chromium.components.browser_ui.site_settings.SiteSettings {
public <init>(...);
}
Expand Down Expand Up @@ -820,3 +813,11 @@
-keep class org.chromium.chrome.browser.identity_disc.BraveIdentityDiscController {
public <init>(...);
}

-keep class org.chromium.chrome.browser.bookmarks.BookmarkUiPrefs {
<init>(...);
}

-keep class org.chromium.chrome.browser.bookmarks.BraveBookmarkUiPrefs {
<init>(...);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;

import org.chromium.base.supplier.OneshotSupplier;
import org.chromium.brave_rewards.mojom.WalletStatus;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.init.ActivityProfileProvider;
import org.chromium.chrome.browser.init.AsyncInitializationActivity;
import org.chromium.chrome.browser.profiles.ProfileProvider;

public class BraveRewardsUserWalletActivity
extends AsyncInitializationActivity implements View.OnClickListener {
Expand Down Expand Up @@ -139,4 +142,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
return super.onOptionsItemSelected(item);
}

@Override
protected OneshotSupplier<ProfileProvider> createProfileProvider() {
return new ActivityProfileProvider(getLifecycleDispatcher());
}
}
23 changes: 13 additions & 10 deletions android/java/org/chromium/chrome/browser/app/BraveActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
import org.chromium.chrome.browser.site_settings.BraveWalletEthereumConnectedSites;
import org.chromium.chrome.browser.speedreader.BraveSpeedReaderUtils;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabImpl;
import org.chromium.chrome.browser.tab.TabLaunchType;
import org.chromium.chrome.browser.tab.TabSelectionType;
import org.chromium.chrome.browser.tabmodel.TabModel;
Expand Down Expand Up @@ -351,7 +350,7 @@ public void onPauseWithNative() {

@Override
public boolean onMenuOrKeyboardAction(int id, boolean fromMenu) {
final TabImpl currentTab = (TabImpl) getActivityTab();
final Tab currentTab = getActivityTab();
// Handle items replaced by Brave.
if (id == R.id.info_menu_id && currentTab != null) {
ShareDelegate shareDelegate = (ShareDelegate) getShareDelegateSupplier().get();
Expand Down Expand Up @@ -396,7 +395,8 @@ public boolean onMenuOrKeyboardAction(int id, boolean fromMenu) {
BraveVpnUtils.openBraveVpnProfileActivity(BraveActivity.this);
}
} else {
BraveVpnUtils.showProgressDialog(BraveActivity.this,
BraveVpnUtils.showProgressDialog(
BraveActivity.this,
getResources().getString(R.string.vpn_connect_text));
if (BraveVpnPrefUtils.isSubscriptionPurchase()) {
verifySubscription();
Expand Down Expand Up @@ -1114,7 +1114,7 @@ public void finishNativeInitialization() {
.readBoolean(BravePreferenceKeys.BRAVE_AD_FREE_CALLOUT_DIALOG, true)
&& getActivityTab() != null
&& getActivityTab().getUrl().getSpec() != null
&& UrlUtilities.isNTPUrl(getActivityTab().getUrl().getSpec())
&& UrlUtilities.isNtpUrl(getActivityTab().getUrl().getSpec())
&& (ChromeSharedPreferences.getInstance()
.readBoolean(BravePreferenceKeys.BRAVE_OPENED_YOUTUBE, false)
|| ChromeSharedPreferences.getInstance()
Expand All @@ -1136,8 +1136,9 @@ && getActivityTab().getUrl().getSpec() != null
handleDeepLinkVpn();
} else if (!mIsDeepLink
&& OnboardingPrefManager.getInstance().isOnboardingSearchBoxTooltip()
&& getActivityTab() != null && getActivityTab().getUrl().getSpec() != null
&& UrlUtilities.isNTPUrl(getActivityTab().getUrl().getSpec())) {
&& getActivityTab() != null
&& getActivityTab().getUrl().getSpec() != null
&& UrlUtilities.isNtpUrl(getActivityTab().getUrl().getSpec())) {
showSearchBoxTooltip();
}

Expand Down Expand Up @@ -1455,8 +1456,9 @@ private void checkForNotificationData() {
checkForBraveStats();
break;
case RetentionNotificationUtil.DAY_6:
if (getActivityTab() != null && getActivityTab().getUrl().getSpec() != null
&& !UrlUtilities.isNTPUrl(getActivityTab().getUrl().getSpec())) {
if (getActivityTab() != null
&& getActivityTab().getUrl().getSpec() != null
&& !UrlUtilities.isNtpUrl(getActivityTab().getUrl().getSpec())) {
getTabCreator(false).launchUrl(
UrlConstants.NTP_URL, TabLaunchType.FROM_CHROME_UI);
}
Expand Down Expand Up @@ -1489,8 +1491,9 @@ public void checkForBraveStats() {
if (OnboardingPrefManager.getInstance().isBraveStatsEnabled()) {
BraveStatsUtil.showBraveStats();
} else {
if (getActivityTab() != null && getActivityTab().getUrl().getSpec() != null
&& !UrlUtilities.isNTPUrl(getActivityTab().getUrl().getSpec())) {
if (getActivityTab() != null
&& getActivityTab().getUrl().getSpec() != null
&& !UrlUtilities.isNtpUrl(getActivityTab().getUrl().getSpec())) {
OnboardingPrefManager.getInstance().setFromNotification(true);
if (getTabCreator(false) != null) {
getTabCreator(false).launchUrl(
Expand Down
Loading

0 comments on commit 777a6f4

Please sign in to comment.