Commit Graph
5528 Commits
Author SHA1 Message Date
samartnik 5fce4013bc [Code Health][Android] Clean up code for brave_xml_preprocessor template (#34406) 2026-03-03 23:01:03 +00:00
Serg 8c0ed68c2e [Android] Gate email aliases preference behind kEmailAliases feature flag (#34403)
The email aliases toggle in Brave Origin settings was always visible
regardless of whether the feature flag is enabled. Since the feature is
disabled by default, users would see a non-functional toggle.

Expose kEmailAliases to Java via ChromeFeatureList and hide the
preference when the flag is disabled.

Resolves: https://github.com/brave/brave-browser/issues/53323
2026-03-03 21:36:30 +00:00
Serg cb5b0a007d [Android] fix: handle Mojo BadMessageException gracefully (#34360)
Chromium 146 introduced BadMessageException in the Java Mojo bindings
(crbug.com/469861566, https://github.com/chromium/chromium/commit/c04b8552deeef)
to surface malformed or unexpected messages (invalid headers, unknown methods,
deserialization errors, responses for already-cancelled requests). However, the
default ExceptionHandler simply re-throws the exception as unchecked, causing
crashes instead of gracefully closing the pipe.

This differs from the C++ Mojo bindings behavior where
Connector::DispatchMessage (mojo/public/cpp/bindings/lib/connector.cc) handles
dispatch failures by calling HandleError() which resets the pipe cleanly.

Set a delegate on ExceptionHandler.DefaultExceptionHandler that catches
BadMessageException and returns false (closing the pipe), while re-throwing
all other exceptions to preserve existing behavior.

Resolves: https://github.com/brave/brave-browser/issues/53290
2026-03-02 21:44:20 +01:00
Simone Arpe 32a340275c Fix HeadingH1/2/3/4 by adding android:textStyle bold (#34355) 2026-03-02 16:49:20 +01:00
AlexeyBarabash f038f8d936 [Android] Fix debug crash at assertNonNull on app start at News (#34330)
Resolves https://github.com/brave/brave-browser/issues/53262
2026-02-27 23:43:18 +00:00
AlexeyBarabash 5210710174 Fixing some Nullaway check warnings (#34122)
* Fixed some Nullaway check warnings

Resolves brave/brave-browser#53098
2026-02-27 18:17:36 +02:00
Simone Arpe 3f35655f1d Implement new layout for widget search promo panel (#34207)
Implements new layout for widget search promo panel and introduces better handling of activity recreations and configuration changes to redraw the widget search promo panel with correct theme (day/night) and proper position.

Other notable enhancements:

- Tweak tablet margins to better frame the onboarding cards on foldable devices after initial review with the design team.
- Fix post-FRE intent and delay activity to avoid a glitch on foldable devices by following the same strategy applied upstream.
- Accessibility: include content descriptions for widget search promo panel images.
- Nala: include new drawables from Nala tokens.
- Append new source android-widget for all searches made from the widget.
- Implement tests to verify new source android-widget.
2026-02-27 13:45:17 +01:00
Serg aa2fcc5c1f [Android] Fix in-app review flow crash on Play Store split APK installs (#34229)
PlayCoreDialogWrapperActivity (from core-common) lives in base.apk
but deserializes a Parcelable (review.zzc) from split_chrome.apk.
The base split's ClassLoader can't see chrome split classes, causing
ClassNotFoundException. Chromium fixes this for its own activities
via BundleUtils.checkContextClassLoader(), but PlayCoreDialogWrapperActivity
extends plain Activity and is not covered.

Fix by registering an ActivityLifecycleCallbacks that sets the
Application's ClassLoader on the Intent extras Bundle before onCreate().

Also adds a QA preference to force the in-app review flow from settings
for easier testing.

Resolves: https://github.com/brave/brave-browser/issues/53179
2026-02-26 23:19:42 +00:00
Claudio DeSouza 635344b6fb Updated strings for Chromium 146.0.7680.32. 2026-02-26 14:14:57 +00:00
Artem Samoilenko f4f73437c0 [cr147][Android] Changes for ToolbarSwipeLayout
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/6257cc0a04731f19de38049632765ee5ffa5f249

commit 6257cc0a04731f19de38049632765ee5ffa5f249
Author: Yanting Yu <yyanting@google.com>
Date:   Tue Feb 17 13:22:09 2026 -0800

    Fix the toolbar swipe animation in NTP (Part2).

    This is the follow up CL for crrev.com/c/7552991. In this CL, we fixed
    1) toolbar jumps down when swiping the toolbar from newly created NTP;
    2) the empty bar is observed above the bottom toolbar after swipe to
    non-NTP tab from newly created NTP.

    Root cause: When preparing the swipe animation, we use the stale toolbar
    capture including the top padding for E2E in NTP. Even though the
    toolbar is notified to remove its own padding before swipe starts. We
    fixed this bug by forcing the toolbar to update its layout and capture
    the bitmap.

    Before: https://screencast.googleplex.com/cast/NTAyMDk1NTYwNzgyNjQzMnxkNWU5ZGQwYy1jMw
    After: https://screencast.googleplex.com/cast/NjI5MTcyNTEzMDY2MTg4OHxkMzE3Y2ZhNi1lYQ

    Bug: 469708907, 480857474
    Change-Id: I7a365b8f1a11ea65d7b3c13b54e00bfb7f1d88ce
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7563889
    Commit-Queue: Yanting Yu <yyanting@google.com>
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Reviewed-by: Xi Han <hanxi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1585966}
2026-02-26 14:14:57 +00:00
AlexeyBarabash 7329263323 [cr146][Android] Rename ObservableSupplier -> MonotonicObservableSupplier
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b8cb84d2901aeffc0003b15622a3052de7a20023

	Rename ObservableSupplier -> MonotonicObservableSupplier

	Bypass-Check-License: Rename
	Change-Id: I101e53b7542d56566c128c23e6d6b081bcd3348c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487973
2026-02-26 14:14:55 +00:00
AlexeyBarabash 2701f088c3 [cr146][Android] Encapsulate TopInsetProvider observer two-step pattern
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2eb1baa19a3548ac2bee87fdd1231ea4051442f0

	[E2E] Encapsulate TopInsetProvider observer two-step pattern

	This CL introduces a new class to encapsulates the common
	two-step pattern of:
	1. Waiting for TopInsetProvider to become available via a supplier
	2. Adding an observer to the provider once available

	This pattern was duplicated in ToolbarPositionController,
	AutocompleteCoordinator, and NewTabPage.

	The new utility class manage TopInsetProvider access with clear
	separation between owners and consumers

	TransitiveTopInsetProvider:
	  - Provides access to consumers who need to observe inset changes
	  - Automatically manages observer registration when provider becomes available
	  - Queues observers added before provider is set

	Bug: 478739083
	Change-Id: Ib818c4f16df88f1d6ab6befc633f1fb9031ba3d5
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7509092
2026-02-26 14:14:55 +00:00
AlexeyBarabash 4accb1d201 Revert "[cr146][Android] Changed shareDelegate arg at ChromeContextMenuPopulator.ctor"
This reverts commit 7d23353a12adf000a22615fd1d07ed389e9fd94c.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ecc16f6754610b4e29b7dde1748bea45b3e48a9c

	Revert (partial) "Fix @Nullable annotation for ChromeContextMenuPopulator's ShareDelegate"

	This reverts commit c6562cde86eaf48819f83a7bd68e37b37626e51b.

	Reason for revert:
	The Suspect CL https://chromium-review.googlesource.com/q/Icc52e361fd3c5f64ef4ab1ff51397d841bc13f64 is highly likely the cause of the crash. Please see the crash report http://crash/d477a2ee4d2284d8.
	Rebase the Revert CL on top of main branch with conflicts allowed option to prevent false positive merge conflicts.

	If you agree with the revert CL, please approve it and mark as Commit-Queue +2 to submit it.

	More details can be found in the go/crash-revert-cls-creation.

	Original change's description:
	> Fix @Nullable annotation for ChromeContextMenuPopulator's ShareDelegate
	>
	> And switch it to not be a Supplier, since nothing currently requires it
	> to be one.
	>
	> Bug: 467389696
	> Change-Id: Icc52e361fd3c5f64ef4ab1ff51397d841bc13f64
	> Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7542574
	> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
	> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1579495}
	>
	Crash Bug: 482849462

	Change-Id: I6042384ff35cd6d3747fa2dab28607fe243e18f8
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7555790
2026-02-26 14:14:55 +00:00
AlexeyBarabash 60e1c669e4 [cr146][Android] Change at ReturnToChromeUtil
shouldShowNtpAsHomeSurfaceAtStartup method has new persistableBundle
argyment

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c2c3eb60bfae7281db65395756660c8977378714

	Explicitly disallow start surface after app update when restoring persistent state

	When a window is restored as part of the persistAcrossReboots feature,
	the start surface may be shown afterwards. This change prevents the
	start surface from being shown if the persistent state indicates that
	the window was restored after an app update, in order to minimize any
	disruptions.

	Bug: 459921316
	Change-Id: Ib02ef3277d3d536479cab4ae5c877c07b74d5dae
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7534264
2026-02-26 14:14:53 +00:00
AlexeyBarabash 240f8280a9 [cr146][Android] Make ObservableSupplierImpl package-private
AI-assited change

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/be70d7b2ff247382d6716d687e2ccffec3e080ec

	Android: Make ObservableSupplierImpl package-private

	Bug: 467389696
	Change-Id: I6d8cce7f71f520d2ee5e43f87f8225cb71bef863
	Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7546004
2026-02-26 14:14:53 +00:00
AlexeyBarabash 7813b87d2f [cr146][Android] Make MonotonicObservableSupplier inherit Supplier<@Nullable T>
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a5aa1f364aa75ce92d3d05c64c7d929303c8dc5f

	Android: Make MonotonicObservableSupplier inherit Supplier<@Nullable T>

	And fix all warnings that come with it.

	Bug: 467389696
	Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
	Change-Id: I86becbc2f3c149941e3401fd726d7062a261bd7a
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7533558
2026-02-26 14:14:52 +00:00
AlexeyBarabash 7ca4b5d5ba [cr146][Android] Changed shareDelegate arg at ChromeContextMenuPopulator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c6562cde86eaf48819f83a7bd68e37b37626e51b

	Fix @Nullable annotation for ChromeContextMenuPopulator's ShareDelegate

	And switch it to not be a Supplier, since nothing currently requires it
	to be one.

	Bug: 467389696
	Change-Id: Icc52e361fd3c5f64ef4ab1ff51397d841bc13f64
	Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7542574
2026-02-26 14:14:52 +00:00
AlexeyBarabash 369e8c62cb [cr146][Android] Decouple Autocomplete from Focus tracking
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/0c57afbab4d40c54ee55637488cf7a800c2cb378

	Decouple Autocomplete from Focus tracking.

	This change removes remaining logic where Autocomplete was tracking
	UrlBar logic, decoupling the editing session from focus entirely. This
	aims at addressing a discrepancy between the isInInputSession and
	the isUrlBarFocused that can come after a delay (from the Animation
	driver).

	Change-Id: I888abb47fa746531fe27a10b6d3cb5e72e3b34a8
	Fixed: 480832132, 480721973
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7539776
2026-02-26 14:14:52 +00:00
AlexeyBarabash d447587eba [cr146][Android] Move OmniboxFocusReason to //components
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d3f05c382534233d3174eaa52628405b5c0791a8

	Move OmniboxFocusReason to //components, include in ACInput.

	Bypass-Check-License: file moved
	Bug: 475620206
	Change-Id: Ifd9bf63a77882415dbc2abeaa81ab82cbc241bb7
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7541346
2026-02-26 14:14:52 +00:00
AlexeyBarabash 745d4ef1e5 [cr146][Android] profileSupplier arg at TopToolbarCoordinator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/cb00be75174e655ef5bafa4cbd9403923bea0d1b

	[Signin][Android] Create Signin Button skeleton & flag flow

	Introduces the SigninButton component for the Android NTP in the
	toolbar. Currently, this component does nothing and is behind the
	SigninLevelUpButton feature flag. This CL sets up the flag logic such
	that, when enabled, the IdentityDisc (which will eventually be replaced
	by the SigninButton) is removed from the Adaptive Toolbar and the
	SigninButton is added to the Top Toolbar. There is no View or XML for
	SigninButton currently as it is just a skeleton component. The
	implementation for SigninButton will be in follow-up CLs.

	Bug: 478828569
	Change-Id: Ibbf7d61687e18f12fd9d6a6401fe4da8c414b599
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7511406
2026-02-26 14:14:51 +00:00
AlexeyBarabash 98e9d1a027 [cr146][Android] Expose didAccountFetchSucceed method in SigninManager
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8d245c9bdb38862319c642f4925de64de7d1745e

	[Signin][Android] Expose didAccountFetchSucceed method in SigninManager

	Fixed: 480076180
	Change-Id: Id244540a757f25559eab0414a11aedbc568d9819
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7534279
2026-02-26 14:14:50 +00:00
AlexeyBarabash e107ef2424 [cr146][Android] Fixed BraveTabbedAppMenuPropertiesDelegateUnitTest
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/e9b66588061acba6de9417f298e398877eae420e

	[TabBottomSheet] Define Glic Button and Add to 3-dot menu Icon row

	Bug: 475592538
	Change-Id: Ia85a0ae72abb8a7cff20a460807be285ce663d9d
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7474125
2026-02-26 14:14:50 +00:00
AlexeyBarabash 21302ec663 [cr146][Android] Clean up OmniboxMobileParityUpdateV2 on Android (Part 1)
NewTabPage.updateSearchProvider is now void at upstream

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d23864706c014549e1f1333face1ece0046c52bd

	[ParityV2] Clean up OmniboxMobileParityUpdateV2 on Android (Part 1).

	Clean up feature flag OMNIBOX_MOBILE_PARITY_UPDATE_V2 and feature
	param "retrieve_builtin_favicon" on Android.

	Bug: 426594110
	Change-Id: I705823eb0dbd34b0e1187dfde3b20f12c4b78fa7
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7523327
2026-02-26 14:14:49 +00:00
AlexeyBarabash bbf9b63412 [cr146][Android] Make MonotonicObservableSupplier implement Supplier<@Nullable>
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/6500325e057365791ae060e8c8405fd43ff48fab

	Android: Make MonotonicObservableSupplier implement Supplier<@Nullable>

	And fix all warnings that result from doing so.
	Supplier.get() is still being treated as @NullUnmarked. That's the
	last step in this migration!

	Bug: 478248581
	Change-Id: I0158e81ec0a739e05c6d89a28586f78b1e633ce5
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7531037
2026-02-26 14:14:49 +00:00
AlexeyBarabash 17f8419622 [cr146][Android] Create OmniboxChipManager and the open-in-app chip
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/466f936e51f26b1bb438f4f7bda2dd65a4b86c6e

	[Link Capturing] Create OmniboxChipManager and the open-in-app chip

	Low-Coverage-Reason: TESTS_IN_SEPARATE_CL implementation not at a point to test properly yet
	Bug: 450253146
	Change-Id: Id4296ce2ce685dcca9be535f8308a1295a1772a4
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7362069
2026-02-26 14:14:49 +00:00
AlexeyBarabash 61234131f6 [cr146][Android] New arg lockTopControlsTokenJar at ToolbarManager.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/90bbbf8c22d3727c3f35756a863dc1bb222db2d0

	[BrowserControls] Defer lock status change during DTC transition

	TopControlsStacker calculates the layer offset assuming they keep a
	consistent height and min height during transitions. As a result, if we
	change the top control lock status, which would change whether layers
	contribute to minHeight, would cause unexpected behaviors for browser
	driven offset calculations.

	This CL lets TabStripTopControlLayer uses the TokenHolder provided by
	TopControlLockCoordinator to prevent the lock status from changing, to
	ensure layers can maintain a consistently state whether they contribute
	to minHeight during tab strip transition.

	Bug: 469484975
	Change-Id: I57b55604c062940bcc120788f0b0764c244bd292
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7355240
2026-02-26 14:14:49 +00:00
AlexeyBarabash ec275e4425 [cr146][Android] Removed autocompleteRequestTypeSupplier arg from LocationBarMediator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ca260a24031dfacb97def5ee3a9bcd71bdc2ee15

	Make AutocompleteInput-s RequestType an ObservableSupplier.

	This change moves the AutocompleteRequestType from FuseboxCoordinator
	over to AutocompleteInput from where it can be restored when session
	resumes.

	Change-Id: I42339d276615c53328687e9eb54e72867f8e7acf
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7522070
2026-02-26 14:14:49 +00:00
AlexeyBarabash 2a54b37c33 [cr146][Android] Rename ObservableSupplier -> MonotonicObservableSupplier
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b8cb84d2901aeffc0003b15622a3052de7a20023

	Rename ObservableSupplier -> MonotonicObservableSupplier

	Bypass-Check-License: Rename
	Change-Id: I101e53b7542d56566c128c23e6d6b081bcd3348c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487973
2026-02-26 14:14:49 +00:00
AlexeyBarabash a47ef100fe [cr146][Android] Convert ObservableSupplierImpl usages in omnibox
This is commit for changes required by ToolbarManager.mOverlayPanelVisibilitySupplier
type change from ObservableSupplierImpl to SettableNonNullObservableSupplier

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9dc3f0d9c6752101cdbec7685dc8df9231333a73

	Android: Convert ObservableSupplierImpl usages in omnibox

	Bug: 467389696
	Change-Id: Ie664088a70e547ab0d19e518019911ee35c9c7cf
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7511143
2026-02-26 13:47:51 +00:00
AlexeyBarabash de15e906b7 [cr146][Android] Convert ObservableSupplierImpl usages in ChromeActivity
This is commit for changes required by ToolbarManager.mBookmarkModelSupplier
type change from MonotonicObservableSupplier to NullableObservableSupplier

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/cb9efe8c51a5119c7e84ad2ae97b5b1ea459529c

	Android: Convert ObservableSupplierImpl usages in ChromeActivity

	Bug: 467389696
	Change-Id: Ib34931fa9d1553e0289ce5bfc22273831f9c660a
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7494558
2026-02-26 13:47:51 +00:00
AlexeyBarabash 2304174ac8 [cr146][Android] isInNarrowWindowOnTablet was moved from NewTabPageLayout to NtpCustomizationUtils`
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/23c8fddd48102899160ce4d71b1ab1949c88a248

	[Theme] Add NtpCustomizationPolicyManager.

	In this CL, we add NtpCustomizationPolicyManager which listens to
	Pref.NTP_CUSTOM_BACKGROUND_DICT changes.
	1) Pref.NTP_CUSTOM_BACKGROUND_DICT being managed means the
	   policy::key::NTPCustomBackgroundEnabled is disabled.
	2) When the policy NTPCustomBackgroundEnabled changes,
	   NtpCustomizationPolicyManager saves the latest policy value to the
	   shared preference. It will apply after relaunch chrome. This allows
	   the UI correct when CTA isn't recreated.
	Demo: http://shortn/_nBBqRNFS3N

	Bug: 467029432
	Change-Id: I04a50d0d814802fbd3ef8be29414a17181adae98
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7500251
2026-02-26 13:47:51 +00:00
AlexeyBarabash d4db7fcba4 [cr146][Android] openInAppMenuItemProvider arg at TabbedAppMenuPropertiesDelegate.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c66c93e16c77f0357a729ea2bd39a05ce95af5ef

	[Link Capturing] Create Open in App entry point classes

	Low-Coverage-Reason: TESTS_IN_SEPARATE_CL New code isn't yet fully implemented
	Bug: 450253146
	Change-Id: I8eb1ebe754e3b244c2fa0b426597bdbc605aa071
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7426174
2026-02-26 13:47:50 +00:00
AlexeyBarabash 18939531c2 [cr146][Android] dragTouchHandler arg Bookmark*** classes
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/800bcec4216aaa7dd4df9f86af6e9804d760c8ec

	actions revamp: Extract DragTouchHandler from RecyclerViewAdapter

	This CL extracts `DragTouchHandler` from
	`DragReorderableRecyclerViewAdapter` for better separation of concerns
	and better customizability of the class.

	This is in preparation of implementing custom behaviors for the toolbar
	actions. The plan is inject a customized `DragTouchHandler` with some
	overriding methods. These will come in following CLs.

	This is a pure refactor and there should be no functional change with
	this CL.

	Bypass-Check-License: Renamed file in parent CL
	Bug: 477519777
	Change-Id: I55dff45b4664d77eb74bdd37c8c18dce74ce7680
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7500135
2026-02-26 13:47:50 +00:00
AlexeyBarabash a41bfd8044 [cr146][Android] SearchEngineAdapter.ctor change
New arg siteSearchClickHandler

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ce9bd0417d1e559e2d3ae5f8b19ee1530b62c369

	Site Search: Add site search setting entry

	This CL adds a "Manage search engine and site search entry" in existing
	Search Engine Settings page. This advanced setting option will be
	displayed based on omnibox site search feature flag.

	Bug: 459588730
	Change-Id: I5c1c806f8d0fcec40b87cb94b31573317696d28c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7494099
2026-02-26 13:47:50 +00:00
AlexeyBarabash c071f69bb2 [cr146][Android] Convert ObservableSupplierImpl usages in ChromeActivity
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/cb9efe8c51a5119c7e84ad2ae97b5b1ea459529c

	Android: Convert ObservableSupplierImpl usages in ChromeActivity

	Bug: 467389696
	Change-Id: Ib34931fa9d1553e0289ce5bfc22273831f9c660a
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7494558
2026-02-26 13:47:50 +00:00
AlexeyBarabash e801d234a1 [Android] Fixed missing deps for ViewFinder
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a41e19ef052b11e14784d8fd9eaa995f2fc4f6af

	[Android] Implement ViewFinder#waitForView()

	This is intended to replace the ViewUtils helpers:
	* onViewWaiting()
	* waitforView()
	* waitForViewCheckingState()
	* waitForVisibleView()
	* waitForDialogViewCheckingState()

	Migrate two usages as a start.

	ViewFinder uses ViewCarryOn, which:
	* Avoids the RootViewWithoutFocusException hangs in Espresso.
	* Supports scoping searches to specific Activities avoiding
	  AmbiguousViewMatcherException.
	* Provides history of the View state as it polled (including displayed rectangle and percentage, and ancestor visibility)

	Bug: 428000595
	Change-Id: I3efe6508113d04210588a6478cd7d179b9151cb6
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7253845
2026-02-26 13:47:49 +00:00
AlexeyBarabash 9672ff26f1 [cr146][Android] Removed PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER feature
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/6162dcf447020baf2795a6974fc28be4e0b9274b

	Clean up Android Parental Controls MVP features.

	The feature was launched in M143 (cr/821645411; crrev.com/c/7054262).

	Bug: 405328417
	Change-Id: I2786cc946e07af7bc18743ae9fe846671e6eedfc
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7509887
2026-02-26 13:47:49 +00:00
AlexeyBarabash 09a0066e4d [cr146][Android] topInsetProviderSupplier at LocationBarCoordinator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9ada9b92ec00dedb31c75b5e8e77d08a3290b19c

	[E2E] Observe TopInsetProvider directly in dependent components

	This CL refactors the edge-to-edge top inset observation pattern by
	having ToolbarPositionController and AutocompleteCoordinator observe
	TopInsetProvider directly, instead of receiving callbacks forwarded
	through ToolbarManager.

	Previously, ToolbarManager observed TopInsetProvider and forwarded
	onToEdgeChange notifications to ToolbarPositionController and
	LocationBarCoordinator (which then forwarded to
	AutocompleteCoordinator). This created unnecessary coupling and
	indirection.

	This CL does not introduce any visible behavior changes.

	Changes:
	- ToolbarPositionController now directly observes TopInsetProvider
	- AutocompleteCoordinator now directly observes TopInsetProvider
	- Removed intermediate forwarding methods from ToolbarManager and
	  LocationBarCoordinator
	- Added TopInsetProviderSupplier parameter to LocationBarCoordinator
	  and AutocompleteCoordinator constructors

	Bug: 476788729
	Change-Id: Ic7344e896ebd8c9e04a821d1cd6df6775255e69c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487625
2026-02-26 13:47:48 +00:00
AlexeyBarabash cfa57bf1c7 [cr146][Android] AccountInfoServiceProvider removed
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/00fc3ac157d869ba5f476f78b90ebab11320b40d

	[Signin][Android] Remove AccountInfoService implementation

	IdentityManager become a source of truth, replacing AccountInfoService.

	Fixed: 341948846
	Change-Id: I6ecb55ab3877c9e248c7f24b15a1f0c809b838a1
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7482429
2026-02-26 13:47:48 +00:00
AlexeyBarabash 0712d65e25 [cr146][Android] Convert ObservableSupplierImpl usages in omnibox
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9dc3f0d9c6752101cdbec7685dc8df9231333a73

	Android: Convert ObservableSupplierImpl usages in omnibox

	Bug: 467389696
	Change-Id: Ie664088a70e547ab0d19e518019911ee35c9c7cf
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7511143
2026-02-26 13:47:48 +00:00
AlexeyBarabash e4dc94ff32 [cr146][Android] LocationBarMediator.performSearchQuery removed
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9b5048b5cd9efa089ef892b9f53c212f433d403b

	Nuke some dead code.

	Tests for this code caused a bit of grief, and this code is not called
	anywhere, so how about we delete it?

	Change-Id: I050254c65f76658cbc1e14867847280550da3246
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7504590
2026-02-26 13:47:47 +00:00
AlexeyBarabash a026feede4 [cr146][Android] LocationBarMediator.ctor change
MonotonicObservableSupplier => SettableMonotonicObservableSupplier
for autocompleteRequestTypeSupplier

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7a83e17059e2e5c43023d864e7ee087d1cc73148

	Use AutocompleteInput to persist session editing state

	Bug: 475620206
	Change-Id: I76b8daa4782e8e419e1847325415c26ba1c3cb44
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7488324
2026-02-26 13:47:47 +00:00
AlexeyBarabash 2c599aa003 [cr146][Android] Changes at BookmarkPage/BookmarkManagerCoordinator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c2f221f1660fc2df9907093e4db32a6d63879a80

	[Android][Signin] Migrate Bookmarks promo to the new sign-in API

	This change migrates the Bookmarks promo to the new sign-in flow API.

	To enable the new API, dependencies such as WindowAndroid,
	BottomSheetController, and ActivityResultTracker are now passed to
	BookmarkManagerCoordinator. These dependencies are threaded through
	BookmarkPane, BookmarkPage, and BookmarkActivity.

	A significant part of the change involves setting up the necessary
	components for the bottom sheet UI (like ScrimManager and
	BottomSheetController) within BookmarkActivity, which previously lacked
	them as it inherits from SynchronousInitializationActivity.

	Preview: we do have Privacy approval to NOT show the snackbar if the
	user navigates away from the UI.

	Known issue: the status bar color is not yet correct.

	Bug: 437039516
	Change-Id: I5463875270a508ff1c9a44a60e74558c9874c989
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7414706
2026-02-26 13:47:46 +00:00
AlexeyBarabash 51a95fe088 [cr146][Android] Convert ObservableSupplierImpl usages in RootUiCoordinator
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/bee89121aecf60788ab1af404b2c3974959a50ff

	Android: Convert ObservableSupplierImpl usages in RootUiCoordinator

	Bug: 467389696
	Change-Id: Ida770f66fa1537bbbdbeb7c111a5f2026c982a7c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487675
2026-02-26 13:47:46 +00:00
AlexeyBarabash 9a0f6e0556 [cr146][Android] Cleanup of unused BraveNewTabPageLayout overrides
BraveNewTabPageLayout.setSearchProviderTopMargin and
BraveNewTabPageLayout.setSearchProviderBottomMargin methods were removed at
https://github.com/brave/brave-core/commit/798973641caa39762bae9dff9d2866c7185ce6c8
but class adapter/bytecode

Chromium commit below is the commit which caused our bytecode test
to fail, because was renamed
setSearchProviderBottomMargin => setLogoViewBottomMargin .

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9b284825edfb4cea09d686dac7456517c1e8b96e

	[Composeplate] Fix composeplate view visibility issue.

	There are 3 issues of the existing NTP:
	1) When DSE is changed between Google and 3P, the return value of
	   ComposeplateUtils.isComposeplateEnabled(mIsTablet, profile)
	   changes, but we didn't recalculate it. It causes the bug that
	   composeplate view button doesn't show again for Google -> 3p ->
	   Google.
	2) If Chrome starts with 3p DSE, ComposeplateCoornidator won't be
	   initialized at all. Switching to Google won't make it visible.
	3) When switching from Google -> 3p, search box's height doesn't reduce
	   from 72dp to 64dp.

	In this CL, we resolve the above 3 issues:
	1) When DSE is changed, initialize ComposeplateCoornidator if hasn't
	   yet; updates the buttons' visibility.
	2) Changes the search box height inside NTP, not in
	   SaerchBoxContainerView. The height is determined by whether
	   composeplate is enabled, as well as whether a shadow is added.
	3) Polish the initialization process of NTP layout to prevent calling
	   same function multiple times.
	Demo: http://shortn/_vdN9koVnsu

	Bug: 474426974
	Change-Id: I3a16e56e655465d36184204657626f2bb7c92f24
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487954
2026-02-26 13:47:45 +00:00
AlexeyBarabash efb6afac18 [cr146][Android] Create waitForNoView(), replace waitForViewCheckingState()
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/abe534931d8325f1c49cf9a70edb1a1eba500339

	Reland "[Android] Create waitForNoView(), replace waitForViewCheckingState()"

	This reverts commit a9f17efd553f18d4d9bb9df5184c7ed1e1b2f8a6.

	Reason for revert: Fixed version - decreased displayed % threshold

	Original change's description:
	> Revert "[Android] Create waitForNoView(), replace waitForViewCheckingState()"
	>
	> This reverts commit 2c35b691d2756aaa58b1d3dbb3a040d45b0500fa.
	>
	> Reason for revert: b/475619743
	>
	> Original change's description:
	> > [Android] Create waitForNoView(), replace waitForViewCheckingState()
	> >
	> > Bug: 471255537
	> > Change-Id: I00a4d97bc5b8f887b5a17bc2440c4c7d11ac5e52
	> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7356538
	> > Reviewed-by: Fiaz Muhammad <mfiaz@google.com>
	> > Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
	> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
	> > Cr-Commit-Position: refs/heads/main@{#1568626}
	>
	> Bug: 471255537
	> No-Presubmit: true
	> No-Tree-Checks: true
	> No-Try: true
	> Change-Id: Ie2e618d6ccbf4863ff1507b0a1bcf710ed20f4db
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7467600
	> Auto-Submit: Mark Schillaci <mschillaci@google.com>
	> Owners-Override: Mark Schillaci <mschillaci@google.com>
	> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
	> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
	> Cr-Commit-Position: refs/heads/main@{#1568760}

	Bug: 471255537
	Change-Id: If8c0b8abad0d36a33a247ad2696b36b3ff9d74ae
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7474110
2026-02-26 13:47:45 +00:00
AlexeyBarabash 127bf8eadd [cr146][Android] Upstream's cleanup at manage_sync_preferences.xml
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/df136265928cb56af0abb4b8fd1553f2504df07a

	[Signin][Android] Remove FirstRunSigninProcessor and related code

	We stopped writing FIRST_RUN_FLOW_SIGNIN_SETUP in 2022
	(https://crrev.com/c/3870839), so this code is not used anymore.

	Bug: 476062000
	Change-Id: Ia55eaee837c8166f39738ee95443f2f3af8fc457
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7485646
2026-02-26 13:47:45 +00:00
AlexeyBarabash d34596b973 [cr146][Android] Introduce TopInsetProvider to decouple from TopInsetCoordinator
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/f9f5b7a181842bdf36228500e83649e3d469fbb1

	[E2E] Introduce TopInsetProvider to decouple from TopInsetCoordinator

	This CL introduces a TopInsetProvider interface to decouple components
	that only need to observe top inset state from the concrete
	TopInsetCoordinator implementation.

	The TopInsetProvider interface exposes:
	- Observer interface for onToEdgeChange notifications
	- addObserver/removeObserver methods
	- getSystemTopInset() method

	This change allows components like NewTabAnimationLayout,
	LayoutManagerChromePhone, NewTabPage, and NativePageFactory to depend
	on the interface rather than the concrete implementation, improving
	testability and reducing coupling.

	Bug: 475877315
	Change-Id: Ife8fa0daa0a8b53e596d40a1f20f72a7748fe06a
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7459640
2026-02-26 13:47:45 +00:00
AlexeyBarabash ff3e9df6a1 [cr146][Android] Rename ObservableSupplier -> MonotonicObservableSupplier
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b8cb84d2901aeffc0003b15622a3052de7a20023

	Rename ObservableSupplier -> MonotonicObservableSupplier

	Bypass-Check-License: Rename
	Change-Id: I101e53b7542d56566c128c23e6d6b081bcd3348c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487973
2026-02-26 13:47:45 +00:00
AlexeyBarabash 2e9c3544c1 [cr146][Android] Suppressed ScannerUseDelimiter errorprone warning
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/5ce50a86e2a7af89af9373c703787db03b977ae8

	Reland "Roll Error Prone from vNPU2aqNbmnmcCMUn... to dhl6VZIaB1O_e5ero..."

	This reverts commit 4050f9a0e9be23071a288956411093a85d634933.

	Reason for revert: fixed the compile error

	Original change's description:
	> Revert "Roll Error Prone from vNPU2aqNbmnmcCMUn... to dhl6VZIaB1O_e5ero..."
	>
	> This reverts commit b1399b850a0bc42567cc637bed9c06ef7b08ebe6.
	>
	> Reason for revert: culprit causing tree closure, see https://ci.chromium.org/ui/p/chromium/builders/ci/android-cast-arm-rel/25636/overview
	>
	> Original change's description:
	> > Roll Error Prone from vNPU2aqNbmnmcCMUn... to dhl6VZIaB1O_e5ero...
	> >
	> > If this roll has caused a breakage, revert this CL and stop the roller
	> > using the controls here:
	> > https://skia-autoroll.corp.goog/r/error-prone-chromium
	> > Please CC agrieve@google.com,clank-build@google.com,clank-library-failures@google.com on the revert to ensure that a human
	> > is aware of the problem.
	> >
	> > To file a bug in Chromium: https://bugs.chromium.org/p/chromium/issues/entry
	> >
	> > To report a problem with the AutoRoller itself, please file a bug:
	> > https://issues.skia.org/issues/new?component=1389291&template=1850622
	> >
	> > Documentation for the AutoRoller is here:
	> > https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
	> >
	> > Cq-Include-Trybots: luci.chrome.try:android-internal-dbg
	> > Tbr: clank-library-failures@google.com
	> > Change-Id: I93b10010558e82f00059cdd33ff401b2ac31b92e
	> > Bug: 475818736
	> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7471468
	> > Owners-Override: Andrew Grieve <agrieve@chromium.org>
	> > Reviewed-by: Martin Kong <martinkong@google.com>
	> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
	> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
	> > Cr-Commit-Position: refs/heads/main@{#1569194}
	>
	> Bug: 475818736
	> Cq-Include-Trybots: luci.chrome.try:android-internal-dbg
	> Change-Id: I383609af7ad8ca98218029e4c3890fbc2bbc6a46
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7474153
	> Commit-Queue: Anthony Cui <cuianthony@chromium.org>
	> Auto-Submit: Anthony Cui <cuianthony@chromium.org>
	> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
	> Owners-Override: Anthony Cui <cuianthony@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1569198}

	Bug: 475818736
	Cq-Include-Trybots: luci.chrome.try:android-internal-dbg
	Change-Id: I4c28819b528d617878ae0649ce9d3688577f9972
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7474115
2026-02-26 13:47:44 +00:00