This stores features that are unavailable in the group container similar to favourites to adjust how the shortcuts widget is displayed when features are unavailable due to Brave Origin or enterprise policies.
Applied rounded corners to panel's contents view.
Introduced brave::GetPanelContentsRoundedCorners(PrefService*, bool has_header)
which derives corners from the pref and current header presence.
Route GetRoundedCorners() through it via patch, reading header_view_ state
(set before AddChildView) instead of the stale coordinator entry ID.
Call UpdateContentWrapperChildCorners() from UpdateBorder() overrides so
corners are re-applied on panel open and pref change.
Resolves no issue - use umbrella issue (brave/brave-browser#51462)
TEST=SidePanelUtilsTest.*, SidebarBrowserTest.SidebarV2ContentCornersUpdateOnStateChange
`resource_component_` was held as a nullable `raw_ptr` but the
factory always provides a valid object. Changing it to `raw_ref`
removes the null guards throughout and adds a `CHECK_DEREF` in the
factory so a missing component crashes immediately.
To add a new BraveVpnService implementation based on Architecture 2.0,
which must co-exist with Architecture 1.0 for quite a while, we need
to split service's interface and implementation. All the external
components will keep accessing VPN service via the BraveVpnService
interface, but the implementation mostly goes into BraveVpnServiceImpl.
This change adds the second service implementation, BraveVpnServiceImpl,
for Architecture 2.0. It will live in a "components/brave_vpn/browser/v2"
subdirectory, but will eventually move into "components/brave_vpn/browser"
once V1 implementation has been removed.
Notable changes:
- fully testable BraveVpnServiceImpl v2 stub implementation, in a
dedicated "v2" namespace;
- BraveVpnServiceFactory can now create a proper implementation based
on the compile-time GN flags;
- v1/v2 include isolation using DEPS include rules (so that the
implementations can't depend on each other);
- stub unit test for BraveVpnServiceImpl v2.
Resolves https://github.com/brave/brave-browser/issues/54597
This reverts commit 31ac5c1ba8.
This change had been introduced under the impression we did not make use
of the hermetic toolchain to build the iOS code, but that's not
accurate. This is a partial revert of the change disabling the hermetic
SDK during the iOS checkout.
Bug: https://github.com/brave/brave-browser/issues/55812
* Produce metadata tests for parsing edge cases
These are some edge cases I found while doing some sec reviews with
an LLM. They seem like some good edge cases so the following commit
also addresses them to make sure the tests now pass.
* [Polkadot] Add asset hub westend\polkadot networks under flag.
This PR adds 2 additional asset hun networks to network_manager that are
available under the feature flag along with captured tx data.
* [AI Chat] Add HistorySearchTool exposing local history embeddings
Adds a self-executing Tool subclass that wraps
HistoryEmbeddingsService::Search() so the Leo assistant can semantically
search the user's local browsing history. Returns matches as a JSON
TextContentBlock containing title, URL, snippet, and last visit time.
The tool is not yet wired into any provider; that follows in a separate
commit so this change can be reviewed in isolation.
* [AI Chat] Add unit tests for HistorySearchTool
Covers the input validation and JSON serialization paths exercised by
HistorySearchTool. The full Search() flow is intentionally not faked
here -- HistoryEmbeddingsService has a heavyweight constructor and
faking it pulls in too many dependencies for a tool unit test; the
JSON formatter is exposed via internal:: so it can be tested directly.
* [AI Chat] Wire HistorySearchTool into BrowserToolProvider
The tool is created when history embeddings is enabled for the active
profile (via IsHistoryEmbeddingsEnabledForProfile, which checks the
flag and per-profile eligibility) and surfaced through GetTools().
* [AI Chat] Permit anchors for URLs returned by client-side tools
For Leo models, MarkdownRenderer strips any anchor whose href isn't in the
entry's allowedLinks list -- which today is populated only from the
sourcesEvent that web search emits. Client-side tools (e.g. semantic
history search) had no way to surface trusted URLs, so any [text](url) the
assistant wrote referencing tool results was demoted to a <span>.
Add a sidechannel via the existing ToolArtifact: a new artifact type
"trusted_links" carrying a JSON array of HTTPS URL strings. Conversation
entries flatten these into allowedLinks for the whole assistant group, so
URLs returned by a tool call (which lives in a separate assistant entry
from the follow-up response text) permit anchors in the response.
The artifact is not rendered visually -- it's purely a trust-list. No
mojom struct change, no LLM payload pollution, no "Sources" panel.
HistorySearchTool emits the artifact populated from the URLs in its JSON
results.
* [AI Chat] Add browser test for HistorySearchTool dispatch
Verifies the end-to-end path that unit tests can't reach: the mocked
engine emits a semantic_history_search tool_use event, ConversationHandler
dispatches to the real HistorySearchTool, the tool forwards the parsed
arguments to a fake HistoryEmbeddingsSearch, and the JSON-serialized
result flows back into the conversation history.
A second case exercises malformed args: the tool surfaces an error and
the search service is never called.
Uses the existing AIChatConversationUIBrowserTestBase helper.
On tablet the rewards (BAT) icon lives in the brave_toolbar row, a
wrap_content LinearLayout that caches its measured width. When the icon
is hidden from onMeasure (e.g. when Brave Origin disables rewards), the
implicit requestLayout() from setVisibility() is dropped because the
toolbar is already mid-layout, so the row keeps its old width and the
weighted location bar never reclaims the freed space, leaving a gap
until a device rotation forces a fresh layout.
Route all rewards-slot visibility changes through a helper that, on an
actual change on tablet, re-requests layout on the rewards view itself
(so its row re-measures) off the measure pass, and refreshes the cached
tablet toolbar snapshot.
Resolves: https://github.com/brave/brave-browser/issues/56036
Plumbing for BravePlaylistExclusions component. Installer and registrar to follow suite
Expose PlaylistExclusionsAPI as a protocol with a private impl so Swift can mock it, and add BravePlaylistExclusions.sharedInstance instead of exposing a wrapper on BraveCoreMain.
Register the public header directly in ios/BUILD.gn and remove unused playlist deps from ios/app and ios/browser/web.
Signed-off-by: Eli Hini <8249954+EliHini@users.noreply.github.com>
This change adds a helper class `RandomizedMessageHandlerName` that can be used in JavaScriptFeature's to support randomizing message handler names. The randomized message handler is a UUIDv4 which is injected with the script itself via placeholder replacement.
* [Android] New Nala icons: copy, edit, share, microphone
Icon ic_share_white_24dp is png in the upstream, so for now we have to use png format as well.
* PNG optimisation
* clear window.localStorage from swift side when wallet is reset
* Clear WebUI localStorage on wallet reset via hidden WKWebView
* fix gn check
* address review(kyle) feedback
refactor WebUI localStorage clear to use SequenceBound
Replace the static global objc object and GCD dispatch with a WalletWebviewRunner C++ class held via base::SequenceBound, ensuring correct per-profile lifetime and UI thread enforcement via DCHECK_CURRENTLY_ON.
* address review(stephen) feedback
update func name with more clarity
* [AI Chat] Move HandoffButton lower and make it smaller
Brave's URL bar is centered, so it makes the URL unreadable in more cases than upstream. And Brave's AI Chat conversation UI has large buttons for pausing the tasks, which perform the same function.
- Fix https://github.com/brave/brave-browser/issues/51384
Brave Origin builds disable rewards (enable_brave_rewards =
!is_brave_origin_branded), so the rewards_grant_* endpoints are unused
and should not be required in .env.
This adds an additional tokenized method `sendWebKitMessageSynchronously` alongside `sendTokenizedWebKitMessage{WithReply}` that uses `window.prompt` from SafeBuiltins.
This change adds a new WebGPU web-compat content settings type. This would allow showing a brand new "Webgpu" toggle inside the Brave shields > "Block fingerprinting" secondary UI.
This change also connects the current webgpu scrubbing to this new content setting type which was webgl before. This allows the users to turn on/off the fingerprinting protections selectively on WebGPU APIs w/o changing WebGL.
Resolves: https://github.com/brave/brave-browser/issues/55927
* update