From 532e667d868f5ba41799034ac8373e34f9b52594 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Tue, 27 Feb 2024 03:48:13 +0700 Subject: [PATCH] Updating to 124.0.6324.1_12.4.80 definitions --- accessibility/accessibility.go | 8 +- autofill/easyjson.go | 7 ++ autofill/types.go | 3 +- browser/browser.go | 4 +- browser/types.go | 5 +- cdproto.go | 4 - css/types.go | 2 +- dom/dom.go | 4 +- emulation/easyjson.go | 126 ----------------------- emulation/emulation.go | 39 +------ emulation/types.go | 4 +- input/input.go | 4 +- io/io.go | 4 +- layertree/events.go | 2 +- network/easyjson.go | 7 ++ network/events.go | 4 +- network/types.go | 58 ++++++++++- overlay/types.go | 4 +- page/events.go | 2 +- page/page.go | 4 +- page/types.go | 10 +- performancetimeline/types.go | 2 +- security/types.go | 2 +- storage/easyjson.go | 181 ++++++++++++++++++++++++++++----- storage/events.go | 2 +- storage/types.go | 12 ++- target/target.go | 4 +- target/types.go | 6 +- 28 files changed, 280 insertions(+), 234 deletions(-) diff --git a/accessibility/accessibility.go b/accessibility/accessibility.go index 73147ba..c5ebdfe 100644 --- a/accessibility/accessibility.go +++ b/accessibility/accessibility.go @@ -319,8 +319,8 @@ func (p *GetChildAXNodesParams) Do(ctx context.Context) (nodes []*Node, err erro // QueryAXTreeParams query a DOM node's accessibility subtree for accessible // name and role. This command computes the name and role for all nodes in the // subtree, including those that are ignored for accessibility, and returns -// those that mactch the specified name and role. If no DOM node is specified, -// or the DOM node does not exist, the command returns an error. If neither +// those that match the specified name and role. If no DOM node is specified, or +// the DOM node does not exist, the command returns an error. If neither // accessibleName or role is specified, it returns all the accessibility nodes // in the subtree. type QueryAXTreeParams struct { @@ -334,8 +334,8 @@ type QueryAXTreeParams struct { // QueryAXTree query a DOM node's accessibility subtree for accessible name // and role. This command computes the name and role for all nodes in the // subtree, including those that are ignored for accessibility, and returns -// those that mactch the specified name and role. If no DOM node is specified, -// or the DOM node does not exist, the command returns an error. If neither +// those that match the specified name and role. If no DOM node is specified, or +// the DOM node does not exist, the command returns an error. If neither // accessibleName or role is specified, it returns all the accessibility nodes // in the subtree. // diff --git a/autofill/easyjson.go b/autofill/easyjson.go index 9fcec92..15dedec 100644 --- a/autofill/easyjson.go +++ b/autofill/easyjson.go @@ -250,6 +250,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(in *jlexer.Lexer, o out.AutofillType = string(in.String()) case "fillingStrategy": (out.FillingStrategy).UnmarshalEasyJSON(in) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) case "fieldId": (out.FieldID).UnmarshalEasyJSON(in) default: @@ -296,6 +298,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(out *jwriter.Writer out.RawString(prefix) (in.FillingStrategy).MarshalEasyJSON(out) } + { + const prefix string = ",\"frameId\":" + out.RawString(prefix) + out.String(string(in.FrameID)) + } { const prefix string = ",\"fieldId\":" out.RawString(prefix) diff --git a/autofill/types.go b/autofill/types.go index dfa8c77..d3a3403 100644 --- a/autofill/types.go +++ b/autofill/types.go @@ -54,7 +54,7 @@ type Address struct { // // See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressUI type AddressUI struct { - AddressFields []*AddressFields `json:"addressFields"` // A two dimension array containing the repesentation of values from an address profile. + AddressFields []*AddressFields `json:"addressFields"` // A two dimension array containing the representation of values from an address profile. } // FillingStrategy specified whether a filled field was done so by using the @@ -113,5 +113,6 @@ type FilledField struct { Value string `json:"value"` // the field value AutofillType string `json:"autofillType"` // The actual field type, e.g FAMILY_NAME FillingStrategy FillingStrategy `json:"fillingStrategy"` // The filling strategy + FrameID cdp.FrameID `json:"frameId"` // The frame the field belongs to FieldID cdp.BackendNodeID `json:"fieldId"` // The form field's DOM node } diff --git a/browser/browser.go b/browser/browser.go index bcc64fa..30ef5db 100644 --- a/browser/browser.go +++ b/browser/browser.go @@ -124,7 +124,7 @@ func (p *ResetPermissionsParams) Do(ctx context.Context) (err error) { // SetDownloadBehaviorParams set the behavior when downloading a file. type SetDownloadBehaviorParams struct { - Behavior SetDownloadBehaviorBehavior `json:"behavior"` // Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids. + Behavior SetDownloadBehaviorBehavior `json:"behavior"` // Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids. BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to set download behavior. When omitted, default browser context is used. DownloadPath string `json:"downloadPath,omitempty"` // The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'. EventsEnabled bool `json:"eventsEnabled,omitempty"` // Whether to emit download events (defaults to false). @@ -136,7 +136,7 @@ type SetDownloadBehaviorParams struct { // // parameters: // -// behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids. +// behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids. func SetDownloadBehavior(behavior SetDownloadBehaviorBehavior) *SetDownloadBehaviorParams { return &SetDownloadBehaviorParams{ Behavior: behavior, diff --git a/browser/types.go b/browser/types.go index 923c058..367af58 100644 --- a/browser/types.go +++ b/browser/types.go @@ -116,6 +116,7 @@ const ( PermissionTypeProtectedMediaIdentifier PermissionType = "protectedMediaIdentifier" PermissionTypeSensors PermissionType = "sensors" PermissionTypeStorageAccess PermissionType = "storageAccess" + PermissionTypeSpeakerSelection PermissionType = "speakerSelection" PermissionTypeTopLevelStorageAccess PermissionType = "topLevelStorageAccess" PermissionTypeVideoCapture PermissionType = "videoCapture" PermissionTypeVideoCapturePanTiltZoom PermissionType = "videoCapturePanTiltZoom" @@ -182,6 +183,8 @@ func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionTypeSensors case PermissionTypeStorageAccess: *t = PermissionTypeStorageAccess + case PermissionTypeSpeakerSelection: + *t = PermissionTypeSpeakerSelection case PermissionTypeTopLevelStorageAccess: *t = PermissionTypeTopLevelStorageAccess case PermissionTypeVideoCapture: @@ -379,7 +382,7 @@ func (t *DownloadProgressState) UnmarshalJSON(buf []byte) error { // SetDownloadBehaviorBehavior whether to allow all or deny all download // requests, or use default Chrome behavior if available (otherwise deny). -// |allowAndName| allows download and names files according to their dowmload +// |allowAndName| allows download and names files according to their download // guids. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior diff --git a/cdproto.go b/cdproto.go index 49afb25..4083556 100644 --- a/cdproto.go +++ b/cdproto.go @@ -316,7 +316,6 @@ const ( EventDeviceAccessDeviceRequestPrompted = "DeviceAccess.deviceRequestPrompted" CommandDeviceOrientationClearDeviceOrientationOverride = deviceorientation.CommandClearDeviceOrientationOverride CommandDeviceOrientationSetDeviceOrientationOverride = deviceorientation.CommandSetDeviceOrientationOverride - CommandEmulationCanEmulate = emulation.CommandCanEmulate CommandEmulationClearDeviceMetricsOverride = emulation.CommandClearDeviceMetricsOverride CommandEmulationClearGeolocationOverride = emulation.CommandClearGeolocationOverride CommandEmulationResetPageScaleFactor = emulation.CommandResetPageScaleFactor @@ -1539,9 +1538,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) { case CommandDeviceOrientationSetDeviceOrientationOverride: return emptyVal, nil - case CommandEmulationCanEmulate: - v = new(emulation.CanEmulateReturns) - case CommandEmulationClearDeviceMetricsOverride: return emptyVal, nil diff --git a/css/types.go b/css/types.go index fa55142..f32fd64 100644 --- a/css/types.go +++ b/css/types.go @@ -143,7 +143,7 @@ type SelectorList struct { type StyleSheetHeader struct { StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier. FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier. - SourceURL string `json:"sourceURL"` // Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported as a CSS module script). + SourceURL string `json:"sourceURL"` // Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script). SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any). Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin. Title string `json:"title"` // Stylesheet title. diff --git a/dom/dom.go b/dom/dom.go index ede07fa..9880670 100644 --- a/dom/dom.go +++ b/dom/dom.go @@ -349,7 +349,7 @@ func (p *FocusParams) Do(ctx context.Context) (err error) { // GetAttributesParams returns attributes for the specified node. type GetAttributesParams struct { - NodeID cdp.NodeID `json:"nodeId"` // Id of the node to retrieve attibutes for. + NodeID cdp.NodeID `json:"nodeId"` // Id of the node to retrieve attributes for. } // GetAttributes returns attributes for the specified node. @@ -358,7 +358,7 @@ type GetAttributesParams struct { // // parameters: // -// nodeID - Id of the node to retrieve attibutes for. +// nodeID - Id of the node to retrieve attributes for. func GetAttributes(nodeID cdp.NodeID) *GetAttributesParams { return &GetAttributesParams{ NodeID: nodeID, diff --git a/emulation/easyjson.go b/emulation/easyjson.go index 87cc70f..4f9ad98 100644 --- a/emulation/easyjson.go +++ b/emulation/easyjson.go @@ -3485,129 +3485,3 @@ func (v *ClearDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error { func (v *ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation42(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation43(in *jlexer.Lexer, out *CanEmulateReturns) { - 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 "result": - out.Result = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation43(out *jwriter.Writer, in CanEmulateReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result { - const prefix string = ",\"result\":" - first = false - out.RawString(prefix[1:]) - out.Bool(bool(in.Result)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanEmulateReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation43(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanEmulateReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation43(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanEmulateReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation43(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanEmulateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation43(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation44(in *jlexer.Lexer, out *CanEmulateParams) { - 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 { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation44(out *jwriter.Writer, in CanEmulateParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanEmulateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation44(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanEmulateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation44(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanEmulateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation44(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanEmulateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation44(l, v) -} diff --git a/emulation/emulation.go b/emulation/emulation.go index b56a325..0701b35 100644 --- a/emulation/emulation.go +++ b/emulation/emulation.go @@ -15,37 +15,6 @@ import ( "github.com/chromedp/cdproto/page" ) -// CanEmulateParams tells whether emulation is supported. -type CanEmulateParams struct{} - -// CanEmulate tells whether emulation is supported. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-canEmulate -func CanEmulate() *CanEmulateParams { - return &CanEmulateParams{} -} - -// CanEmulateReturns return values. -type CanEmulateReturns struct { - Result bool `json:"result,omitempty"` // True if emulation is supported. -} - -// Do executes Emulation.canEmulate against the provided context. -// -// returns: -// -// result - True if emulation is supported. -func (p *CanEmulateParams) Do(ctx context.Context) (result bool, err error) { - // execute - var res CanEmulateReturns - err = cdp.Execute(ctx, CommandCanEmulate, nil, &res) - if err != nil { - return false, err - } - - return res.Result, nil -} - // ClearDeviceMetricsOverrideParams clears the overridden device metrics. type ClearDeviceMetricsOverrideParams struct{} @@ -819,7 +788,7 @@ func (p *SetLocaleOverrideParams) Do(ctx context.Context) (err error) { // SetTimezoneOverrideParams overrides default host system timezone with the // specified one. type SetTimezoneOverrideParams struct { - TimezoneID string `json:"timezoneId"` // The timezone identifier. If empty, disables the override and restores default host system timezone. + TimezoneID string `json:"timezoneId"` // The timezone identifier. List of supported timezones: https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt If empty, disables the override and restores default host system timezone. } // SetTimezoneOverride overrides default host system timezone with the @@ -829,7 +798,7 @@ type SetTimezoneOverrideParams struct { // // parameters: // -// timezoneID - The timezone identifier. If empty, disables the override and restores default host system timezone. +// timezoneID - The timezone identifier. List of supported timezones: https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt If empty, disables the override and restores default host system timezone. func SetTimezoneOverride(timezoneID string) *SetTimezoneOverrideParams { return &SetTimezoneOverrideParams{ TimezoneID: timezoneID, @@ -888,7 +857,7 @@ func (p *SetHardwareConcurrencyOverrideParams) Do(ctx context.Context) (err erro } // SetUserAgentOverrideParams allows overriding user agent with the given -// string. +// string. userAgentMetadata must be set for Client Hint headers to be sent. type SetUserAgentOverrideParams struct { UserAgent string `json:"userAgent"` // User agent to use. AcceptLanguage string `json:"acceptLanguage,omitempty"` // Browser language to emulate. @@ -897,6 +866,7 @@ type SetUserAgentOverrideParams struct { } // SetUserAgentOverride allows overriding user agent with the given string. +// userAgentMetadata must be set for Client Hint headers to be sent. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setUserAgentOverride // @@ -958,7 +928,6 @@ func (p *SetAutomationOverrideParams) Do(ctx context.Context) (err error) { // Command names. const ( - CommandCanEmulate = "Emulation.canEmulate" CommandClearDeviceMetricsOverride = "Emulation.clearDeviceMetricsOverride" CommandClearGeolocationOverride = "Emulation.clearGeolocationOverride" CommandResetPageScaleFactor = "Emulation.resetPageScaleFactor" diff --git a/emulation/types.go b/emulation/types.go index 34a716b..8c0faaa 100644 --- a/emulation/types.go +++ b/emulation/types.go @@ -94,7 +94,7 @@ func (t *VirtualTimePolicy) UnmarshalJSON(buf []byte) error { return easyjson.Unmarshal(buf, t) } -// UserAgentBrandVersion used to specify User Agent Cient Hints to emulate. +// UserAgentBrandVersion used to specify User Agent Client Hints to emulate. // See https://wicg.github.io/ua-client-hints. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentBrandVersion @@ -103,7 +103,7 @@ type UserAgentBrandVersion struct { Version string `json:"version"` } -// UserAgentMetadata used to specify User Agent Cient Hints to emulate. See +// UserAgentMetadata used to specify User Agent Client Hints to emulate. See // https://wicg.github.io/ua-client-hints Missing optional values will be filled // in by the target with what it would normally use. // diff --git a/input/input.go b/input/input.go index 52b35e4..5867b80 100644 --- a/input/input.go +++ b/input/input.go @@ -214,7 +214,7 @@ func (p *InsertTextParams) Do(ctx context.Context) (err error) { } // ImeSetCompositionParams this method sets the current candidate text for -// ime. Use imeCommitComposition to commit the final text. Use imeSetComposition +// IME. Use imeCommitComposition to commit the final text. Use imeSetComposition // with empty string as text to cancel composition. type ImeSetCompositionParams struct { Text string `json:"text"` // The text to insert @@ -224,7 +224,7 @@ type ImeSetCompositionParams struct { ReplacementEnd int64 `json:"replacementEnd,omitempty"` // replacement end } -// ImeSetComposition this method sets the current candidate text for ime. Use +// ImeSetComposition this method sets the current candidate text for IME. Use // imeCommitComposition to commit the final text. Use imeSetComposition with // empty string as text to cancel composition. // diff --git a/io/io.go b/io/io.go index e310b52..ebe6742 100644 --- a/io/io.go +++ b/io/io.go @@ -41,7 +41,7 @@ func (p *CloseParams) Do(ctx context.Context) (err error) { // ReadParams read a chunk of the stream. type ReadParams struct { Handle StreamHandle `json:"handle"` // Handle of the stream to read. - Offset int64 `json:"offset,omitempty"` // Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads. + Offset int64 `json:"offset,omitempty"` // Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads. Size int64 `json:"size,omitempty"` // Maximum number of bytes to read (left upon the agent discretion if not specified). } @@ -58,7 +58,7 @@ func Read(handle StreamHandle) *ReadParams { } } -// WithOffset seek to the specified offset before reading (if not specificed, +// WithOffset seek to the specified offset before reading (if not specified, // proceed with offset following the last read). Some types of streams may only // support sequential reads. func (p ReadParams) WithOffset(offset int64) *ReadParams { diff --git a/layertree/events.go b/layertree/events.go index e635f13..c358b2b 100644 --- a/layertree/events.go +++ b/layertree/events.go @@ -18,5 +18,5 @@ type EventLayerPainted struct { // // See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#event-layerTreeDidChange type EventLayerTreeDidChange struct { - Layers []*Layer `json:"layers,omitempty"` // Layer tree, absent if not in the comspositing mode. + Layers []*Layer `json:"layers,omitempty"` // Layer tree, absent if not in the compositing mode. } diff --git a/network/easyjson.go b/network/easyjson.go index 8f0d3dd..eefd19a 100644 --- a/network/easyjson.go +++ b/network/easyjson.go @@ -2255,6 +2255,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork21(in *jlexer.Lexer, o switch key { case "ruleIdMatched": out.RuleIDMatched = int64(in.Int64()) + case "matchedSourceType": + (out.MatchedSourceType).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -2274,6 +2276,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork21(out *jwriter.Writer out.RawString(prefix[1:]) out.Int64(int64(in.RuleIDMatched)) } + { + const prefix string = ",\"matchedSourceType\":" + out.RawString(prefix) + (in.MatchedSourceType).MarshalEasyJSON(out) + } out.RawByte('}') } diff --git a/network/events.go b/network/events.go index 90967d8..cbfd2bf 100644 --- a/network/events.go +++ b/network/events.go @@ -36,7 +36,7 @@ type EventLoadingFailed struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp. Type ResourceType `json:"type"` // Resource type. - ErrorText string `json:"errorText"` // User friendly error message. + ErrorText string `json:"errorText"` // Error message. List of network errors: https://cs.chromium.org/chromium/src/net/base/net_error_list.h Canceled bool `json:"canceled,omitempty"` // True if loading was canceled. BlockedReason BlockedReason `json:"blockedReason,omitempty"` // The reason why loading was blocked, if any. CorsErrorStatus *CorsErrorStatus `json:"corsErrorStatus,omitempty"` // The reason why loading was blocked by CORS, if any. @@ -231,7 +231,7 @@ type EventResponseReceivedExtraInfo struct { StatusCode int64 `json:"statusCode"` // The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304. HeadersText string `json:"headersText,omitempty"` // Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC. CookiePartitionKey string `json:"cookiePartitionKey,omitempty"` // The cookie partition key that will be used to store partitioned cookies set in this response. Only sent when partitioned cookies are enabled. - CookiePartitionKeyOpaque bool `json:"cookiePartitionKeyOpaque,omitempty"` // True if partitioned cookies are enabled, but the partition key is not serializeable to string. + CookiePartitionKeyOpaque bool `json:"cookiePartitionKeyOpaque,omitempty"` // True if partitioned cookies are enabled, but the partition key is not serializable to string. ExemptedCookies []*ExemptedSetCookieWithReason `json:"exemptedCookies,omitempty"` // A list of cookies which should have been blocked by 3PCD but are exempted and stored from the response with the corresponding reason. } diff --git a/network/types.go b/network/types.go index 1cb7640..cb2c16b 100644 --- a/network/types.go +++ b/network/types.go @@ -531,7 +531,7 @@ type Request struct { ReferrerPolicy ReferrerPolicy `json:"referrerPolicy"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ IsLinkPreload bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload. TrustTokenParams *TrustTokenParams `json:"trustTokenParams,omitempty"` // Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend. - IsSameSite bool `json:"isSameSite,omitempty"` // True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame. + IsSameSite bool `json:"isSameSite,omitempty"` // True if this resource request is considered to be the 'same site' as the request corresponding to the main frame. } // SignedCertificateTimestamp details of a signed certificate timestamp @@ -1017,11 +1017,63 @@ func (t *AlternateProtocolUsage) UnmarshalJSON(buf []byte) error { return easyjson.Unmarshal(buf, t) } +// ServiceWorkerRouterSource source of service worker router. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ServiceWorkerRouterSource +type ServiceWorkerRouterSource string + +// String returns the ServiceWorkerRouterSource as string value. +func (t ServiceWorkerRouterSource) String() string { + return string(t) +} + +// ServiceWorkerRouterSource values. +const ( + ServiceWorkerRouterSourceNetwork ServiceWorkerRouterSource = "network" + ServiceWorkerRouterSourceCache ServiceWorkerRouterSource = "cache" + ServiceWorkerRouterSourceFetchEvent ServiceWorkerRouterSource = "fetch-event" + ServiceWorkerRouterSourceRaceNetworkAndFetchHandler ServiceWorkerRouterSource = "race-network-and-fetch-handler" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t ServiceWorkerRouterSource) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t ServiceWorkerRouterSource) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *ServiceWorkerRouterSource) UnmarshalEasyJSON(in *jlexer.Lexer) { + v := in.String() + switch ServiceWorkerRouterSource(v) { + case ServiceWorkerRouterSourceNetwork: + *t = ServiceWorkerRouterSourceNetwork + case ServiceWorkerRouterSourceCache: + *t = ServiceWorkerRouterSourceCache + case ServiceWorkerRouterSourceFetchEvent: + *t = ServiceWorkerRouterSourceFetchEvent + case ServiceWorkerRouterSourceRaceNetworkAndFetchHandler: + *t = ServiceWorkerRouterSourceRaceNetworkAndFetchHandler + + default: + in.AddError(fmt.Errorf("unknown ServiceWorkerRouterSource value: %v", v)) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *ServiceWorkerRouterSource) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + // ServiceWorkerRouterInfo [no description]. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ServiceWorkerRouterInfo type ServiceWorkerRouterInfo struct { - RuleIDMatched int64 `json:"ruleIdMatched"` + RuleIDMatched int64 `json:"ruleIdMatched"` + MatchedSourceType ServiceWorkerRouterSource `json:"matchedSourceType"` } // Response HTTP response data. @@ -1614,7 +1666,7 @@ type SignedExchangeInfo struct { OuterResponse *Response `json:"outerResponse"` // The outer response of signed HTTP exchange which was received from network. Header *SignedExchangeHeader `json:"header,omitempty"` // Information about the signed exchange header. SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the signed exchange header. - Errors []*SignedExchangeError `json:"errors,omitempty"` // Errors occurred while handling the signed exchagne. + Errors []*SignedExchangeError `json:"errors,omitempty"` // Errors occurred while handling the signed exchange. } // ContentEncoding list of content encodings supported by the backend. diff --git a/overlay/types.go b/overlay/types.go index fe6ac35..942824e 100644 --- a/overlay/types.go +++ b/overlay/types.go @@ -17,7 +17,7 @@ import ( // // See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-SourceOrderConfig type SourceOrderConfig struct { - ParentOutlineColor *cdp.RGBA `json:"parentOutlineColor"` // the color to outline the givent element in. + ParentOutlineColor *cdp.RGBA `json:"parentOutlineColor"` // the color to outline the given element in. ChildOutlineColor *cdp.RGBA `json:"childOutlineColor"` // the color to outline the child elements in. } @@ -259,7 +259,7 @@ type HingeConfig struct { // See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-WindowControlsOverlayConfig type WindowControlsOverlayConfig struct { ShowCSS bool `json:"showCSS"` // Whether the title bar CSS should be shown when emulating the Window Controls Overlay. - SelectedPlatform string `json:"selectedPlatform"` // Seleted platforms to show the overlay. + SelectedPlatform string `json:"selectedPlatform"` // Selected platforms to show the overlay. ThemeColor string `json:"themeColor"` // The theme color defined in app manifest. } diff --git a/page/events.go b/page/events.go index e37e12f..1d86198 100644 --- a/page/events.go +++ b/page/events.go @@ -137,7 +137,7 @@ type EventLifecycleEvent struct { // // See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-backForwardCacheNotUsed type EventBackForwardCacheNotUsed struct { - LoaderID cdp.LoaderID `json:"loaderId"` // The loader id for the associated navgation. + LoaderID cdp.LoaderID `json:"loaderId"` // The loader id for the associated navigation. FrameID cdp.FrameID `json:"frameId"` // The frame id of the associated frame. NotRestoredExplanations []*BackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` // Array of reasons why the page could not be cached. This must not be empty. NotRestoredExplanationsTree *BackForwardCacheNotRestoredExplanationTree `json:"notRestoredExplanationsTree,omitempty"` // Tree structure of reasons why the page could not be cached for each frame. diff --git a/page/page.go b/page/page.go index 7d38bc6..c3bd7fc 100644 --- a/page/page.go +++ b/page/page.go @@ -1488,7 +1488,7 @@ func (p *StopScreencastParams) Do(ctx context.Context) (err error) { } // ProduceCompilationCacheParams requests backend to produce compilation -// cache for the specified scripts. scripts are appeneded to the list of scripts +// cache for the specified scripts. scripts are appended to the list of scripts // for which the cache would be produced. The list may be reset during page // navigation. When script with a matching URL is encountered, the cache is // optionally produced upon backend discretion, based on internal heuristics. @@ -1498,7 +1498,7 @@ type ProduceCompilationCacheParams struct { } // ProduceCompilationCache requests backend to produce compilation cache for -// the specified scripts. scripts are appeneded to the list of scripts for which +// the specified scripts. scripts are appended to the list of scripts for which // the cache would be produced. The list may be reset during page navigation. // When script with a matching URL is encountered, the cache is optionally // produced upon backend discretion, based on internal heuristics. See also: diff --git a/page/types.go b/page/types.go index 8ae7b40..c9d2e64 100644 --- a/page/types.go +++ b/page/types.go @@ -108,6 +108,7 @@ const ( PermissionsPolicyFeatureSharedStorage PermissionsPolicyFeature = "shared-storage" PermissionsPolicyFeatureSharedStorageSelectURL PermissionsPolicyFeature = "shared-storage-select-url" PermissionsPolicyFeatureSmartCard PermissionsPolicyFeature = "smart-card" + PermissionsPolicyFeatureSpeakerSelection PermissionsPolicyFeature = "speaker-selection" PermissionsPolicyFeatureStorageAccess PermissionsPolicyFeature = "storage-access" PermissionsPolicyFeatureSubApps PermissionsPolicyFeature = "sub-apps" PermissionsPolicyFeatureSyncXhr PermissionsPolicyFeature = "sync-xhr" @@ -280,6 +281,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionsPolicyFeatureSharedStorageSelectURL case PermissionsPolicyFeatureSmartCard: *t = PermissionsPolicyFeatureSmartCard + case PermissionsPolicyFeatureSpeakerSelection: + *t = PermissionsPolicyFeatureSpeakerSelection case PermissionsPolicyFeatureStorageAccess: *t = PermissionsPolicyFeatureStorageAccess case PermissionsPolicyFeatureSubApps: @@ -583,7 +586,7 @@ func (t *DialogType) UnmarshalJSON(buf []byte) error { // See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AppManifestError type AppManifestError struct { Message string `json:"message"` // Error message. - Critical int64 `json:"critical"` // If criticial, this is a non-recoverable parse error. + Critical int64 `json:"critical"` // If critical, this is a non-recoverable parse error. Line int64 `json:"line"` // Error line. Column int64 `json:"column"` // Error column. } @@ -861,7 +864,7 @@ type CompilationCacheParams struct { Eager bool `json:"eager,omitempty"` // A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion). } -// AutoResponseMode enum of possible auto-response for permissions / prompt +// AutoResponseMode enum of possible auto-response for permission / prompt // dialogs. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AutoResponseMode @@ -1036,7 +1039,6 @@ const ( BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoCache BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoCache" BackForwardCacheNotRestoredReasonContainsPlugins BackForwardCacheNotRestoredReason = "ContainsPlugins" BackForwardCacheNotRestoredReasonDocumentLoaded BackForwardCacheNotRestoredReason = "DocumentLoaded" - BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet BackForwardCacheNotRestoredReason = "DedicatedWorkerOrWorklet" BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestOthers" BackForwardCacheNotRestoredReasonRequestedMIDIPermission BackForwardCacheNotRestoredReason = "RequestedMIDIPermission" BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission BackForwardCacheNotRestoredReason = "RequestedAudioCapturePermission" @@ -1248,8 +1250,6 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer) *t = BackForwardCacheNotRestoredReasonContainsPlugins case BackForwardCacheNotRestoredReasonDocumentLoaded: *t = BackForwardCacheNotRestoredReasonDocumentLoaded - case BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet: - *t = BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet case BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers: *t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers case BackForwardCacheNotRestoredReasonRequestedMIDIPermission: diff --git a/performancetimeline/types.go b/performancetimeline/types.go index 887a37c..f3ad5dc 100644 --- a/performancetimeline/types.go +++ b/performancetimeline/types.go @@ -46,7 +46,7 @@ type LayoutShift struct { // See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-TimelineEvent type TimelineEvent struct { FrameID cdp.FrameID `json:"frameId"` // Identifies the frame that this event is related to. Empty for non-frame targets. - Type string `json:"type"` // The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional "details" fiedls is present. + Type string `json:"type"` // The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional "details" fields is present. Name string `json:"name"` // Name may be empty depending on the type. Time *cdp.TimeSinceEpoch `json:"time"` // Time in seconds since Epoch, monotonically increasing within document lifetime. Duration float64 `json:"duration,omitempty"` // Event duration, if applicable. diff --git a/security/types.go b/security/types.go index 8561fb9..dcf9906 100644 --- a/security/types.go +++ b/security/types.go @@ -143,7 +143,7 @@ type CertificateSecurityState struct { ValidFrom *cdp.TimeSinceEpoch `json:"validFrom"` // Certificate valid from date. ValidTo *cdp.TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date CertificateNetworkError string `json:"certificateNetworkError,omitempty"` // The highest priority network error code, if the certificate has an error. - CertificateHasWeakSignature bool `json:"certificateHasWeakSignature"` // True if the certificate uses a weak signature aglorithm. + CertificateHasWeakSignature bool `json:"certificateHasWeakSignature"` // True if the certificate uses a weak signature algorithm. CertificateHasSha1signature bool `json:"certificateHasSha1Signature"` // True if the certificate has a SHA1 signature in the chain. ModernSSL bool `json:"modernSSL"` // True if modern SSL ObsoleteSslProtocol bool `json:"obsoleteSslProtocol"` // True if the connection is using an obsolete SSL protocol. diff --git a/storage/easyjson.go b/storage/easyjson.go index 1c23d74..7cd184e 100644 --- a/storage/easyjson.go +++ b/storage/easyjson.go @@ -6970,10 +6970,47 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage74(in *jlexer.Lexer, o continue } switch key { - case "key": - out.Key = string(in.String()) - case "value": - out.Value = float64(in.Float64()) + case "values": + if in.IsNull() { + in.Skip() + out.Values = nil + } else { + in.Delim('[') + if out.Values == nil { + if !in.IsDelim(']') { + out.Values = make([]*AttributionReportingAggregatableValueDictEntry, 0, 8) + } else { + out.Values = []*AttributionReportingAggregatableValueDictEntry{} + } + } else { + out.Values = (out.Values)[:0] + } + for !in.IsDelim(']') { + var v79 *AttributionReportingAggregatableValueDictEntry + if in.IsNull() { + in.Skip() + v79 = nil + } else { + if v79 == nil { + v79 = new(AttributionReportingAggregatableValueDictEntry) + } + (*v79).UnmarshalEasyJSON(in) + } + out.Values = append(out.Values, v79) + in.WantComma() + } + in.Delim(']') + } + case "filters": + if in.IsNull() { + in.Skip() + out.Filters = nil + } else { + if out.Filters == nil { + out.Filters = new(AttributionReportingFilterPair) + } + (*out.Filters).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -6989,14 +7026,33 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage74(out *jwriter.Writer first := true _ = first { - const prefix string = ",\"key\":" + const prefix string = ",\"values\":" out.RawString(prefix[1:]) - out.String(string(in.Key)) + if in.Values == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v80, v81 := range in.Values { + if v80 > 0 { + out.RawByte(',') + } + if v81 == nil { + out.RawString("null") + } else { + (*v81).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } } { - const prefix string = ",\"value\":" + const prefix string = ",\"filters\":" out.RawString(prefix) - out.Float64(float64(in.Value)) + if in.Filters == nil { + out.RawString("null") + } else { + (*in.Filters).MarshalEasyJSON(out) + } } out.RawByte('}') } @@ -7024,7 +7080,80 @@ func (v *AttributionReportingAggregatableValueEntry) UnmarshalJSON(data []byte) func (v *AttributionReportingAggregatableValueEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage74(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(in *jlexer.Lexer, out *AttributionReportingAggregatableTriggerData) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(in *jlexer.Lexer, out *AttributionReportingAggregatableValueDictEntry) { + 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 "key": + out.Key = string(in.String()) + case "value": + out.Value = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(out *jwriter.Writer, in AttributionReportingAggregatableValueDictEntry) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.String(string(in.Key)) + } + { + const prefix string = ",\"value\":" + out.RawString(prefix) + out.Float64(float64(in.Value)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AttributionReportingAggregatableValueDictEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AttributionReportingAggregatableValueDictEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AttributionReportingAggregatableValueDictEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AttributionReportingAggregatableValueDictEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(in *jlexer.Lexer, out *AttributionReportingAggregatableTriggerData) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -7061,9 +7190,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(in *jlexer.Lexer, o out.SourceKeys = (out.SourceKeys)[:0] } for !in.IsDelim(']') { - var v79 string - v79 = string(in.String()) - out.SourceKeys = append(out.SourceKeys, v79) + var v82 string + v82 = string(in.String()) + out.SourceKeys = append(out.SourceKeys, v82) in.WantComma() } in.Delim(']') @@ -7088,7 +7217,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(out *jwriter.Writer, in AttributionReportingAggregatableTriggerData) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(out *jwriter.Writer, in AttributionReportingAggregatableTriggerData) { out.RawByte('{') first := true _ = first @@ -7104,11 +7233,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(out *jwriter.Writer out.RawString("null") } else { out.RawByte('[') - for v80, v81 := range in.SourceKeys { - if v80 > 0 { + for v83, v84 := range in.SourceKeys { + if v83 > 0 { out.RawByte(',') } - out.String(string(v81)) + out.String(string(v84)) } out.RawByte(']') } @@ -7128,27 +7257,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v AttributionReportingAggregatableTriggerData) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AttributionReportingAggregatableTriggerData) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage75(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AttributionReportingAggregatableTriggerData) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AttributionReportingAggregatableTriggerData) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage75(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(in *jlexer.Lexer, out *AttributionReportingAggregatableDedupKey) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage77(in *jlexer.Lexer, out *AttributionReportingAggregatableDedupKey) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -7189,7 +7318,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(out *jwriter.Writer, in AttributionReportingAggregatableDedupKey) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage77(out *jwriter.Writer, in AttributionReportingAggregatableDedupKey) { out.RawByte('{') first := true _ = first @@ -7219,23 +7348,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v AttributionReportingAggregatableDedupKey) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage77(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AttributionReportingAggregatableDedupKey) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage76(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage77(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AttributionReportingAggregatableDedupKey) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage77(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AttributionReportingAggregatableDedupKey) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage76(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage77(l, v) } diff --git a/storage/events.go b/storage/events.go index 0634c7a..607d989 100644 --- a/storage/events.go +++ b/storage/events.go @@ -97,7 +97,7 @@ type EventSharedStorageAccessed struct { Type SharedStorageAccessType `json:"type"` // Enum value indicating the Shared Storage API method invoked. MainFrameID cdp.FrameID `json:"mainFrameId"` // DevTools Frame Token for the primary frame tree's root. OwnerOrigin string `json:"ownerOrigin"` // Serialized origin for the context that invoked the Shared Storage API. - Params *SharedStorageAccessParams `json:"params"` // The sub-parameters warapped by params are all optional and their presence/absence depends on type. + Params *SharedStorageAccessParams `json:"params"` // The sub-parameters wrapped by params are all optional and their presence/absence depends on type. } // EventStorageBucketCreatedOrUpdated [no description]. diff --git a/storage/types.go b/storage/types.go index ac1e2b1..83ab73e 100644 --- a/storage/types.go +++ b/storage/types.go @@ -838,12 +838,20 @@ func (t *AttributionReportingSourceRegistrationTimeConfig) UnmarshalJSON(buf []b return easyjson.Unmarshal(buf, t) } +// AttributionReportingAggregatableValueDictEntry [no description]. +// +// 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 +} + // AttributionReportingAggregatableValueEntry [no description]. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-AttributionReportingAggregatableValueEntry type AttributionReportingAggregatableValueEntry struct { - Key string `json:"key"` - Value float64 `json:"value"` // number instead of integer because not all uint32 can be represented by int + Values []*AttributionReportingAggregatableValueDictEntry `json:"values"` + Filters *AttributionReportingFilterPair `json:"filters"` } // AttributionReportingEventTriggerData [no description]. diff --git a/target/target.go b/target/target.go index bd76086..7fc6eeb 100644 --- a/target/target.go +++ b/target/target.go @@ -145,7 +145,7 @@ func (p *CloseTargetParams) Do(ctx context.Context) (err error) { // ExposeDevToolsProtocolParams inject object to the target's main frame that // provides a communication channel with browser target. Injected object will be -// available as window[bindingName]. The object has the follwing API: - +// available as window[bindingName]. The object has the following API: - // binding.send(json) - a method to send messages over the remote debugging // protocol - binding.onmessage = json => handleMessage(json) - a callback that // will be called for the protocol notifications and command responses. @@ -156,7 +156,7 @@ type ExposeDevToolsProtocolParams struct { // ExposeDevToolsProtocol inject object to the target's main frame that // provides a communication channel with browser target. Injected object will be -// available as window[bindingName]. The object has the follwing API: - +// available as window[bindingName]. The object has the following API: - // binding.send(json) - a method to send messages over the remote debugging // protocol - binding.onmessage = json => handleMessage(json) - a callback that // will be called for the protocol notifications and command responses. diff --git a/target/types.go b/target/types.go index d185955..dc01c86 100644 --- a/target/types.go +++ b/target/types.go @@ -31,7 +31,7 @@ func (t SessionID) String() string { // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetInfo type Info struct { TargetID ID `json:"targetId"` - Type string `json:"type"` + Type string `json:"type"` // List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22 Title string `json:"title"` URL string `json:"url"` Attached bool `json:"attached"` // Whether the target has an attached client. @@ -47,7 +47,7 @@ type Info struct { // // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-FilterEntry type FilterEntry struct { - Exclude bool `json:"exclude,omitempty"` // If set, causes exclusion of mathcing targets from the list. + Exclude bool `json:"exclude,omitempty"` // If set, causes exclusion of matching targets from the list. Type string `json:"type,omitempty"` // If not present, matches any type. } @@ -59,7 +59,7 @@ type FilterEntry struct { // // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetFilter type Filter []struct { - Exclude bool `json:"exclude,omitempty"` // If set, causes exclusion of mathcing targets from the list. + Exclude bool `json:"exclude,omitempty"` // If set, causes exclusion of matching targets from the list. Type string `json:"type,omitempty"` // If not present, matches any type. }