headlessexperimental

package
v0.0.0-...-60dbb97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package headlessexperimental provides the Chrome Debugging Protocol commands, types, and events for the HeadlessExperimental domain.

This domain provides experimental commands only supported in headless mode.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

Variables

EventTypes all event types in the domain.

Functions

This section is empty.

Types

type BeginFrameParams

type BeginFrameParams struct {
	FrameTime  *runtime.Timestamp `json:"frameTime,omitempty"`  // Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used.
	Deadline   *runtime.Timestamp `json:"deadline,omitempty"`   // Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval.
	Interval   float64            `json:"interval,omitempty"`   // The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
	Screenshot *ScreenshotParams  `json:"screenshot,omitempty"` // If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured.
}

BeginFrameParams sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl.

func BeginFrame

func BeginFrame() *BeginFrameParams

BeginFrame sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl.

parameters:

func (*BeginFrameParams) Do

func (p *BeginFrameParams) Do(ctxt context.Context, h cdp.Handler) (hasDamage bool, screenshotData []byte, err error)

Do executes HeadlessExperimental.beginFrame against the provided context and target handler.

returns:

hasDamage - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display.
screenshotData - Base64-encoded image data of the screenshot, if one was requested and successfully taken.

func (BeginFrameParams) MarshalEasyJSON

func (v BeginFrameParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (BeginFrameParams) MarshalJSON

func (v BeginFrameParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*BeginFrameParams) UnmarshalEasyJSON

func (v *BeginFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BeginFrameParams) UnmarshalJSON

func (v *BeginFrameParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (BeginFrameParams) WithDeadline

func (p BeginFrameParams) WithDeadline(deadline *runtime.Timestamp) *BeginFrameParams

WithDeadline deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval.

func (BeginFrameParams) WithFrameTime

func (p BeginFrameParams) WithFrameTime(frameTime *runtime.Timestamp) *BeginFrameParams

WithFrameTime timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used.

func (BeginFrameParams) WithInterval

func (p BeginFrameParams) WithInterval(interval float64) *BeginFrameParams

WithInterval the interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.

func (BeginFrameParams) WithScreenshot

func (p BeginFrameParams) WithScreenshot(screenshot *ScreenshotParams) *BeginFrameParams

WithScreenshot if set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured.

type BeginFrameReturns

type BeginFrameReturns struct {
	HasDamage      bool   `json:"hasDamage,omitempty"`      // Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display.
	ScreenshotData string `json:"screenshotData,omitempty"` // Base64-encoded image data of the screenshot, if one was requested and successfully taken.
}

BeginFrameReturns return values.

func (BeginFrameReturns) MarshalEasyJSON

func (v BeginFrameReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (BeginFrameReturns) MarshalJSON

func (v BeginFrameReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*BeginFrameReturns) UnmarshalEasyJSON

func (v *BeginFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BeginFrameReturns) UnmarshalJSON

func (v *BeginFrameReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DisableParams

type DisableParams struct{}

DisableParams disables headless events for the target.

func Disable

func Disable() *DisableParams

Disable disables headless events for the target.

func (*DisableParams) Do

func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error)

Do executes HeadlessExperimental.disable against the provided context and target handler.

func (DisableParams) MarshalEasyJSON

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams enables headless events for the target.

func Enable

func Enable() *EnableParams

Enable enables headless events for the target.

func (*EnableParams) Do

func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error)

Do executes HeadlessExperimental.enable against the provided context and target handler.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventMainFrameReadyForScreenshots

type EventMainFrameReadyForScreenshots struct{}

EventMainFrameReadyForScreenshots issued when the main frame has first submitted a frame to the browser. May only be fired while a BeginFrame is in flight. Before this event, screenshotting requests may fail.

func (EventMainFrameReadyForScreenshots) MarshalEasyJSON

func (v EventMainFrameReadyForScreenshots) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventMainFrameReadyForScreenshots) MarshalJSON

func (v EventMainFrameReadyForScreenshots) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventMainFrameReadyForScreenshots) UnmarshalEasyJSON

func (v *EventMainFrameReadyForScreenshots) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventMainFrameReadyForScreenshots) UnmarshalJSON

func (v *EventMainFrameReadyForScreenshots) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventNeedsBeginFramesChanged

type EventNeedsBeginFramesChanged struct {
	NeedsBeginFrames bool `json:"needsBeginFrames"` // True if BeginFrames are needed, false otherwise.
}

EventNeedsBeginFramesChanged issued when the target starts or stops needing BeginFrames.

func (EventNeedsBeginFramesChanged) MarshalEasyJSON

func (v EventNeedsBeginFramesChanged) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventNeedsBeginFramesChanged) MarshalJSON

func (v EventNeedsBeginFramesChanged) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventNeedsBeginFramesChanged) UnmarshalEasyJSON

func (v *EventNeedsBeginFramesChanged) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventNeedsBeginFramesChanged) UnmarshalJSON

func (v *EventNeedsBeginFramesChanged) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ScreenshotParams

type ScreenshotParams struct {
	Format  ScreenshotParamsFormat `json:"format,omitempty"`  // Image compression format (defaults to png).
	Quality int64                  `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
}

ScreenshotParams encoding options for a screenshot.

func (ScreenshotParams) MarshalEasyJSON

func (v ScreenshotParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ScreenshotParams) MarshalJSON

func (v ScreenshotParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ScreenshotParams) UnmarshalEasyJSON

func (v *ScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ScreenshotParams) UnmarshalJSON

func (v *ScreenshotParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ScreenshotParamsFormat

type ScreenshotParamsFormat string

ScreenshotParamsFormat image compression format (defaults to png).

const (
	ScreenshotParamsFormatJpeg ScreenshotParamsFormat = "jpeg"
	ScreenshotParamsFormatPng  ScreenshotParamsFormat = "png"
)

ScreenshotParamsFormat values.

func (ScreenshotParamsFormat) MarshalEasyJSON

func (t ScreenshotParamsFormat) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ScreenshotParamsFormat) MarshalJSON

func (t ScreenshotParamsFormat) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ScreenshotParamsFormat) String

func (t ScreenshotParamsFormat) String() string

String returns the ScreenshotParamsFormat as string value.

func (*ScreenshotParamsFormat) UnmarshalEasyJSON

func (t *ScreenshotParamsFormat) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ScreenshotParamsFormat) UnmarshalJSON

func (t *ScreenshotParamsFormat) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL