This updates the shred feature to use the correct website data store from the shared configuration rather than use TabManager's when the `UseProfileWebViewConfiguration` feature flag is enabled
This updates the `TabStateFactory` to no longer pass in the initial WebKit configuration when the `UseProfileWebViewConfiguration` feature flag is enabled
Override DownloadLocationDialogCoordinator to force the download
location dialog even on single-directory devices (no SD card).
Upstream skips the dialog when only one storage directory is
available; the Brave override intercepts that skip and re-triggers
the dialog display. Also transitions SHOW_INITIAL to SHOW_PREFERENCE
so the "Don't show again" checkbox starts unchecked, preventing the
feature from silently disabling itself after the first use.
Resolves: https://github.com/brave/brave-browser/issues/52737
This disables all of the JS injection & script handlers done on the Swift side (obviously breaking all JS related features in the meantime) when the `UseProfileWebViewConfiguration` feature flag is enabled
This new method will also be used when handling `BraveWebView.didResetConfiguration`. This also cleans up a number of configuration defaults that were already being set inside of `WKWebViewConfigurationProvider::ResetWithWebViewConfiguration`
This exposes a property in `BraveWebViewConfiguration` to fetch the web view configuration's data store from `WKWebViewConfigurationProvider`. This property will be used for the shred feature when the `UseProfileWebViewConfiguration` feature flag is enabled.
* [AI Chat] Tab Management Tool initial setup
Provides a Tool for an AI to manage the browser tabs during a conversation. The tool requires user permission before sending any output data. The permission is saved for the conversation, unless the browser is quit. The UI provides the permission via the existing Permission Challenge functionality in AI Chat - an "allow" or "deny" button with an explanation.
We dont support adding arbitrary URLs to a reader mode list so this code was never used. This removes an instance where a TabState is created without providing a profile.
* Migrate ConversationContext to createInterfaceApi pattern
This migrates ConversationContext following the migration of AIChatContext, and leaves
UntrustedConversationContext (and associated API binding classes) alone,
in the interest of making an effort to minimize the branch sizes.
Context Changes:
- conversation_context.tsx: Uses generateReactContextForAPI with new ConversationProvider
API Changes:
- Use new (previously added) API wrapper exported from `api/conversation_api.ts`
- Remove old binding functions from api/index.ts in favor of new (previously added) bindings in `api/bind_conversation.ts`
- state/mock_context.tsx: Update test context wrapper to include ConversationContext and API data
Test and Storybook Updates:
- Now use MockContext from state/mock_context.tsx for ConversationContext
Also fix incorrect !is_ios guards on production sources and tests
that don't actually depend on content, and replace
content::BrowserTaskEnvironment with base::test::TaskEnvironment
in view_counter_model_unittest.cc.
The search tool result format is changing so `query` can be either a
single string or a list of strings.
During OAI response parsing, both formats are accepted and normalized
to a string array internally. Serialization is consistent with parsing: sends
a string for single query and an array for multiple.
Adds the new methods to the Obj-C bridge to access purchase state from `BraveOriginService`. This change also updates the `BraveOriginServiceFactory` to pass in a valid skus service getter
* [Android] Fix NPE in PendingTxHelper when TxService is null
Add null guard for mTxService in fetchTransactions() and null it out
in destroy(). The observer callback can fire after the service is gone
(e.g., wallet service shutdown), causing an NPE at getAllTransactionInfo.
Rename non-public non-static fields to follow the m-prefix convention
required by Chromium's Java style. No functional changes.
Resolves: https://github.com/brave/brave-browser/issues/53102
This adds a temporary WebClient method–exposed through `BraveWebView`–that will allow Brave to perform additional changes to the underlying `WKWebViewConfiguration ` when said configuration is reset in `WKWebViewConfigurationProvider`. This is a requirement for being able to add the `internal` scheme handler and adjust a few WebKit preferences still controlled by Brave when the `UseProfileWebViewConfiguration` feature flag is enabled.