func (c *Browser) SetDockTileWithParams(v *BrowserSetDockTileParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.setDockTile", Params: v})
}
SetDockTileWithParams - Set dock tile details, platform-specific.
package gcdapi
import (
	"encoding/json"
	"github.com/wirepair/gcd/gcdmessage"
)
type BrowserBounds struct {
	Left        int    `json:"left,omitempty"`         
	Top         int    `json:"top,omitempty"`          
	Width       int    `json:"width,omitempty"`        
	Height      int    `json:"height,omitempty"`       
	WindowState string `json:"windowState,omitempty"`  
}
type BrowserBucket struct {
	Low   int `json:"low"`    
	High  int `json:"high"`   
	Count int `json:"count"`  
}
type BrowserHistogram struct {
	Name    string           `json:"name"`     
	Sum     int              `json:"sum"`      
	Count   int              `json:"count"`    
	Buckets []*BrowserBucket `json:"buckets"`  
}
type Browser struct {
	target gcdmessage.ChromeTargeter
}
func NewBrowser(target gcdmessage.ChromeTargeter) *Browser {
	c := &Browser{target: target}
	return c
}
type BrowserGrantPermissionsParams struct {
	Origin string `json:"origin"`
	Permissions []string `json:"permissions"`
	BrowserContextId string `json:"browserContextId,omitempty"`
}
func (c *Browser) GrantPermissionsWithParams(v *BrowserGrantPermissionsParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.grantPermissions", Params: v})
}
func (c *Browser) GrantPermissions(origin string, permissions []string, browserContextId string) (*gcdmessage.ChromeResponse, error) {
	var v BrowserGrantPermissionsParams
	v.Origin = origin
	v.Permissions = permissions
	v.BrowserContextId = browserContextId
	return c.GrantPermissionsWithParams(&v)
}
type BrowserResetPermissionsParams struct {
	BrowserContextId string `json:"browserContextId,omitempty"`
}
func (c *Browser) ResetPermissionsWithParams(v *BrowserResetPermissionsParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.resetPermissions", Params: v})
}
func (c *Browser) ResetPermissions(browserContextId string) (*gcdmessage.ChromeResponse, error) {
	var v BrowserResetPermissionsParams
	v.BrowserContextId = browserContextId
	return c.ResetPermissionsWithParams(&v)
}
func (c *Browser) Close() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.close"})
}
func (c *Browser) Crash() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.crash"})
}
func (c *Browser) GetVersion() (string, string, string, string, string, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.getVersion"})
	if err != nil {
		return "", "", "", "", "", err
	}
	var chromeData struct {
		Result struct {
			ProtocolVersion string
			Product         string
			Revision        string
			UserAgent       string
			JsVersion       string
		}
	}
	if resp == nil {
		return "", "", "", "", "", &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", "", "", "", "", &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", "", "", "", "", err
	}
	return chromeData.Result.ProtocolVersion, chromeData.Result.Product, chromeData.Result.Revision, chromeData.Result.UserAgent, chromeData.Result.JsVersion, nil
}
func (c *Browser) GetBrowserCommandLine() ([]string, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.getBrowserCommandLine"})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Arguments []string
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Arguments, nil
}
type BrowserGetHistogramsParams struct {
	Query string `json:"query,omitempty"`
	Delta bool `json:"delta,omitempty"`
}
func (c *Browser) GetHistogramsWithParams(v *BrowserGetHistogramsParams) ([]*BrowserHistogram, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.getHistograms", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Histograms []*BrowserHistogram
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Histograms, nil
}
func (c *Browser) GetHistograms(query string, delta bool) ([]*BrowserHistogram, error) {
	var v BrowserGetHistogramsParams
	v.Query = query
	v.Delta = delta
	return c.GetHistogramsWithParams(&v)
}
type BrowserGetHistogramParams struct {
	Name string `json:"name"`
	Delta bool `json:"delta,omitempty"`
}
func (c *Browser) GetHistogramWithParams(v *BrowserGetHistogramParams) (*BrowserHistogram, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.getHistogram", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Histogram *BrowserHistogram
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Histogram, nil
}
func (c *Browser) GetHistogram(name string, delta bool) (*BrowserHistogram, error) {
	var v BrowserGetHistogramParams
	v.Name = name
	v.Delta = delta
	return c.GetHistogramWithParams(&v)
}
type BrowserGetWindowBoundsParams struct {
	WindowId int `json:"windowId"`
}
func (c *Browser) GetWindowBoundsWithParams(v *BrowserGetWindowBoundsParams) (*BrowserBounds, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.getWindowBounds", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Bounds *BrowserBounds
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Bounds, nil
}
func (c *Browser) GetWindowBounds(windowId int) (*BrowserBounds, error) {
	var v BrowserGetWindowBoundsParams
	v.WindowId = windowId
	return c.GetWindowBoundsWithParams(&v)
}
type BrowserGetWindowForTargetParams struct {
	TargetId string `json:"targetId,omitempty"`
}
func (c *Browser) GetWindowForTargetWithParams(v *BrowserGetWindowForTargetParams) (int, *BrowserBounds, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.getWindowForTarget", Params: v})
	if err != nil {
		return 0, nil, err
	}
	var chromeData struct {
		Result struct {
			WindowId int
			Bounds   *BrowserBounds
		}
	}
	if resp == nil {
		return 0, nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return 0, nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return 0, nil, err
	}
	return chromeData.Result.WindowId, chromeData.Result.Bounds, nil
}
func (c *Browser) GetWindowForTarget(targetId string) (int, *BrowserBounds, error) {
	var v BrowserGetWindowForTargetParams
	v.TargetId = targetId
	return c.GetWindowForTargetWithParams(&v)
}
type BrowserSetWindowBoundsParams struct {
	WindowId int `json:"windowId"`
	Bounds *BrowserBounds `json:"bounds"`
}
func (c *Browser) SetWindowBoundsWithParams(v *BrowserSetWindowBoundsParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Browser.setWindowBounds", Params: v})
}
func (c *Browser) SetWindowBounds(windowId int, bounds *BrowserBounds) (*gcdmessage.ChromeResponse, error) {
	var v BrowserSetWindowBoundsParams
	v.WindowId = windowId
	v.Bounds = bounds
	return c.SetWindowBoundsWithParams(&v)
}
type BrowserSetDockTileParams struct {
	BadgeLabel string `json:"badgeLabel,omitempty"`
	Image string `json:"image,omitempty"`
}