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.
The Brave News inline promoted ads pipeline is already disabled via
https://github.com/brave/brave-core/pull/32359. This PR removes the remaining
promoted content ads Android code and mojom code that no longer has any effect.
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.
* [Android] Migrate private NTP to Leo tokens and fix VPN icon visibility
- Drop Brave-local duplicates of ic_product_vpn / ic_antenna /
ic_product_private_window so the private NTP renders the Leo
(Nala) icons via resource_overlay; tint the inner icon layer to
primitive_private_window_60 in IncognitoNewTabPageView so the
designed purple still wins on the fixed-dark surface.
- Remove Brave-local primitive_private_window_5/10/20/60/80/90 from
brave_colors.xml; references now resolve through Leo's primitive
scale (same hex for _60/80/90; slight neutral shift for _5/10/20).
- Remove the runtime setBackgroundColor on the scroll view that was
masking the gradient drawable defined in the layout XML.
- Switch the private-tab logo to ic_social_brave_release_favicon_-
fullheight_color (Leo) and size in dp (42 phone, 56 tablet) to
match Figma and to stop scaling with accessibility font size.
- Resize circle drawable to 32x32 (was 32x33), constrain inner icon
via new_tab_page_incognito_icon_inner_size (20dp / 24dp tablet),
and grow circle to 48dp on tablets.
- Introduce per-form-factor style aliases (IncognitoNtpTitle /
SectionTitle / SectionDescription / Cta) under values/ +
values-sw600dp/ so phones and tablets land on the right Leo
typography ramp without per-TextView attributes.
- Delete the now-dead ntp_bg_incognito and incognito_modern_-
primary_color color entries.
Resolves: https://github.com/brave/brave-browser/issues/53958
* [Android] Show loading state in Origin preferences during post-purchase credential fetch
When a Brave Origin purchase is completed, there is a delay while the
receipt is passed from Play Store to the SKUs SDK via
fetchOrderCredentials. During this time, the Origin preferences screen
opens but credentials aren't ready yet.
- Disable all toggles and clickable preferences until
fetchOrderCredentials completes
- Show a snackbar with "Disabling features" spinner instead of
"Restart now" during the credential fetch
- On success, re-enable preferences and transition to "Restart now"
- On failure, close the preferences screen
- Always show restart snackbar on toggle change regardless of
setPolicyValue result, since failure means a restart is needed
- Remove duplicate color definitions (schemes_primary_fixed_dim,
schemes_on_primary_fixed, semantic_text_secondary,
semantic_text_tertiary) that already exist in nala tokens
Resolves: https://github.com/brave/brave-browser/issues/53915
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.
Update Android Origin paywall from subscription to one-time purchase
- Replace monthly/yearly subscription plan selectors with single "One Time Purchase" plan row
- Add 4th feature benefit: one-time purchase, no subscription cost
- Add Origin description and Brave Search Premium note sections
- Replace "Try 7 days free" with "Buy now" button
- Replace "Refresh your credentials" with "Get a login code" button
- Remove "Learn more about Origin" button and unused resources
- Update text styles per design spec
- Comment out billing integration for later hookup
Resolves: https://github.com/brave/brave-browser/issues/52855
Redesign the Origin preferences screen: add a custom restart
snackbar with dismiss button shown on toggle changes, split then
description into styled title/body/note sections, and rename
the bottom section from Subscription to Purchase.
Resolves: https://github.com/brave/brave-browser/issues/52774
Updates the Day Zero onboarding experience on smartphones and small screen devices to a multi‑step, horizontally advancing flow driven by CTA buttons.
It introduces distinct layouts per step, a pager animation helper, and updates onboarding logic to support a scalable, multi‑step sequence with minimal duplication.
Tablet support is intentionally out of scope and will be handled in a separate PR.
Remove Android Super Referrals. The feature is no longer supported or
used, and this cleanup helps reduce unused code and simplify the overall
system as part of https://github.com/brave/brave-browser/issues/44403.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c818a3850128c73f62537482e36f43367e9c40ce
commit c818a3850128c73f62537482e36f43367e9c40ce
Author: Tomasz Wiszkowski <ender@google.com>
Date: Fri Oct 3 15:11:19 2025 -0700
Ensure all StatusIcons meet the specific size constraint.
We've observed a weird behavior when toggling search engines results
in oversize and cropped search engine icon shown in the omnibox.
This is partially because the ChromeTransitionDrawable animating
between states receives Drawables of inconsistent sizes, and changes
its intrinsic size, trying to accommodate the larger of the drawables.
Second more important factor is that the StatusIconResource carrying
drawable was shared between two different views - the NTP Fakebox and
the Omnibox. One view altering the Drawable state made the other view
instantly see these alterations, resulting in wrong positioning of
the icon.
This change aligns all StatusView icon sizes, ensuring that no icon
can ever change the intrinsic size of the TransitionDrawable.
Change intentionally kept small as it will need to be cherrypicked.
Fixed: 449181250
Change-Id: I59953971b99a01d015aa2398db058677c7816d7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7007583
Commit-Queue: Tomasz Wiszkowski <ender@google.com>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1525046}
This change has been produced using a Ruby script that implements the
following logic:
1. For each <color> tag in the destination, try to find one in the
source with the same name
2. If found, update the destination tag with the colour from the source
tag
3. If not found, do nothing and move onto the next tag.
4. Tags that exist in the source but not the destination are ignored.
Currently, some tags exist in the destination XML that are missing from
the source and also vice versa.
Once this has been resolved, we should be able to delete the files in
this diff and move to simply copying the generated XML files straight
out of brave/leo.
Additionally, a small change has been made to the Brave Sync "Add New
Device" button to use a Nala-defined colour rather than being hard-coded
to white.
Closesbrave/brave-browser#49143
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e981dd46821f563acaa6a5a3d8fd51e046e311e2
commit e981dd46821f563acaa6a5a3d8fd51e046e311e2
Author: Patrick Noland <pnoland@google.com>
Date: Wed Aug 13 13:37:18 2025 -0700
[Toolbar] Rework hairline positioning
Manually calculating the margin for the hairline is error-prone and
tedious when multiple components can alter the height of the toolbar.
Instead of manual manipulation, we can position it "for free" by using
coordinator layout's anchor gravity concept.
This does require switching the toolbar container to be a
CoordinatorLayout. Mostly this is easy since CoordinatorLayout is a more
powerful FrameLayout. There is one consideration: OptimizedFrameLayout,
formerly in the inheritance chain for the toolbar container, reduced the
number of measure calls on ToolbarLayout for performance reasons.
This ends up not mattering because CoordinatorLayout performs the same
number of measure calls.
NO_IFTTT=Adding block for the first time
Change-Id: Idfbb41afbbb1d361214cd0e8e585fefa545aee89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6828889
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
Commit-Queue: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1501003}
The custom menu item preference screen follows the Figma design and is composed by two sections, Main menu and Page actions.
The screen shows only those items that are supported by the device, items that will never appear won't be shown.
Each item's visibility will default to true and each preference is saved on shared preferences.
The only two items whose visibility cannot be modified are the Main Settings item and the Custom Menu item itself.
Implements Brave origin paywall screen and handles subscription
purchases on Google Play Store. There is no entry point to it
currently, it will be done in the feature PRs
Resolves: https://github.com/brave/brave-browser/issues/48279
* [Android] Initial integration of quick shortcut button
- Adds flag for quick shortcut (disabled until all Brave items are available)
- Makes parity with options available with the upstream
- Visual and UI fixes
* Moves flag under Android guards
* Move java classes into brave/browser for quick_search_engines
* Move serach_engines resources to brave/browser/search_engines
* Add translations files for search_engines android string
* Add dimens
Add a function to load favicons
* Add close menu id for quick search
* Add missing deps
* Move quick search engines changes to brave/browser/quick_search_engines
* Remove comments for BUILD.gn
* Add support for diferent variants
* Remove omnibox highlight which shows up right after onboarding
* Add different variants function
* Add search widget promo on NTP
* Add notification permission changes
* Update widget promo UI
* Update wdp check
Resolve presubmit issue
* Add rewards 3.0 feature flag
* Add a function to check for rewards 3.0 flag
Update entry points for rewards with rewards 3.0 flag
* Add RewardsPageActivity/RewardsCustomTabRootUiCoordinator to show rewards 3.0 changes in custom tab
* Address rewards reset for rewards 3.0
* Add activity transition for rewards page
* Remove onBackPressed override
* Add close button to close the rewards panel as we have disabled back press
Update close button position on the page
* Add creator changes for rewards 3.0
Remove logs
Add null check
Remove changes for backpress
* Add changes for handling creators
Encode Url for creators
* Add open url native fucntion
* Add bubble in query params
* Add bytecode changes for BaseCustomTabActivity
Add native function to open url into rewards_page_ui
* Update copyright header year
* Update close icon for rewards page
Remove comments and refactor changes
* Address naming related changes
* Add test for bytecode changes
Resolve rebase error
* Update changes to use TabUtils open tab
* Remove close button
* Add FullScreenCustomTabActivity