| // Code generated by cdpgen. DO NOT EDIT. |
| |
| package browser |
| |
| import ( |
| "github.com/mafredri/cdp/protocol/target" |
| ) |
| |
| // GrantPermissionsArgs represents the arguments for GrantPermissions in the Browser domain. |
| type GrantPermissionsArgs struct { |
| Origin string `json:"origin"` // No description. |
| Permissions []PermissionType `json:"permissions"` // No description. |
| BrowserContextID *target.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to override permissions. When omitted, default browser context is used. |
| } |
| |
| // NewGrantPermissionsArgs initializes GrantPermissionsArgs with the required arguments. |
| func NewGrantPermissionsArgs(origin string, permissions []PermissionType) *GrantPermissionsArgs { |
| args := new(GrantPermissionsArgs) |
| args.Origin = origin |
| args.Permissions = permissions |
| return args |
| } |
| |
| // SetBrowserContextID sets the BrowserContextID optional argument. |
| // BrowserContext to override permissions. When omitted, default |
| // browser context is used. |
| func (a *GrantPermissionsArgs) SetBrowserContextID(browserContextID target.BrowserContextID) *GrantPermissionsArgs { |
| a.BrowserContextID = &browserContextID |
| return a |
| } |
| |
| // ResetPermissionsArgs represents the arguments for ResetPermissions in the Browser domain. |
| type ResetPermissionsArgs struct { |
| BrowserContextID *target.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to reset permissions. When omitted, default browser context is used. |
| } |
| |
| // NewResetPermissionsArgs initializes ResetPermissionsArgs with the required arguments. |
| func NewResetPermissionsArgs() *ResetPermissionsArgs { |
| args := new(ResetPermissionsArgs) |
| |
| return args |
| } |
| |
| // SetBrowserContextID sets the BrowserContextID optional argument. |
| // BrowserContext to reset permissions. When omitted, default browser |
| // context is used. |
| func (a *ResetPermissionsArgs) SetBrowserContextID(browserContextID target.BrowserContextID) *ResetPermissionsArgs { |
| a.BrowserContextID = &browserContextID |
| return a |
| } |
| |
| // GetVersionReply represents the return values for GetVersion in the Browser domain. |
| 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. |
| } |
| |
| // GetBrowserCommandLineReply represents the return values for GetBrowserCommandLine in the Browser domain. |
| type GetBrowserCommandLineReply struct { |
| Arguments []string `json:"arguments"` // Commandline parameters |
| } |
| |
| // GetHistogramsArgs represents the arguments for GetHistograms in the Browser domain. |
| 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. |
| Delta *bool `json:"delta,omitempty"` // If true, retrieve delta since last call. |
| } |
| |
| // NewGetHistogramsArgs initializes GetHistogramsArgs with the required arguments. |
| func NewGetHistogramsArgs() *GetHistogramsArgs { |
| args := new(GetHistogramsArgs) |
| |
| return args |
| } |
| |
| // 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. |
| func (a *GetHistogramsArgs) SetQuery(query string) *GetHistogramsArgs { |
| a.Query = &query |
| return a |
| } |
| |
| // SetDelta sets the Delta optional argument. If true, retrieve delta |
| // since last call. |
| func (a *GetHistogramsArgs) SetDelta(delta bool) *GetHistogramsArgs { |
| a.Delta = &delta |
| return a |
| } |
| |
| // GetHistogramsReply represents the return values for GetHistograms in the Browser domain. |
| type GetHistogramsReply struct { |
| Histograms []Histogram `json:"histograms"` // Histograms. |
| } |
| |
| // GetHistogramArgs represents the arguments for GetHistogram in the Browser domain. |
| type GetHistogramArgs struct { |
| Name string `json:"name"` // Requested histogram name. |
| Delta *bool `json:"delta,omitempty"` // If true, retrieve delta since last call. |
| } |
| |
| // NewGetHistogramArgs initializes GetHistogramArgs with the required arguments. |
| func NewGetHistogramArgs(name string) *GetHistogramArgs { |
| args := new(GetHistogramArgs) |
| args.Name = name |
| return args |
| } |
| |
| // SetDelta sets the Delta optional argument. If true, retrieve delta |
| // since last call. |
| func (a *GetHistogramArgs) SetDelta(delta bool) *GetHistogramArgs { |
| a.Delta = &delta |
| return a |
| } |
| |
| // GetHistogramReply represents the return values for GetHistogram in the Browser domain. |
| type GetHistogramReply struct { |
| Histogram Histogram `json:"histogram"` // Histogram. |
| } |
| |
| // GetWindowBoundsArgs represents the arguments for GetWindowBounds in the Browser domain. |
| type GetWindowBoundsArgs struct { |
| WindowID WindowID `json:"windowId"` // Browser window id. |
| } |
| |
| // NewGetWindowBoundsArgs initializes GetWindowBoundsArgs with the required arguments. |
| func NewGetWindowBoundsArgs(windowID WindowID) *GetWindowBoundsArgs { |
| args := new(GetWindowBoundsArgs) |
| args.WindowID = windowID |
| return args |
| } |
| |
| // GetWindowBoundsReply represents the return values for GetWindowBounds in the Browser domain. |
| 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. |
| } |
| |
| // GetWindowForTargetArgs represents the arguments for GetWindowForTarget in the Browser domain. |
| type GetWindowForTargetArgs struct { |
| TargetID *target.ID `json:"targetId,omitempty"` // Devtools agent host id. If called as a part of the session, associated targetId is used. |
| } |
| |
| // NewGetWindowForTargetArgs initializes GetWindowForTargetArgs with the required arguments. |
| func NewGetWindowForTargetArgs() *GetWindowForTargetArgs { |
| args := new(GetWindowForTargetArgs) |
| |
| return args |
| } |
| |
| // SetTargetID sets the TargetID optional argument. Devtools agent |
| // host id. If called as a part of the session, associated targetId is |
| // used. |
| func (a *GetWindowForTargetArgs) SetTargetID(targetID target.ID) *GetWindowForTargetArgs { |
| a.TargetID = &targetID |
| return a |
| } |
| |
| // GetWindowForTargetReply represents the return values for GetWindowForTarget in the Browser domain. |
| 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. |
| } |
| |
| // SetWindowBoundsArgs represents the arguments for SetWindowBounds in the Browser domain. |
| 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. |
| } |
| |
| // NewSetWindowBoundsArgs initializes SetWindowBoundsArgs with the required arguments. |
| func NewSetWindowBoundsArgs(windowID WindowID, bounds Bounds) *SetWindowBoundsArgs { |
| args := new(SetWindowBoundsArgs) |
| args.WindowID = windowID |
| args.Bounds = bounds |
| return args |
| } |
| |
| // SetDockTileArgs represents the arguments for SetDockTile in the Browser domain. |
| type SetDockTileArgs struct { |
| BadgeLabel *string `json:"badgeLabel,omitempty"` // No description. |
| Image *string `json:"image,omitempty"` // Png encoded image. |
| } |
| |
| // NewSetDockTileArgs initializes SetDockTileArgs with the required arguments. |
| func NewSetDockTileArgs() *SetDockTileArgs { |
| args := new(SetDockTileArgs) |
| |
| return args |
| } |
| |
| // SetBadgeLabel sets the BadgeLabel optional argument. |
| func (a *SetDockTileArgs) SetBadgeLabel(badgeLabel string) *SetDockTileArgs { |
| a.BadgeLabel = &badgeLabel |
| return a |
| } |
| |
| // SetImage sets the Image optional argument. Png encoded image. |
| func (a *SetDockTileArgs) SetImage(image string) *SetDockTileArgs { |
| a.Image = &image |
| return a |
| } |