This change ensures that the first app launch with the Chromium web views feature flag enabled will invalidate tab session restoration data to ensure that upgrades dont restore invalid data
* Hide unsupported buttons in customize toolbar panel
Overrides customize_toolbar_handler.cc to hide unsupported buttons in
the customize toolbar panel. Especially, this patch overrides
`CustomizeToolbarHandler::ListActions()` to filter out buttons:
* Payment Methods
* Addresses and More
* Translate
* Reading mode
Resolves https://github.com/brave/brave-browser/issues/44791
Improve Block Elements design to allow blocking elements behind picker.
Added an ability to minimize the Element picker's card to resolve the
situation, when it pops up above the target element, which one the user
wants to block.
Added a new design for the Element picker card, which is Nala styled,
to follow the design line.
Resolves https://github.com/brave/brave-browser/issues/45104
---------
Signed-off-by: Vadym Struts <vstruts@brave.com>
This PR corrects all the test failures on Windows. Most of them are
related to file path separator, and similar things. One failure in
particular had to do with `subprocess.check_output` dropping `\r` from a
string when enconding to utf-8, which may be something to follow up on
plaster, to make sure saved patches match exactly what was produced by
the terminal.
It is not clear why tests have not been running for Windows all along,
however this is soon to change, as it is clear the windows run is taking
place with https://github.com/brave/brave-core/pull/29592.
Resolves https://github.com/brave/brave-browser/issues/47027
Resolvesbrave/brave-browser#46871
During the launching tab modal dialog(ex, js alert), browser prevent
launching modal dailog from inactive tab.
When checkcing inactive tab, mostly tab's web contents visibility is checked.
So, if it not HIDDEN, dialog is shown. This works well except split view.
In split view, inactive split tab's web contents visibility is not HIDDEN.
Because of that, tab modal is shown from inactive split tab.
To prevent this, TabModalDialogManager/WebContentsModalDialogManager
should check tab's activation state also.
TEST=SplitViewWithTabDialogBrowserTest.InactiveSplitTabTest
A Tool is a feature the LLM can "use" by sending a tool request with some input parameters specified.
This will eventually get added to the events of a conversation history entry (via `ToolUseEvent` added in this PR).
We will then provide a response to the tool in the ToolUseEvent's output field (not implemented in this PR).
The LLM will be called again providing an additional role=Tool conversation history entry (not implemented in this PR).
We put tool use requests and responses in the same object (`ToolUseEvent`) for ease of access and UI rendering. Otherwise there would be a lot of cases of searching history to find a relevant tool use response for a given tool use request if we kept them in assistant and user (or tool) `ConversationTurn` items.
In order to keep this submission size as small as possible, it only includes what's necessary to define the mojom structs, so that other PRs that use them can be created in parallel.
Subsequent submissions will be:
- Tool base class
- Conversation API support for sending defined tools, tool use requests, and tool use responses
- ConversationHandler getting an agentic loop to perform the usage of the Tools and send the responses back to the engine
- UI representation for tool uses
- Tool implementations
This PR removes the brave_l10n country code preference, which was
originally added to support new tab takeover (sponsored images) for
Rewards users based on GeoIP. It’s no longer needed, as those ads are
now delivered using variations GeoIP. This also resolves a long-standing
issue where other parts of Brave incorrectly used GetCountryCode,
receiving the GeoIP country instead of the device region.
[ads] Remove dead resources code
We now use the variations service to provide Geo IP for anti-targeting,
conversions, and purchase intent. Previously, we used the device region,
so we can remove the listener for locale changes. We already handle
registering, unregistering, and notifying listeners of changes to the
CRX component.
Since regional capabilities are still being actively updated, we need to
monitor those changes closely. To reduce risk, this change uses the
variations service to provide the Geo IP for anti-targeting, conversions
and purchase intent, bringing these signals in line with how ads are
served based on Geo IP. Previously, we used the device region, which
isn’t standard practice for advertisers.
* Add Containers Settings section.
* Update strings.
* Add isRemoving property to handle delete dialog disabling.
* Migrate to CrLitElement.
* Use templated i18n in html.
* Merge AddContainer and UpdateContainer.
* Few improvements to web component impl.
* Use sources.gni for additional chromium_src deps.
* Add todo.
* Rename containers setter/getter to/from prefs.
* Clarify few things in containers removal/update.
* Remove webui mention from mojo interfaces.
* Rename SettingsPageHandler -> ContainersSettingsHandler.
* Move simulated async data removal to delegate.
* Replace sync ContainerSettingsHandlerFactory with a BindUI call.
* Fix isRemoving_ handling.
* Migrate to generated webui strings in TS.
* Rename BraveContainers feature to Containers.
* Close dialogs when edited/deleted container disappeared from prefs.
* Disallow container name constructed only from spaces/tabs.
* Add CRUD error codes, remove no-op delegate and dialog disabling.
* Add logs on prefs read issues.
* Remove IDSToName in favor of generating a string on TS side.
* Add feature checks in few places.
* Fill DEPS explicitly.
Resolves https://github.com/brave/brave-browser/issues/46066
When vertical tab strip mode is enabled, the tab strip could be
reattached to the original parent during destruction. In this case, theme
changing could occur. But unfortunately, some of native widget's
implementation doesn't check the validity of pointer, which causes crash.
e.g. DesktopNativeWidgetAura's many methods desktop_tree_host without checking it's validity.
In order to avoid accessing invalid pointer, filters here.
TabStripControlButton::UpdateBackground() tries to access theme provider
by calling BrowserTabStripController::GetCustomBackgroundId() and
crash could happen there.