events.go 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package preload
  2. // Code generated by cdproto-gen. DO NOT EDIT.
  3. import (
  4. "github.com/chromedp/cdproto/cdp"
  5. "github.com/chromedp/cdproto/network"
  6. )
  7. // EventRuleSetUpdated upsert. Currently, it is only emitted when a rule set
  8. // added.
  9. //
  10. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-ruleSetUpdated
  11. type EventRuleSetUpdated struct {
  12. RuleSet *RuleSet `json:"ruleSet"`
  13. }
  14. // EventRuleSetRemoved [no description].
  15. //
  16. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-ruleSetRemoved
  17. type EventRuleSetRemoved struct {
  18. ID RuleSetID `json:"id"`
  19. }
  20. // EventPreloadEnabledStateUpdated fired when a preload enabled state is
  21. // updated.
  22. //
  23. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadEnabledStateUpdated
  24. type EventPreloadEnabledStateUpdated struct {
  25. DisabledByPreference bool `json:"disabledByPreference"`
  26. DisabledByDataSaver bool `json:"disabledByDataSaver"`
  27. DisabledByBatterySaver bool `json:"disabledByBatterySaver"`
  28. DisabledByHoldbackPrefetchSpeculationRules bool `json:"disabledByHoldbackPrefetchSpeculationRules"`
  29. DisabledByHoldbackPrerenderSpeculationRules bool `json:"disabledByHoldbackPrerenderSpeculationRules"`
  30. }
  31. // EventPrefetchStatusUpdated fired when a prefetch attempt is updated.
  32. //
  33. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prefetchStatusUpdated
  34. type EventPrefetchStatusUpdated struct {
  35. Key *IngAttemptKey `json:"key"`
  36. InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch.
  37. PrefetchURL string `json:"prefetchUrl"`
  38. Status IngStatus `json:"status"`
  39. PrefetchStatus PrefetchStatus `json:"prefetchStatus"`
  40. RequestID network.RequestID `json:"requestId"`
  41. }
  42. // EventPrerenderStatusUpdated fired when a prerender attempt is updated.
  43. //
  44. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prerenderStatusUpdated
  45. type EventPrerenderStatusUpdated struct {
  46. Key *IngAttemptKey `json:"key"`
  47. Status IngStatus `json:"status"`
  48. PrerenderStatus PrerenderFinalStatus `json:"prerenderStatus,omitempty"`
  49. DisallowedMojoInterface string `json:"disallowedMojoInterface,omitempty"` // This is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt.
  50. MismatchedHeaders []*PrerenderMismatchedHeaders `json:"mismatchedHeaders,omitempty"`
  51. }
  52. // EventPreloadingAttemptSourcesUpdated send a list of sources for all
  53. // preloading attempts in a document.
  54. //
  55. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadingAttemptSourcesUpdated
  56. type EventPreloadingAttemptSourcesUpdated struct {
  57. LoaderID cdp.LoaderID `json:"loaderId"`
  58. PreloadingAttemptSources []*IngAttemptSource `json:"preloadingAttemptSources"`
  59. }