feedback_private.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. // Copyright 2022 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.feedbackPrivate.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: feedbackPrivate */
  11. /** @const */
  12. chrome.feedbackPrivate = {};
  13. /**
  14. * @typedef {{
  15. * name: string,
  16. * data: (Blob|undefined)
  17. * }}
  18. */
  19. chrome.feedbackPrivate.AttachedFile;
  20. /**
  21. * @typedef {{
  22. * key: string,
  23. * value: string
  24. * }}
  25. */
  26. chrome.feedbackPrivate.SystemInformation;
  27. /**
  28. * @enum {string}
  29. */
  30. chrome.feedbackPrivate.FeedbackFlow = {
  31. REGULAR: 'regular',
  32. LOGIN: 'login',
  33. SAD_TAB_CRASH: 'sadTabCrash',
  34. GOOGLE_INTERNAL: 'googleInternal',
  35. };
  36. /**
  37. * @typedef {{
  38. * attachedFile: (!chrome.feedbackPrivate.AttachedFile|undefined),
  39. * categoryTag: (string|undefined),
  40. * description: string,
  41. * descriptionPlaceholder: (string|undefined),
  42. * email: (string|undefined),
  43. * pageUrl: (string|undefined),
  44. * productId: (number|undefined),
  45. * screenshot: (Blob|undefined),
  46. * traceId: (number|undefined),
  47. * systemInformation: (!Array<!chrome.feedbackPrivate.SystemInformation>|undefined),
  48. * sendHistograms: (boolean|undefined),
  49. * flow: (!chrome.feedbackPrivate.FeedbackFlow|undefined),
  50. * attachedFileBlobUuid: (string|undefined),
  51. * screenshotBlobUuid: (string|undefined),
  52. * useSystemWindowFrame: (boolean|undefined),
  53. * sendBluetoothLogs: (boolean|undefined),
  54. * sendTabTitles: (boolean|undefined),
  55. * assistantDebugInfoAllowed: (boolean|undefined),
  56. * fromAssistant: (boolean|undefined),
  57. * includeBluetoothLogs: (boolean|undefined),
  58. * showQuestionnaire: (boolean|undefined)
  59. * }}
  60. */
  61. chrome.feedbackPrivate.FeedbackInfo;
  62. /**
  63. * @enum {string}
  64. */
  65. chrome.feedbackPrivate.Status = {
  66. SUCCESS: 'success',
  67. DELAYED: 'delayed',
  68. };
  69. /**
  70. * @enum {string}
  71. */
  72. chrome.feedbackPrivate.LandingPageType = {
  73. NORMAL: 'normal',
  74. TECHSTOP: 'techstop',
  75. NO_LANDING_PAGE: 'noLandingPage',
  76. };
  77. /**
  78. * @enum {string}
  79. */
  80. chrome.feedbackPrivate.LogSource = {
  81. MESSAGES: 'messages',
  82. UI_LATEST: 'uiLatest',
  83. DRM_MODETEST: 'drmModetest',
  84. LSUSB: 'lsusb',
  85. ATRUS_LOG: 'atrusLog',
  86. NET_LOG: 'netLog',
  87. EVENT_LOG: 'eventLog',
  88. UPDATE_ENGINE_LOG: 'updateEngineLog',
  89. POWERD_LATEST: 'powerdLatest',
  90. POWERD_PREVIOUS: 'powerdPrevious',
  91. LSPCI: 'lspci',
  92. IFCONFIG: 'ifconfig',
  93. UPTIME: 'uptime',
  94. };
  95. /**
  96. * @typedef {{
  97. * source: !chrome.feedbackPrivate.LogSource,
  98. * incremental: boolean,
  99. * readerId: (number|undefined)
  100. * }}
  101. */
  102. chrome.feedbackPrivate.ReadLogSourceParams;
  103. /**
  104. * @typedef {{
  105. * readerId: number,
  106. * logLines: !Array<string>
  107. * }}
  108. */
  109. chrome.feedbackPrivate.ReadLogSourceResult;
  110. /**
  111. * Returns the email of the currently active or logged in user.
  112. * @param {function(string): void} callback
  113. */
  114. chrome.feedbackPrivate.getUserEmail = function(callback) {};
  115. /**
  116. * Returns the system information dictionary.
  117. * @param {function(!Array<!chrome.feedbackPrivate.SystemInformation>): void}
  118. * callback
  119. */
  120. chrome.feedbackPrivate.getSystemInformation = function(callback) {};
  121. /**
  122. * Sends a feedback report.
  123. * @param {!chrome.feedbackPrivate.FeedbackInfo} feedback
  124. * @param {?boolean|undefined} loadSystemInfo Optional flag when present and is
  125. * true, the backend should load system information before sending the
  126. * report. This is added to reduce user's wait time when sending reports
  127. * because loading system information is slow.
  128. * @param {?number|undefined} formOpenTime The epoch time when the feedback form
  129. * was opened. This is used for metrics.
  130. * @param {function(!chrome.feedbackPrivate.Status, !chrome.feedbackPrivate.LandingPageType): void}
  131. * callback
  132. */
  133. chrome.feedbackPrivate.sendFeedback = function(feedback, loadSystemInfo, formOpenTime, callback) {};
  134. /**
  135. * Reads from a log source indicated by <code>source</code>. <p>If
  136. * <code>incremental</code> is false: <ul> <li>Returns the entire contents of
  137. * the log file.</li> <li>Returns <code>readerId</code> value of 0 to
  138. * callback.</li> </ul> If <code>incremental</code> is true, and no
  139. * <code>readerId</code> is provided: <ul> <li>Returns the entire contents of
  140. * the log file.</li> <li>Starts tracking the file read handle, which is
  141. * returned as a nonzero <code>readerId</code> value in the callback.
  142. * </li> <li>If can't create a new file handle, returns <code>readerId</code>
  143. * value of 0 in the callback. </li> </ul> If <code>incremental</code> is
  144. * true, and a valid non-zero <code>readerId</code> is provided: <ul>
  145. * <li>Returns new lines written to the file since the last time this
  146. * function was called for the same file and <code>readerId</code>. </li>
  147. * <li>Returns the same <code>readerId</code> value to the callback.</li> </ul>
  148. * @param {!chrome.feedbackPrivate.ReadLogSourceParams} params
  149. * @param {function(!chrome.feedbackPrivate.ReadLogSourceResult): void} callback
  150. */
  151. chrome.feedbackPrivate.readLogSource = function(params, callback) {};
  152. /**
  153. * Fired when the a user requests the launch of the feedback UI. We're using an
  154. * event for this versus using the override API since we want to be invoked, but
  155. * not showing a UI, so the feedback extension can take a screenshot of the
  156. * user's desktop.
  157. * @type {!ChromeEvent}
  158. */
  159. chrome.feedbackPrivate.onFeedbackRequested;