Updating to latest protocol.json

This commit is contained in:
Kenneth Shaw 2017-05-19 08:09:21 +07:00
parent 49a8fd6e52
commit dff2331810
6 changed files with 90 additions and 4 deletions

View File

@ -296,7 +296,8 @@ func (p *GetPossibleBreakpointsParams) Do(ctxt context.Context, h cdp.Handler) (
// ContinueToLocationParams continues execution until specific location is // ContinueToLocationParams continues execution until specific location is
// reached. // reached.
type ContinueToLocationParams struct { type ContinueToLocationParams struct {
Location *Location `json:"location"` // Location to continue to. Location *Location `json:"location"` // Location to continue to.
TargetCallFrames ContinueToLocationTargetCallFrames `json:"targetCallFrames,omitempty"`
} }
// ContinueToLocation continues execution until specific location is reached. // ContinueToLocation continues execution until specific location is reached.
@ -309,6 +310,12 @@ func ContinueToLocation(location *Location) *ContinueToLocationParams {
} }
} }
// WithTargetCallFrames [no description].
func (p ContinueToLocationParams) WithTargetCallFrames(targetCallFrames ContinueToLocationTargetCallFrames) *ContinueToLocationParams {
p.TargetCallFrames = targetCallFrames
return &p
}
// Do executes Debugger.continueToLocation against the provided context and // Do executes Debugger.continueToLocation against the provided context and
// target handler. // target handler.
func (p *ContinueToLocationParams) Do(ctxt context.Context, h cdp.Handler) (err error) { func (p *ContinueToLocationParams) Do(ctxt context.Context, h cdp.Handler) (err error) {

View File

@ -4016,6 +4016,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, o
} }
(*out.Location).UnmarshalEasyJSON(in) (*out.Location).UnmarshalEasyJSON(in)
} }
case "targetCallFrames":
(out.TargetCallFrames).UnmarshalEasyJSON(in)
default: default:
in.SkipRecursive() in.SkipRecursive()
} }
@ -4040,6 +4042,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(out *jwriter.Writer
} else { } else {
(*in.Location).MarshalEasyJSON(out) (*in.Location).MarshalEasyJSON(out)
} }
if in.TargetCallFrames != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"targetCallFrames\":")
(in.TargetCallFrames).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -248,6 +248,48 @@ func (t *PausedReason) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t) return easyjson.Unmarshal(buf, t)
} }
// ContinueToLocationTargetCallFrames [no description].
type ContinueToLocationTargetCallFrames string
// String returns the ContinueToLocationTargetCallFrames as string value.
func (t ContinueToLocationTargetCallFrames) String() string {
return string(t)
}
// ContinueToLocationTargetCallFrames values.
const (
ContinueToLocationTargetCallFramesAny ContinueToLocationTargetCallFrames = "any"
ContinueToLocationTargetCallFramesCurrent ContinueToLocationTargetCallFrames = "current"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t ContinueToLocationTargetCallFrames) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t ContinueToLocationTargetCallFrames) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *ContinueToLocationTargetCallFrames) UnmarshalEasyJSON(in *jlexer.Lexer) {
switch ContinueToLocationTargetCallFrames(in.String()) {
case ContinueToLocationTargetCallFramesAny:
*t = ContinueToLocationTargetCallFramesAny
case ContinueToLocationTargetCallFramesCurrent:
*t = ContinueToLocationTargetCallFramesCurrent
default:
in.AddError(errors.New("unknown ContinueToLocationTargetCallFrames value"))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *ContinueToLocationTargetCallFrames) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// ExceptionsState pause on exceptions mode. // ExceptionsState pause on exceptions mode.
type ExceptionsState string type ExceptionsState string

View File

@ -50,6 +50,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(in *jlexer.Lexer, o
out.ModelName = string(in.String()) out.ModelName = string(in.String())
case "modelVersion": case "modelVersion":
out.ModelVersion = string(in.String()) out.ModelVersion = string(in.String())
case "commandLine":
out.CommandLine = string(in.String())
default: default:
in.SkipRecursive() in.SkipRecursive()
} }
@ -92,6 +94,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(out *jwriter.Writer
out.RawString("\"modelVersion\":") out.RawString("\"modelVersion\":")
out.String(string(in.ModelVersion)) out.String(string(in.ModelVersion))
} }
if in.CommandLine != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"commandLine\":")
out.String(string(in.CommandLine))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -28,6 +28,7 @@ type GetInfoReturns struct {
Gpu *GPUInfo `json:"gpu,omitempty"` // Information about the GPUs on the system. Gpu *GPUInfo `json:"gpu,omitempty"` // Information about the GPUs on the system.
ModelName string `json:"modelName,omitempty"` // A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported. ModelName string `json:"modelName,omitempty"` // A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported.
ModelVersion string `json:"modelVersion,omitempty"` // A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported. ModelVersion string `json:"modelVersion,omitempty"` // A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported.
CommandLine string `json:"commandLine,omitempty"` // The command line string used to launch the browser. Will be the empty string if not supported.
} }
// Do executes SystemInfo.getInfo against the provided context and // Do executes SystemInfo.getInfo against the provided context and
@ -37,13 +38,14 @@ type GetInfoReturns struct {
// gpu - Information about the GPUs on the system. // gpu - Information about the GPUs on the system.
// modelName - A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported. // modelName - A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported.
// modelVersion - A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported. // modelVersion - A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported.
func (p *GetInfoParams) Do(ctxt context.Context, h cdp.Handler) (gpu *GPUInfo, modelName string, modelVersion string, err error) { // commandLine - The command line string used to launch the browser. Will be the empty string if not supported.
func (p *GetInfoParams) Do(ctxt context.Context, h cdp.Handler) (gpu *GPUInfo, modelName string, modelVersion string, commandLine string, err error) {
// execute // execute
var res GetInfoReturns var res GetInfoReturns
err = h.Execute(ctxt, cdp.CommandSystemInfoGetInfo, nil, &res) err = h.Execute(ctxt, cdp.CommandSystemInfoGetInfo, nil, &res)
if err != nil { if err != nil {
return nil, "", "", err return nil, "", "", "", err
} }
return res.Gpu, res.ModelName, res.ModelVersion, nil return res.Gpu, res.ModelName, res.ModelVersion, res.CommandLine, nil
} }

View File

@ -10256,6 +10256,11 @@
"name": "modelVersion", "name": "modelVersion",
"type": "string", "type": "string",
"description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported." "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported."
},
{
"name": "commandLine",
"type": "string",
"description": "The command line string used to launch the browser. Will be the empty string if not supported."
} }
] ]
} }
@ -11910,6 +11915,16 @@
"name": "location", "name": "location",
"$ref": "Location", "$ref": "Location",
"description": "Location to continue to." "description": "Location to continue to."
},
{
"name": "targetCallFrames",
"type": "string",
"enum": [
"any",
"current"
],
"optional": true,
"experimental": true
} }
], ],
"description": "Continues execution until specific location is reached." "description": "Continues execution until specific location is reached."