Commit Graph
4709 Commits
Author SHA1 Message Date
AlexeyBarabash 9b63e4cd6d [cr138][Android] SiteChannelsManager.getChannelStatus is now getChannelStatusAsync
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/bce682524fa13d089a8a13b4f19b048a21326009

	Switch to use BaseNotificationManagerProxy for Site Chnanels

	This CL switches SiteChannelsManager to use
	BaseNotificationManagerProxy. And it also changed the getChannelStatus()
	call to be async.
	Use BaseNotificationManagerProxy allows Chrome to experiment the effect
	of AsyncNotificationManagerProxy when it is enabled.

	Bug: 242038130
	Change-Id: I9b1fd060382e65f81e85971d04dac26618473184
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6516182
2025-06-11 18:56:29 +01:00
AlexeyBarabash ae106f0b17 Fixed presubmit warnings
BraveStatsBottomSheetDialogFragment.java: Non-public, non-static field names start with m
2025-06-11 18:56:29 +01:00
AlexeyBarabash b81333329d [cr138][Android] Removed method BuildInfo.targetsAtLeastT
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/68567acd6e100219c287793ad1280c65063fb934

	Removing unnecessary is_at_least entries in buildinfo

	These are very old, from when U and T were pre-release. You should just
	check the SDK level.

	Change-Id: I8bc83ebdc24a264c79a040109d7afc614ed9c4c4
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6516000
2025-06-11 18:56:29 +01:00
AlexeyBarabash d281e5aa3a [cr138][Android] Fixed Nullaway warnings at BraveAutocompleteMediator arround Suppliers
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/f3320136300287a23b1824df8641e5d7919e1d1b

	Android: Consider Supplier @NullMarked

	Change-Id: I1b892f71c1c4a864827760b019e968bf043b0314
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6505624
2025-06-11 18:56:29 +01:00
AlexeyBarabash c4b6dedc6e [cr138][Android] New toolbarNavControlsEnabledSupplier arg at TopToolbarCoordinator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/4e0c6f2ed20a06683a32e6ac271d29cdad5729e7

	[Minimal UI] Disable minUI controls when secondary UI is shown

	This CL has two parts, the first one changes back and reload buttons
	contract - now instead of #setEnabled method they require to pass
	an boolean ObservableSupplier that allows easier synchronization of
	internal button state with external states, for example, dialogs overlay
	while page is loading.

	`setEnabled` API forces button to synchronize access internally by
	managing access token, but as more controls will be added, more
	tokens will be held in a parent. Instead a single token can be
	managed by parent container, because individual enabled state is
	a rare case and still can be added on top of the proposed API.

	The second part adds ModalDialogManager into web app header.
	Header listens to shown dialogs and enables/disables controls when
	ovelaid with any. As soon as dialog queue is drained, controls will be
	enabled back.

	Bug: 412910949
	Change-Id: Ice3ee83637d9a88c4c2c84dd4fd167a3ebe8b82b
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6499077
2025-06-11 18:56:28 +01:00
AlexeyBarabash 653da9b08a [cr138][Android] Removed StandardProtectionSettingsFragment.mPasswordLeakDetectionPreference
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1489d05d14bf6c4000a99bfac8ec17137d75f66e

	Clean up PasswordLeakToggleMove on Android

	This CL cleans up the references to the previously launched
	PasswordLeakToggleMove feature on Android and also removes the original
	feature flag.

	Bug: 408237729
	Change-Id: Ic24679e3ac946fdd90dcebdb2bdc3b1c7beddb9c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6501590
