feat(cef): wire CEF engine into bootstrap
Add "cef" case to BuildEngine switch, passing CEFEngineConfig to cef.NewEngine so the application can select CEF via engine.type = "cef".
- commit
- 6da4a3b0f1874e5db93736deedae6b28233007d2
- author
- brice · · 2026-03-19 15:44 UTC
- committer
- brice · · 2026-03-28 04:35 UTC
- parent
- 10992b6
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +3 -1
M internal/bootstrap/engine.go +3 -1
| @@ -6,6 +6,7 @@ import ( | |||
| 6 | 6 | ||
| 7 | 7 | "github.com/bnema/dumber/internal/application/port" | |
| 8 | 8 | "github.com/bnema/dumber/internal/application/usecase" | |
| 9 | + | "github.com/bnema/dumber/internal/infrastructure/cef" | |
| 9 | 10 | "github.com/bnema/dumber/internal/infrastructure/config" | |
| 10 | 11 | "github.com/bnema/dumber/internal/infrastructure/webkit" | |
| 11 | 12 | "github.com/bnema/dumber/internal/infrastructure/webkit/handlers" | |
| @@ -70,7 +71,8 @@ func BuildEngine(input EngineInput) (port.Engine, error) { | |||
| 70 | 71 | handlers.RegisterAccentHandlers, | |
| 71 | 72 | ) | |
| 72 | 73 | case "cef": | |
| 73 | - | return nil, fmt.Errorf("CEF engine not yet implemented") | |
| 74 | + | cefCfg := cfg.Engine.CEF | |
| 75 | + | return cef.NewEngine(input.Ctx, cefCfg, input.Logger) | |
| 74 | 76 | default: | |
| 75 | 77 | return nil, fmt.Errorf("unknown engine type: %q", engineType) | |
| 76 | 78 | } | |
| @@ -6,6 +6,7 @@ import ( | |||||
| 6 | 6 | ||||
| 7 | "github.com/bnema/dumber/internal/application/port" | 7 | "github.com/bnema/dumber/internal/application/port" | ||
| 8 | "github.com/bnema/dumber/internal/application/usecase" | 8 | "github.com/bnema/dumber/internal/application/usecase" | ||
| 9 | + | "github.com/bnema/dumber/internal/infrastructure/cef" | |||
| 9 | "github.com/bnema/dumber/internal/infrastructure/config" | 10 | "github.com/bnema/dumber/internal/infrastructure/config" | ||
| 10 | "github.com/bnema/dumber/internal/infrastructure/webkit" | 11 | "github.com/bnema/dumber/internal/infrastructure/webkit" | ||
| 11 | "github.com/bnema/dumber/internal/infrastructure/webkit/handlers" | 12 | "github.com/bnema/dumber/internal/infrastructure/webkit/handlers" | ||
| @@ -70,7 +71,8 @@ func BuildEngine(input EngineInput) (port.Engine, error) { | |||||
| 70 | handlers.RegisterAccentHandlers, | 71 | handlers.RegisterAccentHandlers, | ||
| 71 | ) | 72 | ) | ||
| 72 | case "cef": | 73 | case "cef": | ||
| 73 | - | return nil, fmt.Errorf("CEF engine not yet implemented") | 74 | + | cefCfg := cfg.Engine.CEF |
| 75 | + | return cef.NewEngine(input.Ctx, cefCfg, input.Logger) | |||
| 74 | default: | 76 | default: | ||
| 75 | return nil, fmt.Errorf("unknown engine type: %q", engineType) | 77 | return nil, fmt.Errorf("unknown engine type: %q", engineType) | ||
| 76 | } | 78 | } | ||