browser

package
v0.0.0-...-ccdd204 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package browser provides the Chrome Debugging Protocol commands, types, and events for the Browser domain.

The Browser domain defines methods and events for browser managing.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bounds

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

Bounds browser window bounds information.

func (Bounds) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Bounds) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Bounds) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Bounds) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetWindowBoundsParams

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

GetWindowBoundsParams get position and size of the browser window.

func GetWindowBounds

func GetWindowBounds(windowID WindowID) *GetWindowBoundsParams

GetWindowBounds get position and size of the browser window.

parameters:

windowID - Browser window id.

func (*GetWindowBoundsParams) Do

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

Do executes Browser.getWindowBounds against the provided context and target handler.

returns:

bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

func (GetWindowBoundsParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetWindowBoundsParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetWindowBoundsParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetWindowBoundsParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetWindowBoundsReturns

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

GetWindowBoundsReturns return values.

func (GetWindowBoundsReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetWindowBoundsReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetWindowBoundsReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetWindowBoundsReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetWindowForTargetParams

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

GetWindowForTargetParams get the browser window that contains the devtools target.

func GetWindowForTarget

func GetWindowForTarget(targetID target.ID) *GetWindowForTargetParams

GetWindowForTarget get the browser window that contains the devtools target.

parameters:

targetID - Devtools agent host id.

func (*GetWindowForTargetParams) Do

func (p *GetWindowForTargetParams) Do(ctxt context.Context, h cdp.Handler) (windowID WindowID, bounds *Bounds, err error)

Do executes Browser.getWindowForTarget against the provided context and target handler.

returns:

windowID - Browser window id.
bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

func (GetWindowForTargetParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetWindowForTargetParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetWindowForTargetParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetWindowForTargetParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetWindowForTargetReturns

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

GetWindowForTargetReturns return values.

func (GetWindowForTargetReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetWindowForTargetReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetWindowForTargetReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetWindowForTargetReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetWindowBoundsParams

type SetWindowBoundsParams 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.
}

SetWindowBoundsParams set position and/or size of the browser window.

func SetWindowBounds

func SetWindowBounds(windowID WindowID, bounds *Bounds) *SetWindowBoundsParams

SetWindowBounds set position and/or size of the browser window.

parameters:

windowID - Browser window id.
bounds - New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.

func (*SetWindowBoundsParams) Do

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

Do executes Browser.setWindowBounds against the provided context and target handler.

func (SetWindowBoundsParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetWindowBoundsParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetWindowBoundsParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetWindowBoundsParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type WindowID

type WindowID int64

WindowID [no description].

func (WindowID) Int64

func (t WindowID) Int64() int64

Int64 returns the WindowID as int64 value.

type WindowState

type WindowState string

WindowState the state of the browser window.

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

WindowState values.

func (WindowState) MarshalEasyJSON

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

MarshalEasyJSON satisfies easyjson.Marshaler.

func (WindowState) MarshalJSON

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

MarshalJSON satisfies json.Marshaler.

func (WindowState) String

func (t WindowState) String() string

String returns the WindowState as string value.

func (*WindowState) UnmarshalEasyJSON

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

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*WindowState) UnmarshalJSON

func (t *WindowState) 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