| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 /** @interface */ | 6 /** @interface */ |
| 7 function InspectorFrontendHostAPI() | 7 function InspectorFrontendHostAPI() |
| 8 { | 8 { |
| 9 } | 9 } |
| 10 window.InspectorFrontendHostAPI = InspectorFrontendHostAPI; | 10 window.InspectorFrontendHostAPI = InspectorFrontendHostAPI; |
| 11 /** @typedef | 11 /** @typedef |
| 12 {{ | 12 {{ |
| 13 type: string, | 13 type: string, |
| 14 id: (number|undefined), | 14 id: (number|undefined), |
| 15 label: (string|undefined), | 15 label: (string|undefined), |
| 16 enabled: (boolean|undefined), | 16 enabled: (boolean|undefined), |
| 17 checked: (boolean|undefined), | 17 checked: (boolean|undefined), |
| 18 subItems: (!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor>|undefine
d) | 18 subItems: (!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor>|undefine
d) |
| 19 }} */ | 19 }} */ |
| 20 InspectorFrontendHostAPI.ContextMenuDescriptor; | 20 InspectorFrontendHostAPI.ContextMenuDescriptor; |
| 21 | 21 |
| 22 /** @typedef | 22 /** @typedef |
| 23 {{ | 23 {{ |
| 24 statusCode: number, | 24 statusCode: number, |
| 25 headers: (!Object.<string, string>|undefined) | 25 headers: (!Object.<string, string>|undefined) |
| 26 }} */ | 26 }} */ |
| 27 InspectorFrontendHostAPI.LoadNetworkResourceResult; | 27 InspectorFrontendHostAPI.LoadNetworkResourceResult; |
| 28 | 28 |
| 29 /** @enum {string} */ | 29 /** @enum {symbol} */ |
| 30 InspectorFrontendHostAPI.Events = { | 30 InspectorFrontendHostAPI.Events = { |
| 31 AddExtensions: "addExtensions", | 31 AddExtensions: Symbol("addExtensions"), |
| 32 AppendedToURL: "appendedToURL", | 32 AppendedToURL: Symbol("appendedToURL"), |
| 33 CanceledSaveURL: "canceledSaveURL", | 33 CanceledSaveURL: Symbol("canceledSaveURL"), |
| 34 ContextMenuCleared: "contextMenuCleared", | 34 ContextMenuCleared: Symbol("contextMenuCleared"), |
| 35 ContextMenuItemSelected: "contextMenuItemSelected", | 35 ContextMenuItemSelected: Symbol("contextMenuItemSelected"), |
| 36 DeviceCountUpdated: "deviceCountUpdated", | 36 DeviceCountUpdated: Symbol("deviceCountUpdated"), |
| 37 DevicesDiscoveryConfigChanged: "devicesDiscoveryConfigChanged", | 37 DevicesDiscoveryConfigChanged: Symbol("devicesDiscoveryConfigChanged"), |
| 38 DevicesPortForwardingStatusChanged: "devicesPortForwardingStatusChanged", | 38 DevicesPortForwardingStatusChanged: Symbol("devicesPortForwardingStatusChang
ed"), |
| 39 DevicesUpdated: "devicesUpdated", | 39 DevicesUpdated: Symbol("devicesUpdated"), |
| 40 DispatchMessage: "dispatchMessage", | 40 DispatchMessage: Symbol("dispatchMessage"), |
| 41 DispatchMessageChunk: "dispatchMessageChunk", | 41 DispatchMessageChunk: Symbol("dispatchMessageChunk"), |
| 42 EnterInspectElementMode: "enterInspectElementMode", | 42 EnterInspectElementMode: Symbol("enterInspectElementMode"), |
| 43 EvaluateForTestInFrontend: "evaluateForTestInFrontend", | 43 EvaluateForTestInFrontend: Symbol("evaluateForTestInFrontend"), |
| 44 FileSystemsLoaded: "fileSystemsLoaded", | 44 FileSystemsLoaded: Symbol("fileSystemsLoaded"), |
| 45 FileSystemRemoved: "fileSystemRemoved", | 45 FileSystemRemoved: Symbol("fileSystemRemoved"), |
| 46 FileSystemAdded: "fileSystemAdded", | 46 FileSystemAdded: Symbol("fileSystemAdded"), |
| 47 FileSystemFilesChanged: "fileSystemFilesChanged", | 47 FileSystemFilesChanged: Symbol("fileSystemFilesChanged"), |
| 48 IndexingTotalWorkCalculated: "indexingTotalWorkCalculated", | 48 IndexingTotalWorkCalculated: Symbol("indexingTotalWorkCalculated"), |
| 49 IndexingWorked: "indexingWorked", | 49 IndexingWorked: Symbol("indexingWorked"), |
| 50 IndexingDone: "indexingDone", | 50 IndexingDone: Symbol("indexingDone"), |
| 51 KeyEventUnhandled: "keyEventUnhandled", | 51 KeyEventUnhandled: Symbol("keyEventUnhandled"), |
| 52 ReloadInspectedPage: "reloadInspectedPage", | 52 ReloadInspectedPage: Symbol("reloadInspectedPage"), |
| 53 RevealSourceLine: "revealSourceLine", | 53 RevealSourceLine: Symbol("revealSourceLine"), |
| 54 SavedURL: "savedURL", | 54 SavedURL: Symbol("savedURL"), |
| 55 SearchCompleted: "searchCompleted", | 55 SearchCompleted: Symbol("searchCompleted"), |
| 56 SetInspectedTabId: "setInspectedTabId", | 56 SetInspectedTabId: Symbol("setInspectedTabId"), |
| 57 SetUseSoftMenu: "setUseSoftMenu", | 57 SetUseSoftMenu: Symbol("setUseSoftMenu"), |
| 58 ShowPanel: "showPanel" | 58 ShowPanel: Symbol("showPanel") |
| 59 } | 59 } |
| 60 | 60 |
| 61 InspectorFrontendHostAPI.EventDescriptors = [ | 61 InspectorFrontendHostAPI.EventDescriptors = [ |
| 62 [InspectorFrontendHostAPI.Events.AddExtensions, ["extensions"]], | 62 [InspectorFrontendHostAPI.Events.AddExtensions, "addExtensions", ["extension
s"]], |
| 63 [InspectorFrontendHostAPI.Events.AppendedToURL, ["url"]], | 63 [InspectorFrontendHostAPI.Events.AppendedToURL, "appendedToURL", ["url"]], |
| 64 [InspectorFrontendHostAPI.Events.CanceledSaveURL, ["url"]], | 64 [InspectorFrontendHostAPI.Events.CanceledSaveURL, "canceledSaveURL", ["url"]
], |
| 65 [InspectorFrontendHostAPI.Events.ContextMenuCleared, []], | 65 [InspectorFrontendHostAPI.Events.ContextMenuCleared, "contextMenuCleared", [
]], |
| 66 [InspectorFrontendHostAPI.Events.ContextMenuItemSelected, ["id"]], | 66 [InspectorFrontendHostAPI.Events.ContextMenuItemSelected, "contextMenuItemSe
lected", ["id"]], |
| 67 [InspectorFrontendHostAPI.Events.DeviceCountUpdated, ["count"]], | 67 [InspectorFrontendHostAPI.Events.DeviceCountUpdated, "deviceCountUpdated", [
"count"]], |
| 68 [InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged, ["discoverUs
bDevices", "portForwardingEnabled", "portForwardingConfig"]], | 68 [InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged, "devicesDisc
overyConfigChanged", ["discoverUsbDevices", "portForwardingEnabled", "portForwar
dingConfig"]], |
| 69 [InspectorFrontendHostAPI.Events.DevicesPortForwardingStatusChanged, ["statu
s"]], | 69 [InspectorFrontendHostAPI.Events.DevicesPortForwardingStatusChanged, "device
sPortForwardingStatusChanged", ["status"]], |
| 70 [InspectorFrontendHostAPI.Events.DevicesUpdated, ["devices"]], | 70 [InspectorFrontendHostAPI.Events.DevicesUpdated, "devicesUpdated", ["devices
"]], |
| 71 [InspectorFrontendHostAPI.Events.DispatchMessage, ["messageObject"]], | 71 [InspectorFrontendHostAPI.Events.DispatchMessage, "dispatchMessage", ["messa
geObject"]], |
| 72 [InspectorFrontendHostAPI.Events.DispatchMessageChunk, ["messageChunk", "mes
sageSize"]], | 72 [InspectorFrontendHostAPI.Events.DispatchMessageChunk, "dispatchMessageChunk
", ["messageChunk", "messageSize"]], |
| 73 [InspectorFrontendHostAPI.Events.EnterInspectElementMode, []], | 73 [InspectorFrontendHostAPI.Events.EnterInspectElementMode, "enterInspectEleme
ntMode", []], |
| 74 [InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, ["callId", "scri
pt"]], | 74 [InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, "evaluateForTest
InFrontend", ["callId", "script"]], |
| 75 [InspectorFrontendHostAPI.Events.FileSystemsLoaded, ["fileSystems"]], | 75 [InspectorFrontendHostAPI.Events.FileSystemsLoaded, "fileSystemsLoaded", ["f
ileSystems"]], |
| 76 [InspectorFrontendHostAPI.Events.FileSystemRemoved, ["fileSystemPath"]], | 76 [InspectorFrontendHostAPI.Events.FileSystemRemoved, "fileSystemRemoved", ["f
ileSystemPath"]], |
| 77 [InspectorFrontendHostAPI.Events.FileSystemAdded, ["errorMessage", "fileSyst
em"]], | 77 [InspectorFrontendHostAPI.Events.FileSystemAdded, "fileSystemAdded", ["error
Message", "fileSystem"]], |
| 78 [InspectorFrontendHostAPI.Events.FileSystemFilesChanged, ["paths"]], | 78 [InspectorFrontendHostAPI.Events.FileSystemFilesChanged, "fileSystemFilesCha
nged", ["paths"]], |
| 79 [InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, ["requestId",
"fileSystemPath", "totalWork"]], | 79 [InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, "indexingTotal
WorkCalculated", ["requestId", "fileSystemPath", "totalWork"]], |
| 80 [InspectorFrontendHostAPI.Events.IndexingWorked, ["requestId", "fileSystemPa
th", "worked"]], | 80 [InspectorFrontendHostAPI.Events.IndexingWorked, "indexingWorked", ["request
Id", "fileSystemPath", "worked"]], |
| 81 [InspectorFrontendHostAPI.Events.IndexingDone, ["requestId", "fileSystemPath
"]], | 81 [InspectorFrontendHostAPI.Events.IndexingDone, "indexingDone", ["requestId",
"fileSystemPath"]], |
| 82 [InspectorFrontendHostAPI.Events.KeyEventUnhandled, ["event"]], | 82 [InspectorFrontendHostAPI.Events.KeyEventUnhandled, "keyEventUnhandled", ["e
vent"]], |
| 83 [InspectorFrontendHostAPI.Events.ReloadInspectedPage, ["hard"]], | 83 [InspectorFrontendHostAPI.Events.ReloadInspectedPage, "reloadInspectedPage",
["hard"]], |
| 84 [InspectorFrontendHostAPI.Events.RevealSourceLine, ["url", "lineNumber", "co
lumnNumber"]], | 84 [InspectorFrontendHostAPI.Events.RevealSourceLine, "revealSourceLine", ["url
", "lineNumber", "columnNumber"]], |
| 85 [InspectorFrontendHostAPI.Events.SavedURL, ["url"]], | 85 [InspectorFrontendHostAPI.Events.SavedURL, "savedURL", ["url"]], |
| 86 [InspectorFrontendHostAPI.Events.SearchCompleted, ["requestId", "fileSystemP
ath", "files"]], | 86 [InspectorFrontendHostAPI.Events.SearchCompleted, "searchCompleted", ["reque
stId", "fileSystemPath", "files"]], |
| 87 [InspectorFrontendHostAPI.Events.SetInspectedTabId, ["tabId"]], | 87 [InspectorFrontendHostAPI.Events.SetInspectedTabId, "setInspectedTabId", ["t
abId"]], |
| 88 [InspectorFrontendHostAPI.Events.SetUseSoftMenu, ["useSoftMenu"]], | 88 [InspectorFrontendHostAPI.Events.SetUseSoftMenu, "setUseSoftMenu", ["useSoft
Menu"]], |
| 89 [InspectorFrontendHostAPI.Events.ShowPanel, ["panelName"]] | 89 [InspectorFrontendHostAPI.Events.ShowPanel, "showPanel", ["panelName"]] |
| 90 ]; | 90 ]; |
| 91 | 91 |
| 92 InspectorFrontendHostAPI.prototype = { | 92 InspectorFrontendHostAPI.prototype = { |
| 93 /** | 93 /** |
| 94 * @param {string=} fileSystemPath | 94 * @param {string=} fileSystemPath |
| 95 */ | 95 */ |
| 96 addFileSystem: function(fileSystemPath) { }, | 96 addFileSystem: function(fileSystemPath) { }, |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * @param {string} url | 99 * @param {string} url |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 */ | 289 */ |
| 290 isUnderTest: function() { }, | 290 isUnderTest: function() { }, |
| 291 | 291 |
| 292 readyForTest: function() { }, | 292 readyForTest: function() { }, |
| 293 | 293 |
| 294 /** | 294 /** |
| 295 * @return {boolean} | 295 * @return {boolean} |
| 296 */ | 296 */ |
| 297 isHostedMode: function() { } | 297 isHostedMode: function() { } |
| 298 } | 298 } |
| OLD | NEW |