From cc28c8fb63e7448e8aa23615215f5155a7cffe26 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Sat, 15 Jun 2024 05:16:51 +0700 Subject: [PATCH] Revert "Updating to 128.0.6539.1_12.8.57 definitions" The chromium team changed the definition of the cookiePartitionKey, and as such this breaks. Unfortunately, an event containing this type is sent with almost every request, leading to extraneous output. This reverts commit 646f539a3e192df7c821b37bef7346dbcdc611ee. --- accessibility/types.go | 3 - audits/types.go | 19 +-- cdproto.go | 4 - network/easyjson.go | 299 +++++++++++++---------------------------- network/events.go | 2 +- network/network.go | 24 ++-- network/types.go | 72 ++++------ page/types.go | 18 --- pwa/easyjson.go | 174 ++++++++---------------- pwa/pwa.go | 88 +++++------- 10 files changed, 224 insertions(+), 479 deletions(-) diff --git a/accessibility/types.go b/accessibility/types.go index e1c439e..0a88caf 100644 --- a/accessibility/types.go +++ b/accessibility/types.go @@ -336,7 +336,6 @@ const ( PropertyNameFlowto PropertyName = "flowto" PropertyNameLabelledby PropertyName = "labelledby" PropertyNameOwns PropertyName = "owns" - PropertyNameURL PropertyName = "url" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -431,8 +430,6 @@ func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PropertyNameLabelledby case PropertyNameOwns: *t = PropertyNameOwns - case PropertyNameURL: - *t = PropertyNameURL default: in.AddError(fmt.Errorf("unknown PropertyName value: %v", v)) diff --git a/audits/types.go b/audits/types.go index a709ceb..94b93c5 100644 --- a/audits/types.go +++ b/audits/types.go @@ -440,13 +440,11 @@ func (t BlockedByResponseReason) String() string { // BlockedByResponseReason values. const ( - BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader" - BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage BlockedByResponseReason = "CoopSandboxedIFrameCannotNavigateToCoopPage" - BlockedByResponseReasonCorpNotSameOrigin BlockedByResponseReason = "CorpNotSameOrigin" - BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep" - BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip BlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByDip" - BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip BlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip" - BlockedByResponseReasonCorpNotSameSite BlockedByResponseReason = "CorpNotSameSite" + BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader" + BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage BlockedByResponseReason = "CoopSandboxedIFrameCannotNavigateToCoopPage" + BlockedByResponseReasonCorpNotSameOrigin BlockedByResponseReason = "CorpNotSameOrigin" + BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep" + BlockedByResponseReasonCorpNotSameSite BlockedByResponseReason = "CorpNotSameSite" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -471,10 +469,6 @@ func (t *BlockedByResponseReason) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = BlockedByResponseReasonCorpNotSameOrigin case BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep: *t = BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep - case BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip: - *t = BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip - case BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip: - *t = BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip case BlockedByResponseReasonCorpNotSameSite: *t = BlockedByResponseReasonCorpNotSameSite @@ -1237,7 +1231,6 @@ const ( FederatedAuthRequestIssueReasonMissingTransientUserActivation FederatedAuthRequestIssueReason = "MissingTransientUserActivation" FederatedAuthRequestIssueReasonReplacedByButtonMode FederatedAuthRequestIssueReason = "ReplacedByButtonMode" FederatedAuthRequestIssueReasonRelyingPartyOriginIsOpaque FederatedAuthRequestIssueReason = "RelyingPartyOriginIsOpaque" - FederatedAuthRequestIssueReasonTypeNotMatching FederatedAuthRequestIssueReason = "TypeNotMatching" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -1336,8 +1329,6 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = FederatedAuthRequestIssueReasonReplacedByButtonMode case FederatedAuthRequestIssueReasonRelyingPartyOriginIsOpaque: *t = FederatedAuthRequestIssueReasonRelyingPartyOriginIsOpaque - case FederatedAuthRequestIssueReasonTypeNotMatching: - *t = FederatedAuthRequestIssueReasonTypeNotMatching default: in.AddError(fmt.Errorf("unknown FederatedAuthRequestIssueReason value: %v", v)) diff --git a/cdproto.go b/cdproto.go index 8b2c4e8..3c6b90a 100644 --- a/cdproto.go +++ b/cdproto.go @@ -554,7 +554,6 @@ const ( CommandPWAUninstall = pwa.CommandUninstall CommandPWALaunch = pwa.CommandLaunch CommandPWALaunchFilesInApp = pwa.CommandLaunchFilesInApp - CommandPWAOpenCurrentPageInApp = pwa.CommandOpenCurrentPageInApp CommandPageAddScriptToEvaluateOnNewDocument = page.CommandAddScriptToEvaluateOnNewDocument CommandPageBringToFront = page.CommandBringToFront CommandPageCaptureScreenshot = page.CommandCaptureScreenshot @@ -2264,9 +2263,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) { case CommandPWALaunchFilesInApp: v = new(pwa.LaunchFilesInAppReturns) - case CommandPWAOpenCurrentPageInApp: - return emptyVal, nil - case CommandPageAddScriptToEvaluateOnNewDocument: v = new(page.AddScriptToEvaluateOnNewDocumentReturns) diff --git a/network/easyjson.go b/network/easyjson.go index ecede66..dab16a2 100644 --- a/network/easyjson.go +++ b/network/easyjson.go @@ -1729,15 +1729,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork15(in *jlexer.Lexer, o case "sourcePort": out.SourcePort = int64(in.Int64()) case "partitionKey": - if in.IsNull() { - in.Skip() - out.PartitionKey = nil - } else { - if out.PartitionKey == nil { - out.PartitionKey = new(CookiePartitionKey) - } - (*out.PartitionKey).UnmarshalEasyJSON(in) - } + out.PartitionKey = string(in.String()) default: in.SkipRecursive() } @@ -1817,10 +1809,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork15(out *jwriter.Writer out.RawString(prefix) out.Int64(int64(in.SourcePort)) } - if in.PartitionKey != nil { + if in.PartitionKey != "" { const prefix string = ",\"partitionKey\":" out.RawString(prefix) - (*in.PartitionKey).MarshalEasyJSON(out) + out.String(string(in.PartitionKey)) } out.RawByte('}') } @@ -7281,15 +7273,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork68(in *jlexer.Lexer, o case "headersText": out.HeadersText = string(in.String()) case "cookiePartitionKey": - if in.IsNull() { - in.Skip() - out.CookiePartitionKey = nil - } else { - if out.CookiePartitionKey == nil { - out.CookiePartitionKey = new(CookiePartitionKey) - } - (*out.CookiePartitionKey).UnmarshalEasyJSON(in) - } + out.CookiePartitionKey = string(in.String()) case "cookiePartitionKeyOpaque": out.CookiePartitionKeyOpaque = bool(in.Bool()) case "exemptedCookies": @@ -7404,10 +7388,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork68(out *jwriter.Writer out.RawString(prefix) out.String(string(in.HeadersText)) } - if in.CookiePartitionKey != nil { + if in.CookiePartitionKey != "" { const prefix string = ",\"cookiePartitionKey\":" out.RawString(prefix) - (*in.CookiePartitionKey).MarshalEasyJSON(out) + out.String(string(in.CookiePartitionKey)) } if in.CookiePartitionKeyOpaque { const prefix string = ",\"cookiePartitionKeyOpaque\":" @@ -9333,15 +9317,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork86(in *jlexer.Lexer, o case "path": out.Path = string(in.String()) case "partitionKey": - if in.IsNull() { - in.Skip() - out.PartitionKey = nil - } else { - if out.PartitionKey == nil { - out.PartitionKey = new(CookiePartitionKey) - } - (*out.PartitionKey).UnmarshalEasyJSON(in) - } + out.PartitionKey = string(in.String()) default: in.SkipRecursive() } @@ -9376,10 +9352,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork86(out *jwriter.Writer out.RawString(prefix) out.String(string(in.Path)) } - if in.PartitionKey != nil { + if in.PartitionKey != "" { const prefix string = ",\"partitionKey\":" out.RawString(prefix) - (*in.PartitionKey).MarshalEasyJSON(out) + out.String(string(in.PartitionKey)) } out.RawByte('}') } @@ -9654,80 +9630,7 @@ func (v *CorsErrorStatus) UnmarshalJSON(data []byte) error { func (v *CorsErrorStatus) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork89(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(in *jlexer.Lexer, out *CookiePartitionKey) { - 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 "topLevelSite": - out.TopLevelSite = string(in.String()) - case "hasCrossSiteAncestor": - out.HasCrossSiteAncestor = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(out *jwriter.Writer, in CookiePartitionKey) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"topLevelSite\":" - out.RawString(prefix[1:]) - out.String(string(in.TopLevelSite)) - } - { - const prefix string = ",\"hasCrossSiteAncestor\":" - out.RawString(prefix) - out.Bool(bool(in.HasCrossSiteAncestor)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CookiePartitionKey) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CookiePartitionKey) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CookiePartitionKey) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CookiePartitionKey) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(in *jlexer.Lexer, out *CookieParam) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(in *jlexer.Lexer, out *CookieParam) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -9781,15 +9684,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(in *jlexer.Lexer, o case "sourcePort": out.SourcePort = int64(in.Int64()) case "partitionKey": - if in.IsNull() { - in.Skip() - out.PartitionKey = nil - } else { - if out.PartitionKey == nil { - out.PartitionKey = new(CookiePartitionKey) - } - (*out.PartitionKey).UnmarshalEasyJSON(in) - } + out.PartitionKey = string(in.String()) default: in.SkipRecursive() } @@ -9800,7 +9695,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(out *jwriter.Writer, in CookieParam) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(out *jwriter.Writer, in CookieParam) { out.RawByte('{') first := true _ = first @@ -9869,10 +9764,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(out *jwriter.Writer out.RawString(prefix) out.Int64(int64(in.SourcePort)) } - if in.PartitionKey != nil { + if in.PartitionKey != "" { const prefix string = ",\"partitionKey\":" out.RawString(prefix) - (*in.PartitionKey).MarshalEasyJSON(out) + out.String(string(in.PartitionKey)) } out.RawByte('}') } @@ -9880,27 +9775,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v CookieParam) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CookieParam) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CookieParam) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CookieParam) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(in *jlexer.Lexer, out *Cookie) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(in *jlexer.Lexer, out *Cookie) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -9946,15 +9841,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(in *jlexer.Lexer, o case "sourcePort": out.SourcePort = int64(in.Int64()) case "partitionKey": - if in.IsNull() { - in.Skip() - out.PartitionKey = nil - } else { - if out.PartitionKey == nil { - out.PartitionKey = new(CookiePartitionKey) - } - (*out.PartitionKey).UnmarshalEasyJSON(in) - } + out.PartitionKey = string(in.String()) case "partitionKeyOpaque": out.PartitionKeyOpaque = bool(in.Bool()) default: @@ -9967,7 +9854,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(out *jwriter.Writer, in Cookie) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(out *jwriter.Writer, in Cookie) { out.RawByte('{') first := true _ = first @@ -10036,10 +9923,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(out *jwriter.Writer out.RawString(prefix) out.Int64(int64(in.SourcePort)) } - if in.PartitionKey != nil { + if in.PartitionKey != "" { const prefix string = ",\"partitionKey\":" out.RawString(prefix) - (*in.PartitionKey).MarshalEasyJSON(out) + out.String(string(in.PartitionKey)) } if in.PartitionKeyOpaque { const prefix string = ",\"partitionKeyOpaque\":" @@ -10052,27 +9939,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v Cookie) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Cookie) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Cookie) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Cookie) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(in *jlexer.Lexer, out *ContentSecurityPolicyStatus) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(in *jlexer.Lexer, out *ContentSecurityPolicyStatus) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10107,7 +9994,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(out *jwriter.Writer, in ContentSecurityPolicyStatus) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(out *jwriter.Writer, in ContentSecurityPolicyStatus) { out.RawByte('{') first := true _ = first @@ -10132,27 +10019,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ContentSecurityPolicyStatus) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ContentSecurityPolicyStatus) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork92(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ContentSecurityPolicyStatus) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ContentSecurityPolicyStatus) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork92(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(in *jlexer.Lexer, out *ConnectTiming) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(in *jlexer.Lexer, out *ConnectTiming) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10183,7 +10070,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(out *jwriter.Writer, in ConnectTiming) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(out *jwriter.Writer, in ConnectTiming) { out.RawByte('{') first := true _ = first @@ -10198,27 +10085,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ConnectTiming) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ConnectTiming) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork93(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ConnectTiming) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ConnectTiming) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork93(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(in *jlexer.Lexer, out *ClientSecurityState) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(in *jlexer.Lexer, out *ClientSecurityState) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10253,7 +10140,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(out *jwriter.Writer, in ClientSecurityState) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(out *jwriter.Writer, in ClientSecurityState) { out.RawByte('{') first := true _ = first @@ -10278,27 +10165,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ClientSecurityState) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClientSecurityState) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork94(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClientSecurityState) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClientSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork94(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(in *jlexer.Lexer, out *ClearBrowserCookiesParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(in *jlexer.Lexer, out *ClearBrowserCookiesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10327,7 +10214,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(out *jwriter.Writer, in ClearBrowserCookiesParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(out *jwriter.Writer, in ClearBrowserCookiesParams) { out.RawByte('{') first := true _ = first @@ -10337,27 +10224,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork95(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork95(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(in *jlexer.Lexer, out *ClearBrowserCacheParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(in *jlexer.Lexer, out *ClearBrowserCacheParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10386,7 +10273,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(out *jwriter.Writer, in ClearBrowserCacheParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(out *jwriter.Writer, in ClearBrowserCacheParams) { out.RawByte('{') first := true _ = first @@ -10396,27 +10283,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ClearBrowserCacheParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork96(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearBrowserCacheParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork96(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(in *jlexer.Lexer, out *ClearAcceptedEncodingsOverrideParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(in *jlexer.Lexer, out *ClearAcceptedEncodingsOverrideParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10445,7 +10332,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(out *jwriter.Writer, in ClearAcceptedEncodingsOverrideParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(out *jwriter.Writer, in ClearAcceptedEncodingsOverrideParams) { out.RawByte('{') first := true _ = first @@ -10455,27 +10342,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ClearAcceptedEncodingsOverrideParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearAcceptedEncodingsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork97(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearAcceptedEncodingsOverrideParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClearAcceptedEncodingsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork97(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(in *jlexer.Lexer, out *CachedResource) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(in *jlexer.Lexer, out *CachedResource) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10520,7 +10407,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(out *jwriter.Writer, in CachedResource) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(out *jwriter.Writer, in CachedResource) { out.RawByte('{') first := true _ = first @@ -10550,27 +10437,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v CachedResource) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CachedResource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork98(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CachedResource) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork98(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(in *jlexer.Lexer, out *BlockedSetCookieWithReason) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(in *jlexer.Lexer, out *BlockedSetCookieWithReason) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10634,7 +10521,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(out *jwriter.Writer, in BlockedSetCookieWithReason) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(out *jwriter.Writer, in BlockedSetCookieWithReason) { out.RawByte('{') first := true _ = first @@ -10670,27 +10557,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v BlockedSetCookieWithReason) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v BlockedSetCookieWithReason) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork99(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *BlockedSetCookieWithReason) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *BlockedSetCookieWithReason) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork99(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(in *jlexer.Lexer, out *AuthChallengeResponse) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(in *jlexer.Lexer, out *AuthChallengeResponse) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10725,7 +10612,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(out *jwriter.Writer, in AuthChallengeResponse) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(out *jwriter.Writer, in AuthChallengeResponse) { out.RawByte('{') first := true _ = first @@ -10750,27 +10637,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v AuthChallengeResponse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AuthChallengeResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork100(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AuthChallengeResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AuthChallengeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork100(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(in *jlexer.Lexer, out *AuthChallenge) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(in *jlexer.Lexer, out *AuthChallenge) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10807,7 +10694,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(out *jwriter.Writer, in AuthChallenge) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(out *jwriter.Writer, in AuthChallenge) { out.RawByte('{') first := true _ = first @@ -10843,27 +10730,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v AuthChallenge) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AuthChallenge) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork101(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AuthChallenge) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AuthChallenge) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork101(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork103(in *jlexer.Lexer, out *AssociatedCookie) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(in *jlexer.Lexer, out *AssociatedCookie) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -10927,7 +10814,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork103(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork103(out *jwriter.Writer, in AssociatedCookie) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(out *jwriter.Writer, in AssociatedCookie) { out.RawByte('{') first := true _ = first @@ -10967,23 +10854,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork103(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v AssociatedCookie) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork103(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AssociatedCookie) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork103(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork102(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AssociatedCookie) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork103(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AssociatedCookie) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork103(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork102(l, v) } diff --git a/network/events.go b/network/events.go index 62ddc72..ead8c53 100644 --- a/network/events.go +++ b/network/events.go @@ -230,7 +230,7 @@ type EventResponseReceivedExtraInfo struct { ResourceIPAddressSpace IPAddressSpace `json:"resourceIPAddressSpace"` // The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo. 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 *CookiePartitionKey `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. + 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 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/network.go b/network/network.go index 69cfeb1..6fb1176 100644 --- a/network/network.go +++ b/network/network.go @@ -94,11 +94,11 @@ func (p *ClearBrowserCookiesParams) Do(ctx context.Context) (err error) { // DeleteCookiesParams deletes browser cookies with matching name and url or // domain/path/partitionKey pair. type DeleteCookiesParams struct { - Name string `json:"name"` // Name of the cookies to remove. - URL string `json:"url,omitempty"` // If specified, deletes all the cookies with the given name where domain and path match provided URL. - Domain string `json:"domain,omitempty"` // If specified, deletes only cookies with the exact domain. - Path string `json:"path,omitempty"` // If specified, deletes only cookies with the exact path. - PartitionKey *CookiePartitionKey `json:"partitionKey,omitempty"` // If specified, deletes only cookies with the the given name and partitionKey where all partition key attributes match the cookie partition key attribute. + Name string `json:"name"` // Name of the cookies to remove. + URL string `json:"url,omitempty"` // If specified, deletes all the cookies with the given name where domain and path match provided URL. + Domain string `json:"domain,omitempty"` // If specified, deletes only cookies with the exact domain. + Path string `json:"path,omitempty"` // If specified, deletes only cookies with the exact path. + PartitionKey string `json:"partitionKey,omitempty"` // If specified, deletes only cookies with the the given name and partitionKey where domain matches provided URL. } // DeleteCookies deletes browser cookies with matching name and url or @@ -135,9 +135,8 @@ func (p DeleteCookiesParams) WithPath(path string) *DeleteCookiesParams { } // WithPartitionKey if specified, deletes only cookies with the the given -// name and partitionKey where all partition key attributes match the cookie -// partition key attribute. -func (p DeleteCookiesParams) WithPartitionKey(partitionKey *CookiePartitionKey) *DeleteCookiesParams { +// name and partitionKey where domain matches provided URL. +func (p DeleteCookiesParams) WithPartitionKey(partitionKey string) *DeleteCookiesParams { p.PartitionKey = partitionKey return &p } @@ -720,7 +719,7 @@ type SetCookieParams struct { SameParty bool `json:"sameParty,omitempty"` // True if cookie is SameParty. SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // Cookie source scheme type. SourcePort int64 `json:"sourcePort,omitempty"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future. - PartitionKey *CookiePartitionKey `json:"partitionKey,omitempty"` // Cookie partition key. If not set, the cookie will be set as not partitioned. + PartitionKey string `json:"partitionKey,omitempty"` // Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned. } // SetCookie sets a cookie with the given cookie data; may overwrite @@ -810,9 +809,10 @@ func (p SetCookieParams) WithSourcePort(sourcePort int64) *SetCookieParams { return &p } -// WithPartitionKey cookie partition key. If not set, the cookie will be set -// as not partitioned. -func (p SetCookieParams) WithPartitionKey(partitionKey *CookiePartitionKey) *SetCookieParams { +// WithPartitionKey cookie partition key. The site of the top-level URL the +// browser was visiting at the start of the request to the endpoint that set the +// cookie. If not set, the cookie will be set as not partitioned. +func (p SetCookieParams) WithPartitionKey(partitionKey string) *SetCookieParams { p.PartitionKey = partitionKey return &p } diff --git a/network/types.go b/network/types.go index 461f76b..b27e354 100644 --- a/network/types.go +++ b/network/types.go @@ -632,20 +632,18 @@ func (t BlockedReason) String() string { // BlockedReason values. const ( - BlockedReasonOther BlockedReason = "other" - BlockedReasonCsp BlockedReason = "csp" - BlockedReasonMixedContent BlockedReason = "mixed-content" - BlockedReasonOrigin BlockedReason = "origin" - BlockedReasonInspector BlockedReason = "inspector" - BlockedReasonSubresourceFilter BlockedReason = "subresource-filter" - BlockedReasonContentType BlockedReason = "content-type" - BlockedReasonCoepFrameResourceNeedsCoepHeader BlockedReason = "coep-frame-resource-needs-coep-header" - BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage BlockedReason = "coop-sandboxed-iframe-cannot-navigate-to-coop-page" - BlockedReasonCorpNotSameOrigin BlockedReason = "corp-not-same-origin" - BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep" - BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-dip" - BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip" - BlockedReasonCorpNotSameSite BlockedReason = "corp-not-same-site" + BlockedReasonOther BlockedReason = "other" + BlockedReasonCsp BlockedReason = "csp" + BlockedReasonMixedContent BlockedReason = "mixed-content" + BlockedReasonOrigin BlockedReason = "origin" + BlockedReasonInspector BlockedReason = "inspector" + BlockedReasonSubresourceFilter BlockedReason = "subresource-filter" + BlockedReasonContentType BlockedReason = "content-type" + BlockedReasonCoepFrameResourceNeedsCoepHeader BlockedReason = "coep-frame-resource-needs-coep-header" + BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage BlockedReason = "coop-sandboxed-iframe-cannot-navigate-to-coop-page" + BlockedReasonCorpNotSameOrigin BlockedReason = "corp-not-same-origin" + BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep" + BlockedReasonCorpNotSameSite BlockedReason = "corp-not-same-site" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -684,10 +682,6 @@ func (t *BlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = BlockedReasonCorpNotSameOrigin case BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep: *t = BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep - case BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip: - *t = BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip - case BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip: - *t = BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip case BlockedReasonCorpNotSameSite: *t = BlockedReasonCorpNotSameSite @@ -1166,35 +1160,25 @@ type Initiator struct { RequestID RequestID `json:"requestId,omitempty"` // Set if another request triggered this request (e.g. preflight). } -// CookiePartitionKey cookiePartitionKey object The representation of the -// components of the key that are created by the cookiePartitionKey class -// contained in net/cookies/cookie_partition_key.h. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CookiePartitionKey -type CookiePartitionKey struct { - TopLevelSite string `json:"topLevelSite"` // The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. - HasCrossSiteAncestor bool `json:"hasCrossSiteAncestor"` // Indicates if the cookie has any ancestors that are cross-site to the topLevelSite. -} - // Cookie cookie object. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Cookie type Cookie struct { - Name string `json:"name"` // Cookie name. - Value string `json:"value"` // Cookie value. - Domain string `json:"domain"` // Cookie domain. - Path string `json:"path"` // Cookie path. - Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch. - Size int64 `json:"size"` // Cookie size. - HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only. - Secure bool `json:"secure"` // True if cookie is secure. - Session bool `json:"session"` // True in case of session cookie. - SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. - Priority CookiePriority `json:"priority"` // Cookie Priority - SourceScheme CookieSourceScheme `json:"sourceScheme"` // Cookie source scheme type. - SourcePort int64 `json:"sourcePort"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future. - PartitionKey *CookiePartitionKey `json:"partitionKey,omitempty"` // Cookie partition key. - PartitionKeyOpaque bool `json:"partitionKeyOpaque,omitempty"` // True if cookie partition key is opaque. + Name string `json:"name"` // Cookie name. + Value string `json:"value"` // Cookie value. + Domain string `json:"domain"` // Cookie domain. + Path string `json:"path"` // Cookie path. + Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch. + Size int64 `json:"size"` // Cookie size. + HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only. + Secure bool `json:"secure"` // True if cookie is secure. + Session bool `json:"session"` // True in case of session cookie. + SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. + Priority CookiePriority `json:"priority"` // Cookie Priority + SourceScheme CookieSourceScheme `json:"sourceScheme"` // Cookie source scheme type. + SourcePort int64 `json:"sourcePort"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future. + PartitionKey string `json:"partitionKey,omitempty"` // Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. + PartitionKeyOpaque bool `json:"partitionKeyOpaque,omitempty"` // True if cookie partition key is opaque. } // SetCookieBlockedReason types of reasons why a cookie may not be stored @@ -1510,7 +1494,7 @@ type CookieParam struct { SameParty bool `json:"sameParty,omitempty"` // True if cookie is SameParty. SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // Cookie source scheme type. SourcePort int64 `json:"sourcePort,omitempty"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future. - PartitionKey *CookiePartitionKey `json:"partitionKey,omitempty"` // Cookie partition key. If not set, the cookie will be set as not partitioned. + PartitionKey string `json:"partitionKey,omitempty"` // Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned. } // AuthChallenge authorization challenge for HTTP status code 401 or 407. diff --git a/page/types.go b/page/types.go index 5339195..dbb230b 100644 --- a/page/types.go +++ b/page/types.go @@ -71,7 +71,6 @@ const ( PermissionsPolicyFeatureClipboardWrite PermissionsPolicyFeature = "clipboard-write" PermissionsPolicyFeatureComputePressure PermissionsPolicyFeature = "compute-pressure" PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated" - PermissionsPolicyFeatureDeferredFetch PermissionsPolicyFeature = "deferred-fetch" PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets" PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture" PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain" @@ -207,8 +206,6 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionsPolicyFeatureComputePressure case PermissionsPolicyFeatureCrossOriginIsolated: *t = PermissionsPolicyFeatureCrossOriginIsolated - case PermissionsPolicyFeatureDeferredFetch: - *t = PermissionsPolicyFeatureDeferredFetch case PermissionsPolicyFeatureDirectSockets: *t = PermissionsPolicyFeatureDirectSockets case PermissionsPolicyFeatureDisplayCapture: @@ -1149,11 +1146,6 @@ const ( BackForwardCacheNotRestoredReasonHTTPAuthRequired BackForwardCacheNotRestoredReason = "HTTPAuthRequired" BackForwardCacheNotRestoredReasonCookieFlushed BackForwardCacheNotRestoredReason = "CookieFlushed" BackForwardCacheNotRestoredReasonBroadcastChannelOnMessage BackForwardCacheNotRestoredReason = "BroadcastChannelOnMessage" - BackForwardCacheNotRestoredReasonWebViewSettingsChanged BackForwardCacheNotRestoredReason = "WebViewSettingsChanged" - BackForwardCacheNotRestoredReasonWebViewJavaScriptObjectChanged BackForwardCacheNotRestoredReason = "WebViewJavaScriptObjectChanged" - BackForwardCacheNotRestoredReasonWebViewMessageListenerInjected BackForwardCacheNotRestoredReason = "WebViewMessageListenerInjected" - BackForwardCacheNotRestoredReasonWebViewSafeBrowsingAllowlistChanged BackForwardCacheNotRestoredReason = "WebViewSafeBrowsingAllowlistChanged" - BackForwardCacheNotRestoredReasonWebViewDocumentStartJavascriptChanged BackForwardCacheNotRestoredReason = "WebViewDocumentStartJavascriptChanged" BackForwardCacheNotRestoredReasonWebSocket BackForwardCacheNotRestoredReason = "WebSocket" BackForwardCacheNotRestoredReasonWebTransport BackForwardCacheNotRestoredReason = "WebTransport" BackForwardCacheNotRestoredReasonWebRTC BackForwardCacheNotRestoredReason = "WebRTC" @@ -1360,16 +1352,6 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer) *t = BackForwardCacheNotRestoredReasonCookieFlushed case BackForwardCacheNotRestoredReasonBroadcastChannelOnMessage: *t = BackForwardCacheNotRestoredReasonBroadcastChannelOnMessage - case BackForwardCacheNotRestoredReasonWebViewSettingsChanged: - *t = BackForwardCacheNotRestoredReasonWebViewSettingsChanged - case BackForwardCacheNotRestoredReasonWebViewJavaScriptObjectChanged: - *t = BackForwardCacheNotRestoredReasonWebViewJavaScriptObjectChanged - case BackForwardCacheNotRestoredReasonWebViewMessageListenerInjected: - *t = BackForwardCacheNotRestoredReasonWebViewMessageListenerInjected - case BackForwardCacheNotRestoredReasonWebViewSafeBrowsingAllowlistChanged: - *t = BackForwardCacheNotRestoredReasonWebViewSafeBrowsingAllowlistChanged - case BackForwardCacheNotRestoredReasonWebViewDocumentStartJavascriptChanged: - *t = BackForwardCacheNotRestoredReasonWebViewDocumentStartJavascriptChanged case BackForwardCacheNotRestoredReasonWebSocket: *t = BackForwardCacheNotRestoredReasonWebSocket case BackForwardCacheNotRestoredReasonWebTransport: diff --git a/pwa/easyjson.go b/pwa/easyjson.go index 1349220..54cad00 100644 --- a/pwa/easyjson.go +++ b/pwa/easyjson.go @@ -84,73 +84,7 @@ func (v *UninstallParams) UnmarshalJSON(data []byte) error { func (v *UninstallParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa1(in *jlexer.Lexer, out *OpenCurrentPageInAppParams) { - 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 "manifestId": - out.ManifestID = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa1(out *jwriter.Writer, in OpenCurrentPageInAppParams) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"manifestId\":" - out.RawString(prefix[1:]) - out.String(string(in.ManifestID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v OpenCurrentPageInAppParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v OpenCurrentPageInAppParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *OpenCurrentPageInAppParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *OpenCurrentPageInAppParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa1(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(in *jlexer.Lexer, out *LaunchReturns) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa1(in *jlexer.Lexer, out *LaunchReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -181,7 +115,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(in *jlexer.Lexer, out *L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(out *jwriter.Writer, in LaunchReturns) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa1(out *jwriter.Writer, in LaunchReturns) { out.RawByte('{') first := true _ = first @@ -197,27 +131,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v LaunchReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v LaunchReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *LaunchReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *LaunchReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa1(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(in *jlexer.Lexer, out *LaunchParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(in *jlexer.Lexer, out *LaunchParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -250,7 +184,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(in *jlexer.Lexer, out *L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(out *jwriter.Writer, in LaunchParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(out *jwriter.Writer, in LaunchParams) { out.RawByte('{') first := true _ = first @@ -270,27 +204,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v LaunchParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v LaunchParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *LaunchParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *LaunchParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa2(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(in *jlexer.Lexer, out *LaunchFilesInAppReturns) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(in *jlexer.Lexer, out *LaunchFilesInAppReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -342,7 +276,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(in *jlexer.Lexer, out *L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(out *jwriter.Writer, in LaunchFilesInAppReturns) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(out *jwriter.Writer, in LaunchFilesInAppReturns) { out.RawByte('{') first := true _ = first @@ -367,27 +301,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v LaunchFilesInAppReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v LaunchFilesInAppReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *LaunchFilesInAppReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *LaunchFilesInAppReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa3(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(in *jlexer.Lexer, out *LaunchFilesInAppParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(in *jlexer.Lexer, out *LaunchFilesInAppParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -441,7 +375,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(in *jlexer.Lexer, out *L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(out *jwriter.Writer, in LaunchFilesInAppParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(out *jwriter.Writer, in LaunchFilesInAppParams) { out.RawByte('{') first := true _ = first @@ -472,27 +406,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v LaunchFilesInAppParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v LaunchFilesInAppParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *LaunchFilesInAppParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *LaunchFilesInAppParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa4(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(in *jlexer.Lexer, out *InstallParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(in *jlexer.Lexer, out *InstallParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -525,7 +459,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(in *jlexer.Lexer, out *I in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(out *jwriter.Writer, in InstallParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(out *jwriter.Writer, in InstallParams) { out.RawByte('{') first := true _ = first @@ -545,27 +479,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v InstallParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v InstallParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *InstallParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *InstallParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa5(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(in *jlexer.Lexer, out *GetOsAppStateReturns) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(in *jlexer.Lexer, out *GetOsAppStateReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -627,7 +561,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(out *jwriter.Writer, in GetOsAppStateReturns) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(out *jwriter.Writer, in GetOsAppStateReturns) { out.RawByte('{') first := true _ = first @@ -666,27 +600,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetOsAppStateReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetOsAppStateReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetOsAppStateReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetOsAppStateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa6(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(in *jlexer.Lexer, out *GetOsAppStateParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(in *jlexer.Lexer, out *GetOsAppStateParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -717,7 +651,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(out *jwriter.Writer, in GetOsAppStateParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(out *jwriter.Writer, in GetOsAppStateParams) { out.RawByte('{') first := true _ = first @@ -732,27 +666,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetOsAppStateParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetOsAppStateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetOsAppStateParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetOsAppStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa7(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(in *jlexer.Lexer, out *FileHandlerAccept) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(in *jlexer.Lexer, out *FileHandlerAccept) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -806,7 +740,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(in *jlexer.Lexer, out *F in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(out *jwriter.Writer, in FileHandlerAccept) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(out *jwriter.Writer, in FileHandlerAccept) { out.RawByte('{') first := true _ = first @@ -837,27 +771,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v FileHandlerAccept) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v FileHandlerAccept) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *FileHandlerAccept) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *FileHandlerAccept) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa8(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa10(in *jlexer.Lexer, out *FileHandler) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(in *jlexer.Lexer, out *FileHandler) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -921,7 +855,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa10(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa10(out *jwriter.Writer, in FileHandler) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(out *jwriter.Writer, in FileHandler) { out.RawByte('{') first := true _ = first @@ -961,23 +895,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa10(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v FileHandler) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa10(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v FileHandler) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa10(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoPwa9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *FileHandler) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa10(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *FileHandler) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa10(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoPwa9(l, v) } diff --git a/pwa/pwa.go b/pwa/pwa.go index 351b224..5723cc4 100644 --- a/pwa/pwa.go +++ b/pwa/pwa.go @@ -128,18 +128,18 @@ func (p *UninstallParams) Do(ctx context.Context) (err error) { } // LaunchParams launches the installed web app, or an url in the same web app -// instead of the default start url if it is provided. Returns a page -// Target.TargetID which can be used to attach to via Target.attachToTarget or -// similar APIs. +// instead of the default start url if it is provided. Returns a tab / web +// contents based Target.TargetID which can be used to attach to via +// Target.attachToTarget or similar APIs. type LaunchParams struct { ManifestID string `json:"manifestId"` URL string `json:"url,omitempty"` } // Launch launches the installed web app, or an url in the same web app -// instead of the default start url if it is provided. Returns a page -// Target.TargetID which can be used to attach to via Target.attachToTarget or -// similar APIs. +// instead of the default start url if it is provided. Returns a tab / web +// contents based Target.TargetID which can be used to attach to via +// Target.attachToTarget or similar APIs. // // See: https://chromedevtools.github.io/devtools-protocol/tot/PWA#method-launch // @@ -181,15 +181,16 @@ func (p *LaunchParams) Do(ctx context.Context) (targetID target.ID, err error) { // LaunchFilesInAppParams opens one or more local files from an installed web // app identified by its manifestId. The web app needs to have file handlers -// registered to process the files. The API returns one or more page -// Target.TargetIDs which can be used to attach to via Target.attachToTarget or -// similar APIs. If some files in the parameters cannot be handled by the web -// app, they will be ignored. If none of the files can be handled, this API -// returns an error. If no files provided as the parameter, this API also -// returns an error. According to the definition of the file handlers in the -// manifest file, one Target.TargetID may represent a page handling one or more -// files. The order of the returned Target.TargetIDs is not guaranteed. -// TODO(crbug.com/339454034): Check the existences of the input files. +// registered to process the files. The API returns one or more tabs / web +// contents' based Target.TargetIDs which can be used to attach to via +// Target.attachToTarget or similar APIs. If some files in the parameters cannot +// be handled by the web app, they will be ignored. If none of the files can be +// handled, this API returns an error. If no files provided as the parameter, +// this API also returns an error. According to the definition of the file +// handlers in the manifest file, one Target.TargetID may represent a tab +// handling one or more files. The order of the returned Target.TargetIDs is +// also not guaranteed. TODO(crbug.com/339454034): Check the existences of the +// input files. type LaunchFilesInAppParams struct { ManifestID string `json:"manifestId"` Files []string `json:"files"` @@ -197,15 +198,16 @@ type LaunchFilesInAppParams struct { // LaunchFilesInApp opens one or more local files from an installed web app // identified by its manifestId. The web app needs to have file handlers -// registered to process the files. The API returns one or more page -// Target.TargetIDs which can be used to attach to via Target.attachToTarget or -// similar APIs. If some files in the parameters cannot be handled by the web -// app, they will be ignored. If none of the files can be handled, this API -// returns an error. If no files provided as the parameter, this API also -// returns an error. According to the definition of the file handlers in the -// manifest file, one Target.TargetID may represent a page handling one or more -// files. The order of the returned Target.TargetIDs is not guaranteed. -// TODO(crbug.com/339454034): Check the existences of the input files. +// registered to process the files. The API returns one or more tabs / web +// contents' based Target.TargetIDs which can be used to attach to via +// Target.attachToTarget or similar APIs. If some files in the parameters cannot +// be handled by the web app, they will be ignored. If none of the files can be +// handled, this API returns an error. If no files provided as the parameter, +// this API also returns an error. According to the definition of the file +// handlers in the manifest file, one Target.TargetID may represent a tab +// handling one or more files. The order of the returned Target.TargetIDs is +// also not guaranteed. TODO(crbug.com/339454034): Check the existences of the +// input files. // // See: https://chromedevtools.github.io/devtools-protocol/tot/PWA#method-launchFilesInApp // @@ -241,39 +243,11 @@ func (p *LaunchFilesInAppParams) Do(ctx context.Context) (targetIDs []target.ID, return res.TargetIDs, nil } -// OpenCurrentPageInAppParams opens the current page in its web app -// identified by the manifest id, needs to be called on a page target. This -// function returns immediately without waiting for the app finishing loading. -type OpenCurrentPageInAppParams struct { - ManifestID string `json:"manifestId"` -} - -// OpenCurrentPageInApp opens the current page in its web app identified by -// the manifest id, needs to be called on a page target. This function returns -// immediately without waiting for the app finishing loading. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/PWA#method-openCurrentPageInApp -// -// parameters: -// -// manifestID -func OpenCurrentPageInApp(manifestID string) *OpenCurrentPageInAppParams { - return &OpenCurrentPageInAppParams{ - ManifestID: manifestID, - } -} - -// Do executes PWA.openCurrentPageInApp against the provided context. -func (p *OpenCurrentPageInAppParams) Do(ctx context.Context) (err error) { - return cdp.Execute(ctx, CommandOpenCurrentPageInApp, p, nil) -} - // Command names. const ( - CommandGetOsAppState = "PWA.getOsAppState" - CommandInstall = "PWA.install" - CommandUninstall = "PWA.uninstall" - CommandLaunch = "PWA.launch" - CommandLaunchFilesInApp = "PWA.launchFilesInApp" - CommandOpenCurrentPageInApp = "PWA.openCurrentPageInApp" + CommandGetOsAppState = "PWA.getOsAppState" + CommandInstall = "PWA.install" + CommandUninstall = "PWA.uninstall" + CommandLaunch = "PWA.launch" + CommandLaunchFilesInApp = "PWA.launchFilesInApp" )