refactor(browser): publicize key-injection capability api (#597)

Promote keyRetrieversSetter to public KeyManager and lift
keychainPasswordSetter from browser_darwin.go into browser.go as
KeychainPasswordReceiver. Engines already implement these methods;
only type-assertion sites switch to the public interface names.
This commit is contained in:
Roger
2026-05-16 12:26:57 +08:00
committed by GitHub
parent f8bd391923
commit 00be145044
4 changed files with 16 additions and 25 deletions
+2 -2
View File
@@ -75,8 +75,8 @@ func platformBrowsers() []types.BrowserConfig {
func newPlatformInjector(_ PickOptions) func(Browser) {
retrievers := keyretriever.DefaultRetrievers()
return func(b Browser) {
if s, ok := b.(keyRetrieversSetter); ok {
s.SetKeyRetrievers(retrievers)
if km, ok := b.(KeyManager); ok {
km.SetKeyRetrievers(retrievers)
}
}
}