The following content consists of the original commits. Original HEAD
commit is b599de1bcf0702ca11466a3ae1afeac732839544
* shields: add unified panel UI resources and skeleton handler
Add the new unified Shields panel that replaces the legacy popup,
triggered from the existing toolbar Shields icon.
- BraveUnifiedPanelHandler.java (new): skeleton handler with
popup display, basic shields status rendering, favicon display,
and lifecycle management.
- BraveShieldsHandler.java:
- Add mBlockedUrls tracking to BlockersInfo.
- Add getTotalBlockedCount() and getBlockedUrls() accessors for
the unified panel.
- BraveShieldsContentSettings.java:
- Add resetSiteToDefaults() to reset all per-site shields
settings to global defaults via individual JNI getter/setter
pairs.
- BraveToolbarLayoutImpl.java:
- Instantiate BraveUnifiedPanelHandler and route Shields button
taps through it instead of the legacy handler.
- All XML drawables, layouts, string resources, colors, styles,
and BUILD.gn/brave_java_sources.gni wiring.
* shields: implement advanced options and toggle controls
Wire up the expandable advanced options section and all toggle
controls in the unified Shields panel.
- BraveUnifiedPanelHandler.java:
- Implement shields on/off toggle with observer notification.
- Add block scripts and fingerprinting toggles with
BraveShieldsContentSettings persistence.
- Add advanced options expand/collapse with navigation items.
- Add reset site shields to defaults.
- Stub methods for sub-panel navigation.
- BraveToolbarLayoutImpl.java:
- Extract BraveShieldsMenuObserver into a shared instance and
register it on both the legacy and unified panel handlers so
either can trigger toolbar icon updates and page reloads.
* shields: add sub-panel navigation for detailed settings
Implement the drill-down sub-panels accessible from the advanced
options section of the unified Shields panel.
- BraveUnifiedPanelHandler.java:
- Fill out stub navigation methods with full implementations.
- HTTPS upgrades panel with strict/standard/disabled radio
options.
- Trackers & ads panel with aggressive/standard/allow settings.
- Cookies panel with block-all/block-third-party/allow settings.
- Shred site data panel with auto-shred mode selection dialog
and immediate shred with confirmation.
- Each sub-panel persists its selection via
BraveShieldsContentSettings and provides return navigation
to the main panel.
* shields: display favicons for blocked trackers and ads
Add favicon display for blocked tracker domains in the unified
Shields panel, showing up to three cascaded icons with a
prohibited overlay.
- BraveUnifiedPanelHandler.java:
- Add asynchronous favicon lookup via
FaviconHelper.getLocalFaviconImageForURL with a multi-step
fallback chain: exact origin -> registrable domain (via
UrlUtilities.getDomainAndRegistry) -> alternative TLDs.
- Prioritize successfully loaded favicons before
letter-placeholder defaults.
- Render circular icon containers with theme-aware backgrounds,
negative-margin cascading, z-ordering, and a stroke-based
prohibited overlay.
- Use UrlFormatter for display-friendly domain names.
- Use ViewUtils.dpToPx for density-independent measurements.
* shields: implement broken site reporting panel
Wire up the broken site reporting panel in the unified Shields UI,
accessible when shields are toggled off.
- BraveUnifiedPanelHandler.java:
- Add showReportBrokenSitePanel() and
setupReportBrokenSitePanel().
- Display site favicon and domain via UrlFormatter.
- Populate category selection from WebcompatReporterHandler.
- Attach screenshot via BraveShieldsScreenshotUtil.
- Pre-populate contact info from existing reporter preferences.
- Add learn-more clickable span linking to community support.
- Submit report via WebcompatReporterHandler with toast
confirmation.
* shields: Add tests for suitable bits of the implementation.
Add unit tests for the new unified Shields panel logic introduced
across the preceding commits.
- BraveShieldsContentSettingsResetTest.java:
- Verify resetSiteToDefaults() reads global defaults and applies
them to a per-site URL for all eight setting types.
- Verify HTTPS upgrade setter is skipped when global default is
"default" and called when it is any other value.
- BraveUnifiedPanelHandlerStatTest.java:
- Verify addStat() increments the correct counter for each block
type (ads, trackers, scripts, fingerprinting).
- Verify blocked URL recording with 50-item cap.
- Verify clearBraveShieldsCount() resets and removeStat() deletes
tab entries.
- Verify getters return sensible defaults for unknown tab IDs.
- Verify per-tab stat isolation.
- BraveUnifiedPanelFaviconPriorityTest.java:
- Verify populateBlockedItemsContainer() prioritises successfully
loaded favicons before letter-placeholder defaults.
- Verify display is capped at MAX_BLOCKED_ICONS (3).
- Verify onFaviconResult() countdown triggers population only
after all loads complete.
- Verify cascading negative-margin layout for overlapping icons.
- BUILD.gn (brave/android/junit, brave/test):
- Register new robolectric_library targets for the shields and
preferences.website test packages.
* Cleanup & Remove old Shields UI.
This commit completes the changeset by removing the old Shields UI from
the codebase.
Since only a small amount of functionality needed to be kept from the
old UI's code, it has been relocated into BraveUnifiedPanelHandler
* Apply Shields UI tweaks.
This commit applies a number of minor tweaks that were initially missed
from the Figma designs. This should make the look and feel match with
the intended UX fully.
* Shields: Task-post & Back button cleanup.
The back button has been moved to its own XML which is then included by
other dialogs. Additionally, the Shred UI has been fixed up to be
consistent with the existing dialogs.
The favicon rendering task uses PostTask now. The check for whether or
not to post the task has been removed since the callback checks it
anyway and the saving from not posting the task would require pretty
tight timing in order to actually be of benefit so it's arguably not
worth double-checking.
* Shields: Improve accessibility for toggle switches.
Since we have custom-designed toggles, TalkBack would consider them
images. We now attach a delegate to these controls that causes them to
be treated as switches.
* Shields: Improve title sizing, HTTPS reset & fix radio buttons
The title sizing now uses a standard Material style for titles along
with a few tweaks that make it dynamically downsize itself to avoid
truncation.
The HTTPS settings reset is now called unconditionally in order to
resolve a report from the puLL-Merge bot.
Finally, Since there appears to be no easy way to group the radio
buttons whilst retaining the desired style, the code now unconditionally
unchecks them after a settings reset to ensure multiple entries don't
appear to be selected.
* Shields: Remove tryAlternativeTldFavicon code.
We originally implemented a hack for verifying if favicons would load at
all. It has served its purpose and we of course can't legitimately
attempt to pull favicons for other TLDs since they could just be
flat-out wrong. There may be desire for a mechanism in future where we
alias domains, but that is largely out-of-scope for our UI.
* Shields: Support zooming/scrolling the screenshot preview.
When a user reports a site and previews the screenshot (if they choose
to send one) they can now zoom and scroll around the image.
This commit includes the implementation of a reusable class for handling
inputs and scaling the image. I didn't find any pre-existing code for
this behaviour and whilst it could be used elsewhere, I've left it
embedded as a static class since there are no other potential users at
this juncture.
* Shields: Restore code that handles WebView usage.
The old implementation of the Shields panel would ensure
`mHardwareButtonMenuAnchor`/`mContext` were initialised when in WebView
only mode. We still require this in order for the panel to still work.
* Implement more requested minor UI tweaks.
This adds animations to the toggle buttons in the new Shields UI and
fixes the ripple animation on the advanced expander which was missing a
single XML attribute that clamped the effect to the bounds of the
rounded box.
The blocked trackers (without a favicon) have also been tweaked to use
colours from Nala and the letter has been sized up to match the Figma
design.
* Switch toggles to Material UI
This commit switches the toggles to Material UI. This doesn't appear to
have any discernible issues but I'm keeping it separated just in case.
* Support Material You colours and tweak minor UI issues.
This commit alters the XML files so that Material You themes should work
out of the box once the Brave flag for dynamic colours is enabled.
Also resolves a few minor UI issues with placing/alignment/sizing.
When an Origin purchase is first detected via credential refresh (e.g.
linked from account.brave.com), open the Origin settings screen and show
the existing restart snackbar.
The shared first-purchase trigger in BraveOriginService::OnCredentialSummary
calls the navigation delegate, whose Android branch was previously a no-op.
It now routes through a JNI helper that opens BraveOriginPreferences with an
explicit show-restart flag, where onViewCreated shows the restart snackbar.
Play Store purchases are left to the existing Java subscription flow (which
shows the "Disabling features" spinner while credentials are fetched, then
transitions to the restart prompt). The helper skips opening when a Play
Store purchase token is present so the screen isn't opened twice.
Resolves: https://github.com/brave/brave-browser/issues/55991
The Brave News inline content ads pipeline is already disabled via
https://github.com/brave/brave-core/pull/32359. This PR removes the
remaining inline content ads Android code and mojom code that no longer
has any effect.
Move BraveConstants.java from org.chromium.chrome.browser.util to
org.chromium.chrome.browser to align with upstream's hierarchy.
Upstream's analogous ChromeStringConstants lives directly under
org.chromium.chrome.browser, and the util package is treated as
deprecated for new top-level constants/utilities.
No behavior changes — pure refactor.
Resolves: https://github.com/brave/brave-browser/issues/55685
Adds support for the https://brave.com/deeplink-android-origin-promo
deep link so that Google Play promotional content events for Brave
Origin can route users directly into the Origin payment screen (or
settings page for existing subscribers).
Routing happens via the existing autoVerified brave.com App Link.
BraveActivity catches the intent before upstream's URL handling in
initializeState (cold start) and onNewIntent (warm start), and the
Play Install Referrer flow continues to support deferred routing for
first-install attribution.
Resolves: https://github.com/brave/brave-browser/issues/55654
Aligns brave:// with chrome:// in IntentHandler.intentHasUnsafeInternalScheme.
The upstream guard is unaware of the Brave alias because the brave:// →
chrome:// rewrite happens after the intent layer.
BraveIntentHandlerClassAdapter redirects the upstream call site through
BraveIntentHandler.intentHasUnsafeInternalScheme. The Brave method defers to
upstream first, then additionally rejects brave:// under the same category
guard upstream uses. A new BraveIntentHandlerInternal helper holds the
bytecode stub used to back-call the (private) upstream method.
Resolves: https://github.com/brave/brave-browser/issues/55473
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/040e46a7c7697d0eb32e58b30a39e9822d045d81
commit 040e46a7c7697d0eb32e58b30a39e9822d045d81
Author: Xi Han <hanxi@google.com>
Date: Wed Mar 11 18:33:45 2026 -0700
[NtpRefactor] Split NewTabPageLayout into NewTabPageCoordinator and
layout.
This is a refactor CL without any behavior changes. In this CL:
1. Split major logic from NewTabPageLayout to NewTabPageCoordinator,
only Layout implementations remains in the NewTabPageLayout;
2. To preserve the renaming history, temporarily renaming
NewTabPageLayout to NtpLayout. We will rename back in follow up CL
https://crrev.com/c/7658503.
Design doc: go/ntp-mvc-refactor.
Bug: 487641528
Bypass-Check-License: NewTabPageCoordinator is a renamed from NewTabPageLayout.
Change-Id: Ief8fd9b048696a875ccd8167421d88ad2e667f04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7658403
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1598132}
Used MultiInstanceOrchestratorImpl override.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1eff3e2dfcb821e6a6fbccae543632bb5ebbce98
commit 1eff3e2dfcb821e6a6fbccae543632bb5ebbce98
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date: Wed Mar 18 15:32:23 2026 -0700
[MIR] Create MultiInstanceOrchestrator as a singleton to hold business
logic that is not scoped to a specific ChromeTabbedActivity
This CL attempts to simplify accessing multi-instance business logic
from callers that do not have access to a MultiInstanceManager instance
(for example, CCT context based feature implementations), by introducing
a MultiInstanceOrchestrator singleton implementation.
The CL only moves method moveTabsToWindowByIdChecked() as an initial
example for usage of this class. Other MultiInstanceManager API methods
that can be extracted into the singleton will be moved in followup CLs.
Bug: 491893859
Change-Id: I459a5ed79b058b548f42fd3c85f0b9382e756803
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7659642
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
Cr-Commit-Position: refs/heads/main@{#1601584}
Removed PREF_LOYALTY_CARDS from preferences.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9d45f2f1f7f2f4e07a9ebf93be1873fd2bc34109
commit 9d45f2f1f7f2f4e07a9ebf93be1873fd2bc34109
Author: Norge Vizcay <vizcay@google.com>
Date: Fri Mar 13 07:52:52 2026 -0700
Remove kAutofillEnableLoyaltyCardsFilling feature flag
The AutofillEnableLoyaltyCardsFilling feature has been launched.
This CL removes the feature flag and all related code/tests that
were conditionally enabled by it. All loyalty card filling
functionality is now enabled by default.
Bug: 395831853
Test: CQ passes
Change-Id: I1a686fcdf1724138ade660229b54760d563f4d66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7661784
Reviewed-by: Christoph Schwering <schwering@google.com>
Reviewed-by: Florian Leimgruber <fleimgruber@google.com>
Commit-Queue: Norge Vizcay <vizcay@google.com>
Cr-Commit-Position: refs/heads/main@{#1599049}
ShortcutsBackend initializes asynchronously. When clearBrowsingData() was
called during startup, the backend was still in the INITIALIZING state and
its OnHistoryDeletions handler silently returned early, leaving shortcut
suggestions (clock-icon entries) intact after exit.
Fix by adding a JNI bridge (BraveShortcutsUtils.initThenRun) that waits for
ShortcutsBackend to finish its async DB init via OnShortcutsLoaded() before
invoking clearBrowsingData(). Also move the clear-on-exit call from
initializeState() to finishNativeInitialization() where the profile is
available, and add FORM_DATA (autofill) to the cleared data types.
* [Android] Register Brave as Android AutofillService for address autofill
Re-enables the Android AutofillService that was removed in
https://github.com/brave/brave-core/pull/25759 due to crashes on
split-APK installs. Uses the SplitCompat pattern
(SplitCompatAutofillService base class) so the service works correctly
when installed from the Play Store.
When the user selects Brave as their autofill provider in Android Settings,
Brave can fill saved address profiles into third-party apps and save new
addresses from manually filled forms.
Resolves: https://github.com/brave/brave-browser/issues/41334
* Android: Implement favicons for Password Manager entries
We now display favicons for Password Manager as happens for our desktop
edition.
In order to do this, the C++ side now passes in the full origin so that
we have the clean, proper URI in order to fetch the favicon.
Resolvesbrave/brave-browser#52775
- Removes `AssetsPricesHelper` class by inlining `fetchPrices` at its two call sites (`BraveWalletPanel` and `Utils`) with direct `assetRatioService.getPrice()` calls, eliminating an unnecessary `MultiResponseHandler` wrapper.
- Moves price lookup helpers (`getPrice`, `getPriceForAsset`, `parseAssetPrice`) into Utils.java where all callers already have access.
- Removes the now-unused `FetchPricesResponseContext` from `AsyncUtils`.
- Fixes copy-paste bug in `ParsedTransaction` where `minBuyAmountArg` was reading `txArgs[1]` (same as `sellAmountArg`) instead of `txArgs[2]`, confirmed against the desktop C++ implementation in `eth_data_parser.cc`.
- Fixes general warnings for `ParsedTransaction` class.
- Improves Javadocs.
* Remove `BraveFirstRunFlowSequencer` class
The sequencer only delays `initializeViews()` (the method called when
the callback is fired) until the account/child-status checks finish.
It does not influence which onboarding steps run or any prefs.
Given the current code, we can remove `BraveFirstRunFlowSequencer`
completely and simply call `initializeViews()` directly in both
`WelcomeOnboardingActivity` and `BraveVpnSupportActivity`.
The behavior will remain be the same, just without that async wait.
* Apply code formatting
To avoid copy/pasting of the same code in `BraveLocationBarQRDialogFragment` and `BraveSyncScreensPreference`, the common code related to qr code reading was moved to `QRCodeCameraManager` class.
Resets the overflow main menu to the top every time is shown. Modifications are applied using bytecode manipulations as we needed to modify upstream class `AppMenuHandlerImpl`.
Here we remove the original interfaces and move them directly to the places they are used.
Interfaces are still genereric, replacing them to a specific interfaces should be done when these parts of code are touched.
In addition, in this PR were fixed presubmit warnings in the files that were touched.
Introduces a unified Wallet-fragment architecture that centralizes how Brave's Android wallet UI talks to WalletModel, manages pending transactions, and stays in sync with keyring state.
[Android] Adds kBraveFreshNtpAfterIdleExpirement experiment flag.
That commit adds the flag with parameters and a functionality
to use cached flags on Android.
Resolves: https://github.com/brave/brave-browser/issues/50567
Simplifies the wallet sign message UI by consolidating DAppsMessageFragment and SignMessagePagerAdapter into SignMessageFragment removing unnecessary abstraction layers.
Currently we have a failure on aab builds:
Service BookmarkWidgetService should be declared in the base manifest.
That commit moves it to base module and renames to
QuickActionSearchAndBookmarkWidgetService.
Resolves: https://github.com/brave/brave-browser/issues/49959
[Android] Makes a scroll in quick action search widget
There are still cases that row with tiles is cut or not displayed when
there is space for them. We better show all fav tiles when the widget
is not in a minimum height and use scroll there.
Resolves: https://github.com/brave/brave-browser/issues/49890
* [Android] Remaining Brave options for quick shortcut settings
* Fox for component build
* Clean up unused profile references
* Remove Brave News option for now
* Fix for browser tests
* Connects GPS Brave Origin purchase with SKUs SDK
We need to pass order token to the SKUs SDK to be able to register
Brave Origin purchase from Google Play Store on Android. The commit
exposes Brave domains util functions and SkusService via mojom to
Java.
Resolves: https://github.com/brave/brave-browser/issues/49619
* [Android] Initial integration of Brave adaptive buttons
The Bookmarks button is the first in the list; the rest of the buttons will be added in separate PRs.
Important notes:
- override via `chromium_src` doesn't work for `patches/chrome-browser-ui-android-toolbar-adaptive_toolbar_enums.h.patch` since this file is parsed by `java_cpp_enum.py` to convert it to java enum
- patch to `java_cpp_enum.py` was added to be able to do 1 line patch, since upsteam parses each value as a separate line
- in `patches/chrome-browser-ui-android-toolbar-adaptive_toolbar_enums.h.patch` were added values for all planned Brave buttons to avoid additional patching for each consecutive PR
* Python patch optimisations
* Presubmit fixes
* Remove python patch in favour of multiline header patch