Documentation ¶
Overview ¶
Package browser provides the Chrome DevTools Protocol commands, types, and events for the Browser domain.
The Browser domain defines methods and events for browser managing.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type Bounds
- type Bucket
- type CloseParams
- type CrashParams
- type GetBrowserCommandLineParams
- func (p *GetBrowserCommandLineParams) Do(ctxt context.Context, h cdp.Executor) (arguments []string, err error)
- func (v GetBrowserCommandLineParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetBrowserCommandLineParams) MarshalJSON() ([]byte, error)
- func (v *GetBrowserCommandLineParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetBrowserCommandLineParams) UnmarshalJSON(data []byte) error
- type GetBrowserCommandLineReturns
- type GetHistogramParams
- func (p *GetHistogramParams) Do(ctxt context.Context, h cdp.Executor) (histogram *Histogram, err error)
- func (v GetHistogramParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetHistogramParams) MarshalJSON() ([]byte, error)
- func (v *GetHistogramParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetHistogramParams) UnmarshalJSON(data []byte) error
- func (p GetHistogramParams) WithDelta(delta bool) *GetHistogramParams
- type GetHistogramReturns
- type GetHistogramsParams
- func (p *GetHistogramsParams) Do(ctxt context.Context, h cdp.Executor) (histograms []*Histogram, err error)
- func (v GetHistogramsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetHistogramsParams) MarshalJSON() ([]byte, error)
- func (v *GetHistogramsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetHistogramsParams) UnmarshalJSON(data []byte) error
- func (p GetHistogramsParams) WithDelta(delta bool) *GetHistogramsParams
- func (p GetHistogramsParams) WithQuery(query string) *GetHistogramsParams
- type GetHistogramsReturns
- type GetVersionParams
- func (p *GetVersionParams) Do(ctxt context.Context, h cdp.Executor) (protocolVersion string, product string, revision string, userAgent string, ...)
- func (v GetVersionParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetVersionParams) MarshalJSON() ([]byte, error)
- func (v *GetVersionParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetVersionParams) UnmarshalJSON(data []byte) error
- type GetVersionReturns
- type GetWindowBoundsParams
- func (p *GetWindowBoundsParams) Do(ctxt context.Context, h cdp.Executor) (bounds *Bounds, err error)
- func (v GetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetWindowBoundsParams) MarshalJSON() ([]byte, error)
- func (v *GetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetWindowBoundsParams) UnmarshalJSON(data []byte) error
- type GetWindowBoundsReturns
- type GetWindowForTargetParams
- func (p *GetWindowForTargetParams) Do(ctxt context.Context, h cdp.Executor) (windowID WindowID, bounds *Bounds, err error)
- func (v GetWindowForTargetParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetWindowForTargetParams) MarshalJSON() ([]byte, error)
- func (v *GetWindowForTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetWindowForTargetParams) UnmarshalJSON(data []byte) error
- type GetWindowForTargetReturns
- type GrantPermissionsParams
- func (p *GrantPermissionsParams) Do(ctxt context.Context, h cdp.Executor) (err error)
- func (v GrantPermissionsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GrantPermissionsParams) MarshalJSON() ([]byte, error)
- func (v *GrantPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GrantPermissionsParams) UnmarshalJSON(data []byte) error
- func (p GrantPermissionsParams) WithBrowserContextID(browserContextID target.BrowserContextID) *GrantPermissionsParams
- type Histogram
- type PermissionType
- type ResetPermissionsParams
- func (p *ResetPermissionsParams) Do(ctxt context.Context, h cdp.Executor) (err error)
- func (v ResetPermissionsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ResetPermissionsParams) MarshalJSON() ([]byte, error)
- func (v *ResetPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ResetPermissionsParams) UnmarshalJSON(data []byte) error
- func (p ResetPermissionsParams) WithBrowserContextID(browserContextID target.BrowserContextID) *ResetPermissionsParams
- type SetWindowBoundsParams
- func (p *SetWindowBoundsParams) Do(ctxt context.Context, h cdp.Executor) (err error)
- func (v SetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SetWindowBoundsParams) MarshalJSON() ([]byte, error)
- func (v *SetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SetWindowBoundsParams) UnmarshalJSON(data []byte) error
- type WindowID
- type WindowState
Constants ¶
const ( CommandGrantPermissions = "Browser.grantPermissions" CommandResetPermissions = "Browser.resetPermissions" CommandClose = "Browser.close" CommandCrash = "Browser.crash" CommandGetVersion = "Browser.getVersion" CommandGetBrowserCommandLine = "Browser.getBrowserCommandLine" CommandGetHistograms = "Browser.getHistograms" CommandGetHistogram = "Browser.getHistogram" CommandGetWindowBounds = "Browser.getWindowBounds" CommandGetWindowForTarget = "Browser.getWindowForTarget" CommandSetWindowBounds = "Browser.setWindowBounds" )
Command names.
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 ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Bounds) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Bounds) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Bounds) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Bucket ¶
type Bucket struct { Low int64 `json:"low"` // Minimum value (inclusive). High int64 `json:"high"` // Maximum value (exclusive). Count int64 `json:"count"` // Number of samples. }
Bucket chrome histogram bucket.
func (Bucket) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Bucket) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Bucket) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Bucket) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type CloseParams ¶
type CloseParams struct{}
CloseParams close browser gracefully.
func (CloseParams) MarshalEasyJSON ¶
func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CloseParams) MarshalJSON ¶
func (v CloseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CloseParams) UnmarshalEasyJSON ¶
func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CloseParams) UnmarshalJSON ¶
func (v *CloseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CrashParams ¶
type CrashParams struct{}
CrashParams crashes browser on the main thread.
func (CrashParams) MarshalEasyJSON ¶
func (v CrashParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CrashParams) MarshalJSON ¶
func (v CrashParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CrashParams) UnmarshalEasyJSON ¶
func (v *CrashParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CrashParams) UnmarshalJSON ¶
func (v *CrashParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetBrowserCommandLineParams ¶
type GetBrowserCommandLineParams struct{}
GetBrowserCommandLineParams returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
func GetBrowserCommandLine ¶
func GetBrowserCommandLine() *GetBrowserCommandLineParams
GetBrowserCommandLine returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
func (*GetBrowserCommandLineParams) Do ¶
func (p *GetBrowserCommandLineParams) Do(ctxt context.Context, h cdp.Executor) (arguments []string, err error)
Do executes Browser.getBrowserCommandLine against the provided context.
returns:
arguments - Commandline parameters
func (GetBrowserCommandLineParams) MarshalEasyJSON ¶
func (v GetBrowserCommandLineParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetBrowserCommandLineParams) MarshalJSON ¶
func (v GetBrowserCommandLineParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetBrowserCommandLineParams) UnmarshalEasyJSON ¶
func (v *GetBrowserCommandLineParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetBrowserCommandLineParams) UnmarshalJSON ¶
func (v *GetBrowserCommandLineParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetBrowserCommandLineReturns ¶
type GetBrowserCommandLineReturns struct {
Arguments []string `json:"arguments,omitempty"` // Commandline parameters
}
GetBrowserCommandLineReturns return values.
func (GetBrowserCommandLineReturns) MarshalEasyJSON ¶
func (v GetBrowserCommandLineReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetBrowserCommandLineReturns) MarshalJSON ¶
func (v GetBrowserCommandLineReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetBrowserCommandLineReturns) UnmarshalEasyJSON ¶
func (v *GetBrowserCommandLineReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetBrowserCommandLineReturns) UnmarshalJSON ¶
func (v *GetBrowserCommandLineReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetHistogramParams ¶
type GetHistogramParams struct { Name string `json:"name"` // Requested histogram name. Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last call. }
GetHistogramParams get a Chrome histogram by name.
func GetHistogram ¶
func GetHistogram(name string) *GetHistogramParams
GetHistogram get a Chrome histogram by name.
parameters:
name - Requested histogram name.
func (*GetHistogramParams) Do ¶
func (p *GetHistogramParams) Do(ctxt context.Context, h cdp.Executor) (histogram *Histogram, err error)
Do executes Browser.getHistogram against the provided context.
returns:
histogram - Histogram.
func (GetHistogramParams) MarshalEasyJSON ¶
func (v GetHistogramParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetHistogramParams) MarshalJSON ¶
func (v GetHistogramParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetHistogramParams) UnmarshalEasyJSON ¶
func (v *GetHistogramParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetHistogramParams) UnmarshalJSON ¶
func (v *GetHistogramParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (GetHistogramParams) WithDelta ¶
func (p GetHistogramParams) WithDelta(delta bool) *GetHistogramParams
WithDelta if true, retrieve delta since last call.
type GetHistogramReturns ¶
type GetHistogramReturns struct {
Histogram *Histogram `json:"histogram,omitempty"` // Histogram.
}
GetHistogramReturns return values.
func (GetHistogramReturns) MarshalEasyJSON ¶
func (v GetHistogramReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetHistogramReturns) MarshalJSON ¶
func (v GetHistogramReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetHistogramReturns) UnmarshalEasyJSON ¶
func (v *GetHistogramReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetHistogramReturns) UnmarshalJSON ¶
func (v *GetHistogramReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetHistogramsParams ¶
type GetHistogramsParams 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. Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last call. }
GetHistogramsParams get Chrome histograms.
func GetHistograms ¶
func GetHistograms() *GetHistogramsParams
GetHistograms get Chrome histograms.
parameters:
func (*GetHistogramsParams) Do ¶
func (p *GetHistogramsParams) Do(ctxt context.Context, h cdp.Executor) (histograms []*Histogram, err error)
Do executes Browser.getHistograms against the provided context.
returns:
histograms - Histograms.
func (GetHistogramsParams) MarshalEasyJSON ¶
func (v GetHistogramsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetHistogramsParams) MarshalJSON ¶
func (v GetHistogramsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetHistogramsParams) UnmarshalEasyJSON ¶
func (v *GetHistogramsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetHistogramsParams) UnmarshalJSON ¶
func (v *GetHistogramsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (GetHistogramsParams) WithDelta ¶
func (p GetHistogramsParams) WithDelta(delta bool) *GetHistogramsParams
WithDelta if true, retrieve delta since last call.
func (GetHistogramsParams) WithQuery ¶
func (p GetHistogramsParams) WithQuery(query string) *GetHistogramsParams
WithQuery 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 GetHistogramsReturns ¶
type GetHistogramsReturns struct {
Histograms []*Histogram `json:"histograms,omitempty"` // Histograms.
}
GetHistogramsReturns return values.
func (GetHistogramsReturns) MarshalEasyJSON ¶
func (v GetHistogramsReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetHistogramsReturns) MarshalJSON ¶
func (v GetHistogramsReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetHistogramsReturns) UnmarshalEasyJSON ¶
func (v *GetHistogramsReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetHistogramsReturns) UnmarshalJSON ¶
func (v *GetHistogramsReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetVersionParams ¶
type GetVersionParams struct{}
GetVersionParams returns version information.
func (*GetVersionParams) Do ¶
func (p *GetVersionParams) Do(ctxt context.Context, h cdp.Executor) (protocolVersion string, product string, revision string, userAgent string, jsVersion string, err error)
Do executes Browser.getVersion against the provided context.
returns:
protocolVersion - Protocol version. product - Product name. revision - Product revision. userAgent - User-Agent. jsVersion - V8 version.
func (GetVersionParams) MarshalEasyJSON ¶
func (v GetVersionParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetVersionParams) MarshalJSON ¶
func (v GetVersionParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetVersionParams) UnmarshalEasyJSON ¶
func (v *GetVersionParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetVersionParams) UnmarshalJSON ¶
func (v *GetVersionParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetVersionReturns ¶
type GetVersionReturns struct { ProtocolVersion string `json:"protocolVersion,omitempty"` // Protocol version. Product string `json:"product,omitempty"` // Product name. Revision string `json:"revision,omitempty"` // Product revision. UserAgent string `json:"userAgent,omitempty"` // User-Agent. JsVersion string `json:"jsVersion,omitempty"` // V8 version. }
GetVersionReturns return values.
func (GetVersionReturns) MarshalEasyJSON ¶
func (v GetVersionReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetVersionReturns) MarshalJSON ¶
func (v GetVersionReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetVersionReturns) UnmarshalEasyJSON ¶
func (v *GetVersionReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetVersionReturns) UnmarshalJSON ¶
func (v *GetVersionReturns) 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.Executor) (bounds *Bounds, err error)
Do executes Browser.getWindowBounds against the provided context.
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.Executor) (windowID WindowID, bounds *Bounds, err error)
Do executes Browser.getWindowForTarget against the provided context.
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 GrantPermissionsParams ¶
type GrantPermissionsParams struct { Origin string `json:"origin"` Permissions []PermissionType `json:"permissions"` BrowserContextID target.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to override permissions. When omitted, default browser context is used. }
GrantPermissionsParams grant specific permissions to the given origin and reject all others.
func GrantPermissions ¶
func GrantPermissions(origin string, permissions []PermissionType) *GrantPermissionsParams
GrantPermissions grant specific permissions to the given origin and reject all others.
parameters:
origin permissions
func (*GrantPermissionsParams) Do ¶
Do executes Browser.grantPermissions against the provided context.
func (GrantPermissionsParams) MarshalEasyJSON ¶
func (v GrantPermissionsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GrantPermissionsParams) MarshalJSON ¶
func (v GrantPermissionsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GrantPermissionsParams) UnmarshalEasyJSON ¶
func (v *GrantPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GrantPermissionsParams) UnmarshalJSON ¶
func (v *GrantPermissionsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (GrantPermissionsParams) WithBrowserContextID ¶
func (p GrantPermissionsParams) WithBrowserContextID(browserContextID target.BrowserContextID) *GrantPermissionsParams
WithBrowserContextID browserContext to override permissions. When omitted, default browser context is used.
type Histogram ¶
type Histogram struct { Name string `json:"name"` // Name. Sum int64 `json:"sum"` // Sum of sample values. Count int64 `json:"count"` // Total number of samples. Buckets []*Bucket `json:"buckets"` // Buckets. }
Histogram chrome histogram.
func (Histogram) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Histogram) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Histogram) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Histogram) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type PermissionType ¶
type PermissionType string
PermissionType [no description].
const ( PermissionTypeAccessibilityEvents PermissionType = "accessibilityEvents" PermissionTypeAudioCapture PermissionType = "audioCapture" PermissionTypeBackgroundSync PermissionType = "backgroundSync" PermissionTypeBackgroundFetch PermissionType = "backgroundFetch" PermissionTypeClipboardRead PermissionType = "clipboardRead" PermissionTypeClipboardWrite PermissionType = "clipboardWrite" PermissionTypeDurableStorage PermissionType = "durableStorage" PermissionTypeFlash PermissionType = "flash" PermissionTypeGeolocation PermissionType = "geolocation" PermissionTypeMidi PermissionType = "midi" PermissionTypeMidiSysex PermissionType = "midiSysex" PermissionTypeNotifications PermissionType = "notifications" PermissionTypePaymentHandler PermissionType = "paymentHandler" PermissionTypeProtectedMediaIdentifier PermissionType = "protectedMediaIdentifier" PermissionTypeSensors PermissionType = "sensors" PermissionTypeVideoCapture PermissionType = "videoCapture" )
PermissionType values.
func (PermissionType) MarshalEasyJSON ¶
func (t PermissionType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (PermissionType) MarshalJSON ¶
func (t PermissionType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (PermissionType) String ¶
func (t PermissionType) String() string
String returns the PermissionType as string value.
func (*PermissionType) UnmarshalEasyJSON ¶
func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*PermissionType) UnmarshalJSON ¶
func (t *PermissionType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type ResetPermissionsParams ¶
type ResetPermissionsParams struct {
BrowserContextID target.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to reset permissions. When omitted, default browser context is used.
}
ResetPermissionsParams reset all permission management for all origins.
func ResetPermissions ¶
func ResetPermissions() *ResetPermissionsParams
ResetPermissions reset all permission management for all origins.
parameters:
func (*ResetPermissionsParams) Do ¶
Do executes Browser.resetPermissions against the provided context.
func (ResetPermissionsParams) MarshalEasyJSON ¶
func (v ResetPermissionsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ResetPermissionsParams) MarshalJSON ¶
func (v ResetPermissionsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ResetPermissionsParams) UnmarshalEasyJSON ¶
func (v *ResetPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ResetPermissionsParams) UnmarshalJSON ¶
func (v *ResetPermissionsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (ResetPermissionsParams) WithBrowserContextID ¶
func (p ResetPermissionsParams) WithBrowserContextID(browserContextID target.BrowserContextID) *ResetPermissionsParams
WithBrowserContextID browserContext to reset permissions. When omitted, default browser context is used.
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 ¶
Do executes Browser.setWindowBounds against the provided context.
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 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.