* Support tab groups in tree tab strip Integrate tab groups with the tree tab strip so that groups are represented as a single tree node wrapping the group (not one tree node per tab). Tabs inside a group remain direct children of the group collection. Collection and delegate: - BraveTreeTabStripCollectionDelegate: When adding a tab with new_group_id, add to collection without wrapping in a tree node; the group wraps it. MoveTabsRecursive: handle empty tab_indices (no-op when moving within same group), and route move-out-of-group and move-into-group to new helpers. - MoveTabsIntoGroup: unwrap tabs from tree nodes (or detach from other groups), add to target group; when group is detached (new group), wrap group in a TreeTabNode and attach at the correct tree position. - MoveTabsOutOfGroup: move tabs from TabGroupTabCollection back into the tree by wrapping each in a tree node at the destination index. - BraveTabStripCollection: add PopDetachedGroupCollectionForDelegate and GetTreeTabNodeIdForGroup; chromium_src TabStripCollection gains virtual GetTreeTabNodeIdForGroup. BraveTabStripCollectionDelegate implements GetTreeTabNodeIdForGroup. TreeTabNodeTabCollection: - BuildTreeTabs: wrap entire groups in one tree node (processed_groups set); grouped tabs stay as direct children of the group. - New constructor that wraps a TabGroupTabCollection (for creating a group in tree mode). Single-tab constructor allows null for GetEmptyTreeTabNode when a tab was moved into a group and the view still holds the old node id. Model, controller, and UI: - BraveTabStripModel::GetTreeTabNodeIdForGroup returns the tree node id for a group (or nullptr if tree tabs off). Wired through controller and BraveTabStripCollection. - BraveBrowserTabStripController::GetTreeTabNode returns GetEmptyTreeTabNode() when the node is null (e.g. tab just moved into group, before TabGroupedStateChanged/AddTabToGroup updates the view). - OnTreeTabChanged: handle tab index kNoTab and detached state during group creation; avoid double-clearing when AddTabToGroup will clear the node id. - BraveTabStrip::AddTabToGroup override sets the tab's tree_tab_node from GetTreeTabNodeIdForGroup when adding to a group in tree mode.
Brave docs
This directory contains documentation for the Brave Browser. For additional resources outside this repository, go to:
Important
If you add new documents, please also add a link to them in the Document Index below.
Creating Documentation
Guidelines
- Markdown documents must follow the Markdown Style Guide.
Previewing changes
Locally using md_browser
# in src/brave/
npm run docs
This is only an estimate. The github view may differ.
Document Index
Checking Out and Patching
- Upgrading Chromium Upgrading
brave-coreto a newer Chromium version. - Patching with
plasterA patching engine for semantical patching of upstream Chromium. - WebUI Overriding
- DevTools Frontend Patching Managing changes to the upstream project.
Tools
- Claude Code Skills - Slash commands for automating common development tasks (commit, review, preflight, CI, and more).
General Development
gninotes - Brief notes on the use ofsource.gnifiles in our code base.- Rust notes - General recommendations on integrating rust code
into
brave-core - Adapting Chromium tests to the Brave Codebase - Suggestions on how to make chromium test work on our test targets.
- Ship a File to All Clients - How to ship a file to all clients via component updater.
- Git Configuration - General recommendations for setting up and optimizing your Git environment.
- Ignoring Files from Format and Presubmit Checks - How to exclude files from format and presubmit checks.
- Siso Customization - How we customize Siso to work for us.