events.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. PipelineID PipelineID `json:"pipelineId"`
  37. InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch.
  38. PrefetchURL string `json:"prefetchUrl"`
  39. Status IngStatus `json:"status"`
  40. PrefetchStatus PrefetchStatus `json:"prefetchStatus"`
  41. RequestID network.RequestID `json:"requestId"`
  42. }
  43. // EventPrerenderStatusUpdated fired when a prerender attempt is updated.
  44. //
  45. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prerenderStatusUpdated
  46. type EventPrerenderStatusUpdated struct {
  47. Key *IngAttemptKey `json:"key"`
  48. PipelineID PipelineID `json:"pipelineId"`
  49. Status IngStatus `json:"status"`
  50. PrerenderStatus PrerenderFinalStatus `json:"prerenderStatus,omitempty,omitzero"`
  51. DisallowedMojoInterface string `json:"disallowedMojoInterface,omitempty,omitzero"` // 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.
  52. MismatchedHeaders []*PrerenderMismatchedHeaders `json:"mismatchedHeaders,omitempty,omitzero"`
  53. }
  54. // EventPreloadingAttemptSourcesUpdated send a list of sources for all
  55. // preloading attempts in a document.
  56. //
  57. // See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadingAttemptSourcesUpdated
  58. type EventPreloadingAttemptSourcesUpdated struct {
  59. LoaderID cdp.LoaderID `json:"loaderId"`
  60. PreloadingAttemptSources []*IngAttemptSource `json:"preloadingAttemptSources"`
  61. }