runtime_config.go RawHistoryFolder
1package entity
2
3// EngineHardwareDecodingMode controls engine-facing video hardware acceleration.
4type EngineHardwareDecodingMode string
5
6const (
7 EngineHardwareDecodingAuto EngineHardwareDecodingMode = "auto"
8 EngineHardwareDecodingForce EngineHardwareDecodingMode = "force"
9 EngineHardwareDecodingDisable EngineHardwareDecodingMode = "disable"
10)
11
12// EngineWebContentSettingsPayload is the engine-facing runtime view of web
13// content settings that can be applied to newly-created or existing webviews.
14type EngineWebContentSettingsPayload struct {
15 SansFont string
16 SerifFont string
17 MonospaceFont string
18 DefaultFontSize int
19 EnableDevTools bool
20 CaptureConsole bool
21 DrawCompositingIndicators bool
22 HardwareDecoding EngineHardwareDecodingMode
23 AutoCopyOnSelection bool
24}
25
26// EngineSettingsPayload is the engine-facing boundary view of runtime config.
27// Add fields here only when an engine needs to react to them at runtime.
28type EngineSettingsPayload struct {
29 DefaultUIScale float64
30 WebContent EngineWebContentSettingsPayload
31}
32
33// EngineSettingsUpdate carries a runtime config change to the engine.
34type EngineSettingsUpdate struct {
35 Settings EngineSettingsPayload
36}
37
38type RuntimeConfigSnapshot struct {
39 EngineSettings EngineSettingsPayload
40 UI RuntimeUIConfig
41}
42
43type RuntimeUIConfig struct {
44 DefaultUIScale float64
45 SidebarWidth int
46 Appearance AppearanceConfig
47 Workspace WorkspaceConfig
48 Session SessionConfig
49 Clipboard RuntimeClipboardConfig
50 SearchShortcuts map[string]RuntimeSearchShortcut
51 DefaultSearchEngine string
52 Omnibox RuntimeOmniboxConfig
53 Update RuntimeUpdateConfig
54 Downloads RuntimeDownloadsConfig
55}
56
57type RuntimeClipboardConfig struct {
58 AutoCopyOnSelection bool
59}
60
61type RuntimeSearchShortcut struct {
62 URL string
63 Description string
64}
65
66type RuntimeOmniboxConfig struct {
67 Style string
68 InitialBehavior OmniboxInitialBehavior
69 MaxHistoryDays int
70 AutoOpenOnNewPane bool
71}
72
73type RuntimeUpdateConfig struct {
74 EnableOnStartup bool
75 AutoDownload bool
76 NotifyOnNewSettings bool
77}
78
79type RuntimeDownloadsConfig struct {
80 Path string
81}