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 116 to Chromium 117 #19398

Merged
merged 158 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
196f0ca
Update from Chromium 116.0.5845.163 to Chromium 117.0.5938.35.
cdesouza-chromium Jul 22, 2023
614fad3
Conflict-resolved patches from Chromium 116.0.5845.163 to Chromium 11…
cdesouza-chromium Jun 9, 2023
a3d1b4e
Update patches from Chromium 116.0.5845.163 to Chromium 117.0.5938.35.
cdesouza-chromium Aug 11, 2023
6d81ac6
Updated strings for Chromium 117.0.5938.35.
cdesouza-chromium Aug 11, 2023
3f05f25
kFedCmIframeSupport/kFedCmUserInfo deleted upstream
cdesouza-chromium Jun 29, 2023
739b5e5
`chrome/browser/ui` using ARC
cdesouza-chromium Jun 29, 2023
dadb188
Migrate to use `ColorProviderKey`
cdesouza-chromium Jun 29, 2023
5d603a8
Correct accessors uses for `OmniboxEditModel`
cdesouza-chromium Jun 29, 2023
efda8c3
Remove TabStrip::GetTabBackgroundColor
cdesouza-chromium Jun 29, 2023
f083745
Use `TabStyleViews::CalculateTargetColors`
cdesouza-chromium Jun 29, 2023
3919655
Pre-empting std replacements on bitcoin-core
cdesouza-chromium Jun 29, 2023
b1faeb1
Padding arg added to `AddDecoration`
cdesouza-chromium Jun 29, 2023
f74f8ef
`EventListenerMap::Add` taking `**` listener pointers
cdesouza-chromium Jun 29, 2023
d148f4e
Moving `BraveOmniboxResultView` instantiation
cdesouza-chromium Jul 3, 2023
5664b43
`GetSettingsForOneType` returning results
cdesouza-chromium Jul 4, 2023
80f1037
IWYU fixes for `notification_service.h`
cdesouza-chromium Jul 4, 2023
6a19b47
`CloseWebContentsAt` returns void
cdesouza-chromium Jul 4, 2023
2f616c4
UsbChooserController constructor updated
cdesouza-chromium Jul 4, 2023
1975f7f
Upstream 10Glass references removed
cdesouza-chromium Jul 4, 2023
3685445
`kSharedHighlightingAmp` deleted upstream
cdesouza-chromium Jul 4, 2023
10cc4bf
Overriding `OmniboxPopupViewViews::GetTargetBounds`
cdesouza-chromium Jul 4, 2023
495fd85
Specific permisison prompts removed
cdesouza-chromium Jul 4, 2023
f5f75db
Initialising `SyncSessionDurationsMetricsRecorder` members
cdesouza-chromium Jul 4, 2023
1e2be47
[rust] Fix usused return errors for Speedreader
cdesouza-chromium Jul 4, 2023
ae860fd
Remove redundant `NavigationManagerImpl` delegate setting
cdesouza-chromium Jul 4, 2023
2e0aaf4
`license.py` expects list of license paths
cdesouza-chromium Jul 4, 2023
1040dff
[ios] Removing unused `chromium_find_in_page` provider
cdesouza-chromium Jul 5, 2023
f6c679e
Incrementing resource_id values
cdesouza-chromium Jul 5, 2023
2e49817
kPageInfoCookiesSubpage flag removed
cdesouza-chromium Jul 7, 2023
d7678a3
Fixing -Wformat conversion failures
cdesouza-chromium Jul 7, 2023
dd5f4f1
Adjust `RecentTabsSubMenuModel` override call
cdesouza-chromium Jul 9, 2023
040c5c7
`PerFrameTranslateAgent` override not needed anymore
cdesouza-chromium Jul 9, 2023
8dbb093
Fix `kAutofillWalletImportEnabled`-related overrides
cdesouza-chromium Jul 10, 2023
8889187
Common pref names now constexpr
cdesouza-chromium Jul 10, 2023
4c440ea
Fix `remote_cocao` overrides to ARC changes
cdesouza-chromium Jul 10, 2023
dda480a
Accomodating `TabSearchButton` changes
sangwoo108 Jul 13, 2023
7c0a7ec
ARC enabled for //chrome/browser overrides
cdesouza-chromium Jul 14, 2023
89064c5
`AutocompleteController` overrides broken by `CalculatorProvider`
cdesouza-chromium Jul 14, 2023
c780b59
Top 500 domains changed to top bucket
cdesouza-chromium Jul 14, 2023
4c60807
`base::mac::IsAtMostOS10_13` removed upstream
cdesouza-chromium Jul 14, 2023
15886cd
Using `ColorProviderKey` in `ColorProviderSource`
cdesouza-chromium Jul 14, 2023
507263c
Providing `kFamilyGroupSiteURL` url
cdesouza-chromium Jul 14, 2023
87020bd
Fix trace method `BatteryManager` dummy
cdesouza-chromium Jul 14, 2023
9c722a1
Correct `DidFinishLoading` signature.
cdesouza-chromium Jul 14, 2023
d8e1395
Fix rust relative path for third party libraries
cdesouza-chromium Jul 18, 2023
f481d50
Bridge `ChromeRefresh2023TabGroupStyle` static through.
cdesouza-chromium Jul 19, 2023
199532f
Romove unused `top500_domains` dependency
cdesouza-chromium Jul 19, 2023
6d9e638
`BasicStringPiece` a typedef to `string_view`
cdesouza-chromium Jul 19, 2023
b721849
Remove disallowed includes on iOS
cdesouza-chromium Jul 19, 2023
eb0580e
[Android] Rename baseline neutral colors
samartnik Jul 19, 2023
6a19d85
[Android] Reduce usage of getLastUsedRegularProfile in FirstRun
samartnik Jul 19, 2023
97d8e84
[Android] Minor code adjustments to the C117 upstream changes
samartnik Jul 19, 2023
8a89c61
[Android] Delete JNI Generator annotation processor
samartnik Jul 19, 2023
b11ac45
`ExtensionWebRequestEventRouter` moved to its own file
cdesouza-chromium Jul 20, 2023
97b6d04
Update `GetCookieSettingInternal` overrides
cdesouza-chromium Jul 21, 2023
ff0d0a8
`SetButtonPadding` removed from close button to CR2023
cdesouza-chromium Jul 22, 2023
c4b9b38
[Android] Added missing dependency for tab_ui
samartnik Jul 25, 2023
68fa95b
[Android] Add location string to ResourceRequest
samartnik Jul 25, 2023
b56fd68
[Android] Sync settings adjustments
samartnik Jul 25, 2023
dedafca
[Android] Fix for conflicting string error
samartnik Jul 26, 2023
37dc46e
Running `gnrt` on rust crates to generate sources
cdesouza-chromium Jul 21, 2023
16cd0bc
Extra argument added to `IsCookieAccessible`
cdesouza-chromium Jul 21, 2023
0be9828
Dead `kSamePartyAttributeEnabled` removed upstream
cdesouza-chromium Jul 21, 2023
4fa0010
Add missing `GetViewBoundsInScreen` for wallet permission
cdesouza-chromium Jul 22, 2023
43fb5f1
`CopySwitchesFrom` simplified to take a span
cdesouza-chromium Jul 22, 2023
3cd2064
`IsFledgeAllowed` taking an interest group argument
cdesouza-chromium Jul 23, 2023
cd7f47d
`kAutofillWalletImportEnabled` renamed to kSyncPayments
cdesouza-chromium Jul 23, 2023
6e3e5df
Partition removed from `WebAuthFlow`s ctor
cdesouza-chromium Jul 23, 2023
59f4343
Add installer argument to `OnFinishCrxInstall`
cdesouza-chromium Jul 23, 2023
1e6cc9c
Fix `ShortcutsProvider` override anchor
cdesouza-chromium Jul 23, 2023
473b540
Remove several unused cookie args for url request
cdesouza-chromium Jul 23, 2023
a9255fa
`ConstCastIterator` deleted upstream
cdesouza-chromium Jul 23, 2023
e3ffbc3
Use `raw_ref` for reference member data
cdesouza-chromium Jul 24, 2023
708e794
IWYU fixes
cdesouza-chromium Jul 26, 2023
10b111e
RFH `storage_key()` renamed to `GetStorageKey`
cdesouza-chromium Jul 26, 2023
fe0721c
Bookmark UUID constants moved in their own header
cdesouza-chromium Jul 26, 2023
95c4ecf
Corrrect to `vector<raw_ptr<T>>` upstream use
cdesouza-chromium Jul 28, 2023
145681c
[Android] Remove tab groups auto creation
samartnik Jul 28, 2023
437e799
[Android] Fixes for unit tests
samartnik Jul 28, 2023
77cdc3a
Fix duplicate test names
cdesouza-chromium Jul 31, 2023
9f51d66
Fix transient inclusion vr build flags
cdesouza-chromium Jul 31, 2023
0105a3b
`kWebEnvironmentIntegrity` moved into blink
cdesouza-chromium Aug 1, 2023
90d5352
Straggler format changes for skus
cdesouza-chromium Aug 1, 2023
8c6e9af
Test adjustment for a new sync type AUTOFILL_WALLET_CREDENTIAL
samartnik Aug 3, 2023
4d7af65
[Android] New dialogs for empty states
samartnik Aug 4, 2023
8e82379
Move `GetCookieSettingInternal` override to the base class
cdesouza-chromium Jul 27, 2023
a873b71
Move `CookieSettings` override to base class
cdesouza-chromium Jul 31, 2023
0358194
`GetTargetTabBackgroundColor` added a hover argument
cdesouza-chromium Jul 31, 2023
1ccafdf
`HeapObject` functions turned into free functions
cdesouza-chromium Jul 31, 2023
38ae1aa
[ios] Fix `AddPendingItem` call during navigation
cdesouza-chromium Jul 31, 2023
3db8fa0
`QRCodeGenerator` moved into its own namespace
cdesouza-chromium Jul 31, 2023
59a051b
Content Settings histogram values moved
cdesouza-chromium Aug 1, 2023
bdaa082
Remove redundant ARC configs
cdesouza-chromium Aug 1, 2023
5efd7d6
[ios] Add MiniMap provider
cdesouza-chromium Aug 1, 2023
4f8003b
`kHttpsFirstModeV2` deleted and made default
cdesouza-chromium Aug 4, 2023
ef325fe
Add `kDownloadBlockedLearnMoreURL` definition
cdesouza-chromium Aug 4, 2023
e8c5851
[v8] Object methods now static
cdesouza-chromium Aug 4, 2023
4d7e79a
Revert "Corrrect to `vector<raw_ptr<T>>` upstream use"
cdesouza-chromium Aug 5, 2023
506dc6b
Fixing `SidePanel` substitutions in `SidePanelCoordinator`
cdesouza-chromium Aug 4, 2023
d4b1d50
Add PDF details to `InstallConstants` instances
cdesouza-chromium Aug 7, 2023
8f48dbd
[Android] Explicitly added action for Brave intents
samartnik Aug 7, 2023
aa89809
//third_party/checkstyle 8.15 -> 10.12.1
mkarolin Aug 7, 2023
b08e107
Fixes presubmit license headers warnings.
mkarolin Aug 7, 2023
4993144
Turns on upstream blink::features::kUACHOverrideBlank flag.
mkarolin Aug 7, 2023
a0ad3c0
[Android] [Empty States] Add tablet illustration to recent tab
samartnik Aug 7, 2023
6c91eac
Fix access to `AutofillClient` instance
cdesouza-chromium Aug 10, 2023
7ee16e9
Reachoring `TabSearchButton` overrides
cdesouza-chromium Aug 4, 2023
fa52dc7
QUIC agent farbling override not needed
cdesouza-chromium Aug 7, 2023
5230037
`IDC_RUN_SCREEN_AI_VISUAL_ANNOTATIONS` renamed
cdesouza-chromium Aug 9, 2023
ed5d042
Adjusting `Profile` passing around HTTP first mode classes
cdesouza-chromium Aug 9, 2023
425ced4
Suppress C-type warnings on skus callbacks
cdesouza-chromium Aug 10, 2023
fa633f8
Fix `HistoryAddPageArgs` missing argument
cdesouza-chromium Aug 10, 2023
4a5a152
[ios] Add chrome material branding provider
cdesouza-chromium Aug 10, 2023
ff3cd85
Removed no longer valid expectations from BlobUrlBrowserTest.ReplaceS…
mkarolin Aug 10, 2023
6937578
[Android] Presumit: remove unused imports.
mkarolin Aug 10, 2023
b1239a0
[Android] Presubmit: fixes if/for without {}.
mkarolin Aug 10, 2023
1007ebb
[Android] Presubmit: fixes naming conventions warnings.
mkarolin Aug 11, 2023
c700405
MenuItemView::HasIcons was removed.
mkarolin Aug 11, 2023
7c77d1a
Cleanup resource_ids.spec.
mkarolin Aug 11, 2023
45bcb78
[Android] Suggest components moved to appropriate packages.
mkarolin Aug 12, 2023
1af18b4
[Android] integerListToIntArray -> integerCollectionToIntArray.
mkarolin Aug 12, 2023
5b7f9d8
[Android] NewTabPageLayout.initialize signature changed.
mkarolin Aug 12, 2023
fe3b0de
Disables crashing upstream unit tests.
mkarolin Aug 15, 2023
32eec11
Disables failing upstream unit tests.
mkarolin Aug 15, 2023
cc6c2ad
Temp fix for missing `outlined_atomics.rs` file
samartnik Aug 15, 2023
2ca6d6d
content_settings_supervised_provider moved to //components
mkarolin Aug 15, 2023
8b14c8d
Update compile_db.py patch.
goodov Aug 16, 2023
4001e77
Deactivate dangling pointer checks
cdesouza-chromium Aug 16, 2023
cc9483b
[Android] Update com_google_android_play_core lib
samartnik Aug 18, 2023
3a2f049
Fixes upstream UnusedSitePermissionsServiceTest unit tests.
mkarolin Aug 20, 2023
b811438
Fixes BraveThemeServiceTest.DarkModeChangeByRegTest browser test.
mkarolin Aug 22, 2023
ff53434
Disables crashing/failing upstream browser tests.
mkarolin Aug 22, 2023
29fc07e
disable autocfg probe and move config options to gn for num_bigint
bridiver Aug 22, 2023
229de3f
[Android] Updates for omnibox icons
samartnik Aug 23, 2023
17ed83d
Fix crash from vertical tab strip
sangwoo108 Aug 24, 2023
9f12319
Workaround for failing TestBrowserUi-derived tests on CI.
mkarolin Aug 25, 2023
5dd9409
Disables 3 CommanderServiceBrowserTest tests that are flaky on Mac CI.
mkarolin Aug 25, 2023
4aa6a51
Enable/disable Chromium features flagged by security/privacy teams.
mkarolin Aug 26, 2023
4801569
Removes override for SystemNetworkContextManager::IsCertificateTransp…
mkarolin Aug 26, 2023
cd1a74e
Removes no longer needed string override.
mkarolin Aug 27, 2023
261854b
Increase feature overrides reserve.
mkarolin Aug 27, 2023
4b75bc8
Hide items in Page Info -> Cookies view.
mkarolin Aug 27, 2023
6c07171
Fix PageGraph attach on frame creation.
goodov Aug 28, 2023
cf6b582
Reanchoring `RecentTabsSubMenuModel` overrides
cdesouza-chromium Aug 28, 2023
cee0527
Settings -> Extensions web store sub-lable text changed.
mkarolin Aug 28, 2023
b091864
Applies brave styling to Password Manager and hides `check` page.
mkarolin Aug 28, 2023
7175f8a
Applies Brave styling to Extensions page.
mkarolin Aug 29, 2023
d1791d4
Fixes gap between tabs and toolbar.
mkarolin Aug 29, 2023
fae17a7
showHttpsOnlyModeSetting_ went away as that mode is now the default
emerick Aug 29, 2023
2828937
Removes unnecessary polymer_overriding.js include.
mkarolin Aug 30, 2023
904ded6
TabSearchButton::GetCornerRadius is now const.
mkarolin Aug 30, 2023
fb3303c
webui::GetWebUiCssTextDefaultsMd() was removed.
mkarolin Aug 30, 2023
c29aeaf
Fixes upstream SafetyHubHandlerTest.RevokeAllContentSettingTypes test.
mkarolin Aug 30, 2023
9262ff4
Simplify PageGraph attach on frame creation patch.
goodov Sep 1, 2023
f89bc75
[macOS] Adjust notarization agruments.
mkarolin Sep 1, 2023
387e9af
Fix crash on iOS due to navigation proxy returning nullptr.
Brandon-T Sep 5, 2023
c0c0dd1
Fixes gn_check error.
mkarolin Sep 6, 2023
6383fbb
Updated BraveAppMenuModelBrowserTest.MenuItemsHaveIcons test.
mkarolin Sep 6, 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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
node_modules/
patches/**/*.patchinfo
/third_party/android_deps/libs/com_google_android_play_core/core-1.10.0.aar
/third_party/android_deps/libs/com_google_android_play_core/core-1.10.3.aar
/third_party/argon2/src
/third_party/brave-vpn-wireguard-nt-dlls/
/third_party/brave-vpn-wireguard-tunnel-dlls/
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core',
'version': 'version:[email protected].0.cr1',
'version': 'version:[email protected].3.cr1',
},
],
'condition': 'checkout_android',
Expand Down
13 changes: 13 additions & 0 deletions android/brave_java_resources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ brave_java_resources = [
"java/res/drawable-night-xhdpi/ic_cookie_background.png",
"java/res/drawable-night-xxhdpi/ic_cookie_background.png",
"java/res/drawable-night-xxxhdpi/ic_cookie_background.png",
"java/res/drawable-night/bookmark_empty_state_illustration.xml",
"java/res/drawable-night/history_empty_state_illustration.xml",
"java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml",
"java/res/drawable-night/reading_list_empty_state_illustration.xml",
"java/res/drawable-night/tablet_recent_tab_empty_state_illustration.xml",
"java/res/drawable-night/tipping_background_success.xml",
"java/res/drawable-nodpi/dylan_malval_sea_min.webp",
"java/res/drawable-nodpi/eth.png",
Expand Down Expand Up @@ -1023,6 +1028,14 @@ brave_java_resources = [
brave_base_module_resources =
[ "java/res_chromium_base/drawable-night/themed_app_icon.xml" ]

brave_download_internal_java_resources =
[ "java/res/drawable-night/downloads_empty_state_illustration.xml" ]

brave_android_features_java_resources = [
"java/res/drawable-night/phone_tab_switcher_empty_state_illustration.xml",
"java/res/drawable-night/tablet_tab_switcher_empty_state_illustration.xml",
]

# XML preprocessing
brave_java_preprocess_xml_sources =
[ "//chrome/android/java/res/menu/main_menu.xml" ]
Expand Down
1 change: 1 addition & 0 deletions android/features/tab_ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ android_library("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/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/tabmodel:java",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 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/.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M48,0L48,0A48,48 0,0 1,96 48L96,48A48,48 0,0 1,48 96L48,96A48,48 0,0 1,0 48L0,48A48,48 0,0 1,48 0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="47.63"
android:startY="-15.63"
android:endX="48.613"
android:endY="152.939"
android:type="linear">
<item android:offset="0" android:color="#002A2ADE"/>
<item android:offset="1" android:color="#3F2A2ADE"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M38.24,33.2L64.24,33.2A2.8,2.8 0,0 1,67.04 36L67.04,70A2.8,2.8 0,0 1,64.24 72.8L38.24,72.8A2.8,2.8 0,0 1,35.44 70L35.44,36A2.8,2.8 0,0 1,38.24 33.2z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#7C91FF"/>
<path
android:pathData="M31.76,23.84L57.76,23.84A2.8,2.8 0,0 1,60.56 26.64L60.56,62.64A2.8,2.8 0,0 1,57.76 65.44L31.76,65.44A2.8,2.8 0,0 1,28.96 62.64L28.96,26.64A2.8,2.8 0,0 1,31.76 23.84z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#7C91FF"/>
<path
android:pathData="M38.08,32.971C36.666,32.971 35.52,34.117 35.52,35.531V38.091H66.88V35.531C66.88,34.117 65.734,32.971 64.32,32.971H38.08Z"
android:fillColor="#7C91FF"
android:fillType="evenOdd"/>
<path
android:pathData="M29.12,26.56C29.12,25.146 30.266,24 31.68,24H57.92C59.334,24 60.48,25.146 60.48,26.56V29.12H29.12V26.56ZM32.96,25.28H31.68C31.51,25.28 31.347,25.347 31.228,25.468C31.107,25.587 31.04,25.75 31.04,25.92V27.2C31.04,27.37 31.107,27.533 31.228,27.653C31.347,27.773 31.51,27.84 31.68,27.84H32.96C33.13,27.84 33.293,27.773 33.412,27.653C33.533,27.533 33.6,27.37 33.6,27.2V25.92C33.6,25.75 33.533,25.587 33.412,25.468C33.293,25.347 33.13,25.28 32.96,25.28Z"
android:fillColor="#7C91FF"
android:fillType="evenOdd"/>
</vector>

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 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/.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M48,0L48,0A48,48 0,0 1,96 48L96,48A48,48 0,0 1,48 96L48,96A48,48 0,0 1,0 48L0,48A48,48 0,0 1,48 0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="47.63"
android:startY="-15.63"
android:endX="48.613"
android:endY="152.939"
android:type="linear">
<item android:offset="0" android:color="#002A2ADE"/>
<item android:offset="1" android:color="#3F2A2ADE"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M26.264,26.233L56.264,26.233A2.8,2.8 0,0 1,59.064 29.033L59.064,50.033A2.8,2.8 0,0 1,56.264 52.833L26.264,52.833A2.8,2.8 0,0 1,23.464 50.033L23.464,29.033A2.8,2.8 0,0 1,26.264 26.233z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#7C91FF"/>
<path
android:pathData="M32.879,34.728L62.879,34.728A2.8,2.8 0,0 1,65.679 37.528L65.679,58.528A2.8,2.8 0,0 1,62.879 61.328L32.879,61.328A2.8,2.8 0,0 1,30.079 58.528L30.079,37.528A2.8,2.8 0,0 1,32.879 34.728z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#7C91FF"/>
<path
android:pathData="M39.736,43.431L69.736,43.431A2.8,2.8 0,0 1,72.536 46.231L72.536,67.231A2.8,2.8 0,0 1,69.736 70.031L39.736,70.031A2.8,2.8 0,0 1,36.936 67.231L36.936,46.231A2.8,2.8 0,0 1,39.736 43.431z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#7C91FF"/>
<path
android:pathData="M39.297,43.648C38.131,43.648 37.187,44.593 37.187,45.758V47.868H72V45.758C72,44.593 71.056,43.648 69.89,43.648H39.297Z"
android:fillColor="#7C91FF"
android:fillType="evenOdd"/>
<path
android:pathData="M26.11,26.769C24.944,26.769 24,27.713 24,28.879V30.989H58.813V28.879C58.813,27.713 57.869,26.769 56.703,26.769H26.11Z"
android:fillColor="#7C91FF"
android:fillType="evenOdd"/>
<path
android:pathData="M30.593,37.319C30.593,36.153 31.538,35.209 32.703,35.209H63.297C64.462,35.209 65.407,36.153 65.407,37.319V39.429H30.593V37.319ZM33.758,35.91H32.703C32.563,35.91 32.429,35.965 32.33,36.064C32.231,36.163 32.176,36.297 32.176,36.437V37.492C32.176,37.632 32.231,37.766 32.33,37.865C32.429,37.964 32.563,38.019 32.703,38.019H33.758C33.898,38.019 34.033,37.964 34.131,37.865C34.23,37.766 34.286,37.632 34.286,37.492V36.437C34.286,36.297 34.23,36.163 34.131,36.064C34.033,35.965 33.898,35.91 33.758,35.91Z"
android:fillColor="#7C91FF"
android:fillType="evenOdd"/>
</vector>

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 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/.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M48,0L48,0A48,48 0,0 1,96 48L96,48A48,48 0,0 1,48 96L48,96A48,48 0,0 1,0 48L0,48A48,48 0,0 1,48 0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="47.63"
android:startY="-15.63"
android:endX="48.613"
android:endY="152.939"
android:type="linear">
<item android:offset="0" android:color="#002A2ADE"/>
<item android:offset="1" android:color="#3F2A2ADE"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M38.24,33.2L64.24,33.2A2.8,2.8 0,0 1,67.04 36L67.04,70A2.8,2.8 0,0 1,64.24 72.8L38.24,72.8A2.8,2.8 0,0 1,35.44 70L35.44,36A2.8,2.8 0,0 1,38.24 33.2z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#545FF8"/>
<path
android:pathData="M31.76,23.84L57.76,23.84A2.8,2.8 0,0 1,60.56 26.64L60.56,62.64A2.8,2.8 0,0 1,57.76 65.44L31.76,65.44A2.8,2.8 0,0 1,28.96 62.64L28.96,26.64A2.8,2.8 0,0 1,31.76 23.84z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#545FF8"/>
<path
android:pathData="M38.08,32.971C36.666,32.971 35.52,34.117 35.52,35.531V38.091H66.88V35.531C66.88,34.117 65.734,32.971 64.32,32.971H38.08Z"
android:fillColor="#545FF8"
android:fillType="evenOdd"/>
<path
android:pathData="M29.12,26.56C29.12,25.146 30.266,24 31.68,24H57.92C59.334,24 60.48,25.146 60.48,26.56V29.12H29.12V26.56ZM32.96,25.28H31.68C31.51,25.28 31.347,25.347 31.228,25.468C31.107,25.587 31.04,25.75 31.04,25.92V27.2C31.04,27.37 31.107,27.533 31.228,27.653C31.347,27.773 31.51,27.84 31.68,27.84H32.96C33.13,27.84 33.293,27.773 33.412,27.653C33.533,27.533 33.6,27.37 33.6,27.2V25.92C33.6,25.75 33.533,25.587 33.412,25.468C33.293,25.347 33.13,25.28 32.96,25.28Z"
android:fillColor="#545FF8"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 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/.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M48,0L48,0A48,48 0,0 1,96 48L96,48A48,48 0,0 1,48 96L48,96A48,48 0,0 1,0 48L0,48A48,48 0,0 1,48 0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="47.63"
android:startY="-15.63"
android:endX="48.613"
android:endY="152.939"
android:type="linear">
<item android:offset="0" android:color="#002A2ADE"/>
<item android:offset="1" android:color="#3F2A2ADE"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M26.264,26.233L56.264,26.233A2.8,2.8 0,0 1,59.064 29.033L59.064,50.033A2.8,2.8 0,0 1,56.264 52.833L26.264,52.833A2.8,2.8 0,0 1,23.464 50.033L23.464,29.033A2.8,2.8 0,0 1,26.264 26.233z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#545FF8"/>
<path
android:pathData="M32.879,34.728L62.879,34.728A2.8,2.8 0,0 1,65.679 37.528L65.679,58.528A2.8,2.8 0,0 1,62.879 61.328L32.879,61.328A2.8,2.8 0,0 1,30.079 58.528L30.079,37.528A2.8,2.8 0,0 1,32.879 34.728z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#545FF8"/>
<path
android:pathData="M39.736,43.431L69.736,43.431A2.8,2.8 0,0 1,72.536 46.231L72.536,67.231A2.8,2.8 0,0 1,69.736 70.031L39.736,70.031A2.8,2.8 0,0 1,36.936 67.231L36.936,46.231A2.8,2.8 0,0 1,39.736 43.431z"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#545FF8"/>
<path
android:pathData="M39.297,43.648C38.131,43.648 37.187,44.593 37.187,45.758V47.868H72V45.758C72,44.593 71.056,43.648 69.89,43.648H39.297Z"
android:fillColor="#545FF8"
android:fillType="evenOdd"/>
<path
android:pathData="M26.11,26.769C24.944,26.769 24,27.713 24,28.879V30.989H58.813V28.879C58.813,27.713 57.869,26.769 56.703,26.769H26.11Z"
android:fillColor="#545FF8"
android:fillType="evenOdd"/>
<path
android:pathData="M30.593,37.319C30.593,36.153 31.538,35.209 32.703,35.209H63.297C64.462,35.209 65.407,36.153 65.407,37.319V39.429H30.593V37.319ZM33.758,35.91H32.703C32.563,35.91 32.429,35.965 32.33,36.064C32.231,36.163 32.176,36.297 32.176,36.437V37.492C32.176,37.632 32.231,37.766 32.33,37.865C32.429,37.964 32.563,38.019 32.703,38.019H33.758C33.898,38.019 34.033,37.964 34.131,37.865C34.23,37.766 34.286,37.632 34.286,37.492V36.437C34.286,36.297 34.23,36.163 34.131,36.064C34.033,35.965 33.898,35.91 33.758,35.91Z"
android:fillColor="#545FF8"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.chromium.base.supplier.ObservableSupplier;
import org.chromium.base.supplier.OneshotSupplier;
import org.chromium.base.supplier.Supplier;
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
import org.chromium.chrome.browser.layouts.LayoutStateProvider;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
Expand All @@ -40,6 +41,7 @@ public class BraveTabGroupUiCoordinator extends TabGroupUiCoordinator {
private IncognitoStateObserver mIncognitoStateObserver;

public BraveTabGroupUiCoordinator(@NonNull Activity activity, @NonNull ViewGroup parentView,
@NonNull BrowserControlsStateProvider browserControlsStateProvider,
@NonNull IncognitoStateProvider incognitoStateProvider,
@NonNull ScrimCoordinator scrimCoordinator,
@NonNull ObservableSupplier<Boolean> omniboxFocusStateSupplier,
Expand All @@ -52,11 +54,11 @@ public BraveTabGroupUiCoordinator(@NonNull Activity activity, @NonNull ViewGroup
@NonNull TabCreatorManager tabCreatorManager,
@NonNull OneshotSupplier<LayoutStateProvider> layoutStateProviderSupplier,
@NonNull SnackbarManager snackbarManager) {
super(activity, parentView, incognitoStateProvider, scrimCoordinator,
omniboxFocusStateSupplier, bottomSheetController, activityLifecycleDispatcher,
isWarmOnResumeSupplier, tabModelSelector, tabContentManager, rootView,
dynamicResourceLoaderSupplier, tabCreatorManager, layoutStateProviderSupplier,
snackbarManager);
super(activity, parentView, browserControlsStateProvider, incognitoStateProvider,
scrimCoordinator, omniboxFocusStateSupplier, bottomSheetController,
activityLifecycleDispatcher, isWarmOnResumeSupplier, tabModelSelector,
tabContentManager, rootView, dynamicResourceLoaderSupplier, tabCreatorManager,
layoutStateProviderSupplier, snackbarManager);

mIncognitoStateProvider = incognitoStateProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,10 @@

package org.chromium.chrome.browser.tasks.tab_management;

import android.annotation.SuppressLint;
import android.content.Context;

import org.chromium.base.BravePreferenceKeys;
import org.chromium.chrome.browser.flags.CachedFeatureFlags;
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;

public class BraveTabUiFeatureUtilities {
private static final String TAB_GROUP_AUTO_CREATION_PREFERENCE =
"Chrome.Flags.FieldTrialParamCached.TabGridLayoutAndroid:enable_tab_group_auto_creation";

@SuppressLint("VisibleForTests")
public static void maybeOverrideEnableTabGroupAutoCreationPreference(Context context) {
if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(context)) {
// Override it to make "Open in new tab" menu option in the context menu available if
// applicable.
SharedPreferencesManager.getInstance().writeBoolean(
TAB_GROUP_AUTO_CREATION_PREFERENCE, isBraveTabGroupsEnabled());
CachedFeatureFlags.resetFlagsForTesting();
}
}

public static boolean isBraveTabGroupsEnabled() {
return SharedPreferencesManager.getInstance().readBoolean(
BravePreferenceKeys.BRAVE_TAB_GROUPS_ENABLED, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,20 @@
public class BraveTabUiThemeProvider {
@ColorInt
public static int getTitleTextColor(Context context, boolean isIncognito, boolean isSelected) {
// These checks are just making sure that these values are still used in Chromium to avoid
// lint issues.
assert R.color.empty_state_icon_bg_background_color > 0
: "Something has changed in the upstream!";
assert R.color.empty_state_icon_bg_foreground_color > 0
: "Something has changed in the upstream!";
assert R.color.empty_state_icon_color > 0 : "Something has changed in the upstream!";
assert R.color.empty_state_icon_bg_color > 0 : "Something has changed in the upstream!";
assert R.color.empty_state_icon_tabswitcher_bg_color > 0
: "Something has changed in the upstream!";

if (isSelected) {
return ApiCompatibilityUtils.getColor(
context.getResources(), R.color.baseline_neutral_900);
context.getResources(), R.color.baseline_neutral_10);
}

return TabUiThemeProvider.getTitleTextColor(context, isIncognito, isSelected);
Expand All @@ -28,7 +39,7 @@ public static int getTitleTextColor(Context context, boolean isIncognito, boolea
public static ColorStateList getActionButtonTintList(
Context context, boolean isIncognito, boolean isSelected) {
if (isSelected) {
return AppCompatResources.getColorStateList(context, R.color.baseline_neutral_900);
return AppCompatResources.getColorStateList(context, R.color.baseline_neutral_10);
}

return TabUiThemeProvider.getActionButtonTintList(context, isIncognito, isSelected);
Expand Down
Loading