Files
Anthony Tseng d0cebb06d7 Drop WebContents → BindCallback registry on BravePassageEmbeddingsSevice (#36458)
Drop WebContents → BindCallback registry on BravePassageEmbeddingsService

There was ever at most one active embedder/BG WebContents pair, so the
static map was 0- or 1-entry overhead. Replace it with a direct
forwarder:

* BravePassageEmbeddingsService::BindLocalAIReceiver hands a
  PendingReceiver<LocalAIService> to batch_embedder_ if alive.
* BravePassageEmbeddingsServiceController exposes the same as an
  instance method, accessible via Get().
* UntrustedLocalAIUI::BindInterface routes through the controller.

Eliminates SetBindCallbackForWebContents (only producer call site went
away) and RemoveBindCallbackForWebContents (was unused in production —
the registry leaked one entry per BG WebContents lifecycle).
2026-05-21 03:06:01 +01:00
..