safe_browsing_private.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // This file was generated by:
  5. // tools/json_schema_compiler/compiler.py.
  6. // NOTE: The format of types has changed. 'FooType' is now
  7. // 'chrome.safeBrowsingPrivate.FooType'.
  8. // Please run the closure compiler before committing changes.
  9. // See https://chromium.googlesource.com/chromium/src/+/main/docs/closure_compilation.md
  10. /** @fileoverview Externs generated from namespace: safeBrowsingPrivate */
  11. /** @const */
  12. chrome.safeBrowsingPrivate = {};
  13. /**
  14. * @enum {string}
  15. */
  16. chrome.safeBrowsingPrivate.URLType = {
  17. EVENT_URL: 'EVENT_URL',
  18. LANDING_PAGE: 'LANDING_PAGE',
  19. LANDING_REFERRER: 'LANDING_REFERRER',
  20. CLIENT_REDIRECT: 'CLIENT_REDIRECT',
  21. RECENT_NAVIGATION: 'RECENT_NAVIGATION',
  22. REFERRER: 'REFERRER',
  23. };
  24. /**
  25. * @enum {string}
  26. */
  27. chrome.safeBrowsingPrivate.NavigationInitiation = {
  28. BROWSER_INITIATED: 'BROWSER_INITIATED',
  29. RENDERER_INITIATED_WITHOUT_USER_GESTURE: 'RENDERER_INITIATED_WITHOUT_USER_GESTURE',
  30. RENDERER_INITIATED_WITH_USER_GESTURE: 'RENDERER_INITIATED_WITH_USER_GESTURE',
  31. };
  32. /**
  33. * @typedef {{
  34. * url: string,
  35. * userName: string,
  36. * isPhishingUrl: boolean
  37. * }}
  38. */
  39. chrome.safeBrowsingPrivate.PolicySpecifiedPasswordReuse;
  40. /**
  41. * @typedef {{
  42. * url: string,
  43. * fileName: string,
  44. * downloadDigestSha256: string,
  45. * userName: string
  46. * }}
  47. */
  48. chrome.safeBrowsingPrivate.DangerousDownloadInfo;
  49. /**
  50. * @typedef {{
  51. * url: string,
  52. * reason: string,
  53. * netErrorCode: (string|undefined),
  54. * userName: string
  55. * }}
  56. */
  57. chrome.safeBrowsingPrivate.InterstitialInfo;
  58. /**
  59. * @typedef {{
  60. * url: (string|undefined)
  61. * }}
  62. */
  63. chrome.safeBrowsingPrivate.ServerRedirect;
  64. /**
  65. * @typedef {{
  66. * url: string,
  67. * mainFrameUrl: (string|undefined),
  68. * urlType: !chrome.safeBrowsingPrivate.URLType,
  69. * ipAddresses: (!Array<string>|undefined),
  70. * referrerUrl: (string|undefined),
  71. * referrerMainFrameUrl: (string|undefined),
  72. * isRetargeting: (boolean|undefined),
  73. * navigationTimeMs: (number|undefined),
  74. * serverRedirectChain: (!Array<!chrome.safeBrowsingPrivate.ServerRedirect>|undefined),
  75. * navigationInitiation: (!chrome.safeBrowsingPrivate.NavigationInitiation|undefined),
  76. * maybeLaunchedByExternalApp: (boolean|undefined),
  77. * isSubframeUrlRemoved: (boolean|undefined),
  78. * isSubframeReferrerUrlRemoved: (boolean|undefined),
  79. * isUrlRemovedByPolicy: boolean
  80. * }}
  81. */
  82. chrome.safeBrowsingPrivate.ReferrerChainEntry;
  83. /**
  84. * Gets referrer chain for the specified tab.
  85. * @param {number} tabId Id of the tab from which to retrieve the referrer.
  86. * @param {function(!Array<!chrome.safeBrowsingPrivate.ReferrerChainEntry>): void}
  87. * callback Called with the list of referrer chain entries.
  88. */
  89. chrome.safeBrowsingPrivate.getReferrerChain = function(tabId, callback) {};
  90. /**
  91. * Fired when Chrome detects a reuse of a policy specified password.
  92. * @type {!ChromeEvent}
  93. */
  94. chrome.safeBrowsingPrivate.onPolicySpecifiedPasswordReuseDetected;
  95. /**
  96. * Fired when the user changed their policy specified password.
  97. * @type {!ChromeEvent}
  98. */
  99. chrome.safeBrowsingPrivate.onPolicySpecifiedPasswordChanged;
  100. /**
  101. * Fired when the user opened a dangerous download.
  102. * @type {!ChromeEvent}
  103. */
  104. chrome.safeBrowsingPrivate.onDangerousDownloadOpened;
  105. /**
  106. * Fired when a security interstitial is shown to the user.
  107. * @type {!ChromeEvent}
  108. */
  109. chrome.safeBrowsingPrivate.onSecurityInterstitialShown;
  110. /**
  111. * Fired when the user clicked-through a security interstitial.
  112. * @type {!ChromeEvent}
  113. */
  114. chrome.safeBrowsingPrivate.onSecurityInterstitialProceeded;