browser

package
v0.16.3 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 browser implements the Browser domain. The Browser domain defines methods and events for browser managing.

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 Browser domain with the connection set to conn.

Types

type Bounds

type Bounds struct {
	Left        *int        `json:"left,omitempty"`        // The offset from the left edge of the screen to the window in pixels.
	Top         *int        `json:"top,omitempty"`         // The offset from the top edge of the screen to the window in pixels.
	Width       *int        `json:"width,omitempty"`       // The window width in pixels.
	Height      *int        `json:"height,omitempty"`      // The window height in pixels.
	WindowState WindowState `json:"windowState,omitempty"` // The window state. Default to normal.
}

Bounds Browser window bounds information

Note: This type is experimental.

type Bucket added in v0.15.6

type Bucket struct {
	Low   int `json:"low"`   // Minimum value (inclusive).
	High  int `json:"high"`  // Maximum value (exclusive).
	Count int `json:"count"` // Number of samples.
}

Bucket Chrome histogram bucket.

Note: This type is experimental.

type GetHistogramArgs added in v0.15.6

type GetHistogramArgs struct {
	Name string `json:"name"` // Requested histogram name.
}

GetHistogramArgs represents the arguments for GetHistogram in the Browser domain.

func NewGetHistogramArgs added in v0.15.6

func NewGetHistogramArgs(name string) *GetHistogramArgs

NewGetHistogramArgs initializes GetHistogramArgs with the required arguments.

type GetHistogramReply added in v0.15.6

type GetHistogramReply struct {
	Histogram Histogram `json:"histogram"` // Histogram.
}

GetHistogramReply represents the return values for GetHistogram in the Browser domain.

type GetHistogramsArgs added in v0.15.6

type GetHistogramsArgs struct {
	Query *string `json:"query,omitempty"` // Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
}

GetHistogramsArgs represents the arguments for GetHistograms in the Browser domain.

func NewGetHistogramsArgs added in v0.15.6

func NewGetHistogramsArgs() *GetHistogramsArgs

NewGetHistogramsArgs initializes GetHistogramsArgs with the required arguments.

func (*GetHistogramsArgs) SetQuery added in v0.15.6

func (a *GetHistogramsArgs) SetQuery(query string) *GetHistogramsArgs

SetQuery sets the Query optional argument. Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.

type GetHistogramsReply added in v0.15.6

type GetHistogramsReply struct {
	Histograms []Histogram `json:"histograms"` // Histograms.
}

GetHistogramsReply represents the return values for GetHistograms in the Browser domain.

type GetVersionReply added in v0.11.1

type GetVersionReply struct {
	ProtocolVersion string `json:"protocolVersion"` // Protocol version.
	Product         string `json:"product"`         // Product name.
	Revision        string `json:"revision"`        // Product revision.
	UserAgent       string `json:"userAgent"`       // User-Agent.
	JsVersion       string `json:"jsVersion"`       // V8 version.
}

GetVersionReply represents the return values for GetVersion in the Browser domain.

type GetWindowBoundsArgs

type GetWindowBoundsArgs struct {
	WindowID WindowID `json:"windowId"` // Browser window id.
}

GetWindowBoundsArgs represents the arguments for GetWindowBounds in the Browser domain.

func NewGetWindowBoundsArgs

func NewGetWindowBoundsArgs(windowID WindowID) *GetWindowBoundsArgs

NewGetWindowBoundsArgs initializes GetWindowBoundsArgs with the required arguments.

type GetWindowBoundsReply

type GetWindowBoundsReply struct {
	Bounds Bounds `json:"bounds"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
}

GetWindowBoundsReply represents the return values for GetWindowBounds in the Browser domain.

type GetWindowForTargetArgs

type GetWindowForTargetArgs struct {
	TargetID target.ID `json:"targetId"` // Devtools agent host id.
}

GetWindowForTargetArgs represents the arguments for GetWindowForTarget in the Browser domain.

func NewGetWindowForTargetArgs

func NewGetWindowForTargetArgs(targetID target.ID) *GetWindowForTargetArgs

NewGetWindowForTargetArgs initializes GetWindowForTargetArgs with the required arguments.

type GetWindowForTargetReply

type GetWindowForTargetReply struct {
	WindowID WindowID `json:"windowId"` // Browser window id.
	Bounds   Bounds   `json:"bounds"`   // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
}

GetWindowForTargetReply represents the return values for GetWindowForTarget in the Browser domain.

type Histogram added in v0.15.6

type Histogram struct {
	Name    string   `json:"name"`    // Name.
	Sum     int      `json:"sum"`     // Sum of sample values.
	Count   int      `json:"count"`   // Total number of samples.
	Buckets []Bucket `json:"buckets"` // Buckets.
}

Histogram Chrome histogram.

Note: This type is experimental.

type SetWindowBoundsArgs

type SetWindowBoundsArgs struct {
	WindowID WindowID `json:"windowId"` // Browser window id.
	Bounds   Bounds   `json:"bounds"`   // New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
}

SetWindowBoundsArgs represents the arguments for SetWindowBounds in the Browser domain.

func NewSetWindowBoundsArgs

func NewSetWindowBoundsArgs(windowID WindowID, bounds Bounds) *SetWindowBoundsArgs

NewSetWindowBoundsArgs initializes SetWindowBoundsArgs with the required arguments.

type WindowID

type WindowID int

WindowID

Note: This type is experimental.

type WindowState

type WindowState string

WindowState The state of the browser window.

Note: This type is experimental.

const (
	WindowStateNotSet     WindowState = ""
	WindowStateNormal     WindowState = "normal"
	WindowStateMinimized  WindowState = "minimized"
	WindowStateMaximized  WindowState = "maximized"
	WindowStateFullscreen WindowState = "fullscreen"
)

WindowState as enums.

func (WindowState) String

func (e WindowState) String() string

func (WindowState) Valid

func (e WindowState) Valid() bool

Jump to

Keyboard shortcuts

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