From f357fd93b5d69ac6e95fd1380818d83341b5be51 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Mon, 28 Aug 2023 09:32:41 +0700 Subject: [PATCH] Updating to 118.0.5974.1_11.8.92 definitions --- autofill/autofill.go | 32 +++ autofill/easyjson.go | 624 +++++++++++++++++++++++++++++++++++++++++-- autofill/events.go | 11 + autofill/types.go | 90 ++++++- cdproto.go | 16 ++ fedcm/easyjson.go | 78 +++++- fedcm/fedcm.go | 36 ++- page/types.go | 159 +++++------ 8 files changed, 927 insertions(+), 119 deletions(-) create mode 100644 autofill/events.go diff --git a/autofill/autofill.go b/autofill/autofill.go index 629b38e..b11fcfb 100644 --- a/autofill/autofill.go +++ b/autofill/autofill.go @@ -74,8 +74,40 @@ func (p *SetAddressesParams) Do(ctx context.Context) (err error) { return cdp.Execute(ctx, CommandSetAddresses, p, nil) } +// DisableParams disables autofill domain notifications. +type DisableParams struct{} + +// Disable disables autofill domain notifications. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-disable +func Disable() *DisableParams { + return &DisableParams{} +} + +// Do executes Autofill.disable against the provided context. +func (p *DisableParams) Do(ctx context.Context) (err error) { + return cdp.Execute(ctx, CommandDisable, nil, nil) +} + +// EnableParams enables autofill domain notifications. +type EnableParams struct{} + +// Enable enables autofill domain notifications. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-enable +func Enable() *EnableParams { + return &EnableParams{} +} + +// Do executes Autofill.enable against the provided context. +func (p *EnableParams) Do(ctx context.Context) (err error) { + return cdp.Execute(ctx, CommandEnable, nil, nil) +} + // Command names. const ( CommandTrigger = "Autofill.trigger" CommandSetAddresses = "Autofill.setAddresses" + CommandDisable = "Autofill.disable" + CommandEnable = "Autofill.enable" ) diff --git a/autofill/easyjson.go b/autofill/easyjson.go index 24a6d7a..c076c89 100644 --- a/autofill/easyjson.go +++ b/autofill/easyjson.go @@ -219,7 +219,355 @@ func (v *SetAddressesParams) UnmarshalJSON(data []byte) error { func (v *SetAddressesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill1(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(in *jlexer.Lexer, out *CreditCard) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(in *jlexer.Lexer, out *FilledField) { + 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 "htmlType": + out.HTMLType = string(in.String()) + case "id": + out.ID = string(in.String()) + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + case "autofillType": + out.AutofillType = string(in.String()) + case "fillingStrategy": + (out.FillingStrategy).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(out *jwriter.Writer, in FilledField) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"htmlType\":" + out.RawString(prefix[1:]) + out.String(string(in.HTMLType)) + } + { + const prefix string = ",\"id\":" + out.RawString(prefix) + out.String(string(in.ID)) + } + { + const prefix string = ",\"name\":" + out.RawString(prefix) + out.String(string(in.Name)) + } + { + const prefix string = ",\"value\":" + out.RawString(prefix) + out.String(string(in.Value)) + } + { + const prefix string = ",\"autofillType\":" + out.RawString(prefix) + out.String(string(in.AutofillType)) + } + { + const prefix string = ",\"fillingStrategy\":" + out.RawString(prefix) + (in.FillingStrategy).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v FilledField) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v FilledField) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *FilledField) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *FilledField) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(in *jlexer.Lexer, out *EventAddressFormFilled) { + 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 "filledFields": + if in.IsNull() { + in.Skip() + out.FilledFields = nil + } else { + in.Delim('[') + if out.FilledFields == nil { + if !in.IsDelim(']') { + out.FilledFields = make([]*FilledField, 0, 8) + } else { + out.FilledFields = []*FilledField{} + } + } else { + out.FilledFields = (out.FilledFields)[:0] + } + for !in.IsDelim(']') { + var v4 *FilledField + if in.IsNull() { + in.Skip() + v4 = nil + } else { + if v4 == nil { + v4 = new(FilledField) + } + (*v4).UnmarshalEasyJSON(in) + } + out.FilledFields = append(out.FilledFields, v4) + in.WantComma() + } + in.Delim(']') + } + case "addressUi": + if in.IsNull() { + in.Skip() + out.AddressUI = nil + } else { + if out.AddressUI == nil { + out.AddressUI = new(AddressUI) + } + (*out.AddressUI).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(out *jwriter.Writer, in EventAddressFormFilled) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"filledFields\":" + out.RawString(prefix[1:]) + if in.FilledFields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v5, v6 := range in.FilledFields { + if v5 > 0 { + out.RawByte(',') + } + if v6 == nil { + out.RawString("null") + } else { + (*v6).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + { + const prefix string = ",\"addressUi\":" + out.RawString(prefix) + if in.AddressUI == nil { + out.RawString("null") + } else { + (*in.AddressUI).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventAddressFormFilled) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventAddressFormFilled) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventAddressFormFilled) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAddressFormFilled) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(in *jlexer.Lexer, out *EnableParams) { + 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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(out *jwriter.Writer, in EnableParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EnableParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill5(in *jlexer.Lexer, out *DisableParams) { + 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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill5(out *jwriter.Writer, in DisableParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DisableParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill5(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill6(in *jlexer.Lexer, out *CreditCard) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -258,7 +606,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(out *jwriter.Writer, in CreditCard) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill6(out *jwriter.Writer, in CreditCard) { out.RawByte('{') first := true _ = first @@ -293,27 +641,247 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v CreditCard) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CreditCard) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CreditCard) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CreditCard) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill6(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(in *jlexer.Lexer, out *AddressField) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill7(in *jlexer.Lexer, out *AddressUI) { + 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 "addressFields": + if in.IsNull() { + in.Skip() + out.AddressFields = nil + } else { + in.Delim('[') + if out.AddressFields == nil { + if !in.IsDelim(']') { + out.AddressFields = make([]*AddressFields, 0, 8) + } else { + out.AddressFields = []*AddressFields{} + } + } else { + out.AddressFields = (out.AddressFields)[:0] + } + for !in.IsDelim(']') { + var v7 *AddressFields + if in.IsNull() { + in.Skip() + v7 = nil + } else { + if v7 == nil { + v7 = new(AddressFields) + } + (*v7).UnmarshalEasyJSON(in) + } + out.AddressFields = append(out.AddressFields, v7) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill7(out *jwriter.Writer, in AddressUI) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"addressFields\":" + out.RawString(prefix[1:]) + if in.AddressFields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.AddressFields { + if v8 > 0 { + out.RawByte(',') + } + if v9 == nil { + out.RawString("null") + } else { + (*v9).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddressUI) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddressUI) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddressUI) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddressUI) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill7(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill8(in *jlexer.Lexer, out *AddressFields) { + 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 "fields": + if in.IsNull() { + in.Skip() + out.Fields = nil + } else { + in.Delim('[') + if out.Fields == nil { + if !in.IsDelim(']') { + out.Fields = make([]*AddressField, 0, 8) + } else { + out.Fields = []*AddressField{} + } + } else { + out.Fields = (out.Fields)[:0] + } + for !in.IsDelim(']') { + var v10 *AddressField + if in.IsNull() { + in.Skip() + v10 = nil + } else { + if v10 == nil { + v10 = new(AddressField) + } + (*v10).UnmarshalEasyJSON(in) + } + out.Fields = append(out.Fields, v10) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill8(out *jwriter.Writer, in AddressFields) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"fields\":" + out.RawString(prefix[1:]) + if in.Fields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Fields { + if v11 > 0 { + out.RawByte(',') + } + if v12 == nil { + out.RawString("null") + } else { + (*v12).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddressFields) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddressFields) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddressFields) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddressFields) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill8(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill9(in *jlexer.Lexer, out *AddressField) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -346,7 +914,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(out *jwriter.Writer, in AddressField) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill9(out *jwriter.Writer, in AddressField) { out.RawByte('{') first := true _ = first @@ -366,27 +934,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v AddressField) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AddressField) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AddressField) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AddressField) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill9(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(in *jlexer.Lexer, out *Address) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill10(in *jlexer.Lexer, out *Address) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -421,17 +989,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(in *jlexer.Lexer, o out.Fields = (out.Fields)[:0] } for !in.IsDelim(']') { - var v4 *AddressField + var v13 *AddressField if in.IsNull() { in.Skip() - v4 = nil + v13 = nil } else { - if v4 == nil { - v4 = new(AddressField) + if v13 == nil { + v13 = new(AddressField) } - (*v4).UnmarshalEasyJSON(in) + (*v13).UnmarshalEasyJSON(in) } - out.Fields = append(out.Fields, v4) + out.Fields = append(out.Fields, v13) in.WantComma() } in.Delim(']') @@ -446,7 +1014,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(out *jwriter.Writer, in Address) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill10(out *jwriter.Writer, in Address) { out.RawByte('{') first := true _ = first @@ -457,14 +1025,14 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(out *jwriter.Writer out.RawString("null") } else { out.RawByte('[') - for v5, v6 := range in.Fields { - if v5 > 0 { + for v14, v15 := range in.Fields { + if v14 > 0 { out.RawByte(',') } - if v6 == nil { + if v15 == nil { out.RawString("null") } else { - (*v6).MarshalEasyJSON(out) + (*v15).MarshalEasyJSON(out) } } out.RawByte(']') @@ -476,23 +1044,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v Address) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Address) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Address) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Address) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill10(l, v) } diff --git a/autofill/events.go b/autofill/events.go new file mode 100644 index 0000000..446abb4 --- /dev/null +++ b/autofill/events.go @@ -0,0 +1,11 @@ +package autofill + +// Code generated by cdproto-gen. DO NOT EDIT. + +// EventAddressFormFilled emitted when an address form is filled. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#event-addressFormFilled +type EventAddressFormFilled struct { + FilledFields []*FilledField `json:"filledFields"` // Information about the fields that were filled + AddressUI *AddressUI `json:"addressUi"` // An UI representation of the address used to fill the form. Consists of a 2D array where each child represents an address/profile line. +} diff --git a/autofill/types.go b/autofill/types.go index 3901fc7..887cd11 100644 --- a/autofill/types.go +++ b/autofill/types.go @@ -2,6 +2,14 @@ package autofill // Code generated by cdproto-gen. DO NOT EDIT. +import ( + "fmt" + + "github.com/mailru/easyjson" + "github.com/mailru/easyjson/jlexer" + "github.com/mailru/easyjson/jwriter" +) + // CreditCard [no description]. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-CreditCard @@ -18,12 +26,90 @@ type CreditCard struct { // See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressField type AddressField struct { Name string `json:"name"` // address field name, for example GIVEN_NAME. - Value string `json:"value"` // address field name, for example Jon Doe. + Value string `json:"value"` // address field value, for example Jon Doe. +} + +// AddressFields a list of address fields. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressFields +type AddressFields struct { + Fields []*AddressField `json:"fields"` } // Address [no description]. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-Address type Address struct { - Fields []*AddressField `json:"fields"` // fields and values defining a test address. + Fields []*AddressField `json:"fields"` // fields and values defining an address. +} + +// AddressUI defines how an address can be displayed like in +// chrome://settings/addresses. Address UI is a two dimensional array, each +// inner array is an "address information line", and when rendered in a UI +// surface should be displayed as such. The following address UI for instance: +// [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], +// [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] should +// allow the receiver to render: Jon Doe Munich 81456. +// +// 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. +} + +// FillingStrategy specified whether a filled field was done so by using the +// html autocomplete attribute or autofill heuristics. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-FillingStrategy +type FillingStrategy string + +// String returns the FillingStrategy as string value. +func (t FillingStrategy) String() string { + return string(t) +} + +// FillingStrategy values. +const ( + FillingStrategyAutocompleteAttribute FillingStrategy = "autocompleteAttribute" + FillingStrategyAutofillInferred FillingStrategy = "autofillInferred" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t FillingStrategy) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t FillingStrategy) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *FillingStrategy) UnmarshalEasyJSON(in *jlexer.Lexer) { + v := in.String() + switch FillingStrategy(v) { + case FillingStrategyAutocompleteAttribute: + *t = FillingStrategyAutocompleteAttribute + case FillingStrategyAutofillInferred: + *t = FillingStrategyAutofillInferred + + default: + in.AddError(fmt.Errorf("unknown FillingStrategy value: %v", v)) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *FillingStrategy) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + +// FilledField [no description]. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-FilledField +type FilledField struct { + HTMLType string `json:"htmlType"` // The type of the field, e.g text, password etc. + ID string `json:"id"` // the html id + Name string `json:"name"` // the html name + 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 } diff --git a/cdproto.go b/cdproto.go index 0a9e80b..9ad7844 100644 --- a/cdproto.go +++ b/cdproto.go @@ -111,6 +111,9 @@ const ( EventAuditsIssueAdded = "Audits.issueAdded" CommandAutofillTrigger = autofill.CommandTrigger CommandAutofillSetAddresses = autofill.CommandSetAddresses + CommandAutofillDisable = autofill.CommandDisable + CommandAutofillEnable = autofill.CommandEnable + EventAutofillAddressFormFilled = "Autofill.addressFormFilled" CommandBackgroundServiceStartObserving = backgroundservice.CommandStartObserving CommandBackgroundServiceStopObserving = backgroundservice.CommandStopObserving CommandBackgroundServiceSetRecording = backgroundservice.CommandSetRecording @@ -347,6 +350,7 @@ const ( CommandFedCmEnable = fedcm.CommandEnable CommandFedCmDisable = fedcm.CommandDisable CommandFedCmSelectAccount = fedcm.CommandSelectAccount + CommandFedCmConfirmIdpSignin = fedcm.CommandConfirmIdpSignin CommandFedCmDismissDialog = fedcm.CommandDismissDialog CommandFedCmResetCooldown = fedcm.CommandResetCooldown EventFedCmDialogShown = "FedCm.dialogShown" @@ -909,6 +913,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) { case CommandAutofillSetAddresses: return emptyVal, nil + case CommandAutofillDisable: + return emptyVal, nil + + case CommandAutofillEnable: + return emptyVal, nil + + case EventAutofillAddressFormFilled: + v = new(autofill.EventAddressFormFilled) + case CommandBackgroundServiceStartObserving: return emptyVal, nil @@ -1617,6 +1630,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) { case CommandFedCmSelectAccount: return emptyVal, nil + case CommandFedCmConfirmIdpSignin: + return emptyVal, nil + case CommandFedCmDismissDialog: return emptyVal, nil diff --git a/fedcm/easyjson.go b/fedcm/easyjson.go index 674ed74..c0433e9 100644 --- a/fedcm/easyjson.go +++ b/fedcm/easyjson.go @@ -486,7 +486,73 @@ func (v *DisableParams) UnmarshalJSON(data []byte) error { func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(in *jlexer.Lexer, out *Account) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(in *jlexer.Lexer, out *ConfirmIdpSigninParams) { + 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 "dialogId": + out.DialogID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(out *jwriter.Writer, in ConfirmIdpSigninParams) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"dialogId\":" + out.RawString(prefix[1:]) + out.String(string(in.DialogID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ConfirmIdpSigninParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ConfirmIdpSigninParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ConfirmIdpSigninParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ConfirmIdpSigninParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(in *jlexer.Lexer, out *Account) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -535,7 +601,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(out *jwriter.Writer, in Account) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(out *jwriter.Writer, in Account) { out.RawByte('{') first := true _ = first @@ -595,23 +661,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Account) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(&w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Account) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(w, v) + easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Account) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(&r, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Account) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(l, v) + easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(l, v) } diff --git a/fedcm/fedcm.go b/fedcm/fedcm.go index 1a402de..a9e56a8 100644 --- a/fedcm/fedcm.go +++ b/fedcm/fedcm.go @@ -82,6 +82,31 @@ func (p *SelectAccountParams) Do(ctx context.Context) (err error) { return cdp.Execute(ctx, CommandSelectAccount, p, nil) } +// ConfirmIdpSigninParams only valid if the dialog type is ConfirmIdpSignin. +// Acts as if the user had clicked the continue button. +type ConfirmIdpSigninParams struct { + DialogID string `json:"dialogId"` +} + +// ConfirmIdpSignin only valid if the dialog type is ConfirmIdpSignin. Acts +// as if the user had clicked the continue button. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-confirmIdpSignin +// +// parameters: +// +// dialogID +func ConfirmIdpSignin(dialogID string) *ConfirmIdpSigninParams { + return &ConfirmIdpSigninParams{ + DialogID: dialogID, + } +} + +// Do executes FedCm.confirmIdpSignin against the provided context. +func (p *ConfirmIdpSigninParams) Do(ctx context.Context) (err error) { + return cdp.Execute(ctx, CommandConfirmIdpSignin, p, nil) +} + // DismissDialogParams [no description]. type DismissDialogParams struct { DialogID string `json:"dialogId"` @@ -131,9 +156,10 @@ func (p *ResetCooldownParams) Do(ctx context.Context) (err error) { // Command names. const ( - CommandEnable = "FedCm.enable" - CommandDisable = "FedCm.disable" - CommandSelectAccount = "FedCm.selectAccount" - CommandDismissDialog = "FedCm.dismissDialog" - CommandResetCooldown = "FedCm.resetCooldown" + CommandEnable = "FedCm.enable" + CommandDisable = "FedCm.disable" + CommandSelectAccount = "FedCm.selectAccount" + CommandConfirmIdpSignin = "FedCm.confirmIdpSignin" + CommandDismissDialog = "FedCm.dismissDialog" + CommandResetCooldown = "FedCm.resetCooldown" ) diff --git a/page/types.go b/page/types.go index 15eff0f..87d5524 100644 --- a/page/types.go +++ b/page/types.go @@ -36,84 +36,85 @@ func (t PermissionsPolicyFeature) String() string { // PermissionsPolicyFeature values. const ( - PermissionsPolicyFeatureAccelerometer PermissionsPolicyFeature = "accelerometer" - PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor" - PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting" - PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay" - PermissionsPolicyFeatureBluetooth PermissionsPolicyFeature = "bluetooth" - PermissionsPolicyFeatureBrowsingTopics PermissionsPolicyFeature = "browsing-topics" - PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera" - PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr" - PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory" - PermissionsPolicyFeatureChDownlink PermissionsPolicyFeature = "ch-downlink" - PermissionsPolicyFeatureChEct PermissionsPolicyFeature = "ch-ect" - PermissionsPolicyFeatureChPrefersColorScheme PermissionsPolicyFeature = "ch-prefers-color-scheme" - PermissionsPolicyFeatureChPrefersReducedMotion PermissionsPolicyFeature = "ch-prefers-reduced-motion" - PermissionsPolicyFeatureChRtt PermissionsPolicyFeature = "ch-rtt" - PermissionsPolicyFeatureChSaveData PermissionsPolicyFeature = "ch-save-data" - PermissionsPolicyFeatureChUa PermissionsPolicyFeature = "ch-ua" - PermissionsPolicyFeatureChUaArch PermissionsPolicyFeature = "ch-ua-arch" - PermissionsPolicyFeatureChUaBitness PermissionsPolicyFeature = "ch-ua-bitness" - PermissionsPolicyFeatureChUaPlatform PermissionsPolicyFeature = "ch-ua-platform" - PermissionsPolicyFeatureChUaModel PermissionsPolicyFeature = "ch-ua-model" - PermissionsPolicyFeatureChUaMobile PermissionsPolicyFeature = "ch-ua-mobile" - PermissionsPolicyFeatureChUaFormFactor PermissionsPolicyFeature = "ch-ua-form-factor" - PermissionsPolicyFeatureChUaFullVersion PermissionsPolicyFeature = "ch-ua-full-version" - PermissionsPolicyFeatureChUaFullVersionList PermissionsPolicyFeature = "ch-ua-full-version-list" - PermissionsPolicyFeatureChUaPlatformVersion PermissionsPolicyFeature = "ch-ua-platform-version" - PermissionsPolicyFeatureChUaWow64 PermissionsPolicyFeature = "ch-ua-wow64" - PermissionsPolicyFeatureChViewportHeight PermissionsPolicyFeature = "ch-viewport-height" - PermissionsPolicyFeatureChViewportWidth PermissionsPolicyFeature = "ch-viewport-width" - PermissionsPolicyFeatureChWidth PermissionsPolicyFeature = "ch-width" - PermissionsPolicyFeatureClipboardRead PermissionsPolicyFeature = "clipboard-read" - PermissionsPolicyFeatureClipboardWrite PermissionsPolicyFeature = "clipboard-write" - PermissionsPolicyFeatureComputePressure PermissionsPolicyFeature = "compute-pressure" - PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated" - PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets" - PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture" - PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain" - PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media" - PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport" - PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered" - PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation" - PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen" - PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate" - PermissionsPolicyFeatureGamepad PermissionsPolicyFeature = "gamepad" - PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation" - PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope" - PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid" - PermissionsPolicyFeatureIdentityCredentialsGet PermissionsPolicyFeature = "identity-credentials-get" - PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection" - PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort" - PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group" - PermissionsPolicyFeatureKeyboardMap PermissionsPolicyFeature = "keyboard-map" - PermissionsPolicyFeatureLocalFonts PermissionsPolicyFeature = "local-fonts" - PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer" - PermissionsPolicyFeatureMicrophone PermissionsPolicyFeature = "microphone" - PermissionsPolicyFeatureMidi PermissionsPolicyFeature = "midi" - PermissionsPolicyFeatureOtpCredentials PermissionsPolicyFeature = "otp-credentials" - PermissionsPolicyFeaturePayment PermissionsPolicyFeature = "payment" - PermissionsPolicyFeaturePictureInPicture PermissionsPolicyFeature = "picture-in-picture" - PermissionsPolicyFeaturePrivateAggregation PermissionsPolicyFeature = "private-aggregation" - PermissionsPolicyFeaturePrivateStateTokenIssuance PermissionsPolicyFeature = "private-state-token-issuance" - PermissionsPolicyFeaturePrivateStateTokenRedemption PermissionsPolicyFeature = "private-state-token-redemption" - PermissionsPolicyFeaturePublickeyCredentialsGet PermissionsPolicyFeature = "publickey-credentials-get" - PermissionsPolicyFeatureRunAdAuction PermissionsPolicyFeature = "run-ad-auction" - PermissionsPolicyFeatureScreenWakeLock PermissionsPolicyFeature = "screen-wake-lock" - PermissionsPolicyFeatureSerial PermissionsPolicyFeature = "serial" - PermissionsPolicyFeatureSharedAutofill PermissionsPolicyFeature = "shared-autofill" - PermissionsPolicyFeatureSharedStorage PermissionsPolicyFeature = "shared-storage" - PermissionsPolicyFeatureSharedStorageSelectURL PermissionsPolicyFeature = "shared-storage-select-url" - PermissionsPolicyFeatureSmartCard PermissionsPolicyFeature = "smart-card" - PermissionsPolicyFeatureStorageAccess PermissionsPolicyFeature = "storage-access" - PermissionsPolicyFeatureSyncXhr PermissionsPolicyFeature = "sync-xhr" - PermissionsPolicyFeatureUnload PermissionsPolicyFeature = "unload" - PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb" - PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll" - PermissionsPolicyFeatureWebShare PermissionsPolicyFeature = "web-share" - PermissionsPolicyFeatureWindowManagement PermissionsPolicyFeature = "window-management" - PermissionsPolicyFeatureWindowPlacement PermissionsPolicyFeature = "window-placement" - PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking" + PermissionsPolicyFeatureAccelerometer PermissionsPolicyFeature = "accelerometer" + PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor" + PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting" + PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay" + PermissionsPolicyFeatureBluetooth PermissionsPolicyFeature = "bluetooth" + PermissionsPolicyFeatureBrowsingTopics PermissionsPolicyFeature = "browsing-topics" + PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera" + PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr" + PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory" + PermissionsPolicyFeatureChDownlink PermissionsPolicyFeature = "ch-downlink" + PermissionsPolicyFeatureChEct PermissionsPolicyFeature = "ch-ect" + PermissionsPolicyFeatureChPrefersColorScheme PermissionsPolicyFeature = "ch-prefers-color-scheme" + PermissionsPolicyFeatureChPrefersReducedMotion PermissionsPolicyFeature = "ch-prefers-reduced-motion" + PermissionsPolicyFeatureChPrefersReducedTransparency PermissionsPolicyFeature = "ch-prefers-reduced-transparency" + PermissionsPolicyFeatureChRtt PermissionsPolicyFeature = "ch-rtt" + PermissionsPolicyFeatureChSaveData PermissionsPolicyFeature = "ch-save-data" + PermissionsPolicyFeatureChUa PermissionsPolicyFeature = "ch-ua" + PermissionsPolicyFeatureChUaArch PermissionsPolicyFeature = "ch-ua-arch" + PermissionsPolicyFeatureChUaBitness PermissionsPolicyFeature = "ch-ua-bitness" + PermissionsPolicyFeatureChUaPlatform PermissionsPolicyFeature = "ch-ua-platform" + PermissionsPolicyFeatureChUaModel PermissionsPolicyFeature = "ch-ua-model" + PermissionsPolicyFeatureChUaMobile PermissionsPolicyFeature = "ch-ua-mobile" + PermissionsPolicyFeatureChUaFormFactor PermissionsPolicyFeature = "ch-ua-form-factor" + PermissionsPolicyFeatureChUaFullVersion PermissionsPolicyFeature = "ch-ua-full-version" + PermissionsPolicyFeatureChUaFullVersionList PermissionsPolicyFeature = "ch-ua-full-version-list" + PermissionsPolicyFeatureChUaPlatformVersion PermissionsPolicyFeature = "ch-ua-platform-version" + PermissionsPolicyFeatureChUaWow64 PermissionsPolicyFeature = "ch-ua-wow64" + PermissionsPolicyFeatureChViewportHeight PermissionsPolicyFeature = "ch-viewport-height" + PermissionsPolicyFeatureChViewportWidth PermissionsPolicyFeature = "ch-viewport-width" + PermissionsPolicyFeatureChWidth PermissionsPolicyFeature = "ch-width" + PermissionsPolicyFeatureClipboardRead PermissionsPolicyFeature = "clipboard-read" + PermissionsPolicyFeatureClipboardWrite PermissionsPolicyFeature = "clipboard-write" + PermissionsPolicyFeatureComputePressure PermissionsPolicyFeature = "compute-pressure" + PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated" + PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets" + PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture" + PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain" + PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media" + PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport" + PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered" + PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation" + PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen" + PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate" + PermissionsPolicyFeatureGamepad PermissionsPolicyFeature = "gamepad" + PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation" + PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope" + PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid" + PermissionsPolicyFeatureIdentityCredentialsGet PermissionsPolicyFeature = "identity-credentials-get" + PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection" + PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort" + PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group" + PermissionsPolicyFeatureKeyboardMap PermissionsPolicyFeature = "keyboard-map" + PermissionsPolicyFeatureLocalFonts PermissionsPolicyFeature = "local-fonts" + PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer" + PermissionsPolicyFeatureMicrophone PermissionsPolicyFeature = "microphone" + PermissionsPolicyFeatureMidi PermissionsPolicyFeature = "midi" + PermissionsPolicyFeatureOtpCredentials PermissionsPolicyFeature = "otp-credentials" + PermissionsPolicyFeaturePayment PermissionsPolicyFeature = "payment" + PermissionsPolicyFeaturePictureInPicture PermissionsPolicyFeature = "picture-in-picture" + PermissionsPolicyFeaturePrivateAggregation PermissionsPolicyFeature = "private-aggregation" + PermissionsPolicyFeaturePrivateStateTokenIssuance PermissionsPolicyFeature = "private-state-token-issuance" + PermissionsPolicyFeaturePrivateStateTokenRedemption PermissionsPolicyFeature = "private-state-token-redemption" + PermissionsPolicyFeaturePublickeyCredentialsGet PermissionsPolicyFeature = "publickey-credentials-get" + PermissionsPolicyFeatureRunAdAuction PermissionsPolicyFeature = "run-ad-auction" + PermissionsPolicyFeatureScreenWakeLock PermissionsPolicyFeature = "screen-wake-lock" + PermissionsPolicyFeatureSerial PermissionsPolicyFeature = "serial" + PermissionsPolicyFeatureSharedAutofill PermissionsPolicyFeature = "shared-autofill" + PermissionsPolicyFeatureSharedStorage PermissionsPolicyFeature = "shared-storage" + PermissionsPolicyFeatureSharedStorageSelectURL PermissionsPolicyFeature = "shared-storage-select-url" + PermissionsPolicyFeatureSmartCard PermissionsPolicyFeature = "smart-card" + PermissionsPolicyFeatureStorageAccess PermissionsPolicyFeature = "storage-access" + PermissionsPolicyFeatureSyncXhr PermissionsPolicyFeature = "sync-xhr" + PermissionsPolicyFeatureUnload PermissionsPolicyFeature = "unload" + PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb" + PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll" + PermissionsPolicyFeatureWebShare PermissionsPolicyFeature = "web-share" + PermissionsPolicyFeatureWindowManagement PermissionsPolicyFeature = "window-management" + PermissionsPolicyFeatureWindowPlacement PermissionsPolicyFeature = "window-placement" + PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -156,6 +157,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionsPolicyFeatureChPrefersColorScheme case PermissionsPolicyFeatureChPrefersReducedMotion: *t = PermissionsPolicyFeatureChPrefersReducedMotion + case PermissionsPolicyFeatureChPrefersReducedTransparency: + *t = PermissionsPolicyFeatureChPrefersReducedTransparency case PermissionsPolicyFeatureChRtt: *t = PermissionsPolicyFeatureChRtt case PermissionsPolicyFeatureChSaveData: