Move InspectorFrontendHostAPI to externs
This was an interface that was already treated as an extern, but was not
explicitly in the externs.js file.
Bug: 1006759
Change-Id: I95301c059cc1213931498788cff553f955abb646
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829098
Commit-Queue: Tim Van der Lippe <[email protected]>
Reviewed-by: Yang Guo <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#700724}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c6c1bf57acb1c9ed7304674e7d5df51122cb22b1
diff --git a/front_end/externs.js b/front_end/externs.js
index 48017b8..eaaf2a7 100644
--- a/front_end/externs.js
+++ b/front_end/externs.js
@@ -1164,3 +1164,315 @@
* @return {string}
*/
Lighthouse.ReportGenerator.replaceStrings;
+
+/** @interface */
+class InspectorFrontendHostAPI {
+ /**
+ * @param {string=} type
+ */
+ addFileSystem(type) {
+ }
+
+ loadCompleted() {
+ }
+
+ /**
+ * @param {number} requestId
+ * @param {string} fileSystemPath
+ * @param {string} excludedFolders
+ */
+ indexPath(requestId, fileSystemPath, excludedFolders) {
+ }
+
+ /**
+ * Requests inspected page to be placed atop of the inspector frontend with specified bounds.
+ * @param {{x: number, y: number, width: number, height: number}} bounds
+ */
+ setInspectedPageBounds(bounds) {
+ }
+
+ /**
+ * @param {!Array<string>} certChain
+ */
+ showCertificateViewer(certChain) {
+ }
+
+ /**
+ * @param {string} shortcuts
+ */
+ setWhitelistedShortcuts(shortcuts) {
+ }
+
+ /**
+ * @param {boolean} active
+ */
+ setEyeDropperActive(active) {
+ }
+
+ inspectElementCompleted() {
+ }
+
+ /**
+ * @param {string} url
+ */
+ openInNewTab(url) {
+ }
+
+ /**
+ * @param {string} fileSystemPath
+ */
+ showItemInFolder(fileSystemPath) {
+ }
+
+ /**
+ * @param {string} fileSystemPath
+ */
+ removeFileSystem(fileSystemPath) {
+ }
+
+ requestFileSystems() {
+ }
+
+ /**
+ * @param {string} url
+ * @param {string} content
+ * @param {boolean} forceSaveAs
+ */
+ save(url, content, forceSaveAs) {
+ }
+
+ /**
+ * @param {string} url
+ * @param {string} content
+ */
+ append(url, content) {
+ }
+
+ /**
+ * @param {string} url
+ */
+ close(url) {
+ }
+
+ /**
+ * @param {number} requestId
+ * @param {string} fileSystemPath
+ * @param {string} query
+ */
+ searchInPath(requestId, fileSystemPath, query) {
+ }
+
+ /**
+ * @param {number} requestId
+ */
+ stopIndexing(requestId) {
+ }
+
+ bringToFront() {
+ }
+
+ closeWindow() {
+ }
+
+ copyText(text) {
+ }
+
+ /**
+ * @param {string} url
+ */
+ inspectedURLChanged(url) {
+ }
+
+ /**
+ * @param {string} fileSystemId
+ * @param {string} registeredName
+ * @return {?DOMFileSystem}
+ */
+ isolatedFileSystem(fileSystemId, registeredName) {
+ }
+
+ /**
+ * @param {string} url
+ * @param {string} headers
+ * @param {number} streamId
+ * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} callback
+ */
+ loadNetworkResource(url, headers, streamId, callback) {
+ }
+
+ /**
+ * @param {function(!Object<string, string>)} callback
+ */
+ getPreferences(callback) {
+ }
+
+ /**
+ * @param {string} name
+ * @param {string} value
+ */
+ setPreference(name, value) {
+ }
+
+ /**
+ * @param {string} name
+ */
+ removePreference(name) {
+ }
+
+ clearPreferences() {
+ }
+
+ /**
+ * @param {!FileSystem} fileSystem
+ */
+ upgradeDraggedFileSystemPermissions(fileSystem) {
+ }
+
+ /**
+ * @return {string}
+ */
+ platform() {
+ }
+
+ /**
+ * @param {string} actionName
+ * @param {number} actionCode
+ * @param {number} bucketSize
+ */
+ recordEnumeratedHistogram(actionName, actionCode, bucketSize) {
+ }
+
+ /**
+ * @param {string} histogramName
+ * @param {number} duration
+ */
+ recordPerformanceHistogram(histogramName, duration) {
+ }
+
+ /**
+ * @param {string} umaName
+ */
+ recordUserMetricsAction(umaName) {
+ }
+
+ /**
+ * @param {string} message
+ */
+ sendMessageToBackend(message) {
+ }
+
+ /**
+ * @param {!Adb.Config} config
+ */
+ setDevicesDiscoveryConfig(config) {
+ }
+
+ /**
+ * @param {boolean} enabled
+ */
+ setDevicesUpdatesEnabled(enabled) {
+ }
+
+ /**
+ * @param {string} pageId
+ * @param {string} action
+ */
+ performActionOnRemotePage(pageId, action) {
+ }
+
+ /**
+ * @param {string} browserId
+ * @param {string} url
+ */
+ openRemotePage(browserId, url) {
+ }
+
+ openNodeFrontend() {
+ }
+
+ /**
+ * @param {string} origin
+ * @param {string} script
+ */
+ setInjectedScriptForOrigin(origin, script) {
+ }
+
+ /**
+ * @param {boolean} isDocked
+ * @param {function()} callback
+ */
+ setIsDocked(isDocked, callback) {
+ }
+
+ /**
+ * @return {number}
+ */
+ zoomFactor() {
+ }
+
+ zoomIn() {
+ }
+
+ zoomOut() {
+ }
+
+ resetZoom() {
+ }
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ * @param {!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor>} items
+ * @param {!Document} document
+ */
+ showContextMenuAtPoint(x, y, items, document) {
+ }
+
+ /**
+ * @param {function()} callback
+ */
+ reattach(callback) {
+ }
+
+ readyForTest() {
+ }
+
+ connectionReady() {
+ }
+
+ /**
+ * @param {boolean} value
+ */
+ setOpenNewWindowForPopups(value) {
+ }
+
+ /**
+ * @return {boolean}
+ */
+ isHostedMode() {
+ }
+
+ /**
+ * @param {function(!ExtensionDescriptor)} callback
+ */
+ setAddExtensionCallback(callback) {
+ }
+}
+
+/** @typedef
+{{
+ type: string,
+ id: (number|undefined),
+ label: (string|undefined),
+ enabled: (boolean|undefined),
+ checked: (boolean|undefined),
+ subItems: (!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor>|undefined)
+}} */
+InspectorFrontendHostAPI.ContextMenuDescriptor;
+
+/** @typedef
+{{
+ statusCode: number,
+ headers: (!Object.<string, string>|undefined)
+}} */
+InspectorFrontendHostAPI.LoadNetworkResourceResult;
\ No newline at end of file