headlessexperimental

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package headlessexperimental implements the HeadlessExperimental domain. This domain provides experimental commands only supported in headless mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the HeadlessExperimental domain with the connection set to conn.

Types

type BeginFrameArgs

type BeginFrameArgs 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.
	NoDisplayUpdates *bool              `json:"noDisplayUpdates,omitempty"` // Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
	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.
}

BeginFrameArgs represents the arguments for BeginFrame in the HeadlessExperimental domain.

func NewBeginFrameArgs

func NewBeginFrameArgs() *BeginFrameArgs

NewBeginFrameArgs initializes BeginFrameArgs with the required arguments.

func (*BeginFrameArgs) SetDeadline

func (a *BeginFrameArgs) SetDeadline(deadline runtime.Timestamp) *BeginFrameArgs

SetDeadline sets the Deadline optional argument. Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval.

func (*BeginFrameArgs) SetFrameTime

func (a *BeginFrameArgs) SetFrameTime(frameTime runtime.Timestamp) *BeginFrameArgs

SetFrameTime sets the FrameTime optional argument. Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used.

func (*BeginFrameArgs) SetInterval

func (a *BeginFrameArgs) SetInterval(interval float64) *BeginFrameArgs

SetInterval sets the Interval optional argument. 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 (*BeginFrameArgs) SetNoDisplayUpdates added in v0.16.1

func (a *BeginFrameArgs) SetNoDisplayUpdates(noDisplayUpdates bool) *BeginFrameArgs

SetNoDisplayUpdates sets the NoDisplayUpdates optional argument. Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.

func (*BeginFrameArgs) SetScreenshot

func (a *BeginFrameArgs) SetScreenshot(screenshot ScreenshotParams) *BeginFrameArgs

SetScreenshot sets the Screenshot optional argument. If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured.

type BeginFrameReply

type BeginFrameReply struct {
	HasDamage               bool   `json:"hasDamage"`                // Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display.
	MainFrameContentUpdated bool   `json:"mainFrameContentUpdated"`  // Whether the main frame submitted a new display frame in response to this BeginFrame.
	ScreenshotData          []byte `json:"screenshotData,omitempty"` // Base64-encoded image data of the screenshot, if one was requested and successfully taken.
}

BeginFrameReply represents the return values for BeginFrame in the HeadlessExperimental domain.

type MainFrameReadyForScreenshotsClient

type MainFrameReadyForScreenshotsClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*MainFrameReadyForScreenshotsReply, error)
	rpcc.Stream
}

MainFrameReadyForScreenshotsClient is a client for MainFrameReadyForScreenshots events. 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.

type MainFrameReadyForScreenshotsReply

type MainFrameReadyForScreenshotsReply struct {
}

MainFrameReadyForScreenshotsReply is the reply for MainFrameReadyForScreenshots events.

type NeedsBeginFramesChangedClient

type NeedsBeginFramesChangedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*NeedsBeginFramesChangedReply, error)
	rpcc.Stream
}

NeedsBeginFramesChangedClient is a client for NeedsBeginFramesChanged events. Issued when the target starts or stops needing BeginFrames.

type NeedsBeginFramesChangedReply

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

NeedsBeginFramesChangedReply is the reply for NeedsBeginFramesChanged events.

type ScreenshotParams

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

ScreenshotParams Encoding options for a screenshot.

Jump to

Keyboard shortcuts

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