2017-01-24 15:09:23 +00:00
|
|
|
// Package rendering provides the Chrome Debugging Protocol
|
2017-02-12 04:59:33 +00:00
|
|
|
// commands, types, and events for the Rendering domain.
|
2017-01-24 15:09:23 +00:00
|
|
|
//
|
|
|
|
// This domain allows to control rendering of the page.
|
|
|
|
//
|
|
|
|
// Generated by the chromedp-gen command.
|
|
|
|
package rendering
|
|
|
|
|
|
|
|
// AUTOGENERATED. DO NOT EDIT.
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
cdp "github.com/knq/chromedp/cdp"
|
2017-01-24 15:09:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// SetShowPaintRectsParams requests that backend shows paint rectangles.
|
|
|
|
type SetShowPaintRectsParams struct {
|
|
|
|
Result bool `json:"result"` // True for showing paint rectangles
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowPaintRects requests that backend shows paint rectangles.
|
|
|
|
//
|
|
|
|
// parameters:
|
|
|
|
// result - True for showing paint rectangles
|
|
|
|
func SetShowPaintRects(result bool) *SetShowPaintRectsParams {
|
|
|
|
return &SetShowPaintRectsParams{
|
|
|
|
Result: result,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Rendering.setShowPaintRects against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *SetShowPaintRectsParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandRenderingSetShowPaintRects, p, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowDebugBordersParams requests that backend shows debug borders on
|
|
|
|
// layers.
|
|
|
|
type SetShowDebugBordersParams struct {
|
|
|
|
Show bool `json:"show"` // True for showing debug borders
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowDebugBorders requests that backend shows debug borders on layers.
|
|
|
|
//
|
|
|
|
// parameters:
|
|
|
|
// show - True for showing debug borders
|
|
|
|
func SetShowDebugBorders(show bool) *SetShowDebugBordersParams {
|
|
|
|
return &SetShowDebugBordersParams{
|
|
|
|
Show: show,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Rendering.setShowDebugBorders against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *SetShowDebugBordersParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandRenderingSetShowDebugBorders, p, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowFPSCounterParams requests that backend shows the FPS counter.
|
|
|
|
type SetShowFPSCounterParams struct {
|
|
|
|
Show bool `json:"show"` // True for showing the FPS counter
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowFPSCounter requests that backend shows the FPS counter.
|
|
|
|
//
|
|
|
|
// parameters:
|
|
|
|
// show - True for showing the FPS counter
|
|
|
|
func SetShowFPSCounter(show bool) *SetShowFPSCounterParams {
|
|
|
|
return &SetShowFPSCounterParams{
|
|
|
|
Show: show,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Rendering.setShowFPSCounter against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *SetShowFPSCounterParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandRenderingSetShowFPSCounter, p, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowScrollBottleneckRectsParams requests that backend shows scroll
|
|
|
|
// bottleneck rects.
|
|
|
|
type SetShowScrollBottleneckRectsParams struct {
|
|
|
|
Show bool `json:"show"` // True for showing scroll bottleneck rects
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowScrollBottleneckRects requests that backend shows scroll bottleneck
|
|
|
|
// rects.
|
|
|
|
//
|
|
|
|
// parameters:
|
|
|
|
// show - True for showing scroll bottleneck rects
|
|
|
|
func SetShowScrollBottleneckRects(show bool) *SetShowScrollBottleneckRectsParams {
|
|
|
|
return &SetShowScrollBottleneckRectsParams{
|
|
|
|
Show: show,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Rendering.setShowScrollBottleneckRects against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *SetShowScrollBottleneckRectsParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandRenderingSetShowScrollBottleneckRects, p, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowViewportSizeOnResizeParams paints viewport size upon main frame
|
|
|
|
// resize.
|
|
|
|
type SetShowViewportSizeOnResizeParams struct {
|
|
|
|
Show bool `json:"show"` // Whether to paint size or not.
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetShowViewportSizeOnResize paints viewport size upon main frame resize.
|
|
|
|
//
|
|
|
|
// parameters:
|
|
|
|
// show - Whether to paint size or not.
|
|
|
|
func SetShowViewportSizeOnResize(show bool) *SetShowViewportSizeOnResizeParams {
|
|
|
|
return &SetShowViewportSizeOnResizeParams{
|
|
|
|
Show: show,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Rendering.setShowViewportSizeOnResize against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *SetShowViewportSizeOnResizeParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandRenderingSetShowViewportSizeOnResize, p, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|