[PSA] Support for "tab" Context in chrome.contextMenus (M150)
tl;dr: Starting in Chrome 150, the chrome.contextMenus API now supports a new tab context menu. This allows extensions to seamlessly integrate custom actions directly into the native browser tab strip's right-click menu, eliminating the need for disjointed UI workarounds.
This update addresses a long-standing ecosystem request (Issue 40246822) by adding a "tab" option to the existing ContextType enum.
API Update: The chrome.contextMenus API reference was updated to reflect the new "tab" context.
Event Payload: When a custom menu item is clicked from a tab's context menu, the chrome.contextMenus.onClicked listener fires asynchronously and receives:
info (OnClickData): The pageUrl property is automatically populated with the URL of the tab where the right-click occurred (web_contents->GetLastCommittedURL()).
tab (tabs.Tab): A standard tab object representing the right-clicked tab.
Multiple Tab Selection: If a user has multiple tabs selected (e.g., via Shift+Click), the tab argument in the event listener represents only the specific tab that was right-clicked to open the context menu. This is consistent with Firefox's existing implementation.
Favicon Attribution: Registered extension items will automatically feature the extension's icon/favicon next to their label in the native menu for clear user attribution.
Test Your Extensions: We highly recommend testing your tab management or utility extensions in Chrome Canary (M150).
Adopt the New Context: You can begin registering your context menus with the "tab" context:

Provide Feedback: We encourage you to try this out and report any issues, regressions, or general feedback on crbug.com
Chrome 150 (Canary/Dev): Available now for testing.
Chrome 150 (Stable): Expected release in line with the Chrome M150 release cycle.
On behalf of the Chrome Extensions team, Miguel Ruiz
| ||||||||||