2025-06-11 18:56:28 +01:00
AlexeyBarabash 0890c8fa38 [cr138][Android] TabbedAppMenuPropertiesDelegate.shouldShowNewWindow is public now
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c59eeff40f493459618031de68c3abdc932d1d8d

	Reland "[Android] Support multi-window in Public Transit tests"

	This is a reland of commit 9527df220a190af84652625ff34f44ea0ad927e4

	Changed: Restricted test to non-Auto as it does not support
	multi-window.

	Bug: 414438679,415935250
	Change-Id: I368b5a5f260050c2c4e200df0aa93c99c4687991

	Original change's description:
	> [Android] Support multi-window in Public Transit tests
	>
	> - TrafficControl now accepts 0+ Stations as active instead of 0-1.
	> - ActivityElement waits for an Activity in the same window or on a
	>   different one, depending on the transition (or any window in the
	>   first transition.
	> - Station now has #spawnSync to transition into a Station in a new
	>   Window without leaving the current Station in the existing Window.
	> - Add MultiwindowAppMenuTest using all of this to test the 'New
	>   Window' menu item in Tablets.
	>
	> Bug: 414438679
	> Change-Id: If963b5d3bb845eb8a71e22c448b2687b71eeffc7
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6488661
	> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
	> Reviewed-by: Aishwarya Rajesh <aishwaryarj@google.com>
	> Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1455965}

	Change-Id: I368b5a5f260050c2c4e200df0aa93c99c4687991
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6513365
2025-06-11 18:56:28 +01:00
AlexeyBarabash c0e9f072f9 [cr138][Android] New arg webAppThemeColorProvider at BaseCustomTabRootUiCoordinator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/55bc1473c10ac7470c2c2133d26d69c936bdc502

	[Minimal UI] Add ThemeColorProvider for browser services

	Adding a new ThemeColorProvider that targets browser services
	primary color calculations based on the web app manifest and
	Chrome default theme. It doesn't add anything new in color calculations
	themselves, but rather extracts existing logic from
	CustomTabColorController to share with other UI controls like web app
	header.

	Focused/unfocused primary color will be implemented in scope of
	another task.

	Bug: 396101424
	Change-Id: I2ee3712725e9e1069a1e30c9dccbd33a4af8ce1b
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6487756
2025-06-11 18:56:28 +01:00
AlexeyBarabash 36b1f5dde8 Fixed tint for delete icon at bookmarks popup menu (#28871)
Fixed tint for delete icon at bookmarks popup menu

There was a wrong variable chosen to apply tint

Resolves https://github.com/brave/brave-browser/issues/45747
2025-06-11 16:33:23 +03:00
samartnik 3913d3e4c7 [Android] Fix for mobile bookmarks option (#29417)
* [Android] Fix for mobile bookmarks option

* Nullaway error fix
2025-06-05 16:25:39 -04:00
Serg 7bcbc8bc21 Brings back upstream search widget on Android (#29416)
This is a revert of https://github.com/brave/brave-core/pull/28753
The reason: we received a lot of feedback from frustrated users that
the widget was very useful.
Resolves: https://github.com/brave/brave-browser/issues/46597
2025-06-05 16:17:04 -04:00
aseren 5652fe9124 [ads] Survey panelist: Android (#29360) 2025-06-04 09:04:47 -05:00
Max Karolinskiy f53cb20d4f Updates support links. (#29355) 2025-06-04 06:44:37 -07:00
Serg 387d7e7284 Android filter list service (#29317)
* Passes correct profile to FilterListServiceFactory
2025-05-30 10:03:33 -04:00
Kevin Smith 2f57ca6b1d [Rewards] Remove Rewards 3.0 feature flag (#28199) 2025-05-30 05:54:37 -04:00
samartnik 0ab1d9d12c Merge pull request #29309 from brave/android_bottom_bar_disable_tooltip
[Android] Disables shields tooltip for bottom address bar
2025-05-29 13:14:25 -04:00
Kevin Smith a7a13ddbc0 [Rewards] Update Rewards "how does it work" URL (#29306) 2025-05-29 13:13:49 -04:00
Serg 9dd413a1e0 Use correct profile for Android url sanitizer service (#29206)
* Uses a correct profile for UrlSanitizerService on Android
2025-05-29 18:25:11 +02:00
Artem Samoilenko c7e465595d [Android] Disables shields tooltip for bottom address bar 2025-05-29 11:31:15 -04:00
samartnik 30a6829c08 Merge pull request #29297 from brave/android_default_download_bubble_value
[Android] Changes default value for download bubble notification
2025-05-29 10:07:00 -04:00
Simone Arpe 660020c778 Tweak background video playback description in flag page (#29207)
* Tweak background video playback description in flag page
* Remove redundant call to allow Javascript injection
The method `content::RenderFrameHost::AllowInjectingJavaScript()` is already called in
`background_video_playback_tab_helper` for those domains that correctly have a match so
it's not needed in `brave_browser_main_parts`.
* Fix boolean logic
* Make `IsBackgroundVideoPlaybackEnabled` method more readable
* Remove unneeded predefined default value from XML
* Refactor logic and remove old code
* Enable background video playback preference by default
* Remove unused constant
2025-05-29 11:33:22 +02:00
Simone Arpe e2a5b49706 Remove usage of BravePrefServiceBridge for boolean background video playback (#29197)
* Remove usage of `BravePrefServiceBridge` for boolean background video playback

* Use mTabModelProfileSupplier as settings UI always use original profile
2025-05-28 16:05:26 -07:00
Artem Samoilenko 88d89f00b1 [Android] Changes default value for download buble notification 2025-05-28 14:56:31 -04:00
Simone Arpe 1b29335e6d Improve network info checks on DApps (#29227)
Improves the checks against potential null values when connecting Brave Wallet to DApps.
2025-05-26 16:35:37 +02:00
AlexeyBarabash 3d7da33b8e [Android] Prevent cleaning of tab groups without sync id (#29201)
* [Android] Prevent cleaning of tab groups without sync id 
fixes brave/brave-browser#45549
2025-05-23 23:56:25 +03:00
Serg 5d03c4ae86 Use correct profile to create webcompat reporter service (#29175)
* Calls WebcompatReporterServiceFactory under correct profile
* Calls getProfile directly inside Pref fragments as they use an original profile only
2025-05-23 00:15:09 +02:00
Artem Samoilenko 90948704a7 [Android] Fix path for mobile bookmarks 2025-05-20 14:17:58 -04:00
Artem Samoilenko 4eb0fda3a1 [Android] Redirect support and help links 2025-05-20 11:52:42 -04:00
aseren ef0f2a4475 [ads] BraveNewTabTakeoverInfobar @NullMarked code health (#29109) 2025-05-17 05:16:17 +02:00
samartnik 81cd3abcd1 [Android] New Mobile Bookmarks homepage setting (#29051)
* [Android] New Mobile Bookmarks homepage setting

* [Android] Mobile bookmarks string correction

* [Android] Code review suggestions

* Replaces direct patch with bytecode and adds eol

* Moves test method from dummy to the main class

* Direct patch xmls and typo fix

* BaseJUnit4ClassRunner to ChromeJUnit4ClassRunner for tests

* Fixes presubmit issues for tests
2025-05-16 23:05:03 +02:00
aseren d37bc9d72e [ads] Fixes New Tab Takeover infobar is displayed on the incorrect tab on Android Tablet (#29090)
* [ads] Fixes New Tab Takeover infobar is displayed on the incorrect tab on Android Tablet

* Added getTab() != null check
2025-05-15 17:45:13 -05:00
samartnik a2725afde8 [Android] Updates download page menu icon (#29091)
* [Android] Updates download page menu icon

* [Android] Adds header to ic_download icon
2025-05-16 00:38:49 +02:00
samartnik 8fd36b6d2c [Android] Main settings reorganisation (#29086)
- Renamed `Autofill` section to `Passwords and Autofill`
- Moved `Brave Password Manager` and `Autofill services` to the new section
2025-05-15 16:20:27 -04:00
Artem Samoilenko 26550166f3 [Android] Main settings reorganisation
- Renamed `Autofill` section to `Passwords and Autofill`
- Moved `Brave Password Manager` and `Autofill services` to the new section
2025-05-15 13:44:41 -04:00
Artem Samoilenko e34cd34879 Fix method names for ChromeSharedPreferences 2025-05-15 12:26:55 -04:00
Artem Samoilenko dd58099ce3 [Android] Fix for bottom address bar with Enabled default to bottom flag state
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/fb3efd9d8f45b5076ef5cfe3c285797f7968f4f7

commit fb3efd9d8f45b5076ef5cfe3c285797f7968f4f7
Author: Patrick Noland <pnoland@google.com>
Date:   Thu Mar 27 14:47:46 2025 -0700

    [Anchor] Add param that controls the default position of the toolbar

    Bug: 406834895
    Change-Id: I12d10f1cdca6b0e451208d2056dc5c58797546a4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6405136
    Reviewed-by: Gang Wu <gangwu@chromium.org>
    Commit-Queue: Patrick Noland <pnoland@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1439025}
2025-05-15 12:26:51 -04:00
aseren 52b5f658fa [ads] Fixes New Tab Takeover infobar is recreated after rotating the Android device (#29052) 2025-05-14 17:01:46 -05:00
Artem Samoilenko 26bcbbb982 [cr137][Android] Temporary fix for Utils.getProfile
This function should be removed and proper profile should be passed https://github.com/brave/brave-browser/issues/45937
2025-05-13 15:53:30 -04:00
Artem Samoilenko ab3ac1d05f [cr137][Android] Changes for createWebContentsWithWarmRenderer
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b875fe9e2f6b613d0207655bd970a34427210f0d

[Android][3PPWM] Ignore IsEnabled and load config timely for CCTs

CCTs create webContents in a way that doesn't allow reading the pref
before the autofill machinery is initialized. With this CL, the pref
value is passed in on creation which fixes the issue.

Another, less frequent issue is checking isEnabled. This method lazily
initializes Android's AutofillManager and contributes to CCTs
occasionally preventing Autofill use. This is incorrect since the return
value may change while the app is running and isn't suitable for making
an initial decision about whether Autofill should be enabled. The
safeguard this provided is (already or by now) checked in the Android
Framework when the regular notifyViewEntered calls are invoked.

Just out of caution and because this fix affects a fully launched
feature, both changes are guarded with a new feature:
kAutofillVirtualViewStructureAndroidInCct.

Unlaunching the original feature isn't a good option but holding this
fix back is a bad option, too. Therefore, it's default-enabled and
intended to use only as a possible kill-switch.

The change shouldn't affect WebView but we'll add a flag as guard.

go/scrcast/NTMyNTYxNTEwMzIxMzU2OHw1OTZhYTJlZC02Yg

(cherry picked from commit 5bd3d05740695f1e55c34415cb77bdea0e04759c)

DD: go/3ppwm-dd
Bug: 411164104
Fixed: 415734605
Change-Id: Iaf8ac48eef3fbf833d49d67c3e427d8c8d4d53b5
2025-05-13 15:53:29 -04:00
Artem Samoilenko 8f11e3d05f [cr137] [Android] Changes for TopToolbarCoordinator
Chromium change:
https://chromium.googlesource.com/chromium/src/+/a07f47b0d1c1a4d6230e53ef63cb03a23863025e

[M137][New Tab Animation] Add TabCount wrapper

It allows to overwrite the tab count for purposes such as animations.

(cherry picked from commit 33d6d91f9d80104b2c2df62eac5b0d290959361a)

Bug: 410818580
Fixed: 415757905
2025-05-13 15:53:28 -04:00
Artem Samoilenko 715e203869 [cr137] [Android] Allowing edge to edge fullscreen on Android
Chromium change:
https://chromium.googlesource.com/chromium/src/+/6c3184ab7d8bcc7656e61b8c22f18c4a751c7163

Allowing edge to edge fullscreen on Android

Activity.requestFullscreenMode is now used to allow expand free form
window to the edges of the display.

User can exit the display edge to edge mode by clisking esc or dragging
the window from the top of the display.

Screencast before change:
http://screencast/cast/NDk1ODgxMzA4NDk3NTEwNHwwMTVlNmU1My1mMA
after change:
http://screencast/cast/NjA2NTAyNTg2ODM2NTgyNHw5ZjVmNWFkNi0zYQ

Bug: 373304413
2025-05-13 15:53:26 -04:00
Artem Samoilenko aa061ea173 [cr137] [Android] Move onCLick for home button to coordinator
Chromium change:
https://chromium.googlesource.com/chromium/src/+/06770268566c51e3f3039a4be41cd1d9cee21468

commit 06770268566c51e3f3039a4be41cd1d9cee21468
Author: Sirisha Kavuluru <skavuluru@google.com>
Date:   Thu Apr 24 10:11:10 2025 -0700

    [Toolbar] Move onCLick for home button to coordinator.

    Reland of https://chromium-review.googlesource.com/c/chromium/src/+/6444671

    The above CL failed tests since I missed removing setOnClickListener for home button in toolbar tablet while removing onClick() implementation.

    Change-Id: I66ed76f26c1d979f5535d11e351c0fb945ff244a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443761
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
    Cr-Commit-Position: refs/heads/main@{#1451247}
2025-05-13 15:53:23 -04:00
Artem Samoilenko 527c099e7f [cr137] [Android] Changes for the edge-to-edge bottom chin feature
Chromium change:
https://chromium.googlesource.com/chromium/src/+/4a0320bb6babe3bcbc220e0c9847f2cd2ea48a45

Default enable the edge-to-edge bottom chin

Launch for the bottom chin: launch/4339772

Intent to ship dynamic safe area insets: https://groups.google.com/a/chromium.org/g/blink-dev/c/hXkimpjYaMg/m/EbDa9c-oAAAJ

Bug: 324436581, 407852142
2025-05-13 15:53:21 -04:00
AlexeyBarabash 5cd09dbdc0 [cr137] Fixed Nullaway warnings 2025-05-13 15:53:21 -04:00
Artem Samoilenko 58e6734aca [cr137] [Android] Fixes for NullAway presubmit errors
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8bafbc5401239117b080d98f49e7bab83eed0e38

Turn NullAway presubmit upload check into an error instead of warning

Bug: 412696018
2025-05-13 15:53:18 -04:00
Artem Samoilenko 8757a298a7 [cr137] [Android] Adds icon for Autofill services setting
Chromium change:
https://chromium.googlesource.com/chromium/src/+/6518be40f7b02e1e973735224d0e994b01e262c6

[Android][3PPWM] Default-enable 3P autofill support

This has been approved in launch/4349206.

Bug: 409579377
2025-05-13 15:53:17 -04:00
Artem Samoilenko 0fac29a2a4 [cr137] [Android] Tab context menu for Tab Group Dialogs
Chromium change:
https://chromium.googlesource.com/chromium/src/+/4de24f972d7e2e062daebcc58856ef7e71091040

[Tab Group Parity] Tab context menu for Tab Group Dialogs

- Now show tab context menu for tab group dialogs
- New interface for showing TabListEditor
- Rename context menu class to TabGridContextMenuCoordinator to resolve naming conflict with `chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListGroupMenuCoordinator.java`
- Recording: https://drive.google.com/file/d/1bXXKs34DMLy5FSXOqnYTaWdaddFjuOcc/view?usp=sharing&resourcekey=0-MNtztibYKcwRsHKRdPDcrA

Bug: 412626589
2025-05-13 15:53:16 -04:00
Artem Samoilenko dff290f724 [cr137] [Android] Add web app header to the main layout
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8cf864537cf0665d3558a5848f92eb469e61fc81

[Minimal UI] Add web app header to the main layout

Integrating web app header into the CCT base activity based on the
feature enabled state and web app launch params.

Support to show web app header in the dialogs will be added in a
separate CL.

HSV: https://hsv.googleplex.com/5366214560841728

Bug: 401230452
2025-05-13 15:53:16 -04:00
Artem Samoilenko 21a2ceee2e [cr137] [Android] Make AppMenuPropertiesDelegateImpl abstract
Chromium change:
https://chromium.googlesource.com/chromium/src/+/19050b6adac2e1f9b0442fc2dc4e58e5e023b251

Make AppMenuPropertiesDelegateImpl abstract.

Previously, the base class had all the logic for tabbed mode, and that
was never accessed by other child classes. This moves the tabbed logic
to the TabbedAppMenuPropertiesDelegate and make the base class abstract.

One of many CLs to try and remove XML menu inflation from the app menu.

Bug: 40145539
2025-05-13 15:53:14 -04:00
Artem Samoilenko 6303275336 [cr137] [Android] Suppress top toolbar scene layer while mini origin bar is active
Chromium change:
https://chromium.googlesource.com/chromium/src/+/44b0ddd43212a03a3a9c7a66c08cd3a0f52b7e4b

[mobar] Suppress top toolbar scene layer while mini origin bar is active

Since the mini origin bar 1) is smaller and 2) looks different from the
scene layer's contents and the Java view will always be visible when
mobar is active, we need to hide it to avoid visual glitches.

Bug: 409317927
2025-05-13 15:53:14 -04:00