events.go 1.4 KB

12345678910111213141516171819202122232425262728
  1. package browser
  2. // Code generated by cdproto-gen. DO NOT EDIT.
  3. import (
  4. "github.com/chromedp/cdproto/cdp"
  5. )
  6. // EventDownloadWillBegin fired when page is about to start a download.
  7. //
  8. // See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadWillBegin
  9. type EventDownloadWillBegin struct {
  10. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that caused the download to begin.
  11. GUID string `json:"guid"` // Global unique identifier of the download.
  12. URL string `json:"url"` // URL of the resource being downloaded.
  13. SuggestedFilename string `json:"suggestedFilename"` // Suggested file name of the resource (the actual name of the file saved on disk may differ).
  14. }
  15. // EventDownloadProgress fired when download makes progress. Last call has
  16. // |done| == true.
  17. //
  18. // See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
  19. type EventDownloadProgress struct {
  20. GUID string `json:"guid"` // Global unique identifier of the download.
  21. TotalBytes float64 `json:"totalBytes"` // Total expected bytes to download.
  22. ReceivedBytes float64 `json:"receivedBytes"` // Total bytes received.
  23. State DownloadProgressState `json:"state"` // Download status.
  24. }