diff --git a/cdproto.go b/cdproto.go index 606bd71..aa47b3c 100644 --- a/cdproto.go +++ b/cdproto.go @@ -35,6 +35,7 @@ import ( "github.com/chromedp/cdproto/extensions" "github.com/chromedp/cdproto/fedcm" "github.com/chromedp/cdproto/fetch" + "github.com/chromedp/cdproto/filesystem" "github.com/chromedp/cdproto/headlessexperimental" "github.com/chromedp/cdproto/heapprofiler" "github.com/chromedp/cdproto/indexeddb" @@ -378,6 +379,7 @@ const ( CommandFetchTakeResponseBodyAsStream = fetch.CommandTakeResponseBodyAsStream EventFetchRequestPaused = "Fetch.requestPaused" EventFetchAuthRequired = "Fetch.authRequired" + CommandFileSystemGetDirectory = filesystem.CommandGetDirectory CommandHeadlessExperimentalBeginFrame = headlessexperimental.CommandBeginFrame CommandHeapProfilerAddInspectedHeapObject = heapprofiler.CommandAddInspectedHeapObject CommandHeapProfilerCollectGarbage = heapprofiler.CommandCollectGarbage @@ -1738,6 +1740,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) { case EventFetchAuthRequired: v = new(fetch.EventAuthRequired) + case CommandFileSystemGetDirectory: + v = new(filesystem.GetDirectoryReturns) + case CommandHeadlessExperimentalBeginFrame: v = new(headlessexperimental.BeginFrameReturns) diff --git a/css/css.go b/css/css.go index 546b636..141c4ec 100644 --- a/css/css.go +++ b/css/css.go @@ -379,7 +379,7 @@ type GetMatchedStylesForNodeReturns struct { Inherited []*InheritedStyleEntry `json:"inherited,omitempty"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root). InheritedPseudoElements []*InheritedPseudoElementMatches `json:"inheritedPseudoElements,omitempty"` // A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root). CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node. - CSSPositionTryRules []*PositionTryRule `json:"cssPositionTryRules,omitempty"` // A list of CSS @position-try rules matching this node, based on the position-try-options property. + CSSPositionTryRules []*PositionTryRule `json:"cssPositionTryRules,omitempty"` // A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property. CSSPropertyRules []*PropertyRule `json:"cssPropertyRules,omitempty"` // A list of CSS at-property rules matching this node. CSSPropertyRegistrations []*PropertyRegistration `json:"cssPropertyRegistrations,omitempty"` // A list of CSS property registrations matching this node. CSSFontPaletteValuesRule *FontPaletteValuesRule `json:"cssFontPaletteValuesRule,omitempty"` // A font-palette-values rule matching this node. @@ -397,7 +397,7 @@ type GetMatchedStylesForNodeReturns struct { // inherited - A chain of inherited styles (from the immediate node parent up to the DOM tree root). // inheritedPseudoElements - A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root). // cssKeyframesRules - A list of CSS keyframed animations matching this node. -// cssPositionTryRules - A list of CSS @position-try rules matching this node, based on the position-try-options property. +// cssPositionTryRules - A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property. // cssPropertyRules - A list of CSS at-property rules matching this node. // cssPropertyRegistrations - A list of CSS property registrations matching this node. // cssFontPaletteValuesRule - A font-palette-values rule matching this node. diff --git a/css/easyjson.go b/css/easyjson.go index 717262c..66ea003 100644 --- a/css/easyjson.go +++ b/css/easyjson.go @@ -4777,6 +4777,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss46(in *jlexer.Lexer, out * } (*out.Style).UnmarshalEasyJSON(in) } + case "active": + out.Active = bool(in.Bool()) default: in.SkipRecursive() } @@ -4819,6 +4821,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss46(out *jwriter.Writer, in (*in.Style).MarshalEasyJSON(out) } } + { + const prefix string = ",\"active\":" + out.RawString(prefix) + out.Bool(bool(in.Active)) + } out.RawByte('}') } diff --git a/css/types.go b/css/types.go index 7c1887d..b8d4b87 100644 --- a/css/types.go +++ b/css/types.go @@ -438,6 +438,7 @@ type PositionTryRule struct { StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin. Style *Style `json:"style"` // Associated style declaration. + Active bool `json:"active"` } // KeyframesRule CSS keyframes rule representation. diff --git a/filesystem/easyjson.go b/filesystem/easyjson.go new file mode 100644 index 0000000..8402b7a --- /dev/null +++ b/filesystem/easyjson.go @@ -0,0 +1,541 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package filesystem + +import ( + json "encoding/json" + cdp "github.com/chromedp/cdproto/cdp" + storage "github.com/chromedp/cdproto/storage" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem(in *jlexer.Lexer, out *GetDirectoryReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "directory": + if in.IsNull() { + in.Skip() + out.Directory = nil + } else { + if out.Directory == nil { + out.Directory = new(Directory) + } + (*out.Directory).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem(out *jwriter.Writer, in GetDirectoryReturns) { + out.RawByte('{') + first := true + _ = first + if in.Directory != nil { + const prefix string = ",\"directory\":" + first = false + out.RawString(prefix[1:]) + (*in.Directory).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetDirectoryReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetDirectoryReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetDirectoryReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetDirectoryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem1(in *jlexer.Lexer, out *GetDirectoryParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "bucketFileSystemLocator": + if in.IsNull() { + in.Skip() + out.BucketFileSystemLocator = nil + } else { + if out.BucketFileSystemLocator == nil { + out.BucketFileSystemLocator = new(BucketFileSystemLocator) + } + (*out.BucketFileSystemLocator).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem1(out *jwriter.Writer, in GetDirectoryParams) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"bucketFileSystemLocator\":" + out.RawString(prefix[1:]) + if in.BucketFileSystemLocator == nil { + out.RawString("null") + } else { + (*in.BucketFileSystemLocator).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetDirectoryParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetDirectoryParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetDirectoryParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetDirectoryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem1(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem2(in *jlexer.Lexer, out *File) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "lastModified": + if in.IsNull() { + in.Skip() + out.LastModified = nil + } else { + if out.LastModified == nil { + out.LastModified = new(cdp.TimeSinceEpoch) + } + (*out.LastModified).UnmarshalEasyJSON(in) + } + case "size": + out.Size = float64(in.Float64()) + case "type": + out.Type = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem2(out *jwriter.Writer, in File) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"name\":" + out.RawString(prefix[1:]) + out.String(string(in.Name)) + } + { + const prefix string = ",\"lastModified\":" + out.RawString(prefix) + if in.LastModified == nil { + out.RawString("null") + } else { + (*in.LastModified).MarshalEasyJSON(out) + } + } + { + const prefix string = ",\"size\":" + out.RawString(prefix) + out.Float64(float64(in.Size)) + } + { + const prefix string = ",\"type\":" + out.RawString(prefix) + out.String(string(in.Type)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v File) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v File) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *File) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *File) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem2(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem3(in *jlexer.Lexer, out *Directory) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "nestedDirectories": + if in.IsNull() { + in.Skip() + out.NestedDirectories = nil + } else { + in.Delim('[') + if out.NestedDirectories == nil { + if !in.IsDelim(']') { + out.NestedDirectories = make([]string, 0, 4) + } else { + out.NestedDirectories = []string{} + } + } else { + out.NestedDirectories = (out.NestedDirectories)[:0] + } + for !in.IsDelim(']') { + var v1 string + v1 = string(in.String()) + out.NestedDirectories = append(out.NestedDirectories, v1) + in.WantComma() + } + in.Delim(']') + } + case "nestedFiles": + if in.IsNull() { + in.Skip() + out.NestedFiles = nil + } else { + in.Delim('[') + if out.NestedFiles == nil { + if !in.IsDelim(']') { + out.NestedFiles = make([]*File, 0, 8) + } else { + out.NestedFiles = []*File{} + } + } else { + out.NestedFiles = (out.NestedFiles)[:0] + } + for !in.IsDelim(']') { + var v2 *File + if in.IsNull() { + in.Skip() + v2 = nil + } else { + if v2 == nil { + v2 = new(File) + } + (*v2).UnmarshalEasyJSON(in) + } + out.NestedFiles = append(out.NestedFiles, v2) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem3(out *jwriter.Writer, in Directory) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"name\":" + out.RawString(prefix[1:]) + out.String(string(in.Name)) + } + { + const prefix string = ",\"nestedDirectories\":" + out.RawString(prefix) + if in.NestedDirectories == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v3, v4 := range in.NestedDirectories { + if v3 > 0 { + out.RawByte(',') + } + out.String(string(v4)) + } + out.RawByte(']') + } + } + { + const prefix string = ",\"nestedFiles\":" + out.RawString(prefix) + if in.NestedFiles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v5, v6 := range in.NestedFiles { + if v5 > 0 { + out.RawByte(',') + } + if v6 == nil { + out.RawString("null") + } else { + (*v6).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Directory) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Directory) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Directory) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Directory) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem3(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem4(in *jlexer.Lexer, out *BucketFileSystemLocator) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "storageKey": + out.StorageKey = storage.SerializedStorageKey(in.String()) + case "bucketName": + out.BucketName = string(in.String()) + case "pathComponents": + if in.IsNull() { + in.Skip() + out.PathComponents = nil + } else { + in.Delim('[') + if out.PathComponents == nil { + if !in.IsDelim(']') { + out.PathComponents = make([]string, 0, 4) + } else { + out.PathComponents = []string{} + } + } else { + out.PathComponents = (out.PathComponents)[:0] + } + for !in.IsDelim(']') { + var v7 string + v7 = string(in.String()) + out.PathComponents = append(out.PathComponents, v7) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem4(out *jwriter.Writer, in BucketFileSystemLocator) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"storageKey\":" + out.RawString(prefix[1:]) + out.String(string(in.StorageKey)) + } + if in.BucketName != "" { + const prefix string = ",\"bucketName\":" + out.RawString(prefix) + out.String(string(in.BucketName)) + } + { + const prefix string = ",\"pathComponents\":" + out.RawString(prefix) + if in.PathComponents == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.PathComponents { + if v8 > 0 { + out.RawByte(',') + } + out.String(string(v9)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BucketFileSystemLocator) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BucketFileSystemLocator) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFilesystem4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BucketFileSystemLocator) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BucketFileSystemLocator) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFilesystem4(l, v) +} diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go new file mode 100644 index 0000000..da6e3ab --- /dev/null +++ b/filesystem/filesystem.go @@ -0,0 +1,57 @@ +// Package filesystem provides the Chrome DevTools Protocol +// commands, types, and events for the FileSystem domain. +// +// Generated by the cdproto-gen command. +package filesystem + +// Code generated by cdproto-gen. DO NOT EDIT. + +import ( + "context" + + "github.com/chromedp/cdproto/cdp" +) + +// GetDirectoryParams [no description]. +type GetDirectoryParams struct { + BucketFileSystemLocator *BucketFileSystemLocator `json:"bucketFileSystemLocator"` +} + +// GetDirectory [no description]. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/FileSystem#method-getDirectory +// +// parameters: +// +// bucketFileSystemLocator +func GetDirectory(bucketFileSystemLocator *BucketFileSystemLocator) *GetDirectoryParams { + return &GetDirectoryParams{ + BucketFileSystemLocator: bucketFileSystemLocator, + } +} + +// GetDirectoryReturns return values. +type GetDirectoryReturns struct { + Directory *Directory `json:"directory,omitempty"` // Returns the directory object at the path. +} + +// Do executes FileSystem.getDirectory against the provided context. +// +// returns: +// +// directory - Returns the directory object at the path. +func (p *GetDirectoryParams) Do(ctx context.Context) (directory *Directory, err error) { + // execute + var res GetDirectoryReturns + err = cdp.Execute(ctx, CommandGetDirectory, p, &res) + if err != nil { + return nil, err + } + + return res.Directory, nil +} + +// Command names. +const ( + CommandGetDirectory = "FileSystem.getDirectory" +) diff --git a/filesystem/types.go b/filesystem/types.go new file mode 100644 index 0000000..e065afd --- /dev/null +++ b/filesystem/types.go @@ -0,0 +1,36 @@ +package filesystem + +// Code generated by cdproto-gen. DO NOT EDIT. + +import ( + "github.com/chromedp/cdproto/cdp" + "github.com/chromedp/cdproto/storage" +) + +// File [no description]. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/FileSystem#type-File +type File struct { + Name string `json:"name"` + LastModified *cdp.TimeSinceEpoch `json:"lastModified"` // Timestamp + Size float64 `json:"size"` // Size in bytes + Type string `json:"type"` +} + +// Directory [no description]. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/FileSystem#type-Directory +type Directory struct { + Name string `json:"name"` + NestedDirectories []string `json:"nestedDirectories"` + NestedFiles []*File `json:"nestedFiles"` // Files that are directly nested under this directory. +} + +// BucketFileSystemLocator [no description]. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/FileSystem#type-BucketFileSystemLocator +type BucketFileSystemLocator struct { + StorageKey storage.SerializedStorageKey `json:"storageKey"` // Storage key + BucketName string `json:"bucketName,omitempty"` // Bucket name. Not passing a bucketName will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets) + PathComponents []string `json:"pathComponents"` // Path to the directory using each path component as an array item. +} diff --git a/page/types.go b/page/types.go index 5339195..4c895a0 100644 --- a/page/types.go +++ b/page/types.go @@ -72,6 +72,7 @@ const ( PermissionsPolicyFeatureComputePressure PermissionsPolicyFeature = "compute-pressure" PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated" PermissionsPolicyFeatureDeferredFetch PermissionsPolicyFeature = "deferred-fetch" + PermissionsPolicyFeatureDigitalCredentialsGet PermissionsPolicyFeature = "digital-credentials-get" PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets" PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture" PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain" @@ -209,6 +210,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionsPolicyFeatureCrossOriginIsolated case PermissionsPolicyFeatureDeferredFetch: *t = PermissionsPolicyFeatureDeferredFetch + case PermissionsPolicyFeatureDigitalCredentialsGet: + *t = PermissionsPolicyFeatureDigitalCredentialsGet case PermissionsPolicyFeatureDirectSockets: *t = PermissionsPolicyFeatureDirectSockets case PermissionsPolicyFeatureDisplayCapture: diff --git a/preload/types.go b/preload/types.go index f585213..6603312 100644 --- a/preload/types.go +++ b/preload/types.go @@ -280,6 +280,7 @@ const ( PrerenderFinalStatusJavaScriptInterfaceAdded PrerenderFinalStatus = "JavaScriptInterfaceAdded" PrerenderFinalStatusJavaScriptInterfaceRemoved PrerenderFinalStatus = "JavaScriptInterfaceRemoved" PrerenderFinalStatusAllPrerenderingCanceled PrerenderFinalStatus = "AllPrerenderingCanceled" + PrerenderFinalStatusWindowClosed PrerenderFinalStatus = "WindowClosed" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -432,6 +433,8 @@ func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PrerenderFinalStatusJavaScriptInterfaceRemoved case PrerenderFinalStatusAllPrerenderingCanceled: *t = PrerenderFinalStatusAllPrerenderingCanceled + case PrerenderFinalStatusWindowClosed: + *t = PrerenderFinalStatusWindowClosed default: in.AddError(fmt.Errorf("unknown PrerenderFinalStatus value: %v", v)) diff --git a/storage/easyjson.go b/storage/easyjson.go index 1d62807..65e74d9 100644 --- a/storage/easyjson.go +++ b/storage/easyjson.go @@ -5910,6 +5910,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage69(in *jlexer.Lexer, o } in.Delim(']') } + case "aggregatableFilteringIdMaxBytes": + out.AggregatableFilteringIDMaxBytes = int64(in.Int64()) case "debugReporting": out.DebugReporting = bool(in.Bool()) case "aggregationCoordinatorOrigin": @@ -6026,6 +6028,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage69(out *jwriter.Writer out.RawByte(']') } } + { + const prefix string = ",\"aggregatableFilteringIdMaxBytes\":" + out.RawString(prefix) + out.Int64(int64(in.AggregatableFilteringIDMaxBytes)) + } { const prefix string = ",\"debugReporting\":" out.RawString(prefix) @@ -7217,6 +7224,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage78(in *jlexer.Lexer, o out.Key = string(in.String()) case "value": out.Value = float64(in.Float64()) + case "filteringId": + out.FilteringID = UnsignedInt64asBase10(in.String()) default: in.SkipRecursive() } @@ -7241,6 +7250,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage78(out *jwriter.Writer out.RawString(prefix) out.Float64(float64(in.Value)) } + { + const prefix string = ",\"filteringId\":" + out.RawString(prefix) + out.String(string(in.FilteringID)) + } out.RawByte('}') } diff --git a/storage/types.go b/storage/types.go index 1dde789..ed6b961 100644 --- a/storage/types.go +++ b/storage/types.go @@ -837,8 +837,9 @@ func (t *AttributionReportingSourceRegistrationTimeConfig) UnmarshalJSON(buf []b // // See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-AttributionReportingAggregatableValueDictEntry type AttributionReportingAggregatableValueDictEntry struct { - Key string `json:"key"` - Value float64 `json:"value"` // number instead of integer because not all uint32 can be represented by int + Key string `json:"key"` + Value float64 `json:"value"` // number instead of integer because not all uint32 can be represented by int + FilteringID UnsignedInt64asBase10 `json:"filteringId"` } // AttributionReportingAggregatableValueEntry [no description]. @@ -880,16 +881,17 @@ type AttributionReportingAggregatableDedupKey struct { // // See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-AttributionReportingTriggerRegistration type AttributionReportingTriggerRegistration struct { - Filters *AttributionReportingFilterPair `json:"filters"` - DebugKey UnsignedInt64asBase10 `json:"debugKey,omitempty"` - AggregatableDedupKeys []*AttributionReportingAggregatableDedupKey `json:"aggregatableDedupKeys"` - EventTriggerData []*AttributionReportingEventTriggerData `json:"eventTriggerData"` - AggregatableTriggerData []*AttributionReportingAggregatableTriggerData `json:"aggregatableTriggerData"` - AggregatableValues []*AttributionReportingAggregatableValueEntry `json:"aggregatableValues"` - DebugReporting bool `json:"debugReporting"` - AggregationCoordinatorOrigin string `json:"aggregationCoordinatorOrigin,omitempty"` - SourceRegistrationTimeConfig AttributionReportingSourceRegistrationTimeConfig `json:"sourceRegistrationTimeConfig"` - TriggerContextID string `json:"triggerContextId,omitempty"` + Filters *AttributionReportingFilterPair `json:"filters"` + DebugKey UnsignedInt64asBase10 `json:"debugKey,omitempty"` + AggregatableDedupKeys []*AttributionReportingAggregatableDedupKey `json:"aggregatableDedupKeys"` + EventTriggerData []*AttributionReportingEventTriggerData `json:"eventTriggerData"` + AggregatableTriggerData []*AttributionReportingAggregatableTriggerData `json:"aggregatableTriggerData"` + AggregatableValues []*AttributionReportingAggregatableValueEntry `json:"aggregatableValues"` + AggregatableFilteringIDMaxBytes int64 `json:"aggregatableFilteringIdMaxBytes"` + DebugReporting bool `json:"debugReporting"` + AggregationCoordinatorOrigin string `json:"aggregationCoordinatorOrigin,omitempty"` + SourceRegistrationTimeConfig AttributionReportingSourceRegistrationTimeConfig `json:"sourceRegistrationTimeConfig"` + TriggerContextID string `json:"triggerContextId,omitempty"` } // AttributionReportingEventLevelResult [no description].