summaryrefslogtreecommitdiff
path: root/deps/v8_inspector
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2016-06-14 07:47:54 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-07-05 22:10:22 +0200
commitcbe57479c496049726001581abc5f296b94a6e9f (patch)
tree585715af48c817328ac4022727abb8157318553f /deps/v8_inspector
parentfb39025e316adcca88b7905383b22202a356540b (diff)
downloadnode-new-cbe57479c496049726001581abc5f296b94a6e9f.tar.gz
deps: switch to upstream v8_inspector
This change picks up v8_inspector directly from the upstream chromium repository [1]; dropping the intermediate repository. The upstream code has been refactored substantially to make it easy to share code without adaptation with Node.js. The deps/v8_inspector directory is now simply a gathering of dependencies: * platform/v8_inspector: vendored from [2]. * platform/inspector_protocol: vendored from [3]. * deps/jinja2: vendored from [4]. * deps/markupsafe: vendored from [5]. [1]: https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform [2]: https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/v8_inspector [3]: https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/inspector_protocol [4]: https://github.com/mitsuhiko/jinja2 [5]: https://github.com/mitsuhiko/markupsafe PR-URL: https://github.com/nodejs/node/pull/7302 Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8_inspector')
-rw-r--r--deps/v8_inspector/README.md12
-rw-r--r--deps/v8_inspector/devtools/Inspector-1.1.json3924
-rw-r--r--deps/v8_inspector/devtools/protocol.json5167
-rw-r--r--deps/v8_inspector/platform/PlatformExport.h66
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Array.h4
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/BackendCallback.h23
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Backend_cpp.template0
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Backend_h.template78
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py177
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Collections.h9
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/CollectionsSTL.h11
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/CollectionsWTF.h14
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/DispatcherBase.cpp173
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/DispatcherBase.h97
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Dispatcher_cpp.template365
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Dispatcher_h.template65
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/ErrorSupport.cpp1
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/ErrorSupport.h6
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/FrontendChannel.h35
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Frontend_cpp.template53
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Frontend_h.template57
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Maybe.h6
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Object.cpp35
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Object.h30
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Parser.cpp1
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Parser.h3
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Platform.h14
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/PlatformSTL.h281
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/PlatformWTF.h14
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/String16STL.cpp16
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/String16STL.h15
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/String16WTF.h4
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/TypeBuilder_cpp.template234
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template169
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/ValueConversions.h11
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Values.cpp3
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/Values.h5
-rwxr-xr-xdeps/v8_inspector/platform/inspector_protocol/generate-inspector-protocol-version115
-rw-r--r--deps/v8_inspector/platform/inspector_protocol/protocol.gyp89
-rw-r--r--deps/v8_inspector/platform/v8_inspector/Atomics.h6
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InjectedScript.cpp36
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InjectedScript.h10
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.cpp1
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.h2
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InjectedScriptSource.js221
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InspectorWrapper.cpp70
-rw-r--r--deps/v8_inspector/platform/v8_inspector/InspectorWrapper.h88
-rw-r--r--deps/v8_inspector/platform/v8_inspector/JavaScriptCallFrame.h3
-rw-r--r--deps/v8_inspector/platform/v8_inspector/OWNERS6
-rw-r--r--deps/v8_inspector/platform/v8_inspector/RemoteObjectId.cpp2
-rw-r--r--deps/v8_inspector/platform/v8_inspector/RemoteObjectId.h4
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8Compat.h4
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8Console.cpp161
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8Console.h22
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.cpp39
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.h19
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.cpp23
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.h9
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8FunctionCall.cpp2
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp38
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.h17
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.cpp69
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.h4
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.cpp115
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.h29
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.cpp20
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.h15
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8Regex.cpp1
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.cpp34
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.h19
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.cpp33
-rw-r--r--deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.h8
-rw-r--r--deps/v8_inspector/platform/v8_inspector/injected_script_externs.js22
-rw-r--r--deps/v8_inspector/platform/v8_inspector/js_protocol-1.1.json1866
-rw-r--r--deps/v8_inspector/platform/v8_inspector/js_protocol.json976
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8ContentSearchUtil.h3
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8Debugger.h24
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8DebuggerAgent.h24
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8DebuggerClient.h9
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8EventListenerInfo.h36
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8HeapProfilerAgent.h23
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8Inspector.cpp58
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8Inspector.h14
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8InspectorSession.h16
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8InspectorSessionClient.h7
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8ProfilerAgent.h22
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8RuntimeAgent.h23
-rw-r--r--deps/v8_inspector/platform/v8_inspector/public/V8StackTrace.h7
-rw-r--r--deps/v8_inspector/platform/v8_inspector/v8_inspector.gyp189
-rw-r--r--deps/v8_inspector/v8_inspector.gyp35
-rw-r--r--deps/v8_inspector/v8_inspector.gypi94
91 files changed, 4703 insertions, 11257 deletions
diff --git a/deps/v8_inspector/README.md b/deps/v8_inspector/README.md
index 9892f5fc81..e3e5e14cab 100644
--- a/deps/v8_inspector/README.md
+++ b/deps/v8_inspector/README.md
@@ -1,2 +1,10 @@
-# v8_inspector
-# v8_inspector
+V8 Inspector support for Node.js
+================================
+
+This directory is a gathering of dependencies for Node.js support for the
+[Chrome Debug Protocol][https://developer.chrome.com/devtools/docs/debugger-protocol].
+
+* platform/v8_inspector: vendored from https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/v8_inspector
+* platform/inspector_protocol: vendored from https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/inspector_protocol
+* deps/jinja2: vendored from https://github.com/mitsuhiko/jinja2
+* deps/markupsafe: vendored from https://github.com/mitsuhiko/markupsafe
diff --git a/deps/v8_inspector/devtools/Inspector-1.1.json b/deps/v8_inspector/devtools/Inspector-1.1.json
deleted file mode 100644
index 55afa73e9d..0000000000
--- a/deps/v8_inspector/devtools/Inspector-1.1.json
+++ /dev/null
@@ -1,3924 +0,0 @@
-{
- "version": { "major": "1", "minor": "1" },
- "domains": [{
- "domain": "Inspector",
- "hidden": true,
- "types": [],
- "commands": [
- {
- "name": "enable",
- "description": "Enables inspector domain notifications."
- },
- {
- "name": "disable",
- "description": "Disables inspector domain notifications."
- },
- {
- "name": "reset",
- "description": "Resets all domains."
- }
- ],
- "events": [
- {
- "name": "evaluateForTestInFrontend",
- "parameters": [
- { "name": "testCallId", "type": "integer" },
- { "name": "script", "type": "string" }
- ]
- },
- {
- "name": "inspect",
- "parameters": [
- { "name": "object", "$ref": "Runtime.RemoteObject" },
- { "name": "hints", "type": "object" }
- ]
- },
- {
- "name": "detached",
- "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.",
- "parameters": [
- { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." }
- ]
- },
- {
- "name": "targetCrashed",
- "description": "Fired when debugging target has crashed"
- }
- ]
- },
- {
- "domain": "Memory",
- "hidden": true,
- "types": [
- {
- "id": "MemoryBlock",
- "type": "object",
- "properties": [
- { "name": "size", "type": "number", "optional": true, "description": "Size of the block in bytes if available" },
- { "name": "name", "type": "string", "description": "Unique name used to identify the component that allocated this block" },
- { "name": "children", "type": "array", "optional": true, "items": { "$ref": "MemoryBlock" }}
- ]
- },
- {
- "id": "HeapSnapshotChunk",
- "type": "object",
- "properties": [
- { "name": "strings", "type": "array", "items": { "type": "string" }, "description": "An array of strings that were found since last update." },
- { "name": "nodes", "type": "array", "items": { "type": "integer" }, "description": "An array of nodes that were found since last update." },
- { "name": "edges", "type": "array", "items": { "type": "integer" }, "description": "An array of edges that were found since last update." },
- { "name": "baseToRealNodeId", "type": "array", "items": { "type": "integer" }, "description": "An array of integers for nodeId remapping. Even nodeId has to be mapped to the following odd nodeId." }
- ]
- }
- ],
- "commands": [
- {
- "name": "getDOMCounters",
- "returns": [
- { "name": "documents", "type": "integer" },
- { "name": "nodes", "type": "integer" },
- { "name": "jsEventListeners", "type": "integer" }
- ]
- }
- ],
- "events": [
- {
- "name": "addNativeSnapshotChunk",
- "parameters": [
- { "name": "chunk", "$ref": "HeapSnapshotChunk", "description": "A chunk of the serialized the snapshot." }
- ]
- }
- ]
- },
- {
- "domain": "Page",
- "description": "Actions and events related to the inspected page belong to the page domain.",
- "types": [
- {
- "id": "ResourceType",
- "type": "string",
- "enum": ["Document", "Stylesheet", "Image", "Font", "Script", "XHR", "WebSocket", "Other"],
- "description": "Resource type as it was perceived by the rendering engine."
- },
- {
- "id": "FrameId",
- "type": "string",
- "description": "Unique frame identifier."
- },
- {
- "id": "Frame",
- "type": "object",
- "description": "Information about the Frame on the page.",
- "properties": [
- { "name": "id", "type": "string", "description": "Frame unique identifier." },
- { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." },
- { "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." },
- { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." },
- { "name": "url", "type": "string", "description": "Frame document's URL." },
- { "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." },
- { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." }
- ]
- },
- {
- "id": "FrameResourceTree",
- "type": "object",
- "description": "Information about the Frame hierarchy along with their cached resources.",
- "properties": [
- { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." },
- { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." },
- { "name": "resources", "type": "array",
- "items": {
- "type": "object",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource URL." },
- { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." },
- { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
- { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." },
- { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." }
- ]
- },
- "description": "Information about frame resources."
- }
- ],
- "hidden": true
- },
- {
- "id": "SearchMatch",
- "type": "object",
- "description": "Search match for resource.",
- "properties": [
- { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
- { "name": "lineContent", "type": "string", "description": "Line with match content." }
- ],
- "hidden": true
- },
- {
- "id": "SearchResult",
- "type": "object",
- "description": "Search result for resource.",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource URL." },
- { "name": "frameId", "$ref": "FrameId", "description": "Resource frame id." },
- { "name": "matchesCount", "type": "number", "description": "Number of matches in the resource content." }
- ],
- "hidden": true
- },
- {
- "id": "Cookie",
- "type": "object",
- "description": "Cookie object",
- "properties": [
- { "name": "name", "type": "string", "description": "Cookie name." },
- { "name": "value", "type": "string", "description": "Cookie value." },
- { "name": "domain", "type": "string", "description": "Cookie domain." },
- { "name": "path", "type": "string", "description": "Cookie path." },
- { "name": "expires", "type": "number", "description": "Cookie expires." },
- { "name": "size", "type": "integer", "description": "Cookie size." },
- { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." },
- { "name": "secure", "type": "boolean", "description": "True if cookie is secure." },
- { "name": "session", "type": "boolean", "description": "True in case of session cookie." }
- ],
- "hidden": true
- },
- {
- "id": "ScriptIdentifier",
- "type": "string",
- "description": "Unique script identifier.",
- "hidden": true
- },
- {
- "id": "NavigationEntry",
- "type": "object",
- "description": "Navigation history entry.",
- "properties": [
- { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." },
- { "name": "url", "type": "string", "description": "URL of the navigation history entry." },
- { "name": "title", "type": "string", "description": "Title of the navigation history entry." }
- ],
- "hidden": true
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables page domain notifications."
- },
- {
- "name": "disable",
- "description": "Disables page domain notifications."
- },
- {
- "name": "addScriptToEvaluateOnLoad",
- "parameters": [
- { "name": "scriptSource", "type": "string" }
- ],
- "returns": [
- { "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." }
- ],
- "hidden": true
- },
- {
- "name": "removeScriptToEvaluateOnLoad",
- "parameters": [
- { "name": "identifier", "$ref": "ScriptIdentifier" }
- ],
- "hidden": true
- },
- {
- "name": "reload",
- "parameters": [
- { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." },
- { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." },
- { "name": "scriptPreprocessor", "type": "string", "optional": true, "description": "Script body that should evaluate to function that will preprocess all the scripts before their compilation.", "hidden": true }
- ],
- "description": "Reloads given page optionally ignoring the cache."
- },
- {
- "name": "navigate",
- "parameters": [
- { "name": "url", "type": "string", "description": "URL to navigate the page to." }
- ],
- "description": "Navigates current page to the given URL."
- },
- {
- "name": "getNavigationHistory",
- "parameters": [],
- "returns": [
- { "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." },
- { "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry"}, "description": "Array of navigation history entries." }
- ],
- "description": "Returns navigation history for the current page.",
- "hidden": true
- },
- {
- "name": "navigateToHistoryEntry",
- "parameters": [
- { "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." }
- ],
- "description": "Navigates current page to the given history entry.",
- "hidden": true
- },
- {
- "name": "getCookies",
- "returns": [
- { "name": "cookies", "type": "array", "items": { "$ref": "Cookie"}, "description": "Array of cookie objects." },
- { "name": "cookiesString", "type": "string", "description": "document.cookie string representation of the cookies." }
- ],
- "description": "Returns all browser cookies. Depending on the backend support, will either return detailed cookie information in the <code>cookie</code> field or string cookie representation using <code>cookieString</code>.",
- "hidden": true
- },
- {
- "name": "deleteCookie",
- "parameters": [
- { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
- { "name": "url", "type": "string", "description": "URL to match cooke domain and path." }
- ],
- "description": "Deletes browser cookie with given name, domain and path.",
- "hidden": true
- },
- {
- "name": "getResourceTree",
- "description": "Returns present frame / resource tree structure.",
- "returns": [
- { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." }
- ],
- "hidden": true
- },
- {
- "name": "getResourceContent",
- "description": "Returns content of the given resource.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." },
- { "name": "url", "type": "string", "description": "URL of the resource to get content for." }
- ],
- "returns": [
- { "name": "content", "type": "string", "description": "Resource content." },
- { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." }
- ],
- "hidden": true
- },
- {
- "name": "searchInResource",
- "description": "Searches for given string in resource content.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Frame id for resource to search in." },
- { "name": "url", "type": "string", "description": "URL of the resource to search in." },
- { "name": "query", "type": "string", "description": "String to search for." },
- { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
- { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." }
- ],
- "hidden": true
- },
- {
- "name": "searchInResources",
- "description": "Searches for given string in frame / resource tree structure.",
- "parameters": [
- { "name": "text", "type": "string", "description": "String to search for." },
- { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
- { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "SearchResult" }, "description": "List of search results." }
- ],
- "hidden": true
- },
- {
- "name": "setDocumentContent",
- "description": "Sets given markup as the document's HTML.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." },
- { "name": "html", "type": "string", "description": "HTML content to set." }
- ],
- "hidden": true
- },
- {
- "name": "setDeviceMetricsOverride",
- "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results) and the font scale factor.",
- "parameters": [
- { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
- { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
- { "name": "fontScaleFactor", "type": "number", "description": "Overriding font scale factor value (must be positive). 1 disables the override." },
- { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }
- ],
- "hidden": true
- },
- {
- "name": "setShowPaintRects",
- "description": "Requests that backend shows paint rectangles",
- "parameters": [
- { "name": "result", "type": "boolean", "description": "True for showing paint rectangles" }
- ],
- "hidden": true
- },
- {
- "name": "setShowDebugBorders",
- "description": "Requests that backend shows debug borders on layers",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "True for showing debug borders" }
- ],
- "hidden": true
- },
- {
- "name": "setShowFPSCounter",
- "description": "Requests that backend shows the FPS counter",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "True for showing the FPS counter" }
- ],
- "hidden": true
- },
- {
- "name": "setContinuousPaintingEnabled",
- "description": "Requests that backend enables continuous painting",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "True for enabling cointinuous painting" }
- ],
- "hidden": true
- },
- {
- "name": "setShowScrollBottleneckRects",
- "description": "Requests that backend shows scroll bottleneck rects",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" }
- ],
- "hidden": true
- },
- {
- "name": "getScriptExecutionStatus",
- "description": "Determines if scripts can be executed in the page.",
- "returns": [
- { "name": "result", "type": "string", "enum": ["allowed", "disabled", "forbidden"], "description": "Script execution status: \"allowed\" if scripts can be executed, \"disabled\" if script execution has been disabled through page settings, \"forbidden\" if script execution for the given page is not possible for other reasons." }
- ],
- "hidden": true
- },
- {
- "name": "setScriptExecutionDisabled",
- "description": "Switches script execution in the page.",
- "parameters": [
- { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." }
- ],
- "hidden": true
- },
- {
- "name": "setGeolocationOverride",
- "description": "Overrides the Geolocation Position or Error.",
- "parameters": [
- { "name": "latitude", "type": "number", "optional": true, "description": "Mock longitude"},
- { "name": "longitude", "type": "number", "optional": true, "description": "Mock latitude"},
- { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
- ]
- },
- {
- "name": "clearGeolocationOverride",
- "description": "Clears the overriden Geolocation Position and Error."
- },
- {
- "name": "setDeviceOrientationOverride",
- "description": "Overrides the Device Orientation.",
- "parameters": [
- { "name": "alpha", "type": "number", "description": "Mock alpha"},
- { "name": "beta", "type": "number", "description": "Mock beta"},
- { "name": "gamma", "type": "number", "description": "Mock gamma"}
- ],
- "hidden": true
- },
- {
- "name": "clearDeviceOrientationOverride",
- "description": "Clears the overridden Device Orientation.",
- "hidden": true
- },
- {
- "name": "setTouchEmulationEnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }
- ],
- "description": "Toggles mouse event-based touch event emulation.",
- "hidden": true
- },
- {
- "name": "setEmulatedMedia",
- "parameters": [
- { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
- ],
- "description": "Emulates the given media for CSS media queries.",
- "hidden": true
- },
- {
- "name": "captureScreenshot",
- "description": "Capture page screenshot.",
- "parameters": [
- { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." },
- { "name": "quality", "type": "integer", "hidden": true, "optional": true, "description": "Compression quality from range [0..100]." },
- { "name": "maxWidth", "type": "integer", "hidden": true, "optional": true, "description": "Maximum screenshot width." },
- { "name": "maxHeight", "type": "integer", "hidden": true, "optional": true, "description": "Maximum screenshot height." }
- ],
- "returns": [
- { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." },
- { "name": "deviceScaleFactor", "type": "number", "hidden": true, "description": "Device scale factor." },
- { "name": "pageScaleFactor", "type": "number", "hidden": true, "description": "Page scale factor." },
- { "name": "viewport", "$ref": "DOM.Rect", "hidden": true, "description": "Viewport in CSS pixels." }
- ],
- "hidden": true
- },
- {
- "name": "startScreencast",
- "description": "Starts sending each frame using the <code>screencastFrame</code> event.",
- "parameters": [
- { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." },
- { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." },
- { "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." },
- { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." }
- ],
- "hidden": true
- },
- {
- "name": "stopScreencast",
- "description": "Stops sending each frame in the <code>screencastFrame</code>.",
- "hidden": true
- },
- {
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ],
- "hidden": true
- },
- {
- "name": "setShowViewportSizeOnResize",
- "description": "Paints viewport size upon main frame resize.",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "Whether to paint size or not." },
- { "name": "showGrid", "type": "boolean", "optional": true, "description": "Whether to paint grid as well." }
- ],
- "hidden": true
- },
- {
- "name": "setForceCompositingMode",
- "description": "Force accelerated compositing mode for inspected page.",
- "parameters": [
- { "name": "force", "type": "boolean", "description": "Whether to force accelerated compositing or not." }
- ],
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "domContentEventFired",
- "parameters": [
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "loadEventFired",
- "parameters": [
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "frameAttached",
- "description": "Fired when frame has been attached to its parent.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." }
- ]
- },
- {
- "name": "frameNavigated",
- "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.",
- "parameters": [
- { "name": "frame", "$ref": "Frame", "description": "Frame object." }
- ]
- },
- {
- "name": "frameDetached",
- "description": "Fired when frame has been detached from its parent.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been detached." }
- ]
- },
- {
- "name": "frameStartedLoading",
- "description": "Fired when frame has started loading.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." }
- ],
- "hidden": true
- },
- {
- "name": "frameStoppedLoading",
- "description": "Fired when frame has stopped loading.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." }
- ],
- "hidden": true
- },
- {
- "name": "frameScheduledNavigation",
- "description": "Fired when frame schedules a potential navigation.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." },
- { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." }
- ],
- "hidden": true
- },
- {
- "name": "frameClearedScheduledNavigation",
- "description": "Fired when frame no longer has a scheduled navigation.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
- ],
- "hidden": true
- },
- {
- "name": "javascriptDialogOpening",
- "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.",
- "parameters": [
- { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }
- ],
- "hidden": true
- },
- {
- "name": "javascriptDialogClosed",
- "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.",
- "hidden": true
- },
- {
- "name": "scriptsEnabled",
- "description": "Fired when the JavaScript is enabled/disabled on the page",
- "parameters": [
- { "name": "isEnabled", "type": "boolean", "description": "Whether script execution is enabled or disabled on the page." }
- ],
- "hidden": true
- },
- {
- "name": "screencastFrame",
- "description": "Compressed image data requested by the <code>startScreencast</code>.",
- "parameters": [
- { "name": "data", "type": "string", "description": "Base64-encoded compressed image." },
- { "name": "deviceScaleFactor", "type": "number", "hidden": true, "optional": true, "description": "Device scale factor." },
- { "name": "pageScaleFactor", "type": "number", "hidden": true, "optional": true, "description": "Page scale factor." },
- { "name": "viewport", "$ref": "DOM.Rect", "hidden": true, "optional": true, "description": "Viewport in CSS pixels." },
- { "name": "offsetTop", "type": "number", "hidden": true, "optional": true, "description": "Top offset in DIP." },
- { "name": "offsetBottom", "type": "number", "hidden": true, "optional": true, "description": "Bottom offset in DIP." }
- ],
- "hidden": true
- }
- ]
- },
- {
- "domain": "Runtime",
- "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- },
- {
- "id": "RemoteObject",
- "type": "object",
- "description": "Mirror object referencing original JavaScript object.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
- { "name": "value", "type": "any", "optional": true, "description": "Remote object value (in case of primitive values or JSON values if it was requested)." },
- { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
- { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values.", "hidden": true }
- ]
- },
- {
- "id": "ObjectPreview",
- "type": "object",
- "hidden": true,
- "description": "Object containing abbreviated remote object value.",
- "properties": [
- { "name": "lossless", "type": "boolean", "description": "Determines whether preview is lossless (contains all information of the original object)." },
- { "name": "overflow", "type": "boolean", "description": "True iff some of the properties of the original did not fit." },
- { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }
- ]
- },
- {
- "id": "PropertyPreview",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "name", "type": "string", "description": "Property name." },
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." },
- { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
- { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
- ]
- },
- {
- "id": "PropertyDescriptor",
- "type": "object",
- "description": "Object property descriptor.",
- "properties": [
- { "name": "name", "type": "string", "description": "Property name." },
- { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
- { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
- { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
- { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
- { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
- { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
- { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true }
-
- ]
- },
- {
- "id": "InternalPropertyDescriptor",
- "type": "object",
- "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
- "properties": [
- { "name": "name", "type": "string", "description": "Conventional property name." },
- { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }
- ],
- "hidden": true
- },
- {
- "id": "CallArgument",
- "type": "object",
- "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.",
- "properties": [
- { "name": "value", "type": "any", "optional": true, "description": "Primitive value." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }
- ]
- },
- {
- "id": "ExecutionContextId",
- "type": "integer",
- "description": "Id of an execution context."
- },
- {
- "id": "ExecutionContextDescription",
- "type": "object",
- "description": "Description of an isolated world.",
- "properties": [
- { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
- { "name": "isPageContext", "type": "boolean", "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.", "hidden": true },
- { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true},
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Id of the owning frame." }
- ]
- }
-
- ],
- "commands": [
- {
- "name": "evaluate",
- "parameters": [
- { "name": "expression", "type": "string", "description": "Expression to evaluate." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
- { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
- ],
- "description": "Evaluates expression on global object."
- },
- {
- "name": "callFunctionOn",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
- { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
- { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Call result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
- ],
- "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
- },
- {
- "name": "getProperties",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
- { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." },
- { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor"}, "description": "Object properties." },
- { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor"}, "description": "Internal object properties (only of the element itself).", "hidden": true }
- ],
- "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
- },
- {
- "name": "releaseObject",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
- ],
- "description": "Releases remote object with given id."
- },
- {
- "name": "releaseObjectGroup",
- "parameters": [
- { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
- ],
- "description": "Releases all remote objects that belong to a given group."
- },
- {
- "name": "run",
- "hidden": true,
- "description": "Tells inspected instance(worker or page) that it can run in case it was started paused."
- },
- {
- "name": "enable",
- "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context."
- },
- {
- "name": "disable",
- "hidden": true,
- "description": "Disables reporting of execution contexts creation."
- }
- ],
- "events": [
- {
- "name": "executionContextCreated",
- "parameters": [
- { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." }
- ],
- "description": "Issued when new execution context is created."
- }
- ]
- },
- {
- "domain": "Console",
- "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.",
- "types": [
- {
- "id": "Timestamp",
- "type": "number",
- "description": "Number of seconds since epoch.",
- "hidden": true
- },
- {
- "id": "ConsoleMessage",
- "type": "object",
- "description": "Console message.",
- "properties": [
- { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "other", "deprecation"], "description": "Message source." },
- { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug"], "description": "Message severity." },
- { "name": "text", "type": "string", "description": "Message text." },
- { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd"], "description": "Console message type." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
- { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
- { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." },
- { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
- { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
- { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." },
- { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp, when this message was fired.", "hidden": true }
- ]
- },
- {
- "id": "CallFrame",
- "type": "object",
- "description": "Stack entry for console errors and assertions.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "JavaScript function name." },
- { "name": "scriptId", "type": "string", "description": "JavaScript script id." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." },
- { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." }
- ]
- },
- {
- "id": "StackTrace",
- "type": "array",
- "items": { "$ref": "CallFrame" },
- "description": "Call frames for assertions or error messages."
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
- },
- {
- "name": "disable",
- "description": "Disables console domain, prevents further console messages from being reported to the client."
- },
- {
- "name": "clearMessages",
- "description": "Clears console messages collected in the browser."
- },
- {
- "name": "setMonitoringXHREnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
- ],
- "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.",
- "hidden": true
- },
- {
- "name": "addInspectedNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "DOM node id to be accessible by means of $x command line API." }
- ],
- "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).",
- "hidden": true
- },
- {
- "name": "addInspectedHeapObject",
- "parameters": [
- { "name": "heapObjectId", "type": "integer" }
- ],
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "messageAdded",
- "parameters": [
- { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
- ],
- "description": "Issued when new console message is added."
- },
- {
- "name": "messageRepeatCountUpdated",
- "parameters": [
- { "name": "count", "type": "integer", "description": "New repeat count value." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of most recent message in batch.", "hidden": true }
- ],
- "description": "Issued when subsequent message(s) are equal to the previous one(s)."
- },
- {
- "name": "messagesCleared",
- "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation."
- }
- ]
- },
- {
- "domain": "Network",
- "description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.",
- "types": [
- {
- "id": "LoaderId",
- "type": "string",
- "description": "Unique loader identifier."
- },
- {
- "id": "RequestId",
- "type": "string",
- "description": "Unique request identifier."
- },
- {
- "id": "Timestamp",
- "type": "number",
- "description": "Number of seconds since epoch."
- },
- {
- "id": "Headers",
- "type": "object",
- "description": "Request / response headers as keys / values of JSON object."
- },
- {
- "id": "ResourceTiming",
- "type": "object",
- "description": "Timing information for the request.",
- "properties": [
- { "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." },
- { "name": "proxyStart", "type": "number", "description": "Started resolving proxy." },
- { "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." },
- { "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." },
- { "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." },
- { "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." },
- { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." },
- { "name": "sslStart", "type": "number", "description": "Started SSL handshake." },
- { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." },
- { "name": "sendStart", "type": "number", "description": "Started sending request." },
- { "name": "sendEnd", "type": "number", "description": "Finished sending request." },
- { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." }
- ]
- },
- {
- "id": "Request",
- "type": "object",
- "description": "HTTP request data.",
- "properties": [
- { "name": "url", "type": "string", "description": "Request URL." },
- { "name": "method", "type": "string", "description": "HTTP request method." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." },
- { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }
- ]
- },
- {
- "id": "Response",
- "type": "object",
- "description": "HTTP response data.",
- "properties": [
- { "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." },
- { "name": "status", "type": "number", "description": "HTTP response status code." },
- { "name": "statusText", "type": "string", "description": "HTTP response status text." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
- { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." },
- { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
- { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
- { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." },
- { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." },
- { "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." },
- { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." },
- { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }
- ]
- },
- {
- "id": "WebSocketRequest",
- "type": "object",
- "description": "WebSocket request data.",
- "hidden": true,
- "properties": [
- { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
- ]
- },
- {
- "id": "WebSocketResponse",
- "type": "object",
- "description": "WebSocket response data.",
- "hidden": true,
- "properties": [
- { "name": "status", "type": "number", "description": "HTTP response status code." },
- { "name": "statusText", "type": "string", "description": "HTTP response status text." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
- ]
- },
- {
- "id": "WebSocketFrame",
- "type": "object",
- "description": "WebSocket frame data.",
- "hidden": true,
- "properties": [
- { "name": "opcode", "type": "number", "description": "WebSocket frame opcode." },
- { "name": "mask", "type": "boolean", "description": "WebSocke frame mask." },
- { "name": "payloadData", "type": "string", "description": "WebSocke frame payload data." }
- ]
- },
- {
- "id": "CachedResource",
- "type": "object",
- "description": "Information about the cached resource.",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." },
- { "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." },
- { "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." },
- { "name": "bodySize", "type": "number", "description": "Cached response body size." }
- ]
- },
- {
- "id": "Initiator",
- "type": "object",
- "description": "Information about the request initiator.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." },
- { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." },
- { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." },
- { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables network tracking, network events will now be delivered to the client."
- },
- {
- "name": "disable",
- "description": "Disables network tracking, prevents network events from being sent to the client."
- },
- {
- "name": "setUserAgentOverride",
- "description": "Allows overriding user agent with the given string.",
- "parameters": [
- { "name": "userAgent", "type": "string", "description": "User agent to use." }
- ]
- },
- {
- "name": "setExtraHTTPHeaders",
- "description": "Specifies whether to always send extra HTTP headers with the requests from this page.",
- "parameters": [
- { "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." }
- ]
- },
- {
- "name": "getResponseBody",
- "description": "Returns content served for the given request.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." }
- ],
- "returns": [
- { "name": "body", "type": "string", "description": "Response body." },
- { "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." }
- ]
- },
- {
- "name": "replayXHR",
- "description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." }
- ],
- "hidden": true
- },
- {
- "name": "canClearBrowserCache",
- "description": "Tells whether clearing browser cache is supported.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if browser cache can be cleared." }
- ]
- },
- {
- "name": "clearBrowserCache",
- "description": "Clears browser cache."
- },
- {
- "name": "canClearBrowserCookies",
- "description": "Tells whether clearing browser cookies is supported.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if browser cookies can be cleared." }
- ]
- },
- {
- "name": "clearBrowserCookies",
- "description": "Clears browser cookies."
- },
- {
- "name": "setCacheDisabled",
- "parameters": [
- { "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." }
- ],
- "description": "Toggles ignoring cache for each request. If <code>true</code>, cache will not be used."
- },
- {
- "name": "loadResourceForFrontend",
- "async": true,
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame to load the resource from." },
- { "name": "url", "type": "string", "description": "URL of the resource to load." },
- { "name": "requestHeaders", "$ref": "Network.Headers", "optional": true, "description": "Request headers." }
- ],
- "returns": [
- { "name": "statusCode", "type": "number", "description": "HTTP status code." },
- { "name": "responseHeaders", "$ref": "Network.Headers", "description": "Response headers." },
- { "name": "content", "type": "string", "description": "Resource content." }
- ],
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks.",
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "requestWillBeSent",
- "description": "Fired when page is about to send HTTP request.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true },
- { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
- { "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." },
- { "name": "request", "$ref": "Request", "description": "Request data." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
- { "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." }
- ]
- },
- {
- "name": "requestServedFromCache",
- "description": "Fired if request ended up loading from cache.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }
- ]
- },
- {
- "name": "responseReceived",
- "description": "Fired when HTTP response is available.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true },
- { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
- { "name": "response", "$ref": "Response", "description": "Response data." }
- ]
- },
- {
- "name": "dataReceived",
- "description": "Fired when data chunk was received over the network.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "dataLength", "type": "integer", "description": "Data chunk length." },
- { "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." }
- ]
- },
- {
- "name": "loadingFinished",
- "description": "Fired when HTTP request has finished loading.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
- ]
- },
- {
- "name": "loadingFailed",
- "description": "Fired when HTTP request has failed to load.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "errorText", "type": "string", "description": "User friendly error message." },
- { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }
- ]
- },
- {
- "name": "webSocketWillSendHandshakeRequest",
- "description": "Fired when WebSocket is about to initiate handshake.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketHandshakeResponseReceived",
- "description": "Fired when WebSocket handshake response becomes available.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketCreated",
- "description": "Fired upon WebSocket creation.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "url", "type": "string", "description": "WebSocket request URL." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketClosed",
- "description": "Fired when WebSocket is closed.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketFrameReceived",
- "description": "Fired when WebSocket frame is received.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketFrameError",
- "description": "Fired when WebSocket frame error occurs.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketFrameSent",
- "description": "Fired when WebSocket frame is sent.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
- ],
- "hidden": true
- }
- ]
- },
- {
- "domain": "Database",
- "hidden": true,
- "types": [
- {
- "id": "DatabaseId",
- "type": "string",
- "description": "Unique identifier of Database object.",
- "hidden": true
- },
- {
- "id": "Database",
- "type": "object",
- "description": "Database object.",
- "hidden": true,
- "properties": [
- { "name": "id", "$ref": "DatabaseId", "description": "Database ID." },
- { "name": "domain", "type": "string", "description": "Database domain." },
- { "name": "name", "type": "string", "description": "Database name." },
- { "name": "version", "type": "string", "description": "Database version." }
- ]
- },
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables database tracking, database events will now be delivered to the client."
- },
- {
- "name": "disable",
- "description": "Disables database tracking, prevents database events from being sent to the client."
- },
- {
- "name": "getDatabaseTableNames",
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" }
- ],
- "returns": [
- { "name": "tableNames", "type": "array", "items": { "type": "string" } }
- ]
- },
- {
- "name": "executeSQL",
- "async": true,
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "query", "type": "string" }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "values", "type": "array", "optional": true, "items": { "type": "any" }},
- { "name": "sqlError", "$ref": "Error", "optional": true }
- ]
- }
- ],
- "events": [
- {
- "name": "addDatabase",
- "parameters": [
- { "name": "database", "$ref": "Database" }
- ]
- }
- ]
- },
- {
- "domain": "IndexedDB",
- "hidden": true,
- "types": [
- {
- "id": "DatabaseWithObjectStores",
- "type": "object",
- "description": "Database with an array of object stores.",
- "properties": [
- { "name": "name", "type": "string", "description": "Database name." },
- { "name": "version", "type": "integer", "description": "Database version." },
- { "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." }
- ]
- },
- {
- "id": "ObjectStore",
- "type": "object",
- "description": "Object store.",
- "properties": [
- { "name": "name", "type": "string", "description": "Object store name." },
- { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." },
- { "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." },
- { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." }
- ]
- },
- {
- "id": "ObjectStoreIndex",
- "type": "object",
- "description": "Object store index.",
- "properties": [
- { "name": "name", "type": "string", "description": "Index name." },
- { "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." },
- { "name": "unique", "type": "boolean", "description": "If true, index is unique." },
- { "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." }
- ]
- },
- {
- "id": "Key",
- "type": "object",
- "description": "Key.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["number", "string", "date", "array"], "description": "Key type." },
- { "name": "number", "type": "number", "optional": true, "description": "Number value." },
- { "name": "string", "type": "string", "optional": true, "description": "String value." },
- { "name": "date", "type": "number", "optional": true, "description": "Date value." },
- { "name": "array", "type": "array", "optional": true, "items": { "$ref": "Key" }, "description": "Array value." }
- ]
- },
- {
- "id": "KeyRange",
- "type": "object",
- "description": "Key range.",
- "properties": [
- { "name": "lower", "$ref": "Key", "optional": true, "description": "Lower bound." },
- { "name": "upper", "$ref": "Key", "optional": true, "description": "Upper bound." },
- { "name": "lowerOpen", "type": "boolean", "description": "If true lower bound is open." },
- { "name": "upperOpen", "type": "boolean", "description": "If true upper bound is open." }
- ]
- },
- {
- "id": "DataEntry",
- "type": "object",
- "description": "Data entry.",
- "properties": [
- { "name": "key", "$ref": "Runtime.RemoteObject", "description": "Key." },
- { "name": "primaryKey", "$ref": "Runtime.RemoteObject", "description": "Primary key." },
- { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Value." }
- ]
- },
- {
- "id": "KeyPath",
- "type": "object",
- "description": "Key path.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." },
- { "name": "string", "type": "string", "optional": true, "description": "String value." },
- { "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables events from backend."
- },
- {
- "name": "disable",
- "description": "Disables events from backend."
- },
- {
- "name": "requestDatabaseNames",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." }
- ],
- "returns": [
- { "name": "databaseNames", "type": "array", "items": { "type": "string" }, "description": "Database names for origin." }
- ],
- "description": "Requests database names for given security origin."
- },
- {
- "name": "requestDatabase",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." },
- { "name": "databaseName", "type": "string", "description": "Database name." }
- ],
- "returns": [
- { "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." }
- ],
- "description": "Requests database with given name in given frame."
- },
- {
- "name": "requestData",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." },
- { "name": "databaseName", "type": "string", "description": "Database name." },
- { "name": "objectStoreName", "type": "string", "description": "Object store name." },
- { "name": "indexName", "type": "string", "description": "Index name, empty string for object store data requests." },
- { "name": "skipCount", "type": "integer", "description": "Number of records to skip." },
- { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." },
- { "name": "keyRange", "$ref": "KeyRange", "optional": true, "description": "Key range." }
- ],
- "returns": [
- { "name": "objectStoreDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." },
- { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." }
- ],
- "description": "Requests data from object store or index."
- },
- {
- "name": "clearObjectStore",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." },
- { "name": "databaseName", "type": "string", "description": "Database name." },
- { "name": "objectStoreName", "type": "string", "description": "Object store name." }
- ],
- "returns": [
- ],
- "description": "Clears all entries from an object store."
- }
- ]
- },
- {
- "domain": "DOMStorage",
- "hidden": true,
- "description": "Query and modify DOM storage.",
- "types": [
- {
- "id": "StorageId",
- "type": "object",
- "description": "DOM Storage identifier.",
- "hidden": true,
- "properties": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin for the storage." },
- { "name": "isLocalStorage", "type": "boolean", "description": "Whether the storage is local storage (not session storage)." }
- ]
- },
- {
- "id": "Item",
- "type": "array",
- "description": "DOM Storage item.",
- "hidden": true,
- "items": { "type": "string" }
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables storage tracking, storage events will now be delivered to the client."
- },
- {
- "name": "disable",
- "description": "Disables storage tracking, prevents storage events from being sent to the client."
- },
- {
- "name": "getDOMStorageItems",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" }
- ],
- "returns": [
- { "name": "entries", "type": "array", "items": { "$ref": "Item" } }
- ]
- },
- {
- "name": "setDOMStorageItem",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" },
- { "name": "value", "type": "string" }
- ]
- },
- {
- "name": "removeDOMStorageItem",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" }
- ]
- }
- ],
- "events": [
- {
- "name": "domStorageItemsCleared",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" }
- ]
- },
- {
- "name": "domStorageItemRemoved",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" }
- ]
- },
- {
- "name": "domStorageItemAdded",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" },
- { "name": "newValue", "type": "string" }
- ]
- },
- {
- "name": "domStorageItemUpdated",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" },
- { "name": "oldValue", "type": "string" },
- { "name": "newValue", "type": "string" }
- ]
- }
- ]
- },
- {
- "domain": "ApplicationCache",
- "hidden": true,
- "types": [
- {
- "id": "ApplicationCacheResource",
- "type": "object",
- "description": "Detailed application cache resource information.",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource url." },
- { "name": "size", "type": "integer", "description": "Resource size." },
- { "name": "type", "type": "string", "description": "Resource type." }
- ]
- },
- {
- "id": "ApplicationCache",
- "type": "object",
- "description": "Detailed application cache information.",
- "properties": [
- { "name": "manifestURL", "type": "string", "description": "Manifest URL." },
- { "name": "size", "type": "number", "description": "Application cache size." },
- { "name": "creationTime", "type": "number", "description": "Application cache creation time." },
- { "name": "updateTime", "type": "number", "description": "Application cache update time." },
- { "name": "resources", "type": "array", "items": { "$ref": "ApplicationCacheResource" }, "description": "Application cache resources." }
- ]
- },
- {
- "id": "FrameWithManifest",
- "type": "object",
- "description": "Frame identifier - manifest URL pair.",
- "properties": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier." },
- { "name": "manifestURL", "type": "string", "description": "Manifest URL." },
- { "name": "status", "type": "integer", "description": "Application cache status." }
- ]
- }
- ],
- "commands": [
- {
- "name": "getFramesWithManifests",
- "returns": [
- { "name": "frameIds", "type": "array", "items": { "$ref": "FrameWithManifest" }, "description": "Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache." }
- ],
- "description": "Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache."
- },
- {
- "name": "enable",
- "description": "Enables application cache domain notifications."
- },
- {
- "name": "getManifestForFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose manifest is retrieved." }
- ],
- "returns": [
- { "name": "manifestURL", "type": "string", "description": "Manifest URL for document in the given frame." }
- ],
- "description": "Returns manifest URL for document in the given frame."
- },
- {
- "name": "getApplicationCacheForFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache is retrieved." }
- ],
- "returns": [
- { "name": "applicationCache", "$ref": "ApplicationCache", "description": "Relevant application cache data for the document in given frame." }
- ],
- "description": "Returns relevant application cache data for the document in given frame."
- }
- ],
- "events": [
- {
- "name": "applicationCacheStatusUpdated",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache updated status." },
- { "name": "manifestURL", "type": "string", "description": "Manifest URL." },
- { "name": "status", "type": "integer", "description": "Updated application cache status." }
- ]
- },
- {
- "name": "networkStateUpdated",
- "parameters": [
- { "name": "isNowOnline", "type": "boolean" }
- ]
- }
- ]
- },
- {
- "domain": "FileSystem",
- "hidden": true,
- "types": [
- {
- "id": "Entry",
- "type": "object",
- "properties": [
- { "name": "url", "type": "string", "description": "filesystem: URL for the entry." },
- { "name": "name", "type": "string", "description": "The name of the file or directory." },
- { "name": "isDirectory", "type": "boolean", "description": "True if the entry is a directory." },
- { "name": "mimeType", "type": "string", "optional": true, "description": "MIME type of the entry, available for a file only." },
- { "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." },
- { "name": "isTextFile", "type": "boolean", "optional": true, "description": "True if the entry is a text file." }
- ],
- "description": "Represents a browser side file or directory."
- },
- {
- "id": "Metadata",
- "type": "object",
- "properties": [
- { "name": "modificationTime", "type": "number", "description": "Modification time." },
- { "name": "size", "type": "number", "description": "File size. This field is always zero for directories." }
- ],
- "description": "Represents metadata of a file or entry."
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables events from backend."
- },
- {
- "name": "disable",
- "description": "Disables events from backend."
- },
- {
- "name": "requestFileSystemRoot",
- "async": true,
- "parameters": [
- { "name": "origin", "type": "string", "description": "Security origin of requesting FileSystem. One of frames in current page needs to have this security origin." },
- { "name": "type", "type": "string", "enum": ["temporary", "persistent"], "description": "FileSystem type of requesting FileSystem." }
- ],
- "returns": [
- { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
- { "name": "root", "$ref": "Entry", "optional": true, "description": "Contains root of the requested FileSystem if the command completed successfully." }
- ],
- "description": "Returns root directory of the FileSystem, if exists."
- },
- {
- "name": "requestDirectoryContent",
- "async": true,
- "parameters": [
- { "name": "url", "type": "string", "description": "URL of the directory that the frontend is requesting to read from." }
- ],
- "returns": [
- { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
- { "name": "entries", "type": "array", "items": { "$ref": "Entry" }, "optional": true, "description": "Contains all entries on directory if the command completed successfully." }
- ],
- "description": "Returns content of the directory."
- },
- {
- "name": "requestMetadata",
- "async": true,
- "parameters": [
- { "name": "url", "type": "string", "description": "URL of the entry that the frontend is requesting to get metadata from." }
- ],
- "returns": [
- { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
- { "name": "metadata", "$ref": "Metadata", "optional": true, "description": "Contains metadata of the entry if the command completed successfully." }
- ],
- "description": "Returns metadata of the entry."
- },
- {
- "name": "requestFileContent",
- "async": true,
- "parameters": [
- { "name": "url", "type": "string", "description": "URL of the file that the frontend is requesting to read from." },
- { "name": "readAsText", "type": "boolean", "description": "True if the content should be read as text, otherwise the result will be returned as base64 encoded text." },
- { "name": "start", "type": "integer", "optional": true, "description": "Specifies the start of range to read." },
- { "name": "end", "type": "integer", "optional": true, "description": "Specifies the end of range to read exclusively." },
- { "name": "charset", "type": "string", "optional": true, "description": "Overrides charset of the content when content is served as text." }
- ],
- "returns": [
- { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
- { "name": "content", "type": "string", "optional": true, "description": "Content of the file." },
- { "name": "charset", "type": "string", "optional": true, "description": "Charset of the content if it is served as text." }
- ],
- "description": "Returns content of the file. Result should be sliced into [start, end)."
- },
- {
- "name": "deleteEntry",
- "async": true,
- "parameters": [
- { "name": "url", "type": "string", "description": "URL of the entry to delete." }
- ],
- "returns": [
- { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise errorCode is set to FileError::ErrorCode value." }
- ],
- "description": "Deletes specified entry. If the entry is a directory, the agent deletes children recursively."
- }
- ]
- },
- {
- "domain": "DOM",
- "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>",
- "types": [
- {
- "id": "NodeId",
- "type": "integer",
- "description": "Unique DOM node identifier."
- },
- {
- "id": "BackendNodeId",
- "type": "integer",
- "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.",
- "hidden": true
- },
- {
- "id": "Node",
- "type": "object",
- "properties": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." },
- { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." },
- { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." },
- { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." },
- { "name": "nodeValue", "type": "string", "description": "<code>Node</code>'s nodeValue." },
- { "name": "childNodeCount", "type": "integer", "optional": true, "description": "Child count for <code>Container</code> nodes." },
- { "name": "children", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Child nodes of this node when requested with children." },
- { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." },
- { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." },
- { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.", "hidden": true },
- { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId." },
- { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." },
- { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." },
- { "name": "xmlVersion", "type": "string", "optional": true, "description": "<code>Document</code>'s XML version in case of XML documents." },
- { "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name." },
- { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." },
- { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Frame ID for frame owner elements.", "hidden": true },
- { "name": "contentDocument", "$ref": "Node", "optional": true, "description": "Content document for frame owner elements." },
- { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host.", "hidden": true },
- { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements", "hidden": true }
- ],
- "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
- },
- {
- "id": "EventListener",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." },
- { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." },
- { "name": "isAttribute", "type": "boolean", "description": "<code>EventListener</code>'s isAttribute." },
- { "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." },
- { "name": "handlerBody", "type": "string", "description": "Event handler function body." },
- { "name": "location", "$ref": "Debugger.Location", "optional": true, "description": "Handler code location." },
- { "name": "sourceName", "type": "string", "optional": true, "description": "Source script URL." },
- { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." }
- ],
- "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
- },
- {
- "id": "RGBA",
- "type": "object",
- "properties": [
- { "name": "r", "type": "integer", "description": "The red component, in the [0-255] range." },
- { "name": "g", "type": "integer", "description": "The green component, in the [0-255] range." },
- { "name": "b", "type": "integer", "description": "The blue component, in the [0-255] range." },
- { "name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1)." }
- ],
- "description": "A structure holding an RGBA color."
- },
- {
- "id": "Quad",
- "type": "array",
- "items": { "type": "number" },
- "minItems": 8,
- "maxItems": 8,
- "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.",
- "hidden": true
- },
- {
- "id": "BoxModel",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "content", "$ref": "Quad", "description": "Content box" },
- { "name": "padding", "$ref": "Quad", "description": "Padding box" },
- { "name": "border", "$ref": "Quad", "description": "Border box" },
- { "name": "margin", "$ref": "Quad", "description": "Margin box" },
- { "name": "width", "type": "integer", "description": "Node width" },
- { "name": "height", "type": "integer", "description": "Node height" },
- { "name": "shapeOutside", "type": "string", "description": "CSS Shape Outside" }
- ],
- "description": "Box model."
- },
- {
- "id": "Rect",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "x", "type": "number", "description": "X coordinate" },
- { "name": "y", "type": "number", "description": "Y coordinate" },
- { "name": "width", "type": "number", "description": "Rectangle width" },
- { "name": "height", "type": "number", "description": "Rectangle height" }
- ],
- "description": "Rectangle."
- },
- {
- "id": "HighlightConfig",
- "type": "object",
- "properties": [
- { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." },
- { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." },
- { "name": "paddingColor", "$ref": "RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." },
- { "name": "borderColor", "$ref": "RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." },
- { "name": "marginColor", "$ref": "RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." },
- { "name": "eventTargetColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The event target element highlight fill color (default: transparent)." }
- ],
- "description": "Configuration data for the highlighting of page elements."
- }
- ],
- "commands": [
- {
- "name": "getDocument",
- "returns": [
- { "name": "root", "$ref": "Node", "description": "Resulting node." }
- ],
- "description": "Returns the root DOM node to the caller."
- },
- {
- "name": "requestChildNodes",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." },
- { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "hidden": true }
- ],
- "description": "Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth."
- },
- {
- "name": "querySelector",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." },
- { "name": "selector", "type": "string", "description": "Selector string." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Query selector result." }
- ],
- "description": "Executes <code>querySelector</code> on a given node."
- },
- {
- "name": "querySelectorAll",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." },
- { "name": "selector", "type": "string", "description": "Selector string." }
- ],
- "returns": [
- { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Query selector result." }
- ],
- "description": "Executes <code>querySelectorAll</code> on a given node."
- },
- {
- "name": "setNodeName",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set name for." },
- { "name": "name", "type": "string", "description": "New node's name." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "New node's id." }
- ],
- "description": "Sets node name for a node with given id."
- },
- {
- "name": "setNodeValue",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set value for." },
- { "name": "value", "type": "string", "description": "New node's value." }
- ],
- "description": "Sets node value for a node with given id."
- },
- {
- "name": "removeNode",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to remove." }
- ],
- "description": "Removes node with given id."
- },
- {
- "name": "setAttributeValue",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attribute for." },
- { "name": "name", "type": "string", "description": "Attribute name." },
- { "name": "value", "type": "string", "description": "Attribute value." }
- ],
- "description": "Sets attribute for an element with given id."
- },
- {
- "name": "setAttributesAsText",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attributes for." },
- { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." },
- { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." }
- ],
- "description": "Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs."
- },
- {
- "name": "removeAttribute",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to remove attribute from." },
- { "name": "name", "type": "string", "description": "Name of the attribute to remove." }
- ],
- "description": "Removes attribute with given name from an element with given id."
- },
- {
- "name": "getEventListenersForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get listeners for." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value. Handler value is not returned without this parameter specified." }
- ],
- "returns": [
- { "name": "listeners", "type": "array", "items": { "$ref": "EventListener"}, "description": "Array of relevant listeners." }
- ],
- "description": "Returns event listeners relevant to the node.",
- "hidden": true
- },
- {
- "name": "getOuterHTML",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get markup for." }
- ],
- "returns": [
- { "name": "outerHTML", "type": "string", "description": "Outer HTML markup." }
- ],
- "description": "Returns node's HTML markup."
- },
- {
- "name": "setOuterHTML",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set markup for." },
- { "name": "outerHTML", "type": "string", "description": "Outer HTML markup to set." }
- ],
- "description": "Sets node HTML markup, returns new node id."
- },
- {
- "name": "performSearch",
- "parameters": [
- { "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." }
- ],
- "returns": [
- { "name": "searchId", "type": "string", "description": "Unique search session identifier." },
- { "name": "resultCount", "type": "integer", "description": "Number of search results." }
- ],
- "description": "Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.",
- "hidden": true
- },
- {
- "name": "getSearchResults",
- "parameters": [
- { "name": "searchId", "type": "string", "description": "Unique search session identifier." },
- { "name": "fromIndex", "type": "integer", "description": "Start index of the search result to be returned." },
- { "name": "toIndex", "type": "integer", "description": "End index of the search result to be returned." }
- ],
- "returns": [
- { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the search result nodes." }
- ],
- "description": "Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.",
- "hidden": true
- },
- {
- "name": "discardSearchResults",
- "parameters": [
- { "name": "searchId", "type": "string", "description": "Unique search session identifier." }
- ],
- "description": "Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.",
- "hidden": true
- },
- {
- "name": "requestNode",
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "JavaScript object id to convert into node." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Node id for given object." }
- ],
- "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications."
- },
- {
- "name": "setInspectModeEnabled",
- "hidden": true,
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "True to enable inspection mode, false to disable it." },
- { "name": "inspectShadowDOM", "type": "boolean", "optional": true, "description": "True to enable inspection mode for shadow DOM." },
- { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." }
- ],
- "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection."
- },
- {
- "name": "highlightRect",
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate" },
- { "name": "y", "type": "integer", "description": "Y coordinate" },
- { "name": "width", "type": "integer", "description": "Rectangle width" },
- { "name": "height", "type": "integer", "description": "Rectangle height" },
- { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." },
- { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." }
- ],
- "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport."
- },
- {
- "name": "highlightQuad",
- "parameters": [
- { "name": "quad", "$ref": "Quad", "description": "Quad to highlight" },
- { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." },
- { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." }
- ],
- "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.",
- "hidden": true
- },
- {
- "name": "highlightNode",
- "parameters": [
- { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." },
- { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." },
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "hidden": true }
- ],
- "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified."
- },
- {
- "name": "hideHighlight",
- "description": "Hides DOM node highlight."
- },
- {
- "name": "highlightFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." },
- { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." },
- { "name": "contentOutlineColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." }
- ],
- "description": "Highlights owner element of the frame with given id.",
- "hidden": true
- },
- {
- "name": "pushNodeByPathToFrontend",
- "parameters": [
- { "name": "path", "type": "string", "description": "Path to node in the proprietary format." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node for given path." }
- ],
- "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath",
- "hidden": true
- },
- {
- "name": "pushNodeByBackendIdToFrontend",
- "parameters": [
- { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "The backend node id of the node." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "The pushed node's id." }
- ],
- "description": "Requests that the node is sent to the caller given its backend node id.",
- "hidden": true
- },
- {
- "name": "releaseBackendNodeIds",
- "parameters": [
- { "name": "nodeGroup", "type": "string", "description": "The backend node ids group name." }
- ],
- "description": "Requests that group of <code>BackendNodeIds</code> is released.",
- "hidden": true
- },
- {
- "name": "resolveNode",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to resolve." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
- ],
- "returns": [
- { "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." }
- ],
- "description": "Resolves JavaScript node object for given node id."
- },
- {
- "name": "getAttributes",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to retrieve attibutes for." }
- ],
- "returns": [
- { "name": "attributes", "type": "array", "items": { "type": "string" }, "description": "An interleaved array of node attribute names and values." }
- ],
- "description": "Returns attributes for the specified node."
- },
- {
- "name": "moveTo",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to drop." },
- { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop into." },
- { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop node before given one." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "New id of the moved node." }
- ],
- "description": "Moves node into the new container, places it before the given anchor."
- },
- {
- "name": "undo",
- "description": "Undoes the last performed action.",
- "hidden": true
- },
- {
- "name": "redo",
- "description": "Re-does the last undone action.",
- "hidden": true
- },
- {
- "name": "markUndoableState",
- "description": "Marks last undoable state.",
- "hidden": true
- },
- {
- "name": "focus",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to focus." }
- ],
- "description": "Focuses the given element.",
- "hidden": true
- },
- {
- "name": "setFileInputFiles",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the file input node to set files for." },
- { "name": "files", "type": "array", "items": { "type": "string" }, "description": "Array of file paths to set." }
- ],
- "description": "Sets files for the given file input element.",
- "hidden": true
- },
- {
- "name": "getBoxModel",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get box model for." }
- ],
- "returns": [
- { "name": "model", "$ref": "BoxModel", "description": "Box model for the node." }
- ],
- "description": "Returns boxes for the currently selected nodes.",
- "hidden": true
- },
- {
- "name": "getNodeForLocation",
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate." },
- { "name": "y", "type": "integer", "description": "Y coordinate." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node at given coordinates." }
- ],
- "description": "Returns node id at given location.",
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "documentUpdated",
- "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid."
- },
- {
- "name": "inspectNodeRequested",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to inspect." }
- ],
- "description": "Fired when the node should be inspected. This happens after call to <code>setInspectModeEnabled</code>.",
- "hidden" : true
- },
- {
- "name": "setChildNodes",
- "parameters": [
- { "name": "parentId", "$ref": "NodeId", "description": "Parent node id to populate with children." },
- { "name": "nodes", "type": "array", "items": { "$ref": "Node"}, "description": "Child nodes array." }
- ],
- "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids."
- },
- {
- "name": "attributeModified",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "name", "type": "string", "description": "Attribute name." },
- { "name": "value", "type": "string", "description": "Attribute value." }
- ],
- "description": "Fired when <code>Element</code>'s attribute is modified."
- },
- {
- "name": "attributeRemoved",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "name", "type": "string", "description": "A ttribute name." }
- ],
- "description": "Fired when <code>Element</code>'s attribute is removed."
- },
- {
- "name": "inlineStyleInvalidated",
- "parameters": [
- { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the nodes for which the inline styles have been invalidated." }
- ],
- "description": "Fired when <code>Element</code>'s inline style is modified via a CSS property modification.",
- "hidden": true
- },
- {
- "name": "characterDataModified",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "characterData", "type": "string", "description": "New text value." }
- ],
- "description": "Mirrors <code>DOMCharacterDataModified</code> event."
- },
- {
- "name": "childNodeCountUpdated",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "childNodeCount", "type": "integer", "description": "New node count." }
- ],
- "description": "Fired when <code>Container</code>'s child node count has changed."
- },
- {
- "name": "childNodeInserted",
- "parameters": [
- { "name": "parentNodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "previousNodeId", "$ref": "NodeId", "description": "If of the previous siblint." },
- { "name": "node", "$ref": "Node", "description": "Inserted node data." }
- ],
- "description": "Mirrors <code>DOMNodeInserted</code> event."
- },
- {
- "name": "childNodeRemoved",
- "parameters": [
- { "name": "parentNodeId", "$ref": "NodeId", "description": "Parent id." },
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has been removed." }
- ],
- "description": "Mirrors <code>DOMNodeRemoved</code> event."
- },
- {
- "name": "shadowRootPushed",
- "parameters": [
- { "name": "hostId", "$ref": "NodeId", "description": "Host element id." },
- { "name": "root", "$ref": "Node", "description": "Shadow root." }
- ],
- "description": "Called when shadow root is pushed into the element.",
- "hidden": true
- },
- {
- "name": "shadowRootPopped",
- "parameters": [
- { "name": "hostId", "$ref": "NodeId", "description": "Host element id." },
- { "name": "rootId", "$ref": "NodeId", "description": "Shadow root id." }
- ],
- "description": "Called when shadow root is popped from the element.",
- "hidden": true
- }
- ]
- },
- {
- "domain": "CSS",
- "hidden": true,
- "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). A client can also discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method (or keeping track of the <code>styleSheetAdded</code>/<code>styleSheetRemoved</code> events) and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.",
- "types": [
- {
- "id": "StyleSheetId",
- "type": "string"
- },
- {
- "id": "CSSStyleId",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Enclosing stylesheet identifier." },
- { "name": "ordinal", "type": "integer", "description": "The style ordinal within the stylesheet." }
- ],
- "description": "This object identifies a CSS style in a unique way."
- },
- {
- "id": "StyleSheetOrigin",
- "type": "string",
- "enum": ["user", "user-agent", "inspector", "regular"],
- "description": "Stylesheet type: \"user\" for user stylesheets, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets."
- },
- {
- "id": "CSSRuleId",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Enclosing stylesheet identifier." },
- { "name": "ordinal", "type": "integer", "description": "The rule ordinal within the stylesheet." }
- ],
- "description": "This object identifies a CSS rule in a unique way."
- },
- {
- "id": "PseudoIdMatches",
- "type": "object",
- "properties": [
- { "name": "pseudoId", "type": "integer", "description": "Pseudo style identifier (see <code>enum PseudoId</code> in <code>ComputedStyleConstants.h</code>)."},
- { "name": "matches", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules applicable to the pseudo style."}
- ],
- "description": "CSS rule collection for a single pseudo style."
- },
- {
- "id": "InheritedStyleEntry",
- "type": "object",
- "properties": [
- { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain." },
- { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain." }
- ],
- "description": "CSS rule collection for a single pseudo style."
- },
- {
- "id": "RuleMatch",
- "type": "object",
- "properties": [
- { "name": "rule", "$ref": "CSSRule", "description": "CSS rule in the match." },
- { "name": "matchingSelectors", "type": "array", "items": { "type": "integer" }, "description": "Matching selector indices in the rule's selectorList selectors (0-based)." }
- ],
- "description": "Match data for a CSS rule."
- },
- {
- "id": "SelectorList",
- "type": "object",
- "properties": [
- { "name": "selectors", "type": "array", "items": { "type": "string" }, "description": "Selectors in the list." },
- { "name": "text", "type": "string", "description": "Rule selector text." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Rule selector range in the underlying resource (if available)." }
- ],
- "description": "Selector list data."
- },
- {
- "id": "CSSStyleAttribute",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "DOM attribute name (e.g. \"width\")."},
- { "name": "style", "$ref": "CSSStyle", "description": "CSS style generated by the respective DOM attribute."}
- ],
- "description": "CSS style information for a DOM style attribute."
- },
- {
- "id": "CSSStyleSheetHeader",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."},
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Owner frame identifier."},
- { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."},
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any)." },
- { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."},
- { "name": "title", "type": "string", "description": "Stylesheet title."},
- { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."},
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment." },
- { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags." },
- { "name": "startLine", "type": "number", "description": "Line offset of the stylesheet within the resource (zero based)." },
- { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." }
- ],
- "description": "CSS stylesheet metainformation."
- },
- {
- "id": "CSSStyleSheetBody",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."},
- { "name": "rules", "type": "array", "items": { "$ref": "CSSRule" }, "description": "Stylesheet resource URL."},
- { "name": "text", "type": "string", "optional": true, "description": "Stylesheet resource contents (if available)."}
- ],
- "description": "CSS stylesheet contents."
- },
- {
- "id": "CSSRule",
- "type": "object",
- "properties": [
- { "name": "ruleId", "$ref": "CSSRuleId", "optional": true, "description": "The CSS rule identifier (absent for user agent stylesheet and user-specified stylesheet rules)."},
- { "name": "selectorList", "$ref": "SelectorList", "description": "Rule selector data." },
- { "name": "sourceURL", "type": "string", "optional": true, "description": "Parent stylesheet resource URL (for regular rules)."},
- { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."},
- { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." },
- { "name": "media", "type": "array", "items": { "$ref": "CSSMedia" }, "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards." }
- ],
- "description": "CSS rule representation."
- },
- {
- "id": "SourceRange",
- "type": "object",
- "properties": [
- { "name": "startLine", "type": "integer", "description": "Start line of range." },
- { "name": "startColumn", "type": "integer", "description": "Start column of range (inclusive)." },
- { "name": "endLine", "type": "integer", "description": "End line of range" },
- { "name": "endColumn", "type": "integer", "description": "End column of range (exclusive)." }
- ],
- "description": "Text range within a resource. All numbers are zero-based."
- },
- {
- "id": "ShorthandEntry",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "Shorthand name." },
- { "name": "value", "type": "string", "description": "Shorthand value." }
- ]
- },
- {
- "id": "CSSPropertyInfo",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "Property name." },
- { "name": "longhands", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Longhand property names." }
- ]
- },
- {
- "id": "CSSComputedStyleProperty",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "Computed style property name." },
- { "name": "value", "type": "string", "description": "Computed style property value." }
- ]
- },
- {
- "id": "CSSStyle",
- "type": "object",
- "properties": [
- { "name": "styleId", "$ref": "CSSStyleId", "optional": true, "description": "The CSS style identifier (absent for attribute styles)." },
- { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSProperty" }, "description": "CSS properties in the style." },
- { "name": "shorthandEntries", "type": "array", "items": { "$ref": "ShorthandEntry" }, "description": "Computed values for all shorthands found in the style." },
- { "name": "cssText", "type": "string", "optional": true, "description": "Style declaration text (if available)." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Style declaration range in the enclosing stylesheet (if available)." },
- { "name": "width", "type": "string", "optional": true, "description": "The effective \"width\" property value from this style." },
- { "name": "height", "type": "string", "optional": true, "description": "The effective \"height\" property value from this style." }
- ],
- "description": "CSS style representation."
- },
- {
- "id": "CSSProperty",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "The property name." },
- { "name": "value", "type": "string", "description": "The property value." },
- { "name": "priority", "type": "string", "optional": true, "description": "The property priority (implies \"\" if absent)." },
- { "name": "implicit", "type": "boolean", "optional": true, "description": "Whether the property is implicit (implies <code>false</code> if absent)." },
- { "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style." },
- { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies <code>true</code> if absent)." },
- { "name": "status", "type": "string", "enum": ["active", "inactive", "disabled", "style"], "optional": true, "description": "The property status: \"active\" if the property is effective in the style, \"inactive\" if the property is overridden by a same-named property in this style later on, \"disabled\" if the property is disabled by the user, \"style\" (implied if absent) if the property is reported by the browser rather than by the CSS source parser." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." }
- ],
- "description": "CSS property declaration data."
- },
- {
- "id": "CSSMedia",
- "type": "object",
- "properties": [
- { "name": "text", "type": "string", "description": "Media query text." },
- { "name": "source", "type": "string", "enum": ["mediaRule", "importRule", "linkedSheet", "inlineSheet"], "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if specified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked stylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline stylesheet's STYLE tag." },
- { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available)." },
- { "name": "parentStyleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists)." }
- ],
- "description": "CSS media query descriptor."
- },
- {
- "id": "SelectorProfileEntry",
- "type": "object",
- "properties": [
- { "name": "selector", "type": "string", "description": "CSS selector of the corresponding rule." },
- { "name": "url", "type": "string", "description": "URL of the resource containing the corresponding rule." },
- { "name": "lineNumber", "type": "integer", "description": "Selector line number in the resource for the corresponding rule." },
- { "name": "time", "type": "number", "description": "Total time this rule handling contributed to the browser running time during profiling (in milliseconds)." },
- { "name": "hitCount", "type": "integer", "description": "Number of times this rule was considered a candidate for matching against DOM elements." },
- { "name": "matchCount", "type": "integer", "description": "Number of times this rule actually matched a DOM element." }
- ],
- "description": "CSS selector profile entry."
- },
- {
- "id": "SelectorProfile",
- "type": "object",
- "properties": [
- { "name": "totalTime", "type": "number", "description": "Total processing time for all selectors in the profile (in milliseconds)." },
- { "name": "data", "type": "array", "items": { "$ref": "SelectorProfileEntry" }, "description": "CSS selector profile entries." }
- ]
- },
- {
- "id": "Region",
- "type": "object",
- "properties": [
- { "name": "regionOverset", "type": "string", "enum": ["overset", "fit", "empty"], "description": "The \"overset\" attribute of a Named Flow." },
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The corresponding DOM node id." }
- ],
- "description": "This object represents a region that flows from a Named Flow.",
- "hidden": true
- },
- {
- "id": "NamedFlow",
- "type": "object",
- "properties": [
- { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
- { "name": "name", "type": "string", "description": "Named Flow identifier." },
- { "name": "overset", "type": "boolean", "description": "The \"overset\" attribute of a Named Flow." },
- { "name": "content", "type": "array", "items": { "$ref": "DOM.NodeId" }, "description": "An array of nodes that flow into the Named Flow." },
- { "name": "regions", "type": "array", "items": { "$ref": "Region" }, "description": "An array of regions associated with the Named Flow." }
- ],
- "description": "This object represents a Named Flow.",
- "hidden": true
- },
- {
- "id": "PlatformFontUsage",
- "type": "object",
- "properties": [
- { "name": "familyName", "type": "string", "description": "Font's family name reported by platform."},
- { "name": "glyphCount", "type": "number", "description": "Amount of glyphs that were rendered with this font."}
- ],
- "description": "Information about amount of glyphs that were rendered with given font."
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received."
- },
- {
- "name": "disable",
- "description": "Disables the CSS agent for the given page."
- },
- {
- "name": "getMatchedStylesForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" },
- { "name": "includePseudo", "type": "boolean", "optional": true, "description": "Whether to include pseudo styles (default: true)." },
- { "name": "includeInherited", "type": "boolean", "optional": true, "description": "Whether to include inherited styles (default: true)." }
- ],
- "returns": [
- { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "optional": true, "description": "CSS rules matching this node, from all applicable stylesheets." },
- { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoIdMatches" }, "optional": true, "description": "Pseudo style matches for this node." },
- { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." }
- ],
- "description": "Returns requested styles for a DOM node identified by <code>nodeId</code>."
- },
- {
- "name": "getInlineStylesForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." },
- { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."}
- ],
- "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>."
- },
- {
- "name": "getComputedStyleForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." }
- ],
- "description": "Returns the computed style for a DOM node identified by <code>nodeId</code>."
- },
- {
- "name": "getPlatformFontsForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "cssFamilyName", "type": "string", "description": "Font family name which is determined by computed style." },
- { "name": "fonts", "type": "array", "items": { "$ref": "PlatformFontUsage"}, "description": "Usage statistics for every employed platform font." }
- ],
- "description": "Requests information about platform fonts which we used to render child TextNodes in the given node.",
- "hidden": true
- },
- {
- "name": "getAllStyleSheets",
- "returns": [
- { "name": "headers", "type": "array", "items": { "$ref": "CSSStyleSheetHeader" }, "description": "Descriptor entries for all available stylesheets." }
- ],
- "description": "Returns metainfo entries for all known stylesheets."
- },
- {
- "name": "getStyleSheet",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" }
- ],
- "returns": [
- { "name": "styleSheet", "$ref": "CSSStyleSheetBody", "description": "Stylesheet contents for the specified <code>styleSheetId</code>." }
- ],
- "description": "Returns stylesheet data for the specified <code>styleSheetId</code>."
- },
- {
- "name": "getStyleSheetText",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" }
- ],
- "returns": [
- { "name": "text", "type": "string", "description": "The stylesheet text." }
- ],
- "description": "Returns the current textual content and the URL for a stylesheet."
- },
- {
- "name": "setStyleSheetText",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" },
- { "name": "text", "type": "string" }
- ],
- "description": "Sets the new stylesheet text, thereby invalidating all existing <code>CSSStyleId</code>'s and <code>CSSRuleId</code>'s contained by this stylesheet."
- },
- {
- "name": "setStyleText",
- "parameters": [
- { "name": "styleId", "$ref": "CSSStyleId" },
- { "name": "text", "type": "string" }
- ],
- "returns": [
- { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the text modification." }
- ],
- "description": "Updates the CSSStyleDeclaration text."
- },
- {
- "name": "setPropertyText",
- "parameters": [
- { "name": "styleId", "$ref": "CSSStyleId" },
- { "name": "propertyIndex", "type": "integer" },
- { "name": "text", "type": "string" },
- { "name": "overwrite", "type": "boolean" }
- ],
- "returns": [
- { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the property text modification." }
- ],
- "description": "Sets the new <code>text</code> for a property in the respective style, at offset <code>propertyIndex</code>. If <code>overwrite</code> is <code>true</code>, a property at the given offset is overwritten, otherwise inserted. <code>text</code> entirely replaces the property <code>name: value</code>."
- },
- {
- "name": "toggleProperty",
- "parameters": [
- { "name": "styleId", "$ref": "CSSStyleId" },
- { "name": "propertyIndex", "type": "integer" },
- { "name": "disable", "type": "boolean" }
- ],
- "returns": [
- { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the property toggling." }
- ],
- "description": "Toggles the property in the respective style, at offset <code>propertyIndex</code>. The <code>disable</code> parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If <code>disable == false</code>, the property gets put back into its original place in the style declaration."
- },
- {
- "name": "setRuleSelector",
- "parameters": [
- { "name": "ruleId", "$ref": "CSSRuleId" },
- { "name": "selector", "type": "string" }
- ],
- "returns": [
- { "name": "rule", "$ref": "CSSRule", "description": "The resulting rule after the selector modification." }
- ],
- "description": "Modifies the rule selector."
- },
- {
- "name": "addRule",
- "parameters": [
- { "name": "contextNodeId", "$ref": "DOM.NodeId" },
- { "name": "selector", "type": "string" }
- ],
- "returns": [
- { "name": "rule", "$ref": "CSSRule", "description": "The newly created rule." }
- ],
- "description": "Creates a new empty rule with the given <code>selector</code> in a special \"inspector\" stylesheet in the owner document of the context node."
- },
- {
- "name": "getSupportedCSSProperties",
- "returns": [
- { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSPropertyInfo" }, "description": "Supported property metainfo." }
- ],
- "description": "Returns all supported CSS property names."
- },
- {
- "name": "forcePseudoState",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
- { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." }
- ],
- "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser."
- },
- {
- "name": "getNamedFlowCollection",
- "parameters": [
- { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id for which to get the Named Flow Collection." }
- ],
- "returns": [
- { "name": "namedFlows", "type": "array", "items": { "$ref": "NamedFlow" }, "description": "An array containing the Named Flows in the document." }
- ],
- "description": "Returns the Named Flows from the document.",
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "mediaQueryResultChanged",
- "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features."
- },
- {
- "name": "styleSheetChanged",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" }
- ],
- "description": "Fired whenever a stylesheet is changed as a result of the client operation."
- },
- {
- "name": "styleSheetAdded",
- "parameters": [
- { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Added stylesheet metainfo." }
- ],
- "description": "Fired whenever an active document stylesheet is added."
- },
- {
- "name": "styleSheetRemoved",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the removed stylesheet." }
- ],
- "description": "Fired whenever an active document stylesheet is removed."
- },
- {
- "name": "namedFlowCreated",
- "parameters": [
- { "name": "namedFlow", "$ref": "NamedFlow", "description": "The new Named Flow." }
- ],
- "description": "Fires when a Named Flow is created.",
- "hidden": true
- },
- {
- "name": "namedFlowRemoved",
- "parameters": [
- { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
- { "name": "flowName", "type": "string", "description": "Identifier of the removed Named Flow." }
- ],
- "description": "Fires when a Named Flow is removed: has no associated content nodes and regions.",
- "hidden": true
- },
- {
- "name": "regionLayoutUpdated",
- "parameters": [
- { "name": "namedFlow", "$ref": "NamedFlow", "description": "The Named Flow whose layout may have changed." }
- ],
- "description": "Fires when a Named Flow's layout may have changed.",
- "hidden": true
- },
- {
- "name": "regionOversetChanged",
- "parameters": [
- { "name": "namedFlow", "$ref": "NamedFlow", "description": "The Named Flow containing the regions whose regionOverset values changed." }
- ],
- "description": "Fires if any of the regionOverset values changed in a Named Flow's region chain.",
- "hidden": true
- }
- ]
- },
- {
- "domain": "Debugger",
- "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
- "types": [
- {
- "id": "BreakpointId",
- "type": "string",
- "description": "Breakpoint identifier."
- },
- {
- "id": "ScriptId",
- "type": "string",
- "description": "Unique script identifier."
- },
- {
- "id": "CallFrameId",
- "type": "string",
- "description": "Call frame identifier."
- },
- {
- "id": "Location",
- "type": "object",
- "properties": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
- { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }
- ],
- "description": "Location in the source code."
- },
- {
- "id": "FunctionDetails",
- "hidden": true,
- "type": "object",
- "properties": [
- { "name": "location", "$ref": "Location", "description": "Location of the function." },
- { "name": "name", "type": "string", "optional": true, "description": "Name of the function. Not present for anonymous functions." },
- { "name": "displayName", "type": "string", "optional": true, "description": "Display name of the function(specified in 'displayName' property on the function object)." },
- { "name": "inferredName", "type": "string", "optional": true, "description": "Name of the function inferred from its initial assignment." },
- { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." }
- ],
- "description": "Information about the function."
- },
- {
- "id": "CallFrame",
- "type": "object",
- "properties": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." },
- { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." },
- { "name": "location", "$ref": "Location", "description": "Location in the source code." },
- { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." },
- { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }
- ],
- "description": "JavaScript call frame. Array of call frames form the call stack."
- },
- {
- "id": "Scope",
- "type": "object",
- "properties": [
- { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch"], "description": "Scope type." },
- { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." }
- ],
- "description": "Scope description."
- },
- {
- "id": "SetScriptSourceError",
- "type": "object",
- "properties": [
- { "name": "compileError", "optional": true, "type": "object", "properties":
- [
- { "name": "message", "type": "string", "description": "Compiler error message" },
- { "name": "lineNumber", "type": "integer", "description": "Compile error line number (1-based)" },
- { "name": "columnNumber", "type": "integer", "description": "Compile error column number (1-based)" }
- ]
- }
- ],
- "description": "Error data for setScriptSource command. compileError is a case type for uncompilable script source error.",
- "hidden": true
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
- },
- {
- "name": "disable",
- "description": "Disables debugger for given page."
- },
- {
- "name": "setBreakpointsActive",
- "parameters": [
- { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
- ],
- "description": "Activates / deactivates all breakpoints on the page."
- },
- {
- "name": "setSkipAllPauses",
- "hidden": true,
- "parameters": [
- { "name": "skipped", "type": "boolean", "description": "New value for skip pauses state." },
- { "name": "untilReload", "type": "boolean", "optional": true, "description": "Whether page reload should set skipped to false." }
- ],
- "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
- },
- {
- "name": "setBreakpointByUrl",
- "parameters": [
- { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
- { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
- { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." },
- { "name": "isAntibreakpoint", "type": "boolean", "optional": true, "hidden": true, "description": "Creates pseudo-breakpoint that prevents debugger from pausing on exception at this location." }
- ],
- "returns": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
- { "name": "locations", "type": "array", "items": { "$ref": "Location"}, "description": "List of the locations this breakpoint resolved into upon addition." }
- ],
- "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
- },
- {
- "name": "setBreakpoint",
- "parameters": [
- { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
- { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
- ],
- "returns": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
- { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
- ],
- "description": "Sets JavaScript breakpoint at a given location."
- },
- {
- "name": "removeBreakpoint",
- "parameters": [
- { "name": "breakpointId", "$ref": "BreakpointId" }
- ],
- "description": "Removes JavaScript breakpoint."
- },
- {
- "name": "continueToLocation",
- "parameters": [
- { "name": "location", "$ref": "Location", "description": "Location to continue to." },
- { "name": "interstatementLocation", "type": "boolean", "optional": true, "hidden": true, "description": "Allows breakpoints at the intemediate positions inside statements." }
- ],
- "description": "Continues execution until specific location is reached."
- },
- {
- "name": "stepOver",
- "description": "Steps over the statement."
- },
- {
- "name": "stepInto",
- "description": "Steps into the function call."
- },
- {
- "name": "stepOut",
- "description": "Steps out of the function call."
- },
- {
- "name": "pause",
- "description": "Stops on the next JavaScript statement."
- },
- {
- "name": "resume",
- "description": "Resumes JavaScript execution."
- },
- {
- "name": "searchInContent",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to search in." },
- { "name": "query", "type": "string", "description": "String to search for." },
- { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
- { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "Page.SearchMatch" }, "description": "List of search matches." }
- ],
- "description": "Searches for given string in script content."
- },
- {
- "name": "canSetScriptSource",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }
- ],
- "description": "Always returns true."
- },
- {
- "name": "setScriptSource",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },
- { "name": "scriptSource", "type": "string", "description": "New content of the script." },
- { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true }
- ],
- "returns": [
- { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },
- { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied.", "hidden": true }
- ],
- "error": {
- "$ref": "SetScriptSourceError"
- },
- "description": "Edits JavaScript source live."
- },
- {
- "name": "restartFrame",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
- ],
- "returns": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame"}, "description": "New stack trace." },
- { "name": "result", "type": "object", "description": "VM-specific description.", "hidden": true }
- ],
- "hidden": true,
- "description": "Restarts particular call frame from the beginning."
- },
- {
- "name": "getScriptSource",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to get source for." }
- ],
- "returns": [
- { "name": "scriptSource", "type": "string", "description": "Script source." }
- ],
- "description": "Returns source for the script with given id."
- },
- {
- "name": "getFunctionDetails",
- "hidden": true,
- "parameters": [
- { "name": "functionId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the function to get location for." }
- ],
- "returns": [
- { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." }
- ],
- "description": "Returns detailed informtation on given function."
- },
- {
- "name": "setPauseOnExceptions",
- "parameters": [
- { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
- ],
- "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>."
- },
- {
- "name": "evaluateOnCallFrame",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." },
- { "name": "expression", "type": "string", "description": "Expression to evaluate." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
- ],
- "description": "Evaluates expression on a given call frame."
- },
- {
- "name": "compileScript",
- "hidden": true,
- "parameters": [
- { "name": "expression", "type": "string", "description": "Expression to compile." },
- { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }
- ],
- "returns": [
- { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
- { "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." }
- ],
- "description": "Compiles expression."
- },
- {
- "name": "runScript",
- "hidden": true,
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
- { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." }
- ],
- "description": "Runs script with given id in a given context."
- },
- {
- "name": "setOverlayMessage",
- "parameters": [
- { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." }
- ],
- "hidden": true,
- "description": "Sets overlay message."
- },
- {
- "name": "setVariableValue",
- "parameters": [
- { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
- { "name": "variableName", "type": "string", "description": "Variable name." },
- { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
- { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." },
- { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." }
- ],
- "hidden": true,
- "description": "Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually."
- },
- {
- "name": "getStepInPositions",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of a call frame where the current statement should be analized" }
- ],
- "returns": [
- { "name": "stepInPositions", "type": "array", "items": { "$ref": "Location" }, "optional": true, "description": "experimental" }
- ],
- "hidden": true,
- "description": "Lists all positions where step-in is possible for a current statement in a specified call frame"
- },
- {
- "name": "getBacktrace",
- "returns": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame"}, "description": "Call stack the virtual machine stopped on." }
- ],
- "hidden": true,
- "description": "Returns call stack including variables changed since VM was paused. VM must be paused."
- },
- {
- "name": "skipStackFrames",
- "parameters": [
- { "name": "script", "optional": true, "type": "string", "description": "Regular expression defining the scripts to ignore while stepping." }
- ],
- "hidden": true,
- "description": "Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."
- }
- ],
- "events": [
- {
- "name": "globalObjectCleared",
- "description": "Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload."
- },
- {
- "name": "scriptParsed",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." },
- { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
- { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
- { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
- { "name": "endLine", "type": "integer", "description": "Last line of the script." },
- { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
- { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true }
- ],
- "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
- },
- {
- "name": "scriptFailedToParse",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." },
- { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
- { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
- { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
- { "name": "endLine", "type": "integer", "description": "Last line of the script." },
- { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
- { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true }
- ],
- "description": "Fired when virtual machine fails to parse the script."
- },
- {
- "name": "breakpointResolved",
- "parameters": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." },
- { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
- ],
- "description": "Fired when breakpoint is resolved to an actual script and location."
- },
- {
- "name": "paused",
- "parameters": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
- { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "debugCommand", "other" ], "description": "Pause reason." },
- { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
- { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden": true }
- ],
- "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
- },
- {
- "name": "resumed",
- "description": "Fired when the virtual machine resumed execution."
- }
- ]
- },
- {
- "domain": "DOMDebugger",
- "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.",
- "types": [
- {
- "id": "DOMBreakpointType",
- "type": "string",
- "enum": ["subtree-modified", "attribute-modified", "node-removed"],
- "description": "DOM breakpoint type."
- }
- ],
- "commands": [
- {
- "name": "setDOMBreakpoint",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to set breakpoint on." },
- { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the operation to stop upon." }
- ],
- "description": "Sets breakpoint on particular operation with DOM."
- },
- {
- "name": "removeDOMBreakpoint",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to remove breakpoint from." },
- { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the breakpoint to remove." }
- ],
- "description": "Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>."
- },
- {
- "name": "setEventListenerBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "DOM Event name to stop on (any DOM event will do)." }
- ],
- "description": "Sets breakpoint on particular DOM event."
- },
- {
- "name": "removeEventListenerBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "Event name." }
- ],
- "description": "Removes breakpoint on particular DOM event."
- },
- {
- "name": "setInstrumentationBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." }
- ],
- "description": "Sets breakpoint on particular native event.",
- "hidden": true
- },
- {
- "name": "removeInstrumentationBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." }
- ],
- "description": "Removes breakpoint on particular native event.",
- "hidden": true
- },
- {
- "name": "setXHRBreakpoint",
- "parameters": [
- { "name": "url", "type": "string", "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon." }
- ],
- "description": "Sets breakpoint on XMLHttpRequest."
- },
- {
- "name": "removeXHRBreakpoint",
- "parameters": [
- { "name": "url", "type": "string", "description": "Resource URL substring." }
- ],
- "description": "Removes breakpoint from XMLHttpRequest."
- }
- ]
- },
- {
- "domain": "Profiler",
- "hidden": true,
- "types": [
- {
- "id": "ProfileHeader",
- "type": "object",
- "description": "Profile header.",
- "properties": [
- { "name": "title", "type": "string", "description": "Profile title." },
- { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." }
- ]
- },
- {
- "id": "CPUProfileNode",
- "type": "object",
- "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "Function name." },
- { "name": "scriptId", "$ref": "Debugger.ScriptId", "description": "Script identifier." },
- { "name": "url", "type": "string", "description": "URL." },
- { "name": "lineNumber", "type": "integer", "description": "Line number." },
- { "name": "hitCount", "type": "integer", "description": "Number of samples where this node was on top of the call stack." },
- { "name": "callUID", "type": "number", "description": "Call UID." },
- { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." },
- { "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
- { "name": "id", "optional": true, "type": "integer", "description": "Unique id of the node." }
- ]
- },
- {
- "id": "CPUProfile",
- "type": "object",
- "description": "Profile.",
- "properties": [
- { "name": "head", "$ref": "CPUProfileNode" },
- { "name": "startTime", "type": "number", "description": "Profiling start time in seconds." },
- { "name": "endTime", "type": "number", "description": "Profiling end time in seconds." },
- { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }
- ]
- },
- {
- "id": "HeapSnapshotObjectId",
- "type": "string",
- "description": "Heap snashot object id."
- }
- ],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "start"
- },
- {
- "name": "stop",
- "returns": [
- { "name": "header", "$ref": "ProfileHeader", "description": "The header of the recorded profile."}
- ]
- },
- {
- "name": "getProfileHeaders",
- "returns": [
- { "name": "headers", "type": "array", "items": { "$ref": "ProfileHeader"} }
- ]
- },
- {
- "name": "getCPUProfile",
- "parameters": [
- { "name": "uid", "type": "integer" }
- ],
- "returns": [
- { "name": "profile", "$ref": "CPUProfile" }
- ]
- },
- {
- "name": "removeProfile",
- "parameters": [
- { "name": "type", "type": "string" },
- { "name": "uid", "type": "integer" }
- ]
- },
- {
- "name": "clearProfiles"
- }
- ],
- "events": [
- {
- "name": "addProfileHeader",
- "parameters": [
- { "name": "header", "$ref": "ProfileHeader" }
- ]
- },
- {
- "name": "setRecordingProfile",
- "parameters": [
- { "name": "isProfiling", "type": "boolean" }
- ]
- },
- {
- "name": "resetProfiles"
- }
- ]
- },
- {
- "domain": "HeapProfiler",
- "hidden": true,
- "types": [
- {
- "id": "ProfileHeader",
- "type": "object",
- "description": "Profile header.",
- "properties": [
- { "name": "title", "type": "string", "description": "Profile title." },
- { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." },
- { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." }
- ]
- },
- {
- "id": "HeapSnapshotObjectId",
- "type": "string",
- "description": "Heap snashot object id."
- }
- ],
- "commands": [
- {
- "name": "getProfileHeaders",
- "returns": [
- { "name": "headers", "type": "array", "items": { "$ref": "ProfileHeader"} }
- ]
- },
- {
- "name": "startTrackingHeapObjects"
- },
- {
- "name": "stopTrackingHeapObjects"
- },
- {
- "name": "getHeapSnapshot",
- "parameters": [
- { "name": "uid", "type": "integer" }
- ]
- },
- {
- "name": "removeProfile",
- "parameters": [
- { "name": "uid", "type": "integer" }
- ]
- },
- {
- "name": "clearProfiles"
- },
- {
- "name": "takeHeapSnapshot",
- "parameters": [
- { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
- ]
- },
- {
- "name": "collectGarbage"
- },
- {
- "name": "getObjectByHeapObjectId",
- "parameters": [
- { "name": "objectId", "$ref": "HeapSnapshotObjectId" },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
- ]
- },
- {
- "name": "getHeapObjectId",
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
- ],
- "returns": [
- { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
- ]
- }
- ],
- "events": [
- {
- "name": "addProfileHeader",
- "parameters": [
- { "name": "header", "$ref": "ProfileHeader" }
- ]
- },
- {
- "name": "addHeapSnapshotChunk",
- "parameters": [
- { "name": "uid", "type": "integer" },
- { "name": "chunk", "type": "string" }
- ]
- },
- {
- "name": "finishHeapSnapshot",
- "parameters": [
- { "name": "uid", "type": "integer" }
- ]
- },
- {
- "name": "resetProfiles"
- },
- {
- "name": "reportHeapSnapshotProgress",
- "parameters": [
- { "name": "done", "type": "integer" },
- { "name": "total", "type": "integer" }
- ]
- },
- {
- "name": "lastSeenObjectId",
- "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
- "parameters": [
- { "name": "lastSeenObjectId", "type": "integer" },
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "heapStatsUpdate",
- "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
- "parameters": [
- { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."}
- ]
- }
- ]
- },
- {
- "domain": "Worker",
- "hidden": true,
- "types": [],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "sendMessageToWorker",
- "parameters": [
- { "name": "workerId", "type": "integer" },
- { "name": "message", "type": "object" }
- ]
- },
- {
- "name": "canInspectWorkers",
- "description": "Tells whether browser supports workers inspection.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if browser has workers support." }
- ]
- },
- {
- "name": "connectToWorker",
- "parameters": [
- { "name": "workerId", "type": "integer" }
- ]
- },
- {
- "name": "disconnectFromWorker",
- "parameters": [
- { "name": "workerId", "type": "integer" }
- ]
- },
- {
- "name": "setAutoconnectToWorkers",
- "parameters": [
- { "name": "value", "type": "boolean" }
- ]
- }
- ],
- "events": [
- {
- "name": "workerCreated",
- "parameters": [
- { "name": "workerId", "type": "integer" },
- { "name": "url", "type": "string" },
- { "name": "inspectorConnected", "type": "boolean" }
- ]
- },
- {
- "name": "workerTerminated",
- "parameters": [
- { "name": "workerId", "type": "integer" }
- ]
- },
- {
- "name": "dispatchMessageFromWorker",
- "parameters": [
- { "name": "workerId", "type": "integer" },
- { "name": "message", "type": "object" }
- ]
- },
- {
- "name": "disconnectedFromWorker"
- }
- ]
- },
- {
- "domain": "Canvas",
- "hidden": true,
- "types": [
- {
- "id": "ResourceId",
- "type": "string",
- "description": "Unique resource identifier."
- },
- {
- "id": "ResourceStateDescriptor",
- "type": "object",
- "description": "Resource state descriptor.",
- "properties": [
- { "name": "name", "type": "string", "description": "State name." },
- { "name": "enumValueForName", "type": "string", "optional": true, "description": "String representation of the enum value, if <code>name</code> stands for an enum." },
- { "name": "value", "$ref": "CallArgument", "optional": true, "description": "The value associated with the particular state." },
- { "name": "values", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified." },
- { "name": "isArray", "type": "boolean", "optional": true, "description": "True iff the given <code>values</code> items stand for an array rather than a list of grouped states." }
- ]
- },
- {
- "id": "ResourceState",
- "type": "object",
- "description": "Resource state.",
- "properties": [
- { "name": "id", "$ref": "ResourceId" },
- { "name": "traceLogId", "$ref": "TraceLogId" },
- { "name": "descriptors", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Describes current <code>Resource</code> state." },
- { "name": "imageURL", "type": "string", "optional": true, "description": "Screenshot image data URL." }
- ]
- },
- {
- "id": "CallArgument",
- "type": "object",
- "properties": [
- { "name": "description", "type": "string", "description": "String representation of the object." },
- { "name": "enumName", "type": "string", "optional": true, "description": "Enum name, if any, that stands for the value (for example, a WebGL enum name)." },
- { "name": "resourceId", "$ref": "ResourceId", "optional": true, "description": "Resource identifier. Specified for <code>Resource</code> objects only." },
- { "name": "type", "type": "string", "optional": true, "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type. Specified for non <code>Resource</code> objects only." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The <code>RemoteObject</code>, if requested." }
- ]
- },
- {
- "id": "Call",
- "type": "object",
- "properties": [
- { "name": "contextId", "$ref": "ResourceId" },
- { "name": "functionName", "type": "string", "optional": true },
- { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument" }, "optional": true },
- { "name": "result", "$ref": "CallArgument", "optional": true },
- { "name": "isDrawingCall", "type": "boolean", "optional": true },
- { "name": "isFrameEndCall", "type": "boolean", "optional": true },
- { "name": "property", "type": "string", "optional": true },
- { "name": "value", "$ref": "CallArgument", "optional": true },
- { "name": "sourceURL", "type": "string", "optional": true },
- { "name": "lineNumber", "type": "integer", "optional": true },
- { "name": "columnNumber", "type": "integer", "optional": true }
- ]
- },
- {
- "id": "TraceLogId",
- "type": "string",
- "description": "Unique trace log identifier."
- },
- {
- "id": "TraceLog",
- "type": "object",
- "properties": [
- { "name": "id", "$ref": "TraceLogId" },
- { "name": "calls", "type": "array", "items": { "$ref": "Call" } },
- { "name": "contexts", "type": "array", "items": { "$ref": "CallArgument" } },
- { "name": "startOffset", "type": "integer" },
- { "name": "alive", "type": "boolean" },
- { "name": "totalAvailableCalls", "type": "number" }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables Canvas inspection."
- },
- {
- "name": "disable",
- "description": "Disables Canvas inspection."
- },
- {
- "name": "dropTraceLog",
- "parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" }
- ]
- },
- {
- "name": "hasUninstrumentedCanvases",
- "returns": [
- { "name": "result", "type": "boolean" }
- ],
- "description": "Checks if there is any uninstrumented canvas in the inspected page."
- },
- {
- "name": "captureFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." }
- ],
- "returns": [
- { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." }
- ],
- "description": "Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared."
- },
- {
- "name": "startCapturing",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." }
- ],
- "returns": [
- { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." }
- ],
- "description": "Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command."
- },
- {
- "name": "stopCapturing",
- "parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" }
- ]
- },
- {
- "name": "getTraceLog",
- "parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" },
- { "name": "startOffset", "type": "integer", "optional": true },
- { "name": "maxLength", "type": "integer", "optional": true }
- ],
- "returns": [
- { "name": "traceLog", "$ref": "TraceLog" }
- ]
- },
- {
- "name": "replayTraceLog",
- "parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" },
- { "name": "stepNo", "type": "integer", "description": "Last call index in the trace log to replay (zero based)." }
- ],
- "returns": [
- { "name": "resourceState", "$ref": "ResourceState" },
- { "name": "replayTime", "type": "number", "description": "Replay time (in milliseconds)." }
- ]
- },
- {
- "name": "getResourceState",
- "parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" },
- { "name": "resourceId", "$ref": "ResourceId" }
- ],
- "returns": [
- { "name": "resourceState", "$ref": "ResourceState" }
- ]
- },
- {
- "name": "evaluateTraceLogCallArgument",
- "parameters": [
- { "name": "traceLogId", "$ref": "TraceLogId" },
- { "name": "callIndex", "type": "integer", "description": "Index of the call to evaluate on (zero based)." },
- { "name": "argumentIndex", "type": "integer", "description": "Index of the argument to evaluate (zero based). Provide <code>-1</code> to evaluate call result." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>Runtime.releaseObjectGroup</code>)." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Object wrapper for the evaluation result." },
- { "name": "resourceState", "$ref": "ResourceState", "optional": true, "description": "State of the <code>Resource</code> object." }
- ],
- "description": "Evaluates a given trace call argument or its result."
- }
- ],
- "events": [
- {
- "name": "contextCreated",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing a canvas with a context." }
- ],
- "description": "Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command)."
- },
- {
- "name": "traceLogsRemoved",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "If given, trace logs from the given frame were removed." },
- { "name": "traceLogId", "$ref": "TraceLogId", "optional": true, "description": "If given, trace log with the given ID was removed." }
- ],
- "description": "Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed."
- }
- ]
- },
- {
- "domain": "Input",
- "types": [
- {
- "id": "TouchPoint",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "state", "type": "string", "enum": ["touchPressed", "touchReleased", "touchMoved", "touchStationary", "touchCancelled"], "description": "State of the touch point." },
- { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
- { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
- { "name": "radiusX", "type": "integer", "optional": true, "description": "X radius of the touch area (default: 1)."},
- { "name": "radiusY", "type": "integer", "optional": true, "description": "Y radius of the touch area (default: 1)."},
- { "name": "rotationAngle", "type": "number", "optional": true, "description": "Rotation angle (default: 0.0)."},
- { "name": "force", "type": "number", "optional": true, "description": "Force (default: 1.0)."},
- { "name": "id", "type": "number", "optional": true, "description": "Identifier used to track touch sources between events, must be unique within an event."}
- ]
- }
- ],
- "commands": [
- {
- "name": "dispatchKeyEvent",
- "parameters": [
- { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"], "description": "Type of the key event." },
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
- { "name": "text", "type": "string", "optional": true, "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: \"\")" },
- { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." },
- { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." },
- { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." },
- { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." },
- { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." },
- { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." },
- { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." }
- ],
- "description": "Dispatches a key event to the page."
- },
- {
- "name": "dispatchMouseEvent",
- "parameters": [
- { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." },
- { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
- { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
- { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." },
- { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." },
- { "name": "deviceSpace", "type": "boolean", "optional": true, "hidden": true, "description": "If true, x and y are given in dip wrt current viewport." }
- ],
- "description": "Dispatches a mouse event to the page."
- },
- {
- "name": "dispatchTouchEvent",
- "hidden": true,
- "parameters": [
- { "name": "type", "type": "string", "enum": ["touchStart", "touchEnd", "touchMove"], "description": "Type of the touch event." },
- { "name": "touchPoints", "type": "array", "items": { "$ref": "TouchPoint" }, "description": "Touch points." },
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }
- ],
- "description": "Dispatches a touch event to the page."
- },
- {
- "name": "dispatchGestureEvent",
- "hidden": true,
- "parameters": [
- { "name": "type", "type": "string", "enum": ["scrollBegin", "scrollEnd", "scrollUpdate", "tapDown", "tap", "pinchBegin", "pinchEnd", "pinchUpdate"], "description": "Type of the gesture event." },
- { "name": "x", "type": "integer", "description": "X coordinate relative to the screen's viewport."},
- { "name": "y", "type": "integer", "description": "Y coordinate relative to the screen's viewport."},
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
- { "name": "deltaX", "type": "integer", "optional": true, "description": "Delta X where apllies."},
- { "name": "deltaY", "type": "integer", "optional": true, "description": "Delta Y where apllies."},
- { "name": "pinchScale", "type": "number", "optional": true, "description": "Pinch scale." }
- ],
- "description": "Dispatches a gesture event to the page."
- }
- ],
- "events": []
- },
- {
- "domain": "LayerTree",
- "hidden": true,
- "types": [
- {
- "id": "LayerId",
- "type": "string",
- "description": "Unique Layer identifier."
- },
- {
- "id": "Layer",
- "type": "object",
- "description": "Information about a compositing layer.",
- "properties": [
- { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." },
- { "name": "parentLayerId", "$ref": "LayerId", "optional": true, "description": "The id of parent (not present for root)." },
- { "name": "nodeId", "$ref": "DOM.NodeId", "optional": true, "description": "The id for the node associated with this layer." },
- { "name": "offsetX", "type": "number", "description": "Offset from parent layer, X coordinate." },
- { "name": "offsetY", "type": "number", "description": "Offset from parent layer, X coordinate." },
- { "name": "width", "type": "number", "description": "Layer width." },
- { "name": "height", "type": "number", "description": "Layer height." },
- { "name": "transform", "type": "array", "items": { "type": "number" }, "minItems": 16, "maxItems": 16, "optional": true, "description": "Transformation matrix for layer, default is identity matrix" },
- { "name": "anchorX", "type": "number", "optional": true, "description": "Transform anchor point X, absent if no transform specified" },
- { "name": "anchorY", "type": "number", "optional": true, "description": "Transform anchor point Y, absent if no transform specified" },
- { "name": "anchorZ", "type": "number", "optional": true, "description": "Transform anchor point Z, absent if no transform specified" },
- { "name": "paintCount", "type": "integer", "description": "Indicates how many time this layer has painted." },
- { "name": "invisible", "type": "boolean", "optional": true, "description": "Set if layer is not visible." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables compositing tree inspection."
- },
- {
- "name": "disable",
- "description": "Disables compositing tree inspection."
- },
- {
- "name": "getLayers",
- "parameters": [
- { "name": "nodeId", "optional": true, "$ref": "DOM.NodeId", "description": "Root of the subtree for which we want to gather layers (return entire tree if not specified)" }
- ],
- "description": "Returns the layer tree structure of the current page.",
- "returns": [
- { "name": "layers", "type": "array", "items": { "$ref": "Layer" }, "description": "Child layers." }
- ]
- },
- {
- "name": "compositingReasons",
- "parameters": [
- { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer for which we want to get the reasons it was composited." }
- ],
- "description": "Provides the reasons why the given layer was composited.",
- "returns": [
- { "name": "compositingReasons", "type": "array", "items": { "type": "string" }, "description": "A list of strings specifying reasons for the given layer to become composited." }
- ]
- }
- ],
- "events": [
- {
- "name": "layerTreeDidChange"
- }
- ]
- },
- {
- "domain": "Tracing",
- "hidden": true,
- "commands": [
- {
- "name": "start",
- "description": "Strart trace events collection.",
- "parameters": [
- { "name": "categories", "type": "string", "description": "Category/tag filter" }
- ]
- },
- {
- "name": "end",
- "description": "Stop trace events collection."
- }
- ],
- "events": [
- {
- "name": "dataCollected",
- "parameters": [
- { "name": "value", "type": "array", "items": { "type": "object" } }
- ]
- },
- {
- "name": "tracingComplete"
- }
- ]
- }]
-}
diff --git a/deps/v8_inspector/devtools/protocol.json b/deps/v8_inspector/devtools/protocol.json
deleted file mode 100644
index 213274bd7c..0000000000
--- a/deps/v8_inspector/devtools/protocol.json
+++ /dev/null
@@ -1,5167 +0,0 @@
-{
- "version": { "major": "1", "minor": "1" },
- "domains": [{
- "domain": "Inspector",
- "hidden": true,
- "types": [],
- "commands": [
- {
- "name": "enable",
- "description": "Enables inspector domain notifications.",
- "handlers": ["browser"]
- },
- {
- "name": "disable",
- "description": "Disables inspector domain notifications.",
- "handlers": ["browser"]
- }
- ],
- "events": [
- {
- "name": "detached",
- "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.",
- "parameters": [
- { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "targetCrashed",
- "description": "Fired when debugging target has crashed",
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Memory",
- "hidden": true,
- "types": [
- {
- "id": "PressureLevel",
- "type": "string",
- "enum": ["moderate", "critical"],
- "description": "Memory pressure level."
- }
- ],
- "commands": [
- {
- "name": "getDOMCounters",
- "returns": [
- { "name": "documents", "type": "integer" },
- { "name": "nodes", "type": "integer" },
- { "name": "jsEventListeners", "type": "integer" }
- ]
- },
- {
- "name": "setPressureNotificationsSuppressed",
- "description": "Enable/disable suppressing memory pressure notifications in all processes.",
- "parameters": [
- { "name": "suppressed", "type": "boolean", "description": "If true, memory pressure notifications will be suppressed."}
- ],
- "handlers": ["browser"]
- },
- {
- "name": "simulatePressureNotification",
- "description": "Simulate a memory pressure notification in all processes.",
- "parameters": [
- { "name": "level", "$ref": "PressureLevel", "description": "Memory pressure level of the notification." }
- ],
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Page",
- "description": "Actions and events related to the inspected page belong to the page domain.",
- "types": [
- {
- "id": "ResourceType",
- "type": "string",
- "enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Manifest", "Other"],
- "description": "Resource type as it was perceived by the rendering engine."
- },
- {
- "id": "FrameId",
- "type": "string",
- "description": "Unique frame identifier."
- },
- {
- "id": "Frame",
- "type": "object",
- "description": "Information about the Frame on the page.",
- "properties": [
- { "name": "id", "type": "string", "description": "Frame unique identifier." },
- { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." },
- { "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." },
- { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." },
- { "name": "url", "type": "string", "description": "Frame document's URL." },
- { "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." },
- { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." }
- ]
- },
- {
- "id": "FrameResource",
- "type": "object",
- "description": "Information about the Resource on the page.",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource URL." },
- { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." },
- { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
- { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." },
- { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." }
- ],
- "hidden": true
- },
- {
- "id": "FrameResourceTree",
- "type": "object",
- "description": "Information about the Frame hierarchy along with their cached resources.",
- "properties": [
- { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." },
- { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." },
- { "name": "resources", "type": "array", "items": { "$ref": "FrameResource" }, "description": "Information about frame resources." }
- ],
- "hidden": true
- },
- {
- "id": "ScriptIdentifier",
- "type": "string",
- "description": "Unique script identifier.",
- "hidden": true
- },
- {
- "id": "NavigationEntry",
- "type": "object",
- "description": "Navigation history entry.",
- "properties": [
- { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." },
- { "name": "url", "type": "string", "description": "URL of the navigation history entry." },
- { "name": "title", "type": "string", "description": "Title of the navigation history entry." }
- ],
- "hidden": true
- },
- {
- "id": "ScreencastFrameMetadata",
- "type": "object",
- "description": "Screencast frame metadata.",
- "properties": [
- { "name": "offsetTop", "type": "number", "hidden": true, "description": "Top offset in DIP." },
- { "name": "pageScaleFactor", "type": "number", "hidden": true, "description": "Page scale factor." },
- { "name": "deviceWidth", "type": "number", "hidden": true, "description": "Device screen width in DIP." },
- { "name": "deviceHeight", "type": "number", "hidden": true, "description": "Device screen height in DIP." },
- { "name": "scrollOffsetX", "type": "number", "hidden": true, "description": "Position of horizontal scroll in CSS pixels." },
- { "name": "scrollOffsetY", "type": "number", "hidden": true, "description": "Position of vertical scroll in CSS pixels." },
- { "name": "timestamp", "type": "number", "optional": true, "hidden": true, "description": "Frame swap timestamp." }
- ],
- "hidden": true
- },
- {
- "id": "DialogType",
- "description": "Javascript dialog type.",
- "type": "string",
- "enum": ["alert", "confirm", "prompt", "beforeunload"],
- "hidden": true
- },
- {
- "id": "AppManifestError",
- "description": "Error while paring app manifest.",
- "type": "object",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "critical", "type": "integer", "description": "If criticial, this is a non-recoverable parse error." },
- { "name": "line", "type": "integer", "description": "Error line." },
- { "name": "column", "type": "integer", "description": "Error column." }
- ],
- "hidden": true
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables page domain notifications.",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "disable",
- "description": "Disables page domain notifications.",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "addScriptToEvaluateOnLoad",
- "parameters": [
- { "name": "scriptSource", "type": "string" }
- ],
- "returns": [
- { "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." }
- ],
- "hidden": true
- },
- {
- "name": "removeScriptToEvaluateOnLoad",
- "parameters": [
- { "name": "identifier", "$ref": "ScriptIdentifier" }
- ],
- "hidden": true
- },
- {
- "name": "setAutoAttachToCreatedPages",
- "parameters": [
- { "name": "autoAttach", "type": "boolean", "description": "If true, browser will open a new inspector window for every page created from this one." }
- ],
- "description": "Controls whether browser will open a new inspector window for connected pages.",
- "hidden": true
- },
- {
- "name": "reload",
- "parameters": [
- { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." },
- { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." }
- ],
- "description": "Reloads given page optionally ignoring the cache.",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "navigate",
- "parameters": [
- { "name": "url", "type": "string", "description": "URL to navigate the page to." }
- ],
- "returns": [
- { "name": "frameId", "$ref": "FrameId", "hidden": true, "description": "Frame id that will be navigated." }
- ],
- "description": "Navigates current page to the given URL.",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "getNavigationHistory",
- "returns": [
- { "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." },
- { "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry" }, "description": "Array of navigation history entries." }
- ],
- "description": "Returns navigation history for the current page.",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "navigateToHistoryEntry",
- "parameters": [
- { "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." }
- ],
- "description": "Navigates current page to the given history entry.",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "getCookies",
- "returns": [
- { "name": "cookies", "type": "array", "items": { "$ref": "Network.Cookie" }, "description": "Array of cookie objects." }
- ],
- "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.",
- "handlers": ["browser"],
- "async": true,
- "hidden": true,
- "redirect": "Network"
- },
- {
- "name": "deleteCookie",
- "parameters": [
- { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
- { "name": "url", "type": "string", "description": "URL to match cooke domain and path." }
- ],
- "description": "Deletes browser cookie with given name, domain and path.",
- "handlers": ["browser"],
- "async": true,
- "hidden": true,
- "redirect": "Network"
- },
- {
- "name": "getResourceTree",
- "description": "Returns present frame / resource tree structure.",
- "returns": [
- { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." }
- ],
- "hidden": true
- },
- {
- "name": "getResourceContent",
- "async": true,
- "description": "Returns content of the given resource.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." },
- { "name": "url", "type": "string", "description": "URL of the resource to get content for." }
- ],
- "returns": [
- { "name": "content", "type": "string", "description": "Resource content." },
- { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." }
- ],
- "hidden": true
- },
- {
- "name": "searchInResource",
- "async": true,
- "description": "Searches for given string in resource content.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Frame id for resource to search in." },
- { "name": "url", "type": "string", "description": "URL of the resource to search in." },
- { "name": "query", "type": "string", "description": "String to search for." },
- { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
- { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "Debugger.SearchMatch" }, "description": "List of search matches." }
- ],
- "hidden": true
- },
- {
- "name": "setDocumentContent",
- "description": "Sets given markup as the document's HTML.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." },
- { "name": "html", "type": "string", "description": "HTML content to set." }
- ],
- "hidden": true
- },
- {
- "name": "setDeviceMetricsOverride",
- "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
- "parameters": [
- { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
- { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
- { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." },
- { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." },
- { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." },
- { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." },
- { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." },
- { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." },
- { "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "screenOrientation", "$ref": "Emulation.ScreenOrientation", "optional": true, "description": "Screen orientation override." }
- ],
- "handlers": ["browser"],
- "redirect": "Emulation",
- "hidden": true
- },
- {
- "name": "clearDeviceMetricsOverride",
- "description": "Clears the overriden device metrics.",
- "handlers": ["browser"],
- "redirect": "Emulation",
- "hidden": true
- },
- {
- "name": "setGeolocationOverride",
- "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
- "parameters": [
- { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},
- { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},
- { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
- ],
- "redirect": "Emulation",
- "handlers": ["browser"]
- },
- {
- "name": "clearGeolocationOverride",
- "description": "Clears the overriden Geolocation Position and Error.",
- "redirect": "Emulation",
- "handlers": ["browser"]
- },
- {
- "name": "setDeviceOrientationOverride",
- "description": "Overrides the Device Orientation.",
- "parameters": [
- { "name": "alpha", "type": "number", "description": "Mock alpha"},
- { "name": "beta", "type": "number", "description": "Mock beta"},
- { "name": "gamma", "type": "number", "description": "Mock gamma"}
- ],
- "redirect": "DeviceOrientation",
- "hidden": true
- },
- {
- "name": "clearDeviceOrientationOverride",
- "description": "Clears the overridden Device Orientation.",
- "redirect": "DeviceOrientation",
- "hidden": true
- },
- {
- "name": "setTouchEmulationEnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." },
- { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." }
- ],
- "description": "Toggles mouse event-based touch event emulation.",
- "hidden": true,
- "redirect": "Emulation",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "captureScreenshot",
- "async": true,
- "description": "Capture page screenshot.",
- "returns": [
- { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." }
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "startScreencast",
- "description": "Starts sending each frame using the <code>screencastFrame</code> event.",
- "parameters": [
- { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." },
- { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." },
- { "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." },
- { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." },
- { "name": "everyNthFrame", "type": "integer", "optional": true, "description": "Send every n-th frame." }
- ],
- "hidden": true,
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "stopScreencast",
- "description": "Stops sending each frame in the <code>screencastFrame</code>.",
- "hidden": true,
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "screencastFrameAck",
- "description": "Acknowledges that a screencast frame has been received by the frontend.",
- "parameters": [
- { "name": "sessionId", "type": "integer", "description": "Frame number." }
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "setColorPickerEnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Shows / hides color picker" }
- ],
- "description": "Shows / hides color picker",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "setOverlayMessage",
- "parameters": [
- { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." }
- ],
- "hidden": true,
- "description": "Sets overlay message."
- },
- {
- "name": "getAppManifest",
- "hidden": true,
- "returns": [
- { "name": "url", "type": "string", "description": "Manifest location." },
- { "name": "errors", "type": "array", "items": { "$ref": "AppManifestError" } },
- { "name": "data", "type": "string", "optional": true, "description": "Manifest content." }
- ],
- "handlers": ["none"]
- },
- {
- "name": "requestAppBanner",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "setBlockedEventsWarningThreshold",
- "hidden": true,
- "parameters": [
- { "name": "threshold", "type": "number", "description": "If set to a positive number, specifies threshold in seconds for input event latency that will cause a console warning about blocked event to be issued. If zero or less, the warning is disabled." }
- ]
- }
- ],
- "events": [
- {
- "name": "domContentEventFired",
- "parameters": [
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "loadEventFired",
- "parameters": [
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "frameAttached",
- "description": "Fired when frame has been attached to its parent.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." },
- { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." }
- ]
- },
- {
- "name": "frameNavigated",
- "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.",
- "parameters": [
- { "name": "frame", "$ref": "Frame", "description": "Frame object." }
- ]
- },
- {
- "name": "frameDetached",
- "description": "Fired when frame has been detached from its parent.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been detached." }
- ]
- },
- {
- "name": "frameStartedLoading",
- "description": "Fired when frame has started loading.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." }
- ],
- "hidden": true
- },
- {
- "name": "frameStoppedLoading",
- "description": "Fired when frame has stopped loading.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." }
- ],
- "hidden": true
- },
- {
- "name": "frameScheduledNavigation",
- "description": "Fired when frame schedules a potential navigation.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." },
- { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." }
- ],
- "hidden": true
- },
- {
- "name": "frameClearedScheduledNavigation",
- "description": "Fired when frame no longer has a scheduled navigation.",
- "parameters": [
- { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
- ],
- "hidden": true
- },
- {
- "name": "frameResized",
- "hidden": true
- },
- {
- "name": "javascriptDialogOpening",
- "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.",
- "parameters": [
- { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." },
- { "name": "type", "$ref": "DialogType", "description": "Dialog type." }
- ],
- "hidden": true
- },
- {
- "name": "javascriptDialogClosed",
- "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.",
- "parameters": [
- { "name": "result", "type": "boolean", "description": "Whether dialog was confirmed." }
- ],
- "hidden": true
- },
- {
- "name": "screencastFrame",
- "description": "Compressed image data requested by the <code>startScreencast</code>.",
- "parameters": [
- { "name": "data", "type": "string", "description": "Base64-encoded compressed image." },
- { "name": "metadata", "$ref": "ScreencastFrameMetadata", "description": "Screencast frame metadata."},
- { "name": "sessionId", "type": "integer", "description": "Frame number."}
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "screencastVisibilityChanged",
- "description": "Fired when the page with currently enabled screencast was shown or hidden </code>.",
- "parameters": [
- { "name": "visible", "type": "boolean", "description": "True if the page is visible." }
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "colorPicked",
- "description": "Fired when a color has been picked.",
- "parameters": [
- { "name": "color", "$ref": "DOM.RGBA", "description": "RGBA of the picked color." }
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "interstitialShown",
- "description": "Fired when interstitial page was shown",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "interstitialHidden",
- "description": "Fired when interstitial page was hidden",
- "hidden": true,
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Rendering",
- "description": "This domain allows to control rendering of the page.",
- "hidden": true,
- "commands": [
- {
- "name": "setShowPaintRects",
- "description": "Requests that backend shows paint rectangles",
- "parameters": [
- { "name": "result", "type": "boolean", "description": "True for showing paint rectangles" }
- ]
- },
- {
- "name": "setShowDebugBorders",
- "description": "Requests that backend shows debug borders on layers",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "True for showing debug borders" }
- ]
- },
- {
- "name": "setShowFPSCounter",
- "description": "Requests that backend shows the FPS counter",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "True for showing the FPS counter" }
- ]
- },
- {
- "name": "setShowScrollBottleneckRects",
- "description": "Requests that backend shows scroll bottleneck rects",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" }
- ]
- },
- {
- "name": "setShowViewportSizeOnResize",
- "description": "Paints viewport size upon main frame resize.",
- "parameters": [
- { "name": "show", "type": "boolean", "description": "Whether to paint size or not." }
- ]
- }
- ]
- },
- {
- "domain": "Emulation",
- "description": "This domain emulates different environments for the page.",
- "hidden": true,
- "types": [
- {
- "id": "ScreenOrientation",
- "type": "object",
- "description": "Screen orientation.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"], "description": "Orientation type." },
- { "name": "angle", "type": "integer", "description": "Orientation angle." }
- ]
- }
- ],
- "commands": [
- {
- "name": "setDeviceMetricsOverride",
- "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
- "parameters": [
- { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
- { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
- { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." },
- { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." },
- { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." },
- { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." },
- { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." },
- { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." },
- { "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
- { "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "clearDeviceMetricsOverride",
- "description": "Clears the overriden device metrics.",
- "handlers": ["browser"]
- },
- {
- "name": "resetPageScaleFactor",
- "description": "Requests that page scale factor is reset to initial values."
- },
- {
- "name": "setPageScaleFactor",
- "description": "Sets a specified page scale factor.",
- "parameters": [
- { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." }
- ]
- },
- {
- "name": "setScriptExecutionDisabled",
- "description": "Switches script execution in the page.",
- "parameters": [
- { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." }
- ]
- },
- {
- "name": "setGeolocationOverride",
- "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
- "parameters": [
- { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},
- { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},
- { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
- ],
- "handlers": ["browser"]
- },
- {
- "name": "clearGeolocationOverride",
- "description": "Clears the overriden Geolocation Position and Error.",
- "handlers": ["browser"]
- },
- {
- "name": "setTouchEmulationEnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." },
- { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." }
- ],
- "description": "Toggles mouse event-based touch event emulation.",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "setEmulatedMedia",
- "parameters": [
- { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
- ],
- "description": "Emulates the given media for CSS media queries."
- },
- {
- "name": "setCPUThrottlingRate",
- "parameters": [
- { "name": "rate", "type": "number", "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)." }
- ],
- "description": "Enables CPU throttling to emulate slow CPUs."
- },
- {
- "name": "canEmulate",
- "description": "Tells whether emulation is supported.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if emulation is supported." }
- ],
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Runtime",
- "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
- "types": [
- {
- "id": "ScriptId",
- "type": "string",
- "description": "Unique script identifier."
- },
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- },
- {
- "id": "RemoteObject",
- "type": "object",
- "description": "Mirror object referencing original JavaScript object.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
- { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." },
- { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
- { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "hidden": true },
- { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "hidden": true}
- ]
- },
- {
- "id": "CustomPreview",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "header", "type": "string"},
- { "name": "hasBody", "type": "boolean"},
- { "name": "formatterObjectId", "$ref": "RemoteObjectId"},
- { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" },
- { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true }
- ]
- },
- {
- "id": "ObjectPreview",
- "type": "object",
- "hidden": true,
- "description": "Object containing abbreviated remote object value.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
- { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." },
- { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." },
- { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." }
- ]
- },
- {
- "id": "PropertyPreview",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "name", "type": "string", "description": "Property name." },
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." },
- { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
- { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
- ]
- },
- {
- "id": "EntryPreview",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." },
- { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." }
- ]
- },
- {
- "id": "PropertyDescriptor",
- "type": "object",
- "description": "Object property descriptor.",
- "properties": [
- { "name": "name", "type": "string", "description": "Property name or symbol description." },
- { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
- { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
- { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
- { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
- { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
- { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
- { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true },
- { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type.", "hidden": true }
- ]
- },
- {
- "id": "InternalPropertyDescriptor",
- "type": "object",
- "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
- "properties": [
- { "name": "name", "type": "string", "description": "Conventional property name." },
- { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }
- ],
- "hidden": true
- },
- {
- "id": "CallArgument",
- "type": "object",
- "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.",
- "properties": [
- { "name": "value", "type": "any", "optional": true, "description": "Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." },
- { "name": "type", "optional": true, "hidden": true, "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }
- ]
- },
- {
- "id": "ExecutionContextId",
- "type": "integer",
- "description": "Id of an execution context."
- },
- {
- "id": "ExecutionContextDescription",
- "type": "object",
- "description": "Description of an isolated world.",
- "properties": [
- { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
- { "name": "isDefault", "type": "boolean", "description": "Whether context is the default page context (as opposite to e.g. context of content script).", "hidden": true },
- { "name": "origin", "type": "string", "description": "Execution context origin.", "hidden": true},
- { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true},
- { "name": "frameId", "type": "string", "description": "Id of the owning frame. May be an empty string if the context is not associated with a frame." }
- ]
- },
- {
- "id": "ExceptionDetails",
- "type": "object",
- "description": "Detailed information on exception (or error) that was thrown during script compilation or execution.",
- "properties": [
- { "name": "text", "type": "string", "description": "Exception text." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
- { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." },
- { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
- { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." },
- { "name": "stack", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." }
- ]
- },
- {
- "id": "CallFrame",
- "type": "object",
- "description": "Stack entry for runtime errors and assertions.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "JavaScript function name." },
- { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." },
- { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." }
- ]
- },
- {
- "id": "StackTrace",
- "type": "object",
- "description": "Call frames for assertions or error messages.",
- "properties": [
- { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." },
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
- { "name": "parent", "$ref": "StackTrace", "optional": true, "hidden": true, "hidden": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }
- ]
- }
- ],
- "commands": [
- {
- "name": "evaluate",
- "parameters": [
- { "name": "expression", "type": "string", "description": "Expression to evaluate." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
- { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." },
- { "name": "userGesture", "type": "boolean", "optional": true, "hidden": true, "description": "Whether execution should be treated as initiated by user in the UI." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."}
- ],
- "description": "Evaluates expression on global object."
- },
- {
- "name": "callFunctionOn",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
- { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
- { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." },
- { "name": "userGesture", "type": "boolean", "optional": true, "hidden": true, "description": "Whether execution should be treated as initiated by user in the UI." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Call result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
- ],
- "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
- },
- {
- "name": "getProperties",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
- { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." },
- { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the results." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." },
- { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself).", "hidden": true },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."}
- ],
- "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
- },
- {
- "name": "releaseObject",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
- ],
- "description": "Releases remote object with given id."
- },
- {
- "name": "releaseObjectGroup",
- "parameters": [
- { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
- ],
- "description": "Releases all remote objects that belong to a given group."
- },
- {
- "name": "run",
- "hidden": true,
- "description": "Tells inspected instance(worker or page) that it can run in case it was started paused."
- },
- {
- "name": "enable",
- "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context."
- },
- {
- "name": "disable",
- "hidden": true,
- "description": "Disables reporting of execution contexts creation."
- },
- {
- "name": "setCustomObjectFormatterEnabled",
- "parameters": [
- {
- "name": "enabled",
- "type": "boolean"
- }
- ],
- "hidden": true
- },
- {
- "name": "compileScript",
- "hidden": true,
- "parameters": [
- { "name": "expression", "type": "string", "description": "Expression to compile." },
- { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." },
- { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter is used to specify one of those contexts." }
- ],
- "returns": [
- { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Compiles expression."
- },
- {
- "name": "runScript",
- "hidden": true,
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter is used to specify one of those contexts." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Run result." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Runs script with given id in a given context."
- }
- ],
- "events": [
- {
- "name": "executionContextCreated",
- "parameters": [
- { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." }
- ],
- "description": "Issued when new execution context is created."
- },
- {
- "name": "executionContextDestroyed",
- "parameters": [
- { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" }
- ],
- "description": "Issued when execution context is destroyed."
- },
- {
- "name": "executionContextsCleared",
- "description": "Issued when all executionContexts were cleared in browser"
- },
- {
- "name": "inspectRequested",
- "parameters": [
- { "name": "object", "$ref": "RemoteObject" },
- { "name": "hints", "type": "object" }
- ],
- "hidden": true
- }
- ]
- },
- {
- "domain": "Console",
- "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.",
- "types": [
- {
- "id": "Timestamp",
- "type": "number",
- "description": "Number of seconds since epoch.",
- "hidden": true
- },
- {
- "id": "ConsoleMessage",
- "type": "object",
- "description": "Console message.",
- "properties": [
- { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation"], "description": "Message source." },
- { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info", "revokedError"], "description": "Message severity." },
- { "name": "text", "type": "string", "description": "Message text." },
- { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd"], "description": "Console message type." },
- { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
- { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
- { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." },
- { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
- { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
- { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." },
- { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp, when this message was fired.", "hidden": true },
- { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Identifier of the context where this message was created", "hidden": true },
- { "name": "messageId", "type": "integer", "hidden": true, "optional": true, "description": "Message id." },
- { "name": "relatedMessageId", "type": "integer", "hidden": true, "optional": true, "description": "Related message id." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
- },
- {
- "name": "disable",
- "description": "Disables console domain, prevents further console messages from being reported to the client."
- },
- {
- "name": "clearMessages",
- "description": "Clears console messages collected in the browser."
- }
- ],
- "events": [
- {
- "name": "messageAdded",
- "parameters": [
- { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
- ],
- "description": "Issued when new console message is added."
- },
- {
- "name": "messageRepeatCountUpdated",
- "parameters": [
- { "name": "count", "type": "integer", "description": "New repeat count value." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of most recent message in batch.", "hidden": true }
- ],
- "description": "Is not issued. Will be gone in the future versions of the protocol.",
- "deprecated": true
- },
- {
- "name": "messagesCleared",
- "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation."
- }
- ]
- },
- {
- "domain": "Security",
- "description": "Security",
- "hidden": true,
- "types": [
- {
- "id": "SecurityState",
- "type": "string",
- "enum": ["unknown", "neutral", "insecure", "warning", "secure", "info"],
- "description": "The security level of a page or resource."
- },
- {
- "id": "SecurityStateExplanation",
- "type": "object",
- "properties": [
- { "name": "securityState", "$ref": "SecurityState", "description": "Security state representing the severity of the factor being explained." },
- { "name": "summary", "type": "string", "description": "Short phrase describing the type of factor." },
- { "name": "description", "type": "string", "description": "Full text explanation of the factor." },
- { "name": "certificateId", "$ref": "Network.CertificateId", "optional": true, "description": "Associated certificate id." }
- ],
- "description": "An explanation of an factor contributing to the security state."
- },
- {
- "id": "MixedContentStatus",
- "type": "object",
- "properties": [
- { "name": "ranInsecureContent", "type": "boolean", "description": "True if the page ran insecure content such as scripts." },
- { "name": "displayedInsecureContent", "type": "boolean", "description": "True if the page displayed insecure content such as images." },
- { "name": "ranInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that ran insecure content." },
- { "name": "displayedInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that displayed insecure content." }
- ],
- "description": "Information about mixed content on the page."
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables tracking security state changes.",
- "handlers": ["browser"]
- },
- {
- "name": "disable",
- "description": "Disables tracking security state changes.",
- "handlers": ["browser"]
- }
- ],
- "events": [
- {
- "name": "securityStateChanged",
- "description": "The security state of the page changed.",
- "parameters": [
- { "name": "securityState", "$ref": "SecurityState", "description": "Security state." },
- { "name": "explanations", "type": "array", "items": { "$ref": "SecurityStateExplanation" }, "description": "List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included.", "optional": true },
- { "name": "mixedContentStatus", "$ref": "MixedContentStatus", "description": "Information about mixed content on the page.", "optional": true },
- { "name": "schemeIsCryptographic", "type": "boolean", "description": "True if the page was loaded over cryptographic transport such as HTTPS.", "optional": true }
- ],
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Network",
- "description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.",
- "types": [
- {
- "id": "LoaderId",
- "type": "string",
- "description": "Unique loader identifier."
- },
- {
- "id": "RequestId",
- "type": "string",
- "description": "Unique request identifier."
- },
- {
- "id": "Timestamp",
- "type": "number",
- "description": "Number of seconds since epoch."
- },
- {
- "id": "Headers",
- "type": "object",
- "description": "Request / response headers as keys / values of JSON object."
- },
- {
- "id": "ResourceTiming",
- "type": "object",
- "description": "Timing information for the request.",
- "properties": [
- { "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." },
- { "name": "proxyStart", "type": "number", "description": "Started resolving proxy." },
- { "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." },
- { "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." },
- { "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." },
- { "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." },
- { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." },
- { "name": "sslStart", "type": "number", "description": "Started SSL handshake." },
- { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." },
- { "name": "workerStart", "type": "number", "description": "Started running ServiceWorker.", "hidden": true },
- { "name": "workerReady", "type": "number", "description": "Finished Starting ServiceWorker.", "hidden": true },
- { "name": "sendStart", "type": "number", "description": "Started sending request." },
- { "name": "sendEnd", "type": "number", "description": "Finished sending request." },
- { "name": "pushStart", "type": "number", "description": "Time the server started pushing request.", "hidden": true },
- { "name": "pushEnd", "type": "number", "description": "Time the server finished pushing request.", "hidden": true },
- { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." }
- ]
- },
- {
- "id": "ResourcePriority",
- "type": "string",
- "enum": ["VeryLow", "Low", "Medium", "High", "VeryHigh"],
- "description": "Loading priority of a resource request."
- },
- {
- "id": "Request",
- "type": "object",
- "description": "HTTP request data.",
- "properties": [
- { "name": "url", "type": "string", "description": "Request URL." },
- { "name": "method", "type": "string", "description": "HTTP request method." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." },
- { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." },
- { "name": "mixedContentType", "optional": true, "type": "string", "enum": ["blockable", "optionally-blockable", "none"], "description": "The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/" },
- { "name": "initialPriority", "$ref": "ResourcePriority", "description": "Priority of the resource request at the time request is sent."}
- ]
- },
- {
- "id": "CertificateId",
- "type": "integer",
- "description": "An internal certificate ID value."
- },
- {
- "id": "CertificateSubject",
- "type": "object",
- "description": "Subject of a certificate.",
- "properties": [
- { "name": "name", "type": "string", "description": "Certificate subject name." },
- { "name": "sanDnsNames", "type": "array", "items": { "type": "string" }, "description": "Subject Alternative Name (SAN) DNS names." },
- { "name": "sanIpAddresses", "type": "array", "items": { "type": "string" }, "description": "Subject Alternative Name (SAN) IP addresses." }
- ]
- },
- {
- "id": "CertificateDetails",
- "type": "object",
- "description": "Details about a request's certificate.",
- "properties": [
- { "name": "subject", "$ref": "CertificateSubject", "description": "Certificate subject." },
- { "name": "issuer", "type": "string", "description": "Name of the issuing CA." },
- { "name": "validFrom", "$ref": "Timestamp", "description": "Certificate valid from date." },
- { "name": "validTo", "$ref": "Timestamp", "description": "Certificate valid to (expiration) date" }
- ]
- },
- {
- "id": "CertificateValidationDetails",
- "type": "object",
- "description": "Details about the validation status of a request's certificate.",
- "properties": [
- { "name": "numUnknownScts", "type": "integer", "description": "The number of SCTs from unknown logs." },
- { "name": "numInvalidScts", "type": "integer", "description": "The number of invalid SCTs." },
- { "name": "numValidScts", "type": "integer", "description": "The number of valid SCTs." }
- ]
- },
- {
- "id": "SecurityDetails",
- "type": "object",
- "description": "Security details about a request.",
- "properties": [
- { "name": "protocol", "type": "string", "description": "Protocol name (e.g. \"TLS 1.2\" or \"QUIC\")." },
- { "name": "keyExchange", "type": "string", "description": "Key Exchange used by the connection." },
- { "name": "cipher", "type": "string", "description": "Cipher name." },
- { "name": "mac", "type": "string", "optional": true, "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs." },
- { "name": "certificateId", "$ref": "CertificateId", "description": "Certificate ID value." },
- { "name": "certificateValidationDetails", "$ref": "CertificateValidationDetails", "optional": true, "description": "Validation details for the request's certficate." }
- ]
- },
- {
- "id": "BlockedReason",
- "type": "string",
- "description": "The reason why request was blocked.",
- "enum": ["csp", "mixed-content", "origin", "inspector", "other"],
- "hidden": true
- },
- {
- "id": "Response",
- "type": "object",
- "description": "HTTP response data.",
- "properties": [
- { "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." },
- { "name": "status", "type": "number", "description": "HTTP response status code." },
- { "name": "statusText", "type": "string", "description": "HTTP response status text." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
- { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." },
- { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
- { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
- { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." },
- { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." },
- { "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." },
- { "name": "remoteIPAddress", "type": "string", "optional": true, "hidden": true, "description": "Remote IP address." },
- { "name": "remotePort", "type": "integer", "optional": true, "hidden": true, "description": "Remote port."},
- { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." },
- { "name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker." },
- { "name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far." },
- { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." },
- { "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request." },
- { "name": "securityState", "$ref": "Security.SecurityState", "description": "Security state of the request resource." },
- { "name": "securityDetails", "$ref": "SecurityDetails", "optional": true, "description": "Security details for the request." }
- ]
- },
- {
- "id": "WebSocketRequest",
- "type": "object",
- "description": "WebSocket request data.",
- "hidden": true,
- "properties": [
- { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." }
- ]
- },
- {
- "id": "WebSocketResponse",
- "type": "object",
- "description": "WebSocket response data.",
- "hidden": true,
- "properties": [
- { "name": "status", "type": "number", "description": "HTTP response status code." },
- { "name": "statusText", "type": "string", "description": "HTTP response status text." },
- { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
- { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." },
- { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "HTTP request headers." },
- { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." }
- ]
- },
- {
- "id": "WebSocketFrame",
- "type": "object",
- "description": "WebSocket frame data.",
- "hidden": true,
- "properties": [
- { "name": "opcode", "type": "number", "description": "WebSocket frame opcode." },
- { "name": "mask", "type": "boolean", "description": "WebSocke frame mask." },
- { "name": "payloadData", "type": "string", "description": "WebSocke frame payload data." }
- ]
- },
- {
- "id": "CachedResource",
- "type": "object",
- "description": "Information about the cached resource.",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." },
- { "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." },
- { "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." },
- { "name": "bodySize", "type": "number", "description": "Cached response body size." }
- ]
- },
- {
- "id": "Initiator",
- "type": "object",
- "description": "Information about the request initiator.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." },
- { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." },
- { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." },
- { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." }
- ]
- },
- {
- "id": "Cookie",
- "type": "object",
- "description": "Cookie object",
- "properties": [
- { "name": "name", "type": "string", "description": "Cookie name." },
- { "name": "value", "type": "string", "description": "Cookie value." },
- { "name": "domain", "type": "string", "description": "Cookie domain." },
- { "name": "path", "type": "string", "description": "Cookie path." },
- { "name": "expires", "type": "number", "description": "Cookie expires." },
- { "name": "size", "type": "integer", "description": "Cookie size." },
- { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." },
- { "name": "secure", "type": "boolean", "description": "True if cookie is secure." },
- { "name": "session", "type": "boolean", "description": "True in case of session cookie." },
- { "name": "sameSite", "type": "string", "optional": true, "enum": ["Strict", "Lax"], "description": "Represents the cookies' 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies" }
- ],
- "hidden": true
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables network tracking, network events will now be delivered to the client.",
- "parameters": [
- { "name": "maxTotalBufferSize", "type": "integer", "optional": true, "hidden": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc)." },
- { "name": "maxResourceBufferSize", "type": "integer", "optional": true, "hidden": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc)." }
- ]
- },
- {
- "name": "disable",
- "description": "Disables network tracking, prevents network events from being sent to the client."
- },
- {
- "name": "setUserAgentOverride",
- "description": "Allows overriding user agent with the given string.",
- "parameters": [
- { "name": "userAgent", "type": "string", "description": "User agent to use." }
- ]
- },
- {
- "name": "setExtraHTTPHeaders",
- "description": "Specifies whether to always send extra HTTP headers with the requests from this page.",
- "parameters": [
- { "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." }
- ]
- },
- {
- "name": "getResponseBody",
- "async": true,
- "description": "Returns content served for the given request.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." }
- ],
- "returns": [
- { "name": "body", "type": "string", "description": "Response body." },
- { "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." }
- ]
- },
- {
- "name": "addBlockedURL",
- "description": "Blocks specific URL from loading.",
- "parameters": [
- { "name": "url", "type": "string", "description": "URL to block." }
- ],
- "hidden": true
- },
- {
- "name": "removeBlockedURL",
- "description": "Cancels blocking of a specific URL from loading.",
- "parameters": [
- { "name": "url", "type": "string", "description": "URL to stop blocking." }
- ],
- "hidden": true
- },
- {
- "name": "replayXHR",
- "description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." }
- ],
- "hidden": true
- },
- {
- "name": "setMonitoringXHREnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
- ],
- "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.",
- "hidden": true
- },
- {
- "name": "canClearBrowserCache",
- "description": "Tells whether clearing browser cache is supported.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if browser cache can be cleared." }
- ]
- },
- {
- "name": "clearBrowserCache",
- "description": "Clears browser cache.",
- "handlers": ["browser"]
- },
- {
- "name": "canClearBrowserCookies",
- "description": "Tells whether clearing browser cookies is supported.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if browser cookies can be cleared." }
- ]
- },
- {
- "name": "clearBrowserCookies",
- "description": "Clears browser cookies.",
- "handlers": ["browser"]
- },
- {
- "name": "getCookies",
- "returns": [
- { "name": "cookies", "type": "array", "items": { "$ref": "Cookie" }, "description": "Array of cookie objects." }
- ],
- "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.",
- "handlers": ["browser"],
- "async": true,
- "hidden": true
- },
- {
- "name": "deleteCookie",
- "parameters": [
- { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
- { "name": "url", "type": "string", "description": "URL to match cooke domain and path." }
- ],
- "description": "Deletes browser cookie with given name, domain and path.",
- "handlers": ["browser"],
- "async": true,
- "hidden": true
- },
- {
- "name": "canEmulateNetworkConditions",
- "description": "Tells whether emulation of network conditions is supported.",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if emulation of network conditions is supported." }
- ],
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "emulateNetworkConditions",
- "description": "Activates emulation of network conditions.",
- "parameters": [
- { "name": "offline", "type": "boolean", "description": "True to emulate internet disconnection." },
- { "name": "latency", "type": "number", "description": "Additional latency (ms)." },
- { "name": "downloadThroughput", "type": "number", "description": "Maximal aggregated download throughput." },
- { "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." }
- ],
- "hidden": true,
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "setCacheDisabled",
- "parameters": [
- { "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." }
- ],
- "description": "Toggles ignoring cache for each request. If <code>true</code>, cache will not be used."
- },
- {
- "name": "setBypassServiceWorker",
- "parameters": [
- { "name": "bypass", "type": "boolean", "description": "Bypass service worker and load from network." }
- ],
- "hidden": true,
- "description": "Toggles ignoring of service worker for each request."
- },
- {
- "name": "setDataSizeLimitsForTest",
- "parameters": [
- { "name": "maxTotalSize", "type": "integer", "description": "Maximum total buffer size." },
- { "name": "maxResourceSize", "type": "integer", "description": "Maximum per-resource size." }
- ],
- "description": "For testing.",
- "hidden": true
- },
- {
- "name": "getCertificateDetails",
- "description": "Returns details for the given certificate.",
- "parameters": [
- { "name": "certificateId", "$ref": "CertificateId", "description": "ID of the certificate to get details for." }
- ],
- "returns": [
- { "name": "result", "$ref": "CertificateDetails", "description": "Certificate details." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "showCertificateViewer",
- "description": "Displays native dialog with the certificate details.",
- "parameters": [
- { "name": "certificateId", "$ref": "CertificateId", "description": "Certificate id." }
- ],
- "handlers": ["browser"]
- }
- ],
- "events": [
- {
- "name": "resourceChangedPriority",
- "description": "Fired when resource loading priority is changed",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "newPriority", "$ref": "ResourcePriority", "description": "New priority" },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
- ],
- "hidden": true
- },
- {
- "name": "requestWillBeSent",
- "description": "Fired when page is about to send HTTP request.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true },
- { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
- { "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." },
- { "name": "request", "$ref": "Request", "description": "Request data." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." },
- { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
- { "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." },
- { "name": "type", "$ref": "Page.ResourceType", "optional": true, "hidden": true, "description": "Type of this resource." }
- ]
- },
- {
- "name": "requestServedFromCache",
- "description": "Fired if request ended up loading from cache.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }
- ]
- },
- {
- "name": "responseReceived",
- "description": "Fired when HTTP response is available.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true },
- { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
- { "name": "response", "$ref": "Response", "description": "Response data." }
- ]
- },
- {
- "name": "dataReceived",
- "description": "Fired when data chunk was received over the network.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "dataLength", "type": "integer", "description": "Data chunk length." },
- { "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." }
- ]
- },
- {
- "name": "loadingFinished",
- "description": "Fired when HTTP request has finished loading.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "encodedDataLength", "type": "number", "description": "Total number of bytes received for this request." }
- ]
- },
- {
- "name": "loadingFailed",
- "description": "Fired when HTTP request has failed to load.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
- { "name": "errorText", "type": "string", "description": "User friendly error message." },
- { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." },
- { "name": "blockedReason", "$ref": "BlockedReason", "optional": true, "description": "The reason why loading was blocked, if any.", "hidden": true }
- ]
- },
- {
- "name": "webSocketWillSendHandshakeRequest",
- "description": "Fired when WebSocket is about to initiate handshake.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." },
- { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketHandshakeResponseReceived",
- "description": "Fired when WebSocket handshake response becomes available.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketCreated",
- "description": "Fired upon WebSocket creation.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "url", "type": "string", "description": "WebSocket request URL." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketClosed",
- "description": "Fired when WebSocket is closed.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketFrameReceived",
- "description": "Fired when WebSocket frame is received.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketFrameError",
- "description": "Fired when WebSocket frame error occurs.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." }
- ],
- "hidden": true
- },
- {
- "name": "webSocketFrameSent",
- "description": "Fired when WebSocket frame is sent.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
- ],
- "hidden": true
- },
- {
- "name": "eventSourceMessageReceived",
- "description": "Fired when EventSource message is received.",
- "parameters": [
- { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
- { "name": "eventName", "type": "string", "description": "Message type." },
- { "name": "eventId", "type": "string", "description": "Message identifier." },
- { "name": "data", "type": "string", "description": "Message content." }
- ],
- "hidden": true
- }
- ]
- },
- {
- "domain": "Database",
- "hidden": true,
- "types": [
- {
- "id": "DatabaseId",
- "type": "string",
- "description": "Unique identifier of Database object.",
- "hidden": true
- },
- {
- "id": "Database",
- "type": "object",
- "description": "Database object.",
- "hidden": true,
- "properties": [
- { "name": "id", "$ref": "DatabaseId", "description": "Database ID." },
- { "name": "domain", "type": "string", "description": "Database domain." },
- { "name": "name", "type": "string", "description": "Database name." },
- { "name": "version", "type": "string", "description": "Database version." }
- ]
- },
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables database tracking, database events will now be delivered to the client."
- },
- {
- "name": "disable",
- "description": "Disables database tracking, prevents database events from being sent to the client."
- },
- {
- "name": "getDatabaseTableNames",
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" }
- ],
- "returns": [
- { "name": "tableNames", "type": "array", "items": { "type": "string" } }
- ]
- },
- {
- "name": "executeSQL",
- "async": true,
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "query", "type": "string" }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "values", "type": "array", "optional": true, "items": { "type": "any" }},
- { "name": "sqlError", "$ref": "Error", "optional": true }
- ]
- }
- ],
- "events": [
- {
- "name": "addDatabase",
- "parameters": [
- { "name": "database", "$ref": "Database" }
- ]
- }
- ]
- },
- {
- "domain": "IndexedDB",
- "hidden": true,
- "types": [
- {
- "id": "DatabaseWithObjectStores",
- "type": "object",
- "description": "Database with an array of object stores.",
- "properties": [
- { "name": "name", "type": "string", "description": "Database name." },
- { "name": "version", "type": "integer", "description": "Database version." },
- { "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." }
- ]
- },
- {
- "id": "ObjectStore",
- "type": "object",
- "description": "Object store.",
- "properties": [
- { "name": "name", "type": "string", "description": "Object store name." },
- { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." },
- { "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." },
- { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." }
- ]
- },
- {
- "id": "ObjectStoreIndex",
- "type": "object",
- "description": "Object store index.",
- "properties": [
- { "name": "name", "type": "string", "description": "Index name." },
- { "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." },
- { "name": "unique", "type": "boolean", "description": "If true, index is unique." },
- { "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." }
- ]
- },
- {
- "id": "Key",
- "type": "object",
- "description": "Key.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["number", "string", "date", "array"], "description": "Key type." },
- { "name": "number", "type": "number", "optional": true, "description": "Number value." },
- { "name": "string", "type": "string", "optional": true, "description": "String value." },
- { "name": "date", "type": "number", "optional": true, "description": "Date value." },
- { "name": "array", "type": "array", "optional": true, "items": { "$ref": "Key" }, "description": "Array value." }
- ]
- },
- {
- "id": "KeyRange",
- "type": "object",
- "description": "Key range.",
- "properties": [
- { "name": "lower", "$ref": "Key", "optional": true, "description": "Lower bound." },
- { "name": "upper", "$ref": "Key", "optional": true, "description": "Upper bound." },
- { "name": "lowerOpen", "type": "boolean", "description": "If true lower bound is open." },
- { "name": "upperOpen", "type": "boolean", "description": "If true upper bound is open." }
- ]
- },
- {
- "id": "DataEntry",
- "type": "object",
- "description": "Data entry.",
- "properties": [
- { "name": "key", "type": "string", "description": "JSON-stringified key object." },
- { "name": "primaryKey", "type": "string", "description": "JSON-stringified primary key object." },
- { "name": "value", "type": "string", "description": "JSON-stringified value object." }
- ]
- },
- {
- "id": "KeyPath",
- "type": "object",
- "description": "Key path.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." },
- { "name": "string", "type": "string", "optional": true, "description": "String value." },
- { "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables events from backend."
- },
- {
- "name": "disable",
- "description": "Disables events from backend."
- },
- {
- "name": "requestDatabaseNames",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." }
- ],
- "returns": [
- { "name": "databaseNames", "type": "array", "items": { "type": "string" }, "description": "Database names for origin." }
- ],
- "description": "Requests database names for given security origin."
- },
- {
- "name": "requestDatabase",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." },
- { "name": "databaseName", "type": "string", "description": "Database name." }
- ],
- "returns": [
- { "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." }
- ],
- "description": "Requests database with given name in given frame."
- },
- {
- "name": "requestData",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." },
- { "name": "databaseName", "type": "string", "description": "Database name." },
- { "name": "objectStoreName", "type": "string", "description": "Object store name." },
- { "name": "indexName", "type": "string", "description": "Index name, empty string for object store data requests." },
- { "name": "skipCount", "type": "integer", "description": "Number of records to skip." },
- { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." },
- { "name": "keyRange", "$ref": "KeyRange", "optional": true, "description": "Key range." }
- ],
- "returns": [
- { "name": "objectStoreDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." },
- { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." }
- ],
- "description": "Requests data from object store or index."
- },
- {
- "name": "clearObjectStore",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." },
- { "name": "databaseName", "type": "string", "description": "Database name." },
- { "name": "objectStoreName", "type": "string", "description": "Object store name." }
- ],
- "returns": [
- ],
- "description": "Clears all entries from an object store."
- }
- ]
- },
- {
- "domain": "CacheStorage",
- "hidden": true,
- "types": [
- {
- "id": "CacheId",
- "type": "string",
- "description": "Unique identifier of the Cache object."
- },
- {
- "id": "DataEntry",
- "type": "object",
- "description": "Data entry.",
- "properties": [
- { "name": "request", "type": "string", "description": "Request url spec." },
- { "name": "response", "type": "string", "description": "Response stataus text." }
- ]
- },
- {
- "id": "Cache",
- "type": "object",
- "description": "Cache identifier.",
- "properties": [
- { "name": "cacheId", "$ref": "CacheId", "description": "An opaque unique id of the cache." },
- { "name": "securityOrigin", "type": "string", "description": "Security origin of the cache." },
- { "name": "cacheName", "type": "string", "description": "The name of the cache." }
- ]
- }
- ],
- "commands": [
- {
- "name": "requestCacheNames",
- "async": true,
- "parameters": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin." }
- ],
- "returns": [
- { "name": "caches", "type": "array", "items": { "$ref": "Cache" }, "description": "Caches for the security origin." }
- ],
- "description": "Requests cache names."
- },
- {
- "name": "requestEntries",
- "async": true,
- "parameters": [
- { "name": "cacheId", "$ref": "CacheId", "description": "ID of cache to get entries from." },
- { "name": "skipCount", "type": "integer", "description": "Number of records to skip." },
- { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." }
- ],
- "returns": [
- { "name": "cacheDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." },
- { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." }
- ],
- "description": "Requests data from cache."
- },
- {
- "name": "deleteCache",
- "async": true,
- "parameters": [
- { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache for deletion." }
- ],
- "description": "Deletes a cache."
- },
- {
- "name": "deleteEntry",
- "async": true,
- "parameters": [
- { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache where the entry will be deleted." },
- { "name": "request", "type": "string", "description": "URL spec of the request." }
- ],
- "description": "Deletes a cache entry."
- }
- ]
- },
- {
- "domain": "DOMStorage",
- "hidden": true,
- "description": "Query and modify DOM storage.",
- "types": [
- {
- "id": "StorageId",
- "type": "object",
- "description": "DOM Storage identifier.",
- "hidden": true,
- "properties": [
- { "name": "securityOrigin", "type": "string", "description": "Security origin for the storage." },
- { "name": "isLocalStorage", "type": "boolean", "description": "Whether the storage is local storage (not session storage)." }
- ]
- },
- {
- "id": "Item",
- "type": "array",
- "description": "DOM Storage item.",
- "hidden": true,
- "items": { "type": "string" }
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables storage tracking, storage events will now be delivered to the client."
- },
- {
- "name": "disable",
- "description": "Disables storage tracking, prevents storage events from being sent to the client."
- },
- {
- "name": "getDOMStorageItems",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" }
- ],
- "returns": [
- { "name": "entries", "type": "array", "items": { "$ref": "Item" } }
- ]
- },
- {
- "name": "setDOMStorageItem",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" },
- { "name": "value", "type": "string" }
- ]
- },
- {
- "name": "removeDOMStorageItem",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" }
- ]
- }
- ],
- "events": [
- {
- "name": "domStorageItemsCleared",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" }
- ]
- },
- {
- "name": "domStorageItemRemoved",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" }
- ]
- },
- {
- "name": "domStorageItemAdded",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" },
- { "name": "newValue", "type": "string" }
- ]
- },
- {
- "name": "domStorageItemUpdated",
- "parameters": [
- { "name": "storageId", "$ref": "StorageId" },
- { "name": "key", "type": "string" },
- { "name": "oldValue", "type": "string" },
- { "name": "newValue", "type": "string" }
- ]
- }
- ]
- },
- {
- "domain": "ApplicationCache",
- "hidden": true,
- "types": [
- {
- "id": "ApplicationCacheResource",
- "type": "object",
- "description": "Detailed application cache resource information.",
- "properties": [
- { "name": "url", "type": "string", "description": "Resource url." },
- { "name": "size", "type": "integer", "description": "Resource size." },
- { "name": "type", "type": "string", "description": "Resource type." }
- ]
- },
- {
- "id": "ApplicationCache",
- "type": "object",
- "description": "Detailed application cache information.",
- "properties": [
- { "name": "manifestURL", "type": "string", "description": "Manifest URL." },
- { "name": "size", "type": "number", "description": "Application cache size." },
- { "name": "creationTime", "type": "number", "description": "Application cache creation time." },
- { "name": "updateTime", "type": "number", "description": "Application cache update time." },
- { "name": "resources", "type": "array", "items": { "$ref": "ApplicationCacheResource" }, "description": "Application cache resources." }
- ]
- },
- {
- "id": "FrameWithManifest",
- "type": "object",
- "description": "Frame identifier - manifest URL pair.",
- "properties": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier." },
- { "name": "manifestURL", "type": "string", "description": "Manifest URL." },
- { "name": "status", "type": "integer", "description": "Application cache status." }
- ]
- }
- ],
- "commands": [
- {
- "name": "getFramesWithManifests",
- "returns": [
- { "name": "frameIds", "type": "array", "items": { "$ref": "FrameWithManifest" }, "description": "Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache." }
- ],
- "description": "Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache."
- },
- {
- "name": "enable",
- "description": "Enables application cache domain notifications."
- },
- {
- "name": "getManifestForFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose manifest is retrieved." }
- ],
- "returns": [
- { "name": "manifestURL", "type": "string", "description": "Manifest URL for document in the given frame." }
- ],
- "description": "Returns manifest URL for document in the given frame."
- },
- {
- "name": "getApplicationCacheForFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache is retrieved." }
- ],
- "returns": [
- { "name": "applicationCache", "$ref": "ApplicationCache", "description": "Relevant application cache data for the document in given frame." }
- ],
- "description": "Returns relevant application cache data for the document in given frame."
- }
- ],
- "events": [
- {
- "name": "applicationCacheStatusUpdated",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache updated status." },
- { "name": "manifestURL", "type": "string", "description": "Manifest URL." },
- { "name": "status", "type": "integer", "description": "Updated application cache status." }
- ]
- },
- {
- "name": "networkStateUpdated",
- "parameters": [
- { "name": "isNowOnline", "type": "boolean" }
- ]
- }
- ]
- },
- {
- "domain": "DOM",
- "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>",
- "types": [
- {
- "id": "NodeId",
- "type": "integer",
- "description": "Unique DOM node identifier."
- },
- {
- "id": "BackendNodeId",
- "type": "integer",
- "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.",
- "hidden": true
- },
- {
- "id": "BackendNode",
- "type": "object",
- "properties": [
- { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." },
- { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." },
- { "name": "backendNodeId", "$ref": "BackendNodeId" }
- ],
- "hidden": true,
- "description": "Backend node with a friendly name."
- },
- {
- "id": "PseudoType",
- "type": "string",
- "enum": [
- "first-line",
- "first-letter",
- "before",
- "after",
- "backdrop",
- "selection",
- "first-line-inherited",
- "scrollbar",
- "scrollbar-thumb",
- "scrollbar-button",
- "scrollbar-track",
- "scrollbar-track-piece",
- "scrollbar-corner",
- "resizer",
- "input-list-button"
- ],
- "description": "Pseudo element type."
- },
- {
- "id": "ShadowRootType",
- "type": "string",
- "enum": ["user-agent", "open", "closed"],
- "description": "Shadow root type."
- },
- {
- "id": "Node",
- "type": "object",
- "properties": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." },
- { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." },
- { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." },
- { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." },
- { "name": "nodeValue", "type": "string", "description": "<code>Node</code>'s nodeValue." },
- { "name": "childNodeCount", "type": "integer", "optional": true, "description": "Child count for <code>Container</code> nodes." },
- { "name": "children", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Child nodes of this node when requested with children." },
- { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." },
- { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." },
- { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.", "hidden": true },
- { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId." },
- { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." },
- { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." },
- { "name": "xmlVersion", "type": "string", "optional": true, "description": "<code>Document</code>'s XML version in case of XML documents." },
- { "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name." },
- { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." },
- { "name": "pseudoType", "$ref": "PseudoType", "optional": true, "description": "Pseudo element type for this node." },
- { "name": "shadowRootType", "$ref": "ShadowRootType", "optional": true, "description": "Shadow root type." },
- { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Frame ID for frame owner elements.", "hidden": true },
- { "name": "contentDocument", "$ref": "Node", "optional": true, "description": "Content document for frame owner elements." },
- { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host.", "hidden": true },
- { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements.", "hidden": true },
- { "name": "pseudoElements", "type": "array", "items": { "$ref": "Node" }, "optional": true, "description": "Pseudo elements associated with this node.", "hidden": true },
- { "name": "importedDocument", "$ref": "Node", "optional": true, "description": "Import document for the HTMLImport links." },
- { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "optional": true, "description": "Distributed nodes for given insertion point.", "hidden": true }
- ],
- "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
- },
- {
- "id": "RGBA",
- "type": "object",
- "properties": [
- { "name": "r", "type": "integer", "description": "The red component, in the [0-255] range." },
- { "name": "g", "type": "integer", "description": "The green component, in the [0-255] range." },
- { "name": "b", "type": "integer", "description": "The blue component, in the [0-255] range." },
- { "name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1)." }
- ],
- "description": "A structure holding an RGBA color."
- },
- {
- "id": "Quad",
- "type": "array",
- "items": { "type": "number" },
- "minItems": 8,
- "maxItems": 8,
- "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.",
- "hidden": true
- },
- {
- "id": "BoxModel",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "content", "$ref": "Quad", "description": "Content box" },
- { "name": "padding", "$ref": "Quad", "description": "Padding box" },
- { "name": "border", "$ref": "Quad", "description": "Border box" },
- { "name": "margin", "$ref": "Quad", "description": "Margin box" },
- { "name": "width", "type": "integer", "description": "Node width" },
- { "name": "height", "type": "integer", "description": "Node height" },
- { "name": "shapeOutside", "$ref": "ShapeOutsideInfo", "optional": true, "description": "Shape outside coordinates" }
- ],
- "description": "Box model."
- },
- {
- "id": "ShapeOutsideInfo",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "bounds", "$ref": "Quad", "description": "Shape bounds" },
- { "name": "shape", "type": "array", "items": { "type": "any"}, "description": "Shape coordinate details" },
- { "name": "marginShape", "type": "array", "items": { "type": "any"}, "description": "Margin shape bounds" }
- ],
- "description": "CSS Shape Outside details."
- },
- {
- "id": "Rect",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "x", "type": "number", "description": "X coordinate" },
- { "name": "y", "type": "number", "description": "Y coordinate" },
- { "name": "width", "type": "number", "description": "Rectangle width" },
- { "name": "height", "type": "number", "description": "Rectangle height" }
- ],
- "description": "Rectangle."
- },
- {
- "id": "HighlightConfig",
- "type": "object",
- "properties": [
- { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." },
- { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." },
- { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." },
- { "name": "displayAsMaterial", "type": "boolean", "optional": true, "hidden": true},
- { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." },
- { "name": "paddingColor", "$ref": "RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." },
- { "name": "borderColor", "$ref": "RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." },
- { "name": "marginColor", "$ref": "RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." },
- { "name": "eventTargetColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The event target element highlight fill color (default: transparent)." },
- { "name": "shapeColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape outside fill color (default: transparent)." },
- { "name": "shapeMarginColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape margin fill color (default: transparent)." },
- { "name": "selectorList", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes."}
- ],
- "description": "Configuration data for the highlighting of page elements."
- },
- {
- "id": "InspectMode",
- "type": "string",
- "hidden": true,
- "enum": [
- "searchForNode",
- "searchForUAShadowDOM",
- "showLayoutEditor",
- "none"
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables DOM agent for the given page."
- },
- {
- "name": "disable",
- "description": "Disables DOM agent for the given page."
- },
- {
- "name": "getDocument",
- "returns": [
- { "name": "root", "$ref": "Node", "description": "Resulting node." }
- ],
- "description": "Returns the root DOM node to the caller."
- },
- {
- "name": "requestChildNodes",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." },
- { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "hidden": true }
- ],
- "description": "Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth."
- },
- {
- "name": "querySelector",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." },
- { "name": "selector", "type": "string", "description": "Selector string." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Query selector result." }
- ],
- "description": "Executes <code>querySelector</code> on a given node."
- },
- {
- "name": "querySelectorAll",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." },
- { "name": "selector", "type": "string", "description": "Selector string." }
- ],
- "returns": [
- { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Query selector result." }
- ],
- "description": "Executes <code>querySelectorAll</code> on a given node."
- },
- {
- "name": "setNodeName",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set name for." },
- { "name": "name", "type": "string", "description": "New node's name." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "New node's id." }
- ],
- "description": "Sets node name for a node with given id."
- },
- {
- "name": "setNodeValue",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set value for." },
- { "name": "value", "type": "string", "description": "New node's value." }
- ],
- "description": "Sets node value for a node with given id."
- },
- {
- "name": "removeNode",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to remove." }
- ],
- "description": "Removes node with given id."
- },
- {
- "name": "setAttributeValue",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attribute for." },
- { "name": "name", "type": "string", "description": "Attribute name." },
- { "name": "value", "type": "string", "description": "Attribute value." }
- ],
- "description": "Sets attribute for an element with given id."
- },
- {
- "name": "setAttributesAsText",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attributes for." },
- { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." },
- { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." }
- ],
- "description": "Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs."
- },
- {
- "name": "removeAttribute",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to remove attribute from." },
- { "name": "name", "type": "string", "description": "Name of the attribute to remove." }
- ],
- "description": "Removes attribute with given name from an element with given id."
- },
- {
- "name": "getOuterHTML",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get markup for." }
- ],
- "returns": [
- { "name": "outerHTML", "type": "string", "description": "Outer HTML markup." }
- ],
- "description": "Returns node's HTML markup."
- },
- {
- "name": "setOuterHTML",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set markup for." },
- { "name": "outerHTML", "type": "string", "description": "Outer HTML markup to set." }
- ],
- "description": "Sets node HTML markup, returns new node id."
- },
- {
- "name": "performSearch",
- "parameters": [
- { "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." },
- { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM.", "hidden": true }
- ],
- "returns": [
- { "name": "searchId", "type": "string", "description": "Unique search session identifier." },
- { "name": "resultCount", "type": "integer", "description": "Number of search results." }
- ],
- "description": "Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.",
- "hidden": true
- },
- {
- "name": "getSearchResults",
- "parameters": [
- { "name": "searchId", "type": "string", "description": "Unique search session identifier." },
- { "name": "fromIndex", "type": "integer", "description": "Start index of the search result to be returned." },
- { "name": "toIndex", "type": "integer", "description": "End index of the search result to be returned." }
- ],
- "returns": [
- { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the search result nodes." }
- ],
- "description": "Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.",
- "hidden": true
- },
- {
- "name": "discardSearchResults",
- "parameters": [
- { "name": "searchId", "type": "string", "description": "Unique search session identifier." }
- ],
- "description": "Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.",
- "hidden": true
- },
- {
- "name": "requestNode",
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "JavaScript object id to convert into node." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Node id for given object." }
- ],
- "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications."
- },
- {
- "name": "setInspectMode",
- "hidden": true,
- "parameters": [
- { "name": "mode", "$ref": "InspectMode", "description": "Set an inspection mode." },
- { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." }
- ],
- "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection."
- },
- {
- "name": "highlightRect",
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate" },
- { "name": "y", "type": "integer", "description": "Y coordinate" },
- { "name": "width", "type": "integer", "description": "Rectangle width" },
- { "name": "height", "type": "integer", "description": "Rectangle height" },
- { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." },
- { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." }
- ],
- "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport."
- },
- {
- "name": "highlightQuad",
- "parameters": [
- { "name": "quad", "$ref": "Quad", "description": "Quad to highlight" },
- { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." },
- { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." }
- ],
- "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.",
- "hidden": true
- },
- {
- "name": "highlightNode",
- "parameters": [
- { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." },
- { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." },
- { "name": "backendNodeId", "$ref": "BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." },
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "hidden": true }
- ],
- "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified."
- },
- {
- "name": "hideHighlight",
- "description": "Hides DOM node highlight."
- },
- {
- "name": "highlightFrame",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." },
- { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." },
- { "name": "contentOutlineColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." }
- ],
- "description": "Highlights owner element of the frame with given id.",
- "hidden": true
- },
- {
- "name": "pushNodeByPathToFrontend",
- "parameters": [
- { "name": "path", "type": "string", "description": "Path to node in the proprietary format." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node for given path." }
- ],
- "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath",
- "hidden": true
- },
- {
- "name": "pushNodesByBackendIdsToFrontend",
- "parameters": [
- { "name": "backendNodeIds", "type": "array", "items": {"$ref": "BackendNodeId"}, "description": "The array of backend node ids." }
- ],
- "returns": [
- { "name": "nodeIds", "type": "array", "items": {"$ref": "NodeId"}, "description": "The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds." }
- ],
- "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.",
- "hidden": true
- },
- {
- "name": "setInspectedNode",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "DOM node id to be accessible by means of $x command line API." }
- ],
- "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).",
- "hidden": true
- },
- {
- "name": "resolveNode",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to resolve." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
- ],
- "returns": [
- { "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." }
- ],
- "description": "Resolves JavaScript node object for given node id."
- },
- {
- "name": "getAttributes",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to retrieve attibutes for." }
- ],
- "returns": [
- { "name": "attributes", "type": "array", "items": { "type": "string" }, "description": "An interleaved array of node attribute names and values." }
- ],
- "description": "Returns attributes for the specified node."
- },
- {
- "name": "copyTo",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to copy." },
- { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop the copy into." },
- { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop the copy before this node (if absent, the copy becomes the last child of <code>targetNodeId</code>)." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node clone." }
- ],
- "description": "Creates a deep copy of the specified node and places it into the target container before the given anchor.",
- "hidden": true
- },
- {
- "name": "moveTo",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to move." },
- { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop the moved node into." },
- { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop node before this one (if absent, the moved node becomes the last child of <code>targetNodeId</code>)." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "New id of the moved node." }
- ],
- "description": "Moves node into the new container, places it before the given anchor."
- },
- {
- "name": "undo",
- "description": "Undoes the last performed action.",
- "hidden": true
- },
- {
- "name": "redo",
- "description": "Re-does the last undone action.",
- "hidden": true
- },
- {
- "name": "markUndoableState",
- "description": "Marks last undoable state.",
- "hidden": true
- },
- {
- "name": "focus",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to focus." }
- ],
- "description": "Focuses the given element.",
- "hidden": true
- },
- {
- "name": "setFileInputFiles",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the file input node to set files for." },
- { "name": "files", "type": "array", "items": { "type": "string" }, "description": "Array of file paths to set." }
- ],
- "description": "Sets files for the given file input element.",
- "hidden": true,
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "getBoxModel",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get box model for." }
- ],
- "returns": [
- { "name": "model", "$ref": "BoxModel", "description": "Box model for the node." }
- ],
- "description": "Returns boxes for the currently selected nodes.",
- "hidden": true
- },
- {
- "name": "getNodeForLocation",
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate." },
- { "name": "y", "type": "integer", "description": "Y coordinate." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node at given coordinates." }
- ],
- "description": "Returns node id at given location.",
- "hidden": true
- },
- {
- "name": "getRelayoutBoundary",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node." }
- ],
- "returns": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Relayout boundary node id for the given node." }
- ],
- "description": "Returns the id of the nearest ancestor that is a relayout boundary.",
- "hidden": true
- },
- {
- "name": "getHighlightObjectForTest",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get highlight object for." }
- ],
- "returns": [
- { "name": "highlight", "type": "object", "description": "Highlight data for the node." }
- ],
- "description": "For testing.",
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "documentUpdated",
- "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid."
- },
- {
- "name": "inspectNodeRequested",
- "parameters": [
- { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "Id of the node to inspect." }
- ],
- "description": "Fired when the node should be inspected. This happens after call to <code>setInspectMode</code>.",
- "hidden" : true
- },
- {
- "name": "setChildNodes",
- "parameters": [
- { "name": "parentId", "$ref": "NodeId", "description": "Parent node id to populate with children." },
- { "name": "nodes", "type": "array", "items": { "$ref": "Node" }, "description": "Child nodes array." }
- ],
- "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids."
- },
- {
- "name": "attributeModified",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "name", "type": "string", "description": "Attribute name." },
- { "name": "value", "type": "string", "description": "Attribute value." }
- ],
- "description": "Fired when <code>Element</code>'s attribute is modified."
- },
- {
- "name": "attributeRemoved",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "name", "type": "string", "description": "A ttribute name." }
- ],
- "description": "Fired when <code>Element</code>'s attribute is removed."
- },
- {
- "name": "inlineStyleInvalidated",
- "parameters": [
- { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the nodes for which the inline styles have been invalidated." }
- ],
- "description": "Fired when <code>Element</code>'s inline style is modified via a CSS property modification.",
- "hidden": true
- },
- {
- "name": "characterDataModified",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "characterData", "type": "string", "description": "New text value." }
- ],
- "description": "Mirrors <code>DOMCharacterDataModified</code> event."
- },
- {
- "name": "childNodeCountUpdated",
- "parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "childNodeCount", "type": "integer", "description": "New node count." }
- ],
- "description": "Fired when <code>Container</code>'s child node count has changed."
- },
- {
- "name": "childNodeInserted",
- "parameters": [
- { "name": "parentNodeId", "$ref": "NodeId", "description": "Id of the node that has changed." },
- { "name": "previousNodeId", "$ref": "NodeId", "description": "If of the previous siblint." },
- { "name": "node", "$ref": "Node", "description": "Inserted node data." }
- ],
- "description": "Mirrors <code>DOMNodeInserted</code> event."
- },
- {
- "name": "childNodeRemoved",
- "parameters": [
- { "name": "parentNodeId", "$ref": "NodeId", "description": "Parent id." },
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has been removed." }
- ],
- "description": "Mirrors <code>DOMNodeRemoved</code> event."
- },
- {
- "name": "shadowRootPushed",
- "parameters": [
- { "name": "hostId", "$ref": "NodeId", "description": "Host element id." },
- { "name": "root", "$ref": "Node", "description": "Shadow root." }
- ],
- "description": "Called when shadow root is pushed into the element.",
- "hidden": true
- },
- {
- "name": "shadowRootPopped",
- "parameters": [
- { "name": "hostId", "$ref": "NodeId", "description": "Host element id." },
- { "name": "rootId", "$ref": "NodeId", "description": "Shadow root id." }
- ],
- "description": "Called when shadow root is popped from the element.",
- "hidden": true
- },
- {
- "name": "pseudoElementAdded",
- "parameters": [
- { "name": "parentId", "$ref": "NodeId", "description": "Pseudo element's parent element id." },
- { "name": "pseudoElement", "$ref": "Node", "description": "The added pseudo element." }
- ],
- "description": "Called when a pseudo element is added to an element.",
- "hidden": true
- },
- {
- "name": "pseudoElementRemoved",
- "parameters": [
- { "name": "parentId", "$ref": "NodeId", "description": "Pseudo element's parent element id." },
- { "name": "pseudoElementId", "$ref": "NodeId", "description": "The removed pseudo element id." }
- ],
- "description": "Called when a pseudo element is removed from an element.",
- "hidden": true
- },
- {
- "name": "distributedNodesUpdated",
- "parameters": [
- { "name": "insertionPointId", "$ref": "NodeId", "description": "Insertion point where distrubuted nodes were updated." },
- { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "description": "Distributed nodes for given insertion point." }
- ],
- "description": "Called when distrubution is changed.",
- "hidden": true
- },
- {
- "name": "nodeHighlightRequested",
- "parameters": [
- {"name": "nodeId", "$ref": "NodeId"}
- ],
- "hidden": true
- }
- ]
- },
- {
- "domain": "CSS",
- "hidden": true,
- "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). A client can also discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method (or keeping track of the <code>styleSheetAdded</code>/<code>styleSheetRemoved</code> events) and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.",
- "types": [
- {
- "id": "StyleSheetId",
- "type": "string"
- },
- {
- "id": "StyleSheetOrigin",
- "type": "string",
- "enum": ["injected", "user-agent", "inspector", "regular"],
- "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets."
- },
- {
- "id": "PseudoElementMatches",
- "type": "object",
- "properties": [
- { "name": "pseudoType", "$ref": "DOM.PseudoType", "description": "Pseudo element type."},
- { "name": "matches", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules applicable to the pseudo style."}
- ],
- "description": "CSS rule collection for a single pseudo style."
- },
- {
- "id": "InheritedStyleEntry",
- "type": "object",
- "properties": [
- { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain." },
- { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain." }
- ],
- "description": "Inherited CSS rule collection from ancestor node."
- },
- {
- "id": "RuleMatch",
- "type": "object",
- "properties": [
- { "name": "rule", "$ref": "CSSRule", "description": "CSS rule in the match." },
- { "name": "matchingSelectors", "type": "array", "items": { "type": "integer" }, "description": "Matching selector indices in the rule's selectorList selectors (0-based)." }
- ],
- "description": "Match data for a CSS rule."
- },
- {
- "id": "Value",
- "type": "object",
- "properties": [
- { "name": "text", "type": "string", "description": "Value text." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Value range in the underlying resource (if available)." }
- ],
- "description": "Data for a simple selector (these are delimited by commas in a selector list)."
- },
- {
- "id": "SelectorList",
- "type": "object",
- "properties": [
- { "name": "selectors", "type": "array", "items": { "$ref": "Value" }, "description": "Selectors in the list." },
- { "name": "text", "type": "string", "description": "Rule selector text." }
- ],
- "description": "Selector list data."
- },
- {
- "id": "CSSStyleSheetHeader",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."},
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Owner frame identifier."},
- { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."},
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any)." },
- { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."},
- { "name": "title", "type": "string", "description": "Stylesheet title."},
- { "name": "ownerNode", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the owner node of the stylesheet." },
- { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."},
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment." },
- { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags." },
- { "name": "startLine", "type": "number", "description": "Line offset of the stylesheet within the resource (zero based)." },
- { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." }
- ],
- "description": "CSS stylesheet metainformation."
- },
- {
- "id": "CSSRule",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." },
- { "name": "selectorList", "$ref": "SelectorList", "description": "Rule selector data." },
- { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."},
- { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." },
- { "name": "media", "type": "array", "items": { "$ref": "CSSMedia" }, "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards." }
- ],
- "description": "CSS rule representation."
- },
- {
- "id": "SourceRange",
- "type": "object",
- "properties": [
- { "name": "startLine", "type": "integer", "description": "Start line of range." },
- { "name": "startColumn", "type": "integer", "description": "Start column of range (inclusive)." },
- { "name": "endLine", "type": "integer", "description": "End line of range" },
- { "name": "endColumn", "type": "integer", "description": "End column of range (exclusive)." }
- ],
- "description": "Text range within a resource. All numbers are zero-based."
- },
- {
- "id": "ShorthandEntry",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "Shorthand name." },
- { "name": "value", "type": "string", "description": "Shorthand value." },
- { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \"!important\" annotation (implies <code>false</code> if absent)." }
- ]
- },
- {
- "id": "CSSComputedStyleProperty",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "Computed style property name." },
- { "name": "value", "type": "string", "description": "Computed style property value." }
- ]
- },
- {
- "id": "CSSStyle",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." },
- { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSProperty" }, "description": "CSS properties in the style." },
- { "name": "shorthandEntries", "type": "array", "items": { "$ref": "ShorthandEntry" }, "description": "Computed values for all shorthands found in the style." },
- { "name": "cssText", "type": "string", "optional": true, "description": "Style declaration text (if available)." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Style declaration range in the enclosing stylesheet (if available)." }
- ],
- "description": "CSS style representation."
- },
- {
- "id": "CSSProperty",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "The property name." },
- { "name": "value", "type": "string", "description": "The property value." },
- { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \"!important\" annotation (implies <code>false</code> if absent)." },
- { "name": "implicit", "type": "boolean", "optional": true, "description": "Whether the property is implicit (implies <code>false</code> if absent)." },
- { "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style." },
- { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies <code>true</code> if absent)." },
- { "name": "disabled", "type": "boolean", "optional": true, "description": "Whether the property is disabled by the user (present for source-based properties only)." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." }
- ],
- "description": "CSS property declaration data."
- },
- {
- "id": "CSSMedia",
- "type": "object",
- "properties": [
- { "name": "text", "type": "string", "description": "Media query text." },
- { "name": "source", "type": "string", "enum": ["mediaRule", "importRule", "linkedSheet", "inlineSheet"], "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if specified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked stylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline stylesheet's STYLE tag." },
- { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description." },
- { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available)." },
- { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists)." },
- { "name": "mediaList", "type": "array", "items": { "$ref": "MediaQuery" }, "optional": true, "hidden": true, "description": "Array of media queries." }
- ],
- "description": "CSS media rule descriptor."
- },
- {
- "id": "MediaQuery",
- "type": "object",
- "properties": [
- { "name": "expressions", "type": "array", "items": { "$ref": "MediaQueryExpression" }, "description": "Array of media query expressions." },
- { "name": "active", "type": "boolean", "description": "Whether the media query condition is satisfied." }
- ],
- "description": "Media query descriptor.",
- "hidden": true
- },
- {
- "id": "MediaQueryExpression",
- "type": "object",
- "properties": [
- { "name": "value", "type": "number", "description": "Media query expression value."},
- { "name": "unit", "type": "string", "description": "Media query expression units."},
- { "name": "feature", "type": "string", "description": "Media query expression feature."},
- { "name": "valueRange", "$ref": "SourceRange", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available)." },
- { "name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable)."}
- ],
- "description": "Media query expression descriptor.",
- "hidden": true
- },
- {
- "id": "PlatformFontUsage",
- "type": "object",
- "properties": [
- { "name": "familyName", "type": "string", "description": "Font's family name reported by platform."},
- { "name": "isCustomFont", "type": "boolean", "description": "Indicates if the font was downloaded or resolved locally."},
- { "name": "glyphCount", "type": "number", "description": "Amount of glyphs that were rendered with this font."}
- ],
- "description": "Information about amount of glyphs that were rendered with given font.",
- "hidden": true
- },
- {
- "id": "CSSKeyframesRule",
- "type": "object",
- "properties": [
- { "name": "animationName", "$ref": "Value", "description": "Animation name." },
- { "name": "keyframes", "type": "array", "items": { "$ref": "CSSKeyframeRule" }, "description": "List of keyframes." }
- ],
- "description": "CSS keyframes rule representation."
- },
- {
- "id": "CSSKeyframeRule",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." },
- { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."},
- { "name": "keyText", "$ref": "Value", "description": "Associated key text." },
- { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." }
- ],
- "description": "CSS keyframe rule representation."
- },
- {
- "id": "StyleDeclarationEdit",
- "type": "object",
- "properties": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier." },
- { "name": "range", "$ref": "SourceRange", "description": "The range of the style text in the enclosing stylesheet." },
- { "name": "text", "type": "string", "description": "New style text."}
- ],
- "description": "A descriptor of operation to mutate style declaration text."
- }
- ],
- "commands": [
- {
- "name": "enable",
- "async": true,
- "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received."
- },
- {
- "name": "disable",
- "description": "Disables the CSS agent for the given page."
- },
- {
- "name": "getMatchedStylesForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." },
- { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."},
- { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "optional": true, "description": "CSS rules matching this node, from all applicable stylesheets." },
- { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoElementMatches" }, "optional": true, "description": "Pseudo style matches for this node." },
- { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." },
- { "name": "cssKeyframesRules", "type": "array", "items": { "$ref": "CSSKeyframesRule" }, "optional": true, "description": "A list of CSS keyframed animations matching this node." }
- ],
- "description": "Returns requested styles for a DOM node identified by <code>nodeId</code>."
- },
- {
- "name": "getInlineStylesForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." },
- { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."}
- ],
- "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>."
- },
- {
- "name": "getComputedStyleForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." }
- ],
- "description": "Returns the computed style for a DOM node identified by <code>nodeId</code>."
- },
- {
- "name": "getPlatformFontsForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId" }
- ],
- "returns": [
- { "name": "fonts", "type": "array", "items": { "$ref": "PlatformFontUsage" }, "description": "Usage statistics for every employed platform font." }
- ],
- "description": "Requests information about platform fonts which we used to render child TextNodes in the given node.",
- "hidden": true
- },
- {
- "name": "getStyleSheetText",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" }
- ],
- "returns": [
- { "name": "text", "type": "string", "description": "The stylesheet text." }
- ],
- "description": "Returns the current textual content and the URL for a stylesheet."
- },
- {
- "name": "setStyleSheetText",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" },
- { "name": "text", "type": "string" }
- ],
- "returns": [
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }
- ],
- "description": "Sets the new stylesheet text."
- },
- {
- "name": "setRuleSelector",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" },
- { "name": "range", "$ref": "SourceRange" },
- { "name": "selector", "type": "string" }
- ],
- "returns": [
- { "name": "selectorList", "$ref": "SelectorList", "description": "The resulting selector list after modification." }
- ],
- "description": "Modifies the rule selector."
- },
- {
- "name": "setKeyframeKey",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" },
- { "name": "range", "$ref": "SourceRange" },
- { "name": "keyText", "type": "string" }
- ],
- "returns": [
- { "name": "keyText", "$ref": "Value", "description": "The resulting key text after modification." }
- ],
- "description": "Modifies the keyframe rule key text."
- },
- {
- "name": "setStyleTexts",
- "parameters": [
- { "name": "edits", "type": "array", "items": { "$ref": "StyleDeclarationEdit" }}
- ],
- "returns": [
- { "name": "styles", "type": "array", "items": { "$ref": "CSSStyle" }, "description": "The resulting styles after modification." }
- ],
- "description": "Applies specified style edits one after another in the given order."
- },
- {
- "name": "setMediaText",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" },
- { "name": "range", "$ref": "SourceRange" },
- { "name": "text", "type": "string" }
- ],
- "returns": [
- { "name": "media", "$ref": "CSSMedia", "description": "The resulting CSS media rule after modification." }
- ],
- "description": "Modifies the rule selector."
- },
- {
- "name": "createStyleSheet",
- "parameters": [
- { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created."}
- ],
- "returns": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the created \"via-inspector\" stylesheet." }
- ],
- "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given <code>frameId</code>."
- },
- {
- "name": "addRule",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier where a new rule should be inserted." },
- { "name": "ruleText", "type": "string", "description": "The text of a new rule." },
- { "name": "location", "$ref": "SourceRange", "description": "Text position of a new rule in the target style sheet." }
- ],
- "returns": [
- { "name": "rule", "$ref": "CSSRule", "description": "The newly created rule." }
- ],
- "description": "Inserts a new rule with the given <code>ruleText</code> in a stylesheet with given <code>styleSheetId</code>, at the position specified by <code>location</code>."
- },
- {
- "name": "forcePseudoState",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
- { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." }
- ],
- "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser."
- },
- {
- "name": "getMediaQueries",
- "returns": [
- { "name": "medias", "type": "array", "items": { "$ref": "CSSMedia" } }
- ],
- "description": "Returns all media queries parsed by the rendering engine.",
- "hidden": true
- },
- {
- "name": "setEffectivePropertyValueForNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to set property." },
- { "name": "propertyName", "type": "string"},
- { "name": "value", "type": "string"}
- ],
- "description": "Find a rule with the given active property for the given node and set the new value for this property",
- "hidden": true
- },
- {
- "name": "getBackgroundColors",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get background colors for." }
- ],
- "returns": [
- { "name": "backgroundColors", "type": "array", "items": { "type": "string" }, "description": "The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).", "optional": true }
- ],
- "hidden": true
- }
- ],
- "events": [
- {
- "name": "mediaQueryResultChanged",
- "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features."
- },
- {
- "name": "styleSheetChanged",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId" }
- ],
- "description": "Fired whenever a stylesheet is changed as a result of the client operation."
- },
- {
- "name": "styleSheetAdded",
- "parameters": [
- { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Added stylesheet metainfo." }
- ],
- "description": "Fired whenever an active document stylesheet is added."
- },
- {
- "name": "styleSheetRemoved",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the removed stylesheet." }
- ],
- "description": "Fired whenever an active document stylesheet is removed."
- },
- {
- "name": "layoutEditorChange",
- "parameters": [
- { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the stylesheet where the modification occurred." },
- { "name": "changeRange", "$ref": "SourceRange", "description": "Range where the modification occurred." }
- ]
- }
- ]
- },
- {
- "domain": "IO",
- "description": "Input/Output operations for streams produced by DevTools.",
- "hidden": true,
- "types": [
- {
- "id": "StreamHandle",
- "type": "string"
- }
- ],
- "commands": [
- {
- "name": "read",
- "description": "Read a chunk of the stream",
- "async": true,
- "parameters": [
- { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to read." },
- { "name": "offset", "type": "integer", "optional": true, "description": "Seek to the specified offset before reading (if not specificed, proceed with offset following the last read)." },
- { "name": "size", "type": "integer", "optional": true, "description": "Maximum number of bytes to read (left upon the agent discretion if not specified)." }
- ],
- "returns": [
- { "name": "data", "type": "string", "description": "Data that were read." },
- { "name": "eof", "type": "boolean", "description": "Set if the end-of-file condition occured while reading." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "close",
- "description": "Close the stream, discard any temporary backing storage.",
- "parameters": [
- { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to close." }
- ],
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Debugger",
- "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
- "types": [
- {
- "id": "BreakpointId",
- "type": "string",
- "description": "Breakpoint identifier."
- },
- {
- "id": "CallFrameId",
- "type": "string",
- "description": "Call frame identifier."
- },
- {
- "id": "Location",
- "type": "object",
- "properties": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
- { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }
- ],
- "description": "Location in the source code."
- },
- {
- "id": "ScriptPosition",
- "hidden": true,
- "type": "object",
- "properties": [
- { "name": "line", "type": "integer" },
- { "name": "column", "type": "integer" }
- ],
- "description": "Location in the source code."
- },
- {
- "id": "FunctionDetails",
- "hidden": true,
- "type": "object",
- "properties": [
- { "name": "location", "$ref": "Location", "optional": true, "description": "Location of the function, none for native functions." },
- { "name": "functionName", "type": "string", "description": "Name of the function." },
- { "name": "isGenerator", "type": "boolean", "description": "Whether this is a generator function." },
- { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." }
- ],
- "description": "Information about the function."
- },
- {
- "id": "GeneratorObjectDetails",
- "hidden": true,
- "type": "object",
- "properties": [
- { "name": "function", "$ref": "Runtime.RemoteObject", "description": "Generator function." },
- { "name": "functionName", "type": "string", "description": "Name of the generator function." },
- { "name": "status", "type": "string", "enum": ["running", "suspended", "closed"], "description": "Current generator object status." },
- { "name": "location", "$ref": "Location", "optional": true, "description": "If suspended, location where generator function was suspended (e.g. location of the last 'yield'). Otherwise, location of the generator function." }
- ],
- "description": "Information about the generator object."
- },
- {
- "id": "CollectionEntry",
- "hidden": true,
- "type": "object",
- "properties": [
- { "name": "key", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Entry key of a map-like collection, otherwise not provided." },
- { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Entry value." }
- ],
- "description": "Collection entry."
- },
- {
- "id": "CallFrame",
- "type": "object",
- "properties": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." },
- { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." },
- { "name": "functionLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code." },
- { "name": "location", "$ref": "Location", "description": "Location in the source code." },
- { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." },
- { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." },
- { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "The value being returned, if the function is at return point." }
- ],
- "description": "JavaScript call frame. Array of call frames form the call stack."
- },
- {
- "id": "Scope",
- "type": "object",
- "properties": [
- { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script"], "description": "Scope type." },
- { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." },
- { "name": "name", "type": "string", "optional": true, "hidden": true },
- { "name": "startLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code where scope starts" },
- { "name": "endLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code where scope ends" }
- ],
- "description": "Scope description."
- },
- {
- "id": "SetScriptSourceError",
- "type": "object",
- "properties": [
- { "name": "message", "type": "string", "description": "Compiler error message" },
- { "name": "lineNumber", "type": "integer", "description": "Compile error line number (1-based)" },
- { "name": "columnNumber", "type": "integer", "description": "Compile error column number (1-based)" }
- ],
- "description": "Error data for setScriptSource command. Contains uncompilable script source error.",
- "hidden": true
- },
- {
- "id": "SearchMatch",
- "type": "object",
- "description": "Search match for resource.",
- "properties": [
- { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
- { "name": "lineContent", "type": "string", "description": "Line with match content." }
- ],
- "hidden": true
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
- },
- {
- "name": "disable",
- "description": "Disables debugger for given page."
- },
- {
- "name": "setBreakpointsActive",
- "parameters": [
- { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
- ],
- "description": "Activates / deactivates all breakpoints on the page."
- },
- {
- "name": "setSkipAllPauses",
- "hidden": true,
- "parameters": [
- { "name": "skipped", "type": "boolean", "description": "New value for skip pauses state." }
- ],
- "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
- },
- {
- "name": "setBreakpointByUrl",
- "parameters": [
- { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
- { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
- { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
- ],
- "returns": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
- { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." }
- ],
- "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
- },
- {
- "name": "setBreakpoint",
- "parameters": [
- { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
- { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
- ],
- "returns": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
- { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
- ],
- "description": "Sets JavaScript breakpoint at a given location."
- },
- {
- "name": "removeBreakpoint",
- "parameters": [
- { "name": "breakpointId", "$ref": "BreakpointId" }
- ],
- "description": "Removes JavaScript breakpoint."
- },
- {
- "name": "continueToLocation",
- "parameters": [
- { "name": "location", "$ref": "Location", "description": "Location to continue to." },
- { "name": "interstatementLocation", "type": "boolean", "optional": true, "hidden": true, "description": "Allows breakpoints at the intemediate positions inside statements." }
- ],
- "description": "Continues execution until specific location is reached."
- },
- {
- "name": "stepOver",
- "description": "Steps over the statement."
- },
- {
- "name": "stepInto",
- "description": "Steps into the function call."
- },
- {
- "name": "stepOut",
- "description": "Steps out of the function call."
- },
- {
- "name": "pause",
- "description": "Stops on the next JavaScript statement."
- },
- {
- "name": "resume",
- "description": "Resumes JavaScript execution."
- },
- {
- "name": "searchInContent",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." },
- { "name": "query", "type": "string", "description": "String to search for." },
- { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
- { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." }
- ],
- "description": "Searches for given string in script content."
- },
- {
- "name": "canSetScriptSource",
- "returns": [
- { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }
- ],
- "description": "Always returns true."
- },
- {
- "name": "setScriptSource",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." },
- { "name": "scriptSource", "type": "string", "description": "New content of the script." },
- { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true }
- ],
- "returns": [
- { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." },
- { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes.", "hidden": true },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true },
- { "name": "compileError", "optional": true, "$ref": "SetScriptSourceError", "description": "Error data if any." }
- ],
- "description": "Edits JavaScript source live."
- },
- {
- "name": "restartFrame",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
- ],
- "returns": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
- ],
- "hidden": true,
- "description": "Restarts particular call frame from the beginning."
- },
- {
- "name": "getScriptSource",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." }
- ],
- "returns": [
- { "name": "scriptSource", "type": "string", "description": "Script source." }
- ],
- "description": "Returns source for the script with given id."
- },
- {
- "name": "getFunctionDetails",
- "hidden": true,
- "parameters": [
- { "name": "functionId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the function to get details for." }
- ],
- "returns": [
- { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." }
- ],
- "description": "Returns detailed information on given function."
- },
- {
- "name": "getGeneratorObjectDetails",
- "hidden": true,
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the generator object to get details for." }
- ],
- "returns": [
- { "name": "details", "$ref": "GeneratorObjectDetails", "description": "Information about the generator object." }
- ],
- "description": "Returns detailed information on given generator object."
- },
- {
- "name": "getCollectionEntries",
- "hidden": true,
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the collection to get entries for." }
- ],
- "returns": [
- { "name": "entries", "type": "array", "items": { "$ref": "CollectionEntry" }, "description": "Array of collection entries." }
- ],
- "description": "Returns entries of given collection."
- },
- {
- "name": "setPauseOnExceptions",
- "parameters": [
- { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
- ],
- "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>."
- },
- {
- "name": "evaluateOnCallFrame",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." },
- { "name": "expression", "type": "string", "description": "Expression to evaluate." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true },
- { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
- { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."}
- ],
- "description": "Evaluates expression on a given call frame."
- },
- {
- "name": "setVariableValue",
- "parameters": [
- { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
- { "name": "variableName", "type": "string", "description": "Variable name." },
- { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." }
- ],
- "hidden": true,
- "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually."
- },
- {
- "name": "getBacktrace",
- "returns": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
- ],
- "hidden": true,
- "description": "Returns call stack including variables changed since VM was paused. VM must be paused."
- },
- {
- "name": "setAsyncCallStackDepth",
- "parameters": [
- { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." }
- ],
- "hidden": true,
- "description": "Enables or disables async call stacks tracking."
- },
- {
- "name": "setBlackboxPatterns",
- "parameters": [
- { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." }
- ],
- "hidden": true,
- "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."
- },
- {
- "name": "setBlackboxedRanges",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." },
- { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } }
- ],
- "hidden": true,
- "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted."
- }
- ],
- "events": [
- {
- "name": "scriptParsed",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
- { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
- { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
- { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
- { "name": "endLine", "type": "integer", "description": "Last line of the script." },
- { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
- { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context.", "hidden": true },
- { "name": "hash", "type": "string", "hidden": true, "description": "Content hash of the script."},
- { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
- { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true },
- { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "hidden": true },
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true },
- { "name": "deprecatedCommentWasUsed", "type": "boolean", "optional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@ sourceMappingURL' was used."}
- ],
- "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
- },
- {
- "name": "scriptFailedToParse",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
- { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
- { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
- { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
- { "name": "endLine", "type": "integer", "description": "Last line of the script." },
- { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
- { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context.", "hidden": true },
- { "name": "hash", "type": "string", "hidden": true, "description": "Content hash of the script."},
- { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
- { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true },
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true },
- { "name": "deprecatedCommentWasUsed", "type": "boolean", "optional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@ sourceMappingURL' was used."}
- ],
- "description": "Fired when virtual machine fails to parse the script."
- },
- {
- "name": "breakpointResolved",
- "parameters": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." },
- { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
- ],
- "description": "Fired when breakpoint is resolved to an actual script and location."
- },
- {
- "name": "paused",
- "parameters": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
- { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "debugCommand", "promiseRejection", "other" ], "description": "Pause reason." },
- { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
- { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden": true },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true }
- ],
- "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
- },
- {
- "name": "resumed",
- "description": "Fired when the virtual machine resumed execution."
- }
- ]
- },
- {
- "domain": "DOMDebugger",
- "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.",
- "types": [
- {
- "id": "DOMBreakpointType",
- "type": "string",
- "enum": ["subtree-modified", "attribute-modified", "node-removed"],
- "description": "DOM breakpoint type."
- },
- {
- "id": "EventListener",
- "type": "object",
- "description": "Object event listener.",
- "properties": [
- { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." },
- { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." },
- { "name": "passive", "type": "boolean", "description": "<code>EventListener</code>'s passive flag." },
- { "name": "location", "$ref": "Debugger.Location", "description": "Handler code location." },
- { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." },
- { "name": "originalHandler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event original handler function value." }
- ],
- "hidden": true
- }
- ],
- "commands": [
- {
- "name": "setDOMBreakpoint",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to set breakpoint on." },
- { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the operation to stop upon." }
- ],
- "description": "Sets breakpoint on particular operation with DOM."
- },
- {
- "name": "removeDOMBreakpoint",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to remove breakpoint from." },
- { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the breakpoint to remove." }
- ],
- "description": "Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>."
- },
- {
- "name": "setEventListenerBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "DOM Event name to stop on (any DOM event will do)." },
- { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name to stop on. If equal to <code>\"*\"</code> or not provided, will stop on any EventTarget.", "hidden": true }
- ],
- "description": "Sets breakpoint on particular DOM event."
- },
- {
- "name": "removeEventListenerBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "Event name." },
- { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "hidden": true }
- ],
- "description": "Removes breakpoint on particular DOM event."
- },
- {
- "name": "setInstrumentationBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." }
- ],
- "description": "Sets breakpoint on particular native event.",
- "hidden": true
- },
- {
- "name": "removeInstrumentationBreakpoint",
- "parameters": [
- { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." }
- ],
- "description": "Removes breakpoint on particular native event.",
- "hidden": true
- },
- {
- "name": "setXHRBreakpoint",
- "parameters": [
- { "name": "url", "type": "string", "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon." }
- ],
- "description": "Sets breakpoint on XMLHttpRequest."
- },
- {
- "name": "removeXHRBreakpoint",
- "parameters": [
- { "name": "url", "type": "string", "description": "Resource URL substring." }
- ],
- "description": "Removes breakpoint from XMLHttpRequest."
- },
- {
- "name": "getEventListeners",
- "hidden": true,
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to return listeners for." }
- ],
- "returns": [
- { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." }
- ],
- "description": "Returns event listeners of the given object."
- }
- ]
- },
- {
- "domain": "Profiler",
- "hidden": true,
- "types": [
- {
- "id": "CPUProfileNode",
- "type": "object",
- "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "Function name." },
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier." },
- { "name": "url", "type": "string", "description": "URL." },
- { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." },
- { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." },
- { "name": "hitCount", "type": "integer", "description": "Number of samples where this node was on top of the call stack." },
- { "name": "callUID", "type": "number", "description": "Call UID." },
- { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." },
- { "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
- { "name": "id", "type": "integer", "description": "Unique id of the node." },
- { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "description": "An array of source position ticks." }
- ]
- },
- {
- "id": "CPUProfile",
- "type": "object",
- "description": "Profile.",
- "properties": [
- { "name": "head", "$ref": "CPUProfileNode" },
- { "name": "startTime", "type": "number", "description": "Profiling start time in seconds." },
- { "name": "endTime", "type": "number", "description": "Profiling end time in seconds." },
- { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." },
- { "name": "timestamps", "optional": true, "type": "array", "items": { "type": "number" }, "description": "Timestamps of the samples in microseconds." }
- ]
- },
- {
- "id": "PositionTickInfo",
- "type": "object",
- "description": "Specifies a number of samples attributed to a certain source position.",
- "properties": [
- { "name": "line", "type": "integer", "description": "Source line number (1-based)." },
- { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "setSamplingInterval",
- "parameters": [
- { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." }
- ],
- "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started."
- },
- {
- "name": "start"
- },
- {
- "name": "stop",
- "returns": [
- { "name": "profile", "$ref": "CPUProfile", "description": "Recorded profile." }
- ]
- }
- ],
- "events": [
- {
- "name": "consoleProfileStarted",
- "parameters": [
- { "name": "id", "type": "string" },
- { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." },
- { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argument to console.profile()." }
-
- ],
- "description": "Sent when new profile recodring is started using console.profile() call."
- },
- {
- "name": "consoleProfileFinished",
- "parameters": [
- { "name": "id", "type": "string" },
- { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." },
- { "name": "profile", "$ref": "CPUProfile" },
- { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argunet to console.profile()." }
- ]
- }
- ]
- },
- {
- "domain": "HeapProfiler",
- "hidden": true,
- "types": [
- {
- "id": "HeapSnapshotObjectId",
- "type": "string",
- "description": "Heap snapshot object id."
- },
- {
- "id": "SamplingHeapProfileNode",
- "type": "object",
- "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "Function name." },
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier." },
- { "name": "url", "type": "string", "description": "URL." },
- { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." },
- { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." },
- { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." },
- { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." }
- ]
- },
- {
- "id": "SamplingHeapProfile",
- "type": "object",
- "description": "Profile.",
- "properties": [
- { "name": "head", "$ref": "SamplingHeapProfileNode" }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "startTrackingHeapObjects",
- "parameters": [
- { "name": "trackAllocations", "type": "boolean", "optional": true }
- ]
- },
- {
- "name": "stopTrackingHeapObjects",
- "parameters": [
- { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." }
- ]
-
- },
- {
- "name": "takeHeapSnapshot",
- "parameters": [
- { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
- ]
- },
- {
- "name": "collectGarbage"
- },
- {
- "name": "getObjectByHeapObjectId",
- "parameters": [
- { "name": "objectId", "$ref": "HeapSnapshotObjectId" },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
- ]
- },
- {
- "name": "addInspectedHeapObject",
- "parameters": [
- { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." }
- ],
- "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
- },
- {
- "name": "getHeapObjectId",
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
- ],
- "returns": [
- { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
- ]
- },
- {
- "name": "startSampling",
- "parameters": [
- { "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes." }
- ]
- },
- {
- "name": "stopSampling",
- "returns": [
- { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." }
- ]
- }
- ],
- "events": [
- {
- "name": "addHeapSnapshotChunk",
- "parameters": [
- { "name": "chunk", "type": "string" }
- ]
- },
- {
- "name": "resetProfiles"
- },
- {
- "name": "reportHeapSnapshotProgress",
- "parameters": [
- { "name": "done", "type": "integer" },
- { "name": "total", "type": "integer" },
- { "name": "finished", "type": "boolean", "optional": true }
- ]
- },
- {
- "name": "lastSeenObjectId",
- "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
- "parameters": [
- { "name": "lastSeenObjectId", "type": "integer" },
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "heapStatsUpdate",
- "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
- "parameters": [
- { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."}
- ]
- }
- ]
- },
- {
- "domain": "Worker",
- "hidden": true,
- "types": [],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "sendMessageToWorker",
- "parameters": [
- { "name": "workerId", "type": "string" },
- { "name": "message", "type": "string" }
- ]
- },
- {
- "name": "setWaitForDebuggerOnStart",
- "parameters": [
- { "name": "value", "type": "boolean" }
- ]
- }
- ],
- "events": [
- {
- "name": "workerCreated",
- "parameters": [
- { "name": "workerId", "type": "string" },
- { "name": "url", "type": "string" },
- { "name": "waitingForDebugger", "type": "boolean" }
- ]
- },
- {
- "name": "workerTerminated",
- "parameters": [
- { "name": "workerId", "type": "string" }
- ]
- },
- {
- "name": "dispatchMessageFromWorker",
- "parameters": [
- { "name": "workerId", "type": "string" },
- { "name": "message", "type": "string" }
- ]
- }
- ]
- },
- {
- "domain": "ServiceWorker",
- "hidden": true,
- "types": [
- {
- "id": "ServiceWorkerRegistration",
- "type": "object",
- "description": "ServiceWorker registration.",
- "properties": [
- { "name": "registrationId", "type": "string" },
- { "name": "scopeURL", "type": "string" },
- { "name": "isDeleted", "type": "boolean" }
- ]
- },
- {
- "id": "ServiceWorkerVersionRunningStatus",
- "type": "string",
- "enum": ["stopped", "starting", "running", "stopping"]
- },
- {
- "id": "ServiceWorkerVersionStatus",
- "type": "string",
- "enum": ["new", "installing", "installed", "activating", "activated", "redundant"]
- },
- {
- "id": "TargetID",
- "type": "string"
- },
- {
- "id": "ServiceWorkerVersion",
- "type": "object",
- "description": "ServiceWorker version.",
- "properties": [
- { "name": "versionId", "type": "string" },
- { "name": "registrationId", "type": "string" },
- { "name": "scriptURL", "type": "string" },
- { "name": "runningStatus", "$ref": "ServiceWorkerVersionRunningStatus" },
- { "name": "status", "$ref": "ServiceWorkerVersionStatus" },
- { "name": "scriptLastModified", "type": "number", "optional": true, "description": "The Last-Modified header value of the main script." },
- { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated." },
- { "name": "controlledClients", "type": "array", "optional": true, "items": { "$ref": "TargetID" } }
- ]
- },
- {
- "id": "ServiceWorkerErrorMessage",
- "type": "object",
- "description": "ServiceWorker error message.",
- "properties": [
- { "name": "errorMessage", "type": "string" },
- { "name": "registrationId", "type": "string" },
- { "name": "versionId", "type": "string" },
- { "name": "sourceURL", "type": "string" },
- { "name": "lineNumber", "type": "integer" },
- { "name": "columnNumber", "type": "integer" }
- ]
- },
- {
- "id": "TargetInfo",
- "type": "object",
- "properties": [
- { "name": "id", "$ref": "TargetID" },
- { "name": "type", "type": "string" },
- { "name": "title", "type": "string" },
- { "name": "url", "type": "string" }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "handlers": ["browser"]
- },
- {
- "name": "disable",
- "handlers": ["browser"]
- },
- {
- "name": "sendMessage",
- "parameters": [
- { "name": "workerId", "type": "string" },
- { "name": "message", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "stop",
- "parameters": [
- { "name": "workerId", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "unregister",
- "parameters": [
- { "name": "scopeURL", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "updateRegistration",
- "parameters": [
- { "name": "scopeURL", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "startWorker",
- "parameters": [
- { "name": "scopeURL", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "skipWaiting",
- "parameters": [
- { "name": "scopeURL", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "stopWorker",
- "parameters": [
- { "name": "versionId", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "inspectWorker",
- "parameters": [
- { "name": "versionId", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "setForceUpdateOnPageLoad",
- "parameters": [
- { "name": "forceUpdateOnPageLoad", "type": "boolean" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "deliverPushMessage",
- "parameters": [
- { "name": "origin", "type": "string" },
- { "name": "registrationId", "type": "string" },
- { "name": "data", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "getTargetInfo",
- "parameters": [
- { "name": "targetId", "$ref": "TargetID" }
- ],
- "returns": [
- { "name": "targetInfo","$ref": "TargetInfo" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "activateTarget",
- "parameters": [
- { "name": "targetId", "$ref": "TargetID" }
- ],
- "handlers": ["browser"]
- }
- ],
- "events": [
- {
- "name": "workerCreated",
- "parameters": [
- { "name": "workerId", "type": "string" },
- { "name": "url", "type": "string" },
- { "name": "versionId", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "workerTerminated",
- "parameters": [
- { "name": "workerId", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "dispatchMessage",
- "parameters": [
- { "name": "workerId", "type": "string" },
- { "name": "message", "type": "string" }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "workerRegistrationUpdated",
- "parameters": [
- { "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "workerVersionUpdated",
- "parameters": [
- { "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "workerErrorReported",
- "parameters": [
- { "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" }
- ],
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Input",
- "types": [
- {
- "id": "TouchPoint",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "state", "type": "string", "enum": ["touchPressed", "touchReleased", "touchMoved", "touchStationary", "touchCancelled"], "description": "State of the touch point." },
- { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
- { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
- { "name": "radiusX", "type": "integer", "optional": true, "description": "X radius of the touch area (default: 1)."},
- { "name": "radiusY", "type": "integer", "optional": true, "description": "Y radius of the touch area (default: 1)."},
- { "name": "rotationAngle", "type": "number", "optional": true, "description": "Rotation angle (default: 0.0)."},
- { "name": "force", "type": "number", "optional": true, "description": "Force (default: 1.0)."},
- { "name": "id", "type": "number", "optional": true, "description": "Identifier used to track touch sources between events, must be unique within an event."}
- ]
- },
- {
- "id": "GestureSourceType",
- "type": "string",
- "hidden": true,
- "enum": ["default", "touch", "mouse"]
- }
- ],
- "commands": [
- {
- "name": "dispatchKeyEvent",
- "parameters": [
- { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"], "description": "Type of the key event." },
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
- { "name": "text", "type": "string", "optional": true, "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: \"\")" },
- { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." },
- { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." },
- { "name": "code", "type": "string", "optional": true, "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\")." },
- { "name": "key", "type": "string", "optional": true, "description": "Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\")." },
- { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." },
- { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." },
- { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." },
- { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." },
- { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." }
- ],
- "description": "Dispatches a key event to the page.",
- "handlers": ["browser"]
- },
- {
- "name": "dispatchMouseEvent",
- "parameters": [
- { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." },
- { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
- { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
- { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." },
- { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." }
- ],
- "description": "Dispatches a mouse event to the page.",
- "handlers": ["browser"]
- },
- {
- "name": "dispatchTouchEvent",
- "hidden": true,
- "parameters": [
- { "name": "type", "type": "string", "enum": ["touchStart", "touchEnd", "touchMove"], "description": "Type of the touch event." },
- { "name": "touchPoints", "type": "array", "items": { "$ref": "TouchPoint" }, "description": "Touch points." },
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }
- ],
- "description": "Dispatches a touch event to the page."
- },
- {
- "name": "emulateTouchFromMouseEvent",
- "hidden": true,
- "parameters": [
- { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"], "description": "Type of the mouse event." },
- { "name": "x", "type": "integer", "description": "X coordinate of the mouse pointer in DIP."},
- { "name": "y", "type": "integer", "description": "Y coordinate of the mouse pointer in DIP."},
- { "name": "timestamp", "type": "number", "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970." },
- { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "description": "Mouse button." },
- { "name": "deltaX", "type": "number", "optional": true, "description": "X delta in DIP for mouse wheel event (default: 0)."},
- { "name": "deltaY", "type": "number", "optional": true, "description": "Y delta in DIP for mouse wheel event (default: 0)."},
- { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
- { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." }
- ],
- "description": "Emulates touch event from the mouse event parameters.",
- "handlers": ["browser"]
- },
- {
- "name": "synthesizePinchGesture",
- "async": true,
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." },
- { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." },
- { "name": "scaleFactor", "type": "number", "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out)." },
- { "name": "relativeSpeed", "type": "integer", "optional": true, "description": "Relative pointer speed in pixels per second (default: 800)." },
- { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." }
- ],
- "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "synthesizeScrollGesture",
- "async": true,
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." },
- { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." },
- { "name": "xDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the X axis (positive to scroll left)." },
- { "name": "yDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the Y axis (positive to scroll up)." },
- { "name": "xOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the X axis, in addition to the given distance." },
- { "name": "yOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given distance." },
- { "name": "preventFling", "type": "boolean", "optional": true, "description": "Prevent fling (default: true)." },
- { "name": "speed", "type": "integer", "optional": true, "description": "Swipe speed in pixels per second (default: 800)." },
- { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." },
- { "name": "repeatCount", "type": "integer", "optional": true, "description": "The number of times to repeat the gesture (default: 0)." },
- { "name": "repeatDelayMs", "type": "integer", "optional": true, "description": "The number of milliseconds delay between each repeat. (default: 250)." },
- { "name": "interactionMarkerName", "type": "string", "optional": true, "description": "The name of the interaction markers to generate, if not empty (default: \"\")." }
- ],
- "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.",
- "hidden": true,
- "handlers": ["browser"]
- },
- {
- "name": "synthesizeTapGesture",
- "async": true,
- "parameters": [
- { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." },
- { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." },
- { "name": "duration", "type": "integer", "optional": true, "description": "Duration between touchdown and touchup events in ms (default: 50)." },
- { "name": "tapCount", "type": "integer", "optional": true, "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1)." },
- { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." }
- ],
- "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.",
- "hidden": true,
- "handlers": ["browser"]
- }
- ],
- "events": []
- },
- {
- "domain": "LayerTree",
- "hidden": true,
- "types": [
- {
- "id": "LayerId",
- "type": "string",
- "description": "Unique Layer identifier."
- },
- {
- "id": "SnapshotId",
- "type": "string",
- "description": "Unique snapshot identifier."
- },
- {
- "id": "ScrollRect",
- "type": "object",
- "description": "Rectangle where scrolling happens on the main thread.",
- "properties": [
- { "name": "rect", "$ref": "DOM.Rect", "description": "Rectangle itself." },
- { "name": "type", "type": "string", "enum": ["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"], "description": "Reason for rectangle to force scrolling on the main thread" }
- ]
- },
- {
- "id": "PictureTile",
- "type": "object",
- "description": "Serialized fragment of layer picture along with its offset within the layer.",
- "properties": [
- { "name": "x", "type": "number", "description": "Offset from owning layer left boundary" },
- { "name": "y", "type": "number", "description": "Offset from owning layer top boundary" },
- { "name": "picture", "type": "string", "description": "Base64-encoded snapshot data." }
- ]
- },
- {
- "id": "Layer",
- "type": "object",
- "description": "Information about a compositing layer.",
- "properties": [
- { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." },
- { "name": "parentLayerId", "$ref": "LayerId", "optional": true, "description": "The id of parent (not present for root)." },
- { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the node associated with this layer." },
- { "name": "offsetX", "type": "number", "description": "Offset from parent layer, X coordinate." },
- { "name": "offsetY", "type": "number", "description": "Offset from parent layer, Y coordinate." },
- { "name": "width", "type": "number", "description": "Layer width." },
- { "name": "height", "type": "number", "description": "Layer height." },
- { "name": "transform", "type": "array", "items": { "type": "number" }, "minItems": 16, "maxItems": 16, "optional": true, "description": "Transformation matrix for layer, default is identity matrix" },
- { "name": "anchorX", "type": "number", "optional": true, "description": "Transform anchor point X, absent if no transform specified" },
- { "name": "anchorY", "type": "number", "optional": true, "description": "Transform anchor point Y, absent if no transform specified" },
- { "name": "anchorZ", "type": "number", "optional": true, "description": "Transform anchor point Z, absent if no transform specified" },
- { "name": "paintCount", "type": "integer", "description": "Indicates how many time this layer has painted." },
- { "name": "drawsContent", "type": "boolean", "description": "Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only." },
- { "name": "invisible", "type": "boolean", "optional": true, "description": "Set if layer is not visible." },
- { "name": "scrollRects", "type": "array", "items": { "$ref": "ScrollRect"}, "optional": true, "description": "Rectangles scrolling on main thread only."}
- ]
- },
- {
- "id": "PaintProfile",
- "type": "array",
- "description": "Array of timings, one per paint step.",
- "items": {
- "type": "number",
- "description": "A time in seconds since the end of previous step (for the first step, time since painting started)"
- }
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables compositing tree inspection."
- },
- {
- "name": "disable",
- "description": "Disables compositing tree inspection."
- },
- {
- "name": "compositingReasons",
- "parameters": [
- { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer for which we want to get the reasons it was composited." }
- ],
- "description": "Provides the reasons why the given layer was composited.",
- "returns": [
- { "name": "compositingReasons", "type": "array", "items": { "type": "string" }, "description": "A list of strings specifying reasons for the given layer to become composited." }
- ]
- },
- {
- "name": "makeSnapshot",
- "parameters": [
- { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer." }
- ],
- "description": "Returns the layer snapshot identifier.",
- "returns": [
- { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }
- ]
- },
- {
- "name": "loadSnapshot",
- "parameters": [
- { "name": "tiles", "type": "array", "items": { "$ref": "PictureTile" }, "minItems": 1, "description": "An array of tiles composing the snapshot." }
- ],
- "description": "Returns the snapshot identifier.",
- "returns": [
- { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the snapshot." }
- ]
- },
- {
- "name": "releaseSnapshot",
- "parameters": [
- { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }
- ],
- "description": "Releases layer snapshot captured by the back-end."
- },
- {
- "name": "profileSnapshot",
- "parameters": [
- { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." },
- { "name": "minRepeatCount", "type": "integer", "optional": true, "description": "The maximum number of times to replay the snapshot (1, if not specified)." },
- { "name": "minDuration", "type": "number", "optional": true, "description": "The minimum duration (in seconds) to replay the snapshot." },
- { "name": "clipRect", "$ref": "DOM.Rect", "optional": true, "description": "The clip rectangle to apply when replaying the snapshot." }
- ],
- "returns": [
- { "name": "timings", "type": "array", "items": { "$ref": "PaintProfile" }, "description": "The array of paint profiles, one per run." }
- ]
- },
- {
- "name": "replaySnapshot",
- "parameters": [
- { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." },
- { "name": "fromStep", "type": "integer", "optional": true, "description": "The first step to replay from (replay from the very start if not specified)." },
- { "name": "toStep", "type": "integer", "optional": true, "description": "The last step to replay to (replay till the end if not specified)." },
- { "name": "scale", "type": "number", "optional": true, "description": "The scale to apply while replaying (defaults to 1)." }
- ],
- "description": "Replays the layer snapshot and returns the resulting bitmap.",
- "returns": [
- { "name": "dataURL", "type": "string", "description": "A data: URL for resulting image." }
- ]
- },
- {
- "name": "snapshotCommandLog",
- "parameters": [
- { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }
- ],
- "description": "Replays the layer snapshot and returns canvas log.",
- "returns": [
- { "name": "commandLog", "type": "array", "items": { "type": "object" }, "description": "The array of canvas function calls." }
- ]
- }
- ],
- "events": [
- {
- "name": "layerTreeDidChange",
- "parameters": [
- { "name": "layers", "type": "array", "items": { "$ref": "Layer" }, "optional": true, "description": "Layer tree, absent if not in the comspositing mode." }
- ]
- },
- {
- "name": "layerPainted",
- "parameters": [
- { "name": "layerId", "$ref": "LayerId", "description": "The id of the painted layer." },
- { "name": "clip", "$ref": "DOM.Rect", "description": "Clip rectangle." }
- ]
- }
- ]
- },
- {
- "domain": "DeviceOrientation",
- "hidden": true,
- "commands": [
- {
- "name": "setDeviceOrientationOverride",
- "description": "Overrides the Device Orientation.",
- "parameters": [
- { "name": "alpha", "type": "number", "description": "Mock alpha"},
- { "name": "beta", "type": "number", "description": "Mock beta"},
- { "name": "gamma", "type": "number", "description": "Mock gamma"}
- ]
- },
- {
- "name": "clearDeviceOrientationOverride",
- "description": "Clears the overridden Device Orientation."
- }
- ]
- },
- {
- "domain": "Tracing",
- "types": [
- {
- "id": "MemoryDumpConfig",
- "type": "object",
- "description": "Configuration for memory dump. Used only when \"memory-infra\" category is enabled."
- },
- {
- "id": "TraceConfig",
- "type": "object",
- "properties": [
- { "name": "recordMode", "type": "string", "optional": true, "enum": ["recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole"], "description": "Controls how the trace buffer stores data." },
- { "name": "enableSampling", "type": "boolean", "optional": true, "description": "Turns on JavaScript stack sampling." },
- { "name": "enableSystrace", "type": "boolean", "optional": true, "description": "Turns on system tracing." },
- { "name": "enableArgumentFilter", "type": "boolean", "optional": true, "description": "Turns on argument filter." },
- { "name": "includedCategories", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Included category filters." },
- { "name": "excludedCategories", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Excluded category filters." },
- { "name": "syntheticDelays", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Configuration to synthesize the delays in tracing." },
- { "name": "memoryDumpConfig", "$ref": "MemoryDumpConfig", "optional": true, "description": "Configuration for memory dump triggers. Used only when \"memory-infra\" category is enabled." }
- ]
- }
- ],
- "commands": [
- {
- "name": "start",
- "async": true,
- "description": "Start trace events collection.",
- "parameters": [
- { "name": "categories", "type": "string", "optional": true, "deprecated": true, "description": "Category/tag filter" },
- { "name": "options", "type": "string", "optional": true, "deprecated": true, "description": "Tracing options" },
- { "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds" },
- { "name": "transferMode", "type": "string", "enum": ["ReportEvents", "ReturnAsStream"], "optional": true, "description": "Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to <code>ReportEvents</code>)." },
- { "name": "traceConfig", "$ref": "TraceConfig", "optional": true, "description": "" }
- ],
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "end",
- "async": true,
- "description": "Stop trace events collection.",
- "handlers": ["browser", "renderer"]
- },
- {
- "name": "getCategories",
- "async": true,
- "description": "Gets supported tracing categories.",
- "returns": [
- { "name": "categories", "type": "array", "items": { "type": "string" }, "description": "A list of supported tracing categories." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "requestMemoryDump",
- "async": true,
- "description": "Request a global memory dump.",
- "returns": [
- { "name": "dumpGuid", "type": "string", "description": "GUID of the resulting global memory dump." },
- { "name": "success", "type": "boolean", "description": "True iff the global memory dump succeeded." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "recordClockSyncMarker",
- "description": "Record a clock sync marker in the trace.",
- "parameters": [
- { "name": "syncId", "type": "string", "description": "The ID of this clock sync marker" }
- ],
- "handlers": ["browser"]
- }
- ],
- "events": [
- {
- "name": "dataCollected",
- "parameters": [
- { "name": "value", "type": "array", "items": { "type": "object" } }
- ],
- "description": "Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.",
- "handlers": ["browser"]
- },
- {
- "name": "tracingComplete",
- "description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.",
- "parameters": [
- { "name": "stream", "$ref": "IO.StreamHandle", "optional": true, "description": "A handle of the stream that holds resulting trace data." }
- ],
- "handlers": ["browser"]
- },
- {
- "name": "bufferUsage",
- "parameters": [
- { "name": "percentFull", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." },
- { "name": "eventCount", "type": "number", "optional": true, "description": "An approximate number of events in the trace log." },
- { "name": "value", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." }
- ],
- "handlers": ["browser"]
- }
- ]
- },
- {
- "domain": "Animation",
- "hidden": true,
- "types": [
- {
- "id": "Animation",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "id", "type": "string", "description": "<code>Animation</code>'s id." },
- { "name": "name", "type": "string", "description": "<code>Animation</code>'s name." },
- { "name": "pausedState", "type": "boolean", "hidden": "true", "description": "<code>Animation</code>'s internal paused state." },
- { "name": "playState", "type": "string", "description": "<code>Animation</code>'s play state." },
- { "name": "playbackRate", "type": "number", "description": "<code>Animation</code>'s playback rate." },
- { "name": "startTime", "type": "number", "description": "<code>Animation</code>'s start time." },
- { "name": "currentTime", "type": "number", "description": "<code>Animation</code>'s current time." },
- { "name": "source", "$ref": "AnimationEffect", "description": "<code>Animation</code>'s source animation node." },
- { "name": "type", "type": "string", "enum": ["CSSTransition", "CSSAnimation", "WebAnimation"], "description": "Animation type of <code>Animation</code>." },
- { "name": "cssId", "type": "string", "optional": true, "description": "A unique ID for <code>Animation</code> representing the sources that triggered this CSS animation/transition."}
- ],
- "description": "Animation instance."
- },
- {
- "id": "AnimationEffect",
- "type": "object",
- "hidden": true,
- "properties": [
- { "name": "delay", "type": "number", "description": "<code>AnimationEffect</code>'s delay." },
- { "name": "endDelay", "type": "number", "description": "<code>AnimationEffect</code>'s end delay." },
- { "name": "playbackRate", "type": "number", "description": "<code>AnimationEffect</code>'s playbackRate." },
- { "name": "iterationStart", "type": "number", "description": "<code>AnimationEffect</code>'s iteration start." },
- { "name": "iterations", "type": "number", "description": "<code>AnimationEffect</code>'s iterations." },
- { "name": "duration", "type": "number", "description": "<code>AnimationEffect</code>'s iteration duration." },
- { "name": "direction", "type": "string", "description": "<code>AnimationEffect</code>'s playback direction." },
- { "name": "fill", "type": "string", "description": "<code>AnimationEffect</code>'s fill mode." },
- { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "<code>AnimationEffect</code>'s target node." },
- { "name": "keyframesRule", "$ref": "KeyframesRule", "optional": true, "description": "<code>AnimationEffect</code>'s keyframes." },
- { "name": "easing", "type": "string", "description": "<code>AnimationEffect</code>'s timing function." }
- ],
- "description": "AnimationEffect instance"
- },
- {
- "id": "KeyframesRule",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "optional": true, "description": "CSS keyframed animation's name." },
- { "name": "keyframes", "type": "array", "items": { "$ref": "KeyframeStyle" }, "description": "List of animation keyframes." }
- ],
- "description": "Keyframes Rule"
- },
- {
- "id": "KeyframeStyle",
- "type": "object",
- "properties": [
- { "name": "offset", "type": "string", "description": "Keyframe's time offset." },
- { "name": "easing", "type": "string", "description": "<code>AnimationEffect</code>'s timing function." }
- ],
- "description": "Keyframe Style"
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables animation domain notifications."
- },
- {
- "name": "disable",
- "description": "Disables animation domain notifications."
- },
- {
- "name": "getPlaybackRate",
- "returns": [
- { "name": "playbackRate", "type": "number", "description": "Playback rate for animations on page."}
- ],
- "description": "Gets the playback rate of the document timeline."
- },
- {
- "name": "setPlaybackRate",
- "parameters": [
- { "name": "playbackRate", "type": "number", "description": "Playback rate for animations on page" }
- ],
- "description": "Sets the playback rate of the document timeline."
- },
- {
- "name": "getCurrentTime",
- "parameters": [
- { "name": "id", "type": "string", "description": "Id of animation." }
- ],
- "returns": [
- { "name": "currentTime", "type": "number", "description": "Current time of the page." }
- ],
- "description": "Returns the current time of the an animation."
- },
- {
- "name": "setPaused",
- "parameters": [
- { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "Animations to set the pause state of." },
- { "name": "paused", "type": "boolean", "description": "Paused state to set to." }
- ],
- "description": "Sets the paused state of a set of animations."
- },
- {
- "name": "setTiming",
- "parameters": [
- { "name": "animationId", "type": "string", "description": "Animation id." },
- { "name": "duration", "type": "number", "description": "Duration of the animation." },
- { "name": "delay", "type": "number", "description": "Delay of the animation." }
- ],
- "description": "Sets the timing of an animation node."
- },
- {
- "name": "seekAnimations",
- "parameters": [
- { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "List of animation ids to seek." },
- { "name": "currentTime", "type": "number", "description": "Set the current time of each animation." }
- ],
- "description": "Seek a set of animations to a particular time within each animation."
- },
- {
- "name": "releaseAnimations",
- "parameters": [
- { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "List of animation ids to seek." }
- ],
- "description": "Releases a set of animations to no longer be manipulated."
- },
- {
- "name": "resolveAnimation",
- "parameters": [
- { "name": "animationId", "type": "string", "description": "Animation id." }
- ],
- "returns": [
- { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "description": "Corresponding remote object." }
- ],
- "description": "Gets the remote object of the Animation."
- }
- ],
- "events": [
- {
- "name": "animationCreated",
- "parameters": [
- { "name": "id", "type": "string", "description": "Id of the animation that was created." }
- ],
- "description": "Event for each animation that has been created."
- },
- {
- "name": "animationStarted",
- "parameters": [
- { "name": "animation", "$ref": "Animation", "description": "Animation that was started." }
- ],
- "description": "Event for animation that has been started."
- },
- {
- "name": "animationCanceled",
- "parameters": [
- { "name": "id", "type": "string", "description": "Id of the animation that was cancelled."}
- ],
- "description": "Event for when an animation has been cancelled."
- }
- ]
- },
- {
- "domain": "Accessibility",
- "hidden": true,
- "types": [
- {
- "id": "AXNodeId",
- "type": "string",
- "description": "Unique accessibility node identifier."
- },
- {
- "id": "AXValueType",
- "type": "string",
- "enum": [ "boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "node", "nodeList", "number", "string", "computedString", "token", "tokenList", "domRelation", "role", "internalRole", "valueUndefined" ],
- "description": "Enum of possible property types."
- },
- {
- "id": "AXValueSourceType",
- "type": "string",
- "enum": [ "attribute", "implicit", "style", "contents", "placeholder", "relatedElement" ],
- "description": "Enum of possible property sources."
- },
- { "id": "AXValueNativeSourceType",
- "type": "string",
- "enum": [ "figcaption", "label", "labelfor", "labelwrapped", "legend", "tablecaption", "title", "other" ],
- "description": "Enum of possible native property sources (as a subtype of a particular AXValueSourceType)."
- },
- {
- "id": "AXValueSource",
- "type": "object",
- "properties": [
- { "name": "type", "$ref": "AXValueSourceType", "description": "What type of source this is." },
- { "name": "value", "$ref": "AXValue", "description": "The value of this property source.", "optional": true },
- { "name": "attribute", "type": "string", "description": "The name of the relevant attribute, if any.", "optional": true },
- { "name": "attributeValue", "$ref": "AXValue", "description": "The value of the relevant attribute, if any.", "optional": true },
- { "name": "superseded", "type": "boolean", "description": "Whether this source is superseded by a higher priority source.", "optional": true },
- { "name": "nativeSource", "$ref": "AXValueNativeSourceType", "description": "The native markup source for this value, e.g. a <label> element.", "optional": true },
- { "name": "nativeSourceValue", "$ref": "AXValue", "description": "The value, such as a node or node list, of the native source.", "optional": true },
- { "name": "invalid", "type": "boolean", "description": "Whether the value for this property is invalid.", "optional": true },
- { "name": "invalidReason", "type": "string", "description": "Reason for the value being invalid, if it is.", "optional": true }
- ],
- "description": "A single source for a computed AX property."
- },
- {
- "id": "AXRelatedNode",
- "type": "object",
- "properties": [
- { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "The BackendNodeId of the related node." },
- { "name": "idref", "type": "string", "description": "The IDRef value provided, if any.", "optional": true },
- { "name": "text", "type": "string", "description": "The text alternative of this node in the current context.", "optional": true }
- ]
- },
- {
- "id": "AXProperty",
- "type": "object",
- "properties": [
- { "name": "name", "type": "string", "description": "The name of this property." },
- { "name": "value", "$ref": "AXValue", "description": "The value of this property." }
- ]
- },
- {
- "id": "AXValue",
- "type": "object",
- "properties": [
- { "name": "type", "$ref": "AXValueType", "description": "The type of this value." },
-
- { "name": "value", "type": "any", "description": "The computed value of this property.", "optional": true },
- { "name": "relatedNodes", "type": "array", "items": { "$ref": "AXRelatedNode" }, "description": "One or more related nodes, if applicable.", "optional": true },
- { "name": "sources", "type": "array", "items": { "$ref": "AXValueSource" }, "description": "The sources which contributed to the computation of this property.", "optional": true }
- ],
- "description": "A single computed AX property."
- },
- {
- "id": "AXGlobalStates",
- "type": "string",
- "enum": [ "disabled", "hidden", "hiddenRoot", "invalid" ],
- "description": "States which apply to every AX node."
- },
- {
- "id": "AXLiveRegionAttributes",
- "type": "string",
- "enum": [ "live", "atomic", "relevant", "busy", "root" ],
- "description": "Attributes which apply to nodes in live regions."
- },
- {
- "id": "AXWidgetAttributes",
- "type": "string",
- "enum": [ "autocomplete", "haspopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext" ],
- "Description": "Attributes which apply to widgets."
- },
- {
- "id": "AXWidgetStates",
- "type": "string",
- "enum": [ "checked", "expanded", "pressed", "selected" ],
- "description": "States which apply to widgets."
- },
- {
- "id": "AXRelationshipAttributes",
- "type": "string",
- "enum": [ "activedescendant", "flowto", "controls", "describedby", "labelledby", "owns" ],
- "description": "Relationships between elements other than parent/child/sibling."
- },
- {
- "id": "AXNode",
- "type": "object",
- "properties": [
- { "name": "nodeId", "$ref": "AXNodeId", "description": "Unique identifier for this node." },
- { "name": "ignored", "type": "boolean", "description": "Whether this node is ignored for accessibility" },
- { "name": "ignoredReasons", "type": "array", "items": { "$ref": "AXProperty" }, "description": "Collection of reasons why this node is hidden.", "optional": true },
- { "name": "role", "$ref": "AXValue", "description": "This <code>Node</code>'s role, whether explicit or implicit.", "optional": true},
- { "name": "name", "$ref": "AXValue", "description": "The accessible name for this <code>Node</code>.", "optional": true },
- { "name": "description", "$ref": "AXValue", "description": "The accessible description for this <code>Node</code>.", "optional": true },
- { "name": "value", "$ref": "AXValue", "description": "The value for this <code>Node</code>.", "optional": true },
- { "name": "properties", "type": "array", "items": { "$ref": "AXProperty" }, "description": "All other properties", "optional": true }
- ],
- "description": "A node in the accessibility tree."
- }
- ],
- "commands": [
- {
- "name": "getAXNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "ID of node to get accessibility node for." }
- ],
- "returns": [
- { "name": "accessibilityNode", "$ref": "AXNode", "description": "The <code>Accessibility.AXNode</code> for this DOM node, if it exists.", "optional": true }
- ],
- "description": "Fetches the accessibility node for this DOM node, if it exists.",
- "hidden": true
- }
- ]
- },
- {
- "domain": "Storage",
- "hidden": true,
- "types": [
- {
- "id": "StorageType",
- "type": "string",
- "enum": [
- "appcache",
- "cookies",
- "file_systems",
- "indexeddb",
- "local_storage",
- "shader_cache",
- "websql",
- "webrtc_indetity",
- "service_workers",
- "cache_storage",
- "all"
- ],
- "description": "Enum of possible storage types."
- }
- ],
- "commands": [
- {
- "name": "clearDataForOrigin",
- "parameters": [
- { "name": "origin", "type": "string", "description": "Security origin." },
- { "name": "storageTypes", "type": "string", "description": "Comma separated origin names." }
- ],
- "description": "Clears storage for origin.",
- "handlers": ["browser"]
- }
- ]
- }]
-}
diff --git a/deps/v8_inspector/platform/PlatformExport.h b/deps/v8_inspector/platform/PlatformExport.h
deleted file mode 100644
index 8230fbb80f..0000000000
--- a/deps/v8_inspector/platform/PlatformExport.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef PlatformExport_h
-#define PlatformExport_h
-
-#if !defined(BLINK_PLATFORM_IMPLEMENTATION)
-#define BLINK_PLATFORM_IMPLEMENTATION 0
-#endif
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-#if BLINK_PLATFORM_IMPLEMENTATION
-#define PLATFORM_EXPORT __declspec(dllexport)
-#else
-#define PLATFORM_EXPORT __declspec(dllimport)
-#endif
-#else // defined(WIN32)
-#define PLATFORM_EXPORT __attribute__((visibility("default")))
-#endif
-#else // defined(COMPONENT_BUILD)
-#define PLATFORM_EXPORT
-#endif
-
-#if defined(_MSC_VER)
-// MSVC Compiler warning C4275:
-// non dll-interface class 'Bar' used as base for dll-interface class 'Foo'.
-// Note that this is intended to be used only when no access to the base class'
-// static data is done through derived classes or inline methods. For more info,
-// see http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx
-//
-// This pragma will allow exporting a class that inherits from a non-exported
-// base class, anywhere in the Blink platform component. This is only
-// a problem when using the MSVC compiler on Windows.
-#pragma warning(suppress:4275)
-#endif
-
-#endif // PlatformExport_h
diff --git a/deps/v8_inspector/platform/inspector_protocol/Array.h b/deps/v8_inspector/platform/inspector_protocol/Array.h
index 07a2993d5c..b75f517429 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Array.h
+++ b/deps/v8_inspector/platform/inspector_protocol/Array.h
@@ -5,9 +5,9 @@
#ifndef Array_h
#define Array_h
-#include "platform/PlatformExport.h"
#include "platform/inspector_protocol/Collections.h"
#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
#include "platform/inspector_protocol/ValueConversions.h"
#include "platform/inspector_protocol/Values.h"
@@ -91,7 +91,7 @@ public:
errors->addError("array expected");
return nullptr;
}
- std::unique_ptr<Array<T>> result = wrapUnique(new Array<T>());
+ std::unique_ptr<Array<T>> result(new Array<T>());
errors->push();
for (size_t i = 0; i < array->size(); ++i) {
errors->setName(String16::number(i));
diff --git a/deps/v8_inspector/platform/inspector_protocol/BackendCallback.h b/deps/v8_inspector/platform/inspector_protocol/BackendCallback.h
new file mode 100644
index 0000000000..870fbb5555
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/BackendCallback.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BackendCallback_h
+#define BackendCallback_h
+
+#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/Platform.h"
+
+namespace blink {
+namespace protocol {
+
+class PLATFORM_EXPORT BackendCallback {
+public:
+ virtual ~BackendCallback() { }
+ virtual void sendFailure(const ErrorString&) = 0;
+};
+
+} // namespace platform
+} // namespace blink
+
+#endif // !defined(BackendCallback_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/Backend_cpp.template b/deps/v8_inspector/platform/inspector_protocol/Backend_cpp.template
deleted file mode 100644
index e69de29bb2..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/Backend_cpp.template
+++ /dev/null
diff --git a/deps/v8_inspector/platform/inspector_protocol/Backend_h.template b/deps/v8_inspector/platform/inspector_protocol/Backend_h.template
deleted file mode 100644
index 4d6ac711f6..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/Backend_h.template
+++ /dev/null
@@ -1,78 +0,0 @@
-// This file is generated
-
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef {{class_name}}_h
-#define {{class_name}}_h
-
-#include "platform/inspector_protocol/TypeBuilder.h"
-
-namespace blink {
-namespace protocol {
-
-class FrontendChannel;
-class BackendImplWeakPtr;
-
-class PLATFORM_EXPORT Backend {
-public:
- class PLATFORM_EXPORT CallbackBase {
- public:
- virtual ~CallbackBase() { }
- virtual void sendFailure(const ErrorString&) = 0;
- };
-{% for domain in api.domains %}
-
- class PLATFORM_EXPORT {{domain.domain}} {
- public:
- {% for command in domain.commands %}
- {% if "redirect" in command %}{% continue %}{% endif %}
- {% if ("handlers" in command) and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
- {% if "async" in command %}
- class PLATFORM_EXPORT {{command.name | to_title_case}}Callback : public CallbackBase {
- public:
- virtual void sendSuccess(
- {%- for parameter in command.returns -%}
- {%- if "optional" in parameter -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
- {%- else -%}
- {{resolve_type(parameter).pass_type}} {{parameter.name}}
- {%- endif -%}
- {%- if not loop.last -%}, {% endif -%}
- {%- endfor -%}
- ) = 0;
- };
- {% endif %}
- virtual void {{command.name}}(ErrorString*
- {%- for parameter in command.parameters -%}
- {%- if "optional" in parameter -%}
- , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter.name}}
- {%- else -%}
- , {{resolve_type(parameter).pass_type}} in_{{parameter.name}}
- {%- endif -%}
- {%- endfor -%}
- {%- if "async" in command -%}
- , std::unique_ptr<{{command.name | to_title_case}}Callback> callback
- {%- else -%}
- {%- for parameter in command.returns -%}
- {%- if "optional" in parameter -%}
- , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name}}
- {%- else -%}
- , {{resolve_type(parameter).type}}* out_{{parameter.name}}
- {%- endif -%}
- {%- endfor -%}
- {%- endif -%}
- ) = 0;
- {% endfor %}
-
- protected:
- virtual ~{{domain.domain}}() { }
- };
-{% endfor %}
-};
-
-} // namespace protocol
-} // namespace blink
-
-#endif // !defined({{class_name}}_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py b/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py
index 62f77a783a..4c11161a3c 100644
--- a/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py
+++ b/deps/v8_inspector/platform/inspector_protocol/CodeGenerator.py
@@ -4,9 +4,7 @@
import os.path
import sys
-import string
import optparse
-import re
try:
import json
except ImportError:
@@ -22,49 +20,92 @@ except ImportError:
# since some compile processes will try to read the partially written cache.
module_path, module_filename = os.path.split(os.path.realpath(__file__))
templates_dir = module_path
+
+# In Blink, jinja2 is in chromium's third_party directory.
+# Insert at 1 so at front to override system libraries, and
+# after path[0] == invoking script dir
+third_party_dir = os.path.normpath(os.path.join(
+ module_path, os.pardir, os.pardir, os.pardir, os.pardir))
+if os.path.isdir(third_party_dir):
+ sys.path.insert(1, third_party_dir)
+
+# In Node, it is in deps folder
deps_dir = os.path.normpath(os.path.join(
- module_path, os.pardir, os.pardir, 'deps'))
+ module_path, os.pardir, os.pardir, "deps"))
+if os.path.isdir(deps_dir):
+ sys.path.insert(1, os.path.join(deps_dir, "jinja2"))
+ sys.path.insert(1, os.path.join(deps_dir, "markupsafe"))
-sys.path.insert(1, os.path.join(deps_dir, "jinja2"))
-sys.path.insert(1, os.path.join(deps_dir, "markupsafe"))
import jinja2
cmdline_parser = optparse.OptionParser()
+cmdline_parser.add_option("--protocol")
+cmdline_parser.add_option("--include")
+cmdline_parser.add_option("--string_type")
+cmdline_parser.add_option("--export_macro")
cmdline_parser.add_option("--output_dir")
-cmdline_parser.add_option("--generate_dispatcher")
+cmdline_parser.add_option("--output_package")
try:
arg_options, arg_values = cmdline_parser.parse_args()
- if (len(arg_values) == 0):
- raise Exception("At least one plain argument expected (found %s)" % len(arg_values))
+ protocol_file = arg_options.protocol
+ if not protocol_file:
+ raise Exception("Protocol directory must be specified")
+ include_file = arg_options.include
output_dirname = arg_options.output_dir
- generate_dispatcher = arg_options.generate_dispatcher
if not output_dirname:
raise Exception("Output directory must be specified")
+ output_package = arg_options.output_package
+ if not output_package:
+ raise Exception("Output package must be specified")
+ string_type = arg_options.string_type
+ if not string_type:
+ raise Exception("String type must be specified")
+ export_macro = arg_options.export_macro
+ if not export_macro:
+ raise Exception("Export macro must be specified")
except Exception:
# Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html
exc = sys.exc_info()[1]
sys.stderr.write("Failed to parse command-line arguments: %s\n\n" % exc)
- sys.stderr.write("Usage: <script> --output_dir <output_dir> blink_protocol.json v8_protocol.json ...\n")
exit(1)
-json_api = {"domains": []}
-json_timestamp = 0
+input_file = open(protocol_file, "r")
+json_string = input_file.read()
+parsed_json = json.loads(json_string)
+
+
+# Make gyp / make generatos happy, otherwise make rebuilds world.
+def up_to_date():
+ template_ts = max(
+ os.path.getmtime(__file__),
+ os.path.getmtime(os.path.join(templates_dir, "TypeBuilder_h.template")),
+ os.path.getmtime(os.path.join(templates_dir, "TypeBuilder_cpp.template")),
+ os.path.getmtime(protocol_file))
+
+ for domain in parsed_json["domains"]:
+ name = domain["domain"]
+ h_path = os.path.join(output_dirname, name + ".h")
+ cpp_path = os.path.join(output_dirname, name + ".cpp")
+ if not os.path.exists(h_path) or not os.path.exists(cpp_path):
+ return False
+ generated_ts = max(os.path.getmtime(h_path), os.path.getmtime(cpp_path))
+ if generated_ts < template_ts:
+ return False
+ return True
+
+
+if up_to_date():
+ sys.exit()
-for filename in arg_values:
- json_timestamp = max(os.path.getmtime(filename), json_timestamp)
- input_file = open(filename, "r")
- json_string = input_file.read()
- parsed_json = json.loads(json_string)
- json_api["domains"] += parsed_json["domains"]
def to_title_case(name):
return name[:1].upper() + name[1:]
def dash_to_camelcase(word):
- return ''.join(to_title_case(x) or '-' for x in word.split('-'))
+ return "".join(to_title_case(x) or "-" for x in word.split("-"))
def initialize_jinja_env(cache_dir):
@@ -77,7 +118,7 @@ def initialize_jinja_env(cache_dir):
lstrip_blocks=True, # so can indent control flow tags
trim_blocks=True)
jinja_env.filters.update({"to_title_case": to_title_case, "dash_to_camelcase": dash_to_camelcase})
- jinja_env.add_extension('jinja2.ext.loopcontrols')
+ jinja_env.add_extension("jinja2.ext.loopcontrols")
return jinja_env
@@ -149,28 +190,16 @@ def create_any_type_definition():
def create_string_type_definition(domain):
- if domain in ["Runtime", "Debugger", "Profiler", "HeapProfiler"]:
- return {
- "return_type": "String16",
- "pass_type": "const String16&",
- "to_pass_type": "%s",
- "to_raw_type": "%s",
- "to_rvalue": "%s",
- "type": "String16",
- "raw_type": "String16",
- "raw_pass_type": "const String16&",
- "raw_return_type": "String16",
- }
return {
- "return_type": "String",
- "pass_type": "const String&",
+ "return_type": string_type,
+ "pass_type": ("const %s&" % string_type),
"to_pass_type": "%s",
"to_raw_type": "%s",
"to_rvalue": "%s",
- "type": "String",
- "raw_type": "String",
- "raw_pass_type": "const String&",
- "raw_return_type": "String",
+ "type": string_type,
+ "raw_type": string_type,
+ "raw_pass_type": ("const %s&" % string_type),
+ "raw_return_type": string_type,
}
@@ -203,6 +232,7 @@ def create_primitive_type_definition(type):
"default_value": defaults[type]
}
+
type_definitions = {}
type_definitions["number"] = create_primitive_type_definition("number")
type_definitions["integer"] = create_primitive_type_definition("integer")
@@ -210,6 +240,7 @@ type_definitions["boolean"] = create_primitive_type_definition("boolean")
type_definitions["object"] = create_object_type_definition()
type_definitions["any"] = create_any_type_definition()
+
def wrap_array_definition(type):
return {
"return_type": "std::unique_ptr<protocol::Array<%s>>" % type["raw_type"],
@@ -242,9 +273,6 @@ def create_type_definitions():
else:
type_definitions[domain["domain"] + "." + type["id"]] = create_primitive_type_definition(type["type"])
-patch_full_qualified_refs()
-create_type_definitions()
-
def type_definition(name):
return type_definitions[name]
@@ -266,39 +294,54 @@ def join_arrays(dict, keys):
return result
-if os.path.exists(__file__):
- current_script_timestamp = os.path.getmtime(__file__)
-else:
- current_script_timestamp = 0
+def has_disable(commands):
+ for command in commands:
+ if command["name"] == "disable":
+ return True
+ return False
-def is_up_to_date(file, template):
- if not os.path.exists(file):
- return False
- timestamp = os.path.getmtime(file)
- return timestamp > max(os.path.getmtime(module_path + template),
- current_script_timestamp, json_timestamp)
+generate_domains = []
+json_api = {}
+json_api["domains"] = parsed_json["domains"]
+for domain in parsed_json["domains"]:
+ generate_domains.append(domain["domain"])
-def generate(class_name):
- h_template_name = "/%s_h.template" % class_name
- cpp_template_name = "/%s_cpp.template" % class_name
+if include_file:
+ input_file = open(include_file, "r")
+ json_string = input_file.read()
+ parsed_json = json.loads(json_string)
+ json_api["domains"] += parsed_json["domains"]
+
+
+patch_full_qualified_refs()
+create_type_definitions()
+
+if not os.path.exists(output_dirname):
+ os.mkdir(output_dirname)
+jinja_env = initialize_jinja_env(output_dirname)
+
+h_template_name = "/TypeBuilder_h.template"
+cpp_template_name = "/TypeBuilder_cpp.template"
+h_template = jinja_env.get_template(h_template_name)
+cpp_template = jinja_env.get_template(cpp_template_name)
+
+
+def generate(domain):
+ class_name = domain["domain"]
h_file_name = output_dirname + "/" + class_name + ".h"
cpp_file_name = output_dirname + "/" + class_name + ".cpp"
- if (is_up_to_date(cpp_file_name, cpp_template_name) and
- is_up_to_date(h_file_name, h_template_name)):
- return
-
template_context = {
- "class_name": class_name,
- "api": json_api,
+ "domain": domain,
"join_arrays": join_arrays,
"resolve_type": resolve_type,
- "type_definition": type_definition
+ "type_definition": type_definition,
+ "has_disable": has_disable,
+ "export_macro": export_macro,
+ "output_package": output_package,
}
- h_template = jinja_env.get_template(h_template_name)
- cpp_template = jinja_env.get_template(cpp_template_name)
h_file = output_file(h_file_name)
cpp_file = output_file(cpp_file_name)
h_file.write(h_template.render(template_context))
@@ -307,8 +350,6 @@ def generate(class_name):
cpp_file.close()
-jinja_env = initialize_jinja_env(output_dirname)
-generate("Backend")
-generate("Dispatcher")
-generate("Frontend")
-generate("TypeBuilder")
+for domain in json_api["domains"]:
+ if domain["domain"] in generate_domains:
+ generate(domain)
diff --git a/deps/v8_inspector/platform/inspector_protocol/Collections.h b/deps/v8_inspector/platform/inspector_protocol/Collections.h
index 960c747bae..6309284488 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Collections.h
+++ b/deps/v8_inspector/platform/inspector_protocol/Collections.h
@@ -11,4 +11,13 @@
#include "platform/inspector_protocol/CollectionsWTF.h"
#endif // V8_INSPECTOR_USE_STL
+
+// Macro that returns a compile time constant with the length of an array, but gives an error if passed a non-array.
+template<typename T, size_t Size> char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
+// GCC needs some help to deduce a 0 length array.
+#if defined(__GNUC__)
+template<typename T> char (&ArrayLengthHelperFunction(T (&)[0]))[0];
+#endif
+#define PROTOCOL_ARRAY_LENGTH(array) sizeof(::ArrayLengthHelperFunction(array))
+
#endif // !defined(Collections_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/CollectionsSTL.h b/deps/v8_inspector/platform/inspector_protocol/CollectionsSTL.h
index 09a1d39971..ee99cfd8bd 100644
--- a/deps/v8_inspector/platform/inspector_protocol/CollectionsSTL.h
+++ b/deps/v8_inspector/platform/inspector_protocol/CollectionsSTL.h
@@ -5,9 +5,8 @@
#ifndef CollectionsSTL_h
#define CollectionsSTL_h
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/Compiler.h"
-#include "wtf/PtrUtil.h"
#include <algorithm>
#include <map>
@@ -242,12 +241,4 @@ public:
} // namespace platform
} // namespace blink
-// Macro that returns a compile time constant with the length of an array, but gives an error if passed a non-array.
-template<typename T, size_t Size> char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
-// GCC needs some help to deduce a 0 length array.
-#if COMPILER(GCC)
-template<typename T> char (&ArrayLengthHelperFunction(T (&)[0]))[0];
-#endif
-#define PROTOCOL_ARRAY_LENGTH(array) sizeof(::ArrayLengthHelperFunction(array))
-
#endif // !defined(CollectionsSTL_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/CollectionsWTF.h b/deps/v8_inspector/platform/inspector_protocol/CollectionsWTF.h
index 4642c610b8..5d8fbf625f 100644
--- a/deps/v8_inspector/platform/inspector_protocol/CollectionsWTF.h
+++ b/deps/v8_inspector/platform/inspector_protocol/CollectionsWTF.h
@@ -5,7 +5,7 @@
#ifndef CollectionsWTF_h
#define CollectionsWTF_h
-#include "wtf/Assertions.h"
+#include "wtf/Allocator.h"
#include "wtf/HashMap.h"
#include "wtf/PtrUtil.h"
#include "wtf/Vector.h"
@@ -67,12 +67,12 @@ public:
void resize(size_t s) { m_impl.resize(s); }
size_t size() const { return m_impl.size(); }
bool isEmpty() const { return m_impl.isEmpty(); }
- std::unique_ptr<T>& operator[](size_t i) { return m_impl.at(i); }
- const std::unique_ptr<T>& operator[](size_t i) const { return m_impl.at(i); }
- std::unique_ptr<T>& at(size_t i) { return m_impl.at(i); }
- const std::unique_ptr<T>& at(size_t i) const { return m_impl.at(i); }
- std::unique_ptr<T>& last() { return m_impl.last(); }
- const std::unique_ptr<T>& last() const { return m_impl.last(); }
+ T* operator[](size_t i) { return m_impl.at(i).get(); }
+ const T* operator[](size_t i) const { return m_impl.at(i).get(); }
+ T* at(size_t i) { return m_impl.at(i).get(); }
+ const T* at(size_t i) const { return m_impl.at(i).get(); }
+ T* last() { return m_impl.last().get(); }
+ const T* last() const { return m_impl.last(); }
void append(std::unique_ptr<T> t) { m_impl.append(std::move(t)); }
void prepend(std::unique_ptr<T> t) { m_impl.prepend(std::move(t)); }
void remove(size_t i) { m_impl.remove(i); }
diff --git a/deps/v8_inspector/platform/inspector_protocol/DispatcherBase.cpp b/deps/v8_inspector/platform/inspector_protocol/DispatcherBase.cpp
new file mode 100644
index 0000000000..6979872651
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/DispatcherBase.cpp
@@ -0,0 +1,173 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "platform/inspector_protocol/DispatcherBase.h"
+
+#include "platform/inspector_protocol/FrontendChannel.h"
+#include "platform/inspector_protocol/Parser.h"
+
+namespace blink {
+namespace protocol {
+
+// static
+const char DispatcherBase::kInvalidRequest[] = "Invalid request";
+
+DispatcherBase::WeakPtr::WeakPtr(DispatcherBase* dispatcher) : m_dispatcher(dispatcher) { }
+
+DispatcherBase::WeakPtr::~WeakPtr()
+{
+ if (m_dispatcher)
+ m_dispatcher->m_weakPtrs.remove(this);
+}
+
+DispatcherBase::Callback::Callback(std::unique_ptr<DispatcherBase::WeakPtr> backendImpl, int callId)
+ : m_backendImpl(std::move(backendImpl))
+ , m_callId(callId) { }
+
+DispatcherBase::Callback::~Callback() = default;
+
+void DispatcherBase::Callback::dispose()
+{
+ m_backendImpl = nullptr;
+}
+
+void DispatcherBase::Callback::sendIfActive(std::unique_ptr<protocol::DictionaryValue> partialMessage, const ErrorString& invocationError)
+{
+ if (!m_backendImpl->get())
+ return;
+ m_backendImpl->get()->sendResponse(m_callId, invocationError, nullptr, std::move(partialMessage));
+ m_backendImpl = nullptr;
+}
+
+DispatcherBase::DispatcherBase(FrontendChannel* frontendChannel)
+ : m_frontendChannel(frontendChannel) { }
+
+DispatcherBase::~DispatcherBase()
+{
+ clearFrontend();
+}
+
+// static
+bool DispatcherBase::getCommandName(const String16& message, String16* result)
+{
+ std::unique_ptr<protocol::Value> value = parseJSON(message);
+ if (!value)
+ return false;
+
+ protocol::DictionaryValue* object = DictionaryValue::cast(value.get());
+ if (!object)
+ return false;
+
+ if (!object->getString("method", result))
+ return false;
+
+ return true;
+}
+
+void DispatcherBase::sendResponse(int callId, const ErrorString& invocationError, ErrorSupport* errors, std::unique_ptr<protocol::DictionaryValue> result)
+{
+ if (invocationError.length() || (errors && errors->hasErrors())) {
+ reportProtocolError(callId, ServerError, invocationError, errors);
+ return;
+ }
+
+ std::unique_ptr<protocol::DictionaryValue> responseMessage = DictionaryValue::create();
+ responseMessage->setNumber("id", callId);
+ responseMessage->setObject("result", std::move(result));
+ if (m_frontendChannel)
+ m_frontendChannel->sendProtocolResponse(callId, responseMessage->toJSONString());
+}
+
+void DispatcherBase::sendResponse(int callId, const ErrorString& invocationError, std::unique_ptr<protocol::DictionaryValue> result)
+{
+ sendResponse(callId, invocationError, nullptr, std::move(result));
+}
+
+void DispatcherBase::sendResponse(int callId, const ErrorString& invocationError)
+{
+ sendResponse(callId, invocationError, nullptr, DictionaryValue::create());
+}
+
+static void reportProtocolError(FrontendChannel* frontendChannel, int callId, DispatcherBase::CommonErrorCode code, const String16& errorMessage, ErrorSupport* errors)
+{
+ std::unique_ptr<protocol::DictionaryValue> error = DictionaryValue::create();
+ error->setNumber("code", code);
+ error->setString("message", errorMessage);
+ DCHECK(error);
+ if (errors && errors->hasErrors())
+ error->setString("data", errors->errors());
+ std::unique_ptr<protocol::DictionaryValue> message = DictionaryValue::create();
+ message->setObject("error", std::move(error));
+ message->setNumber("id", callId);
+ frontendChannel->sendProtocolResponse(callId, message->toJSONString());
+}
+
+void DispatcherBase::reportProtocolError(int callId, CommonErrorCode code, const String16& errorMessage, ErrorSupport* errors)
+{
+ if (m_frontendChannel)
+ ::blink::protocol::reportProtocolError(m_frontendChannel, callId, code, errorMessage, errors);
+}
+
+void DispatcherBase::clearFrontend()
+{
+ m_frontendChannel = nullptr;
+ for (auto& weak : m_weakPtrs)
+ weak.first->dispose();
+ m_weakPtrs.clear();
+}
+
+std::unique_ptr<DispatcherBase::WeakPtr> DispatcherBase::weakPtr()
+{
+ std::unique_ptr<DispatcherBase::WeakPtr> weak(new DispatcherBase::WeakPtr(this));
+ m_weakPtrs.add(weak.get());
+ return weak;
+}
+
+UberDispatcher::UberDispatcher(FrontendChannel* frontendChannel)
+ : m_frontendChannel(frontendChannel) { }
+
+void UberDispatcher::registerBackend(const String16& name, std::unique_ptr<protocol::DispatcherBase> dispatcher)
+{
+ m_dispatchers.set(name, std::move(dispatcher));
+}
+
+void UberDispatcher::dispatch(const String16& message)
+{
+ std::unique_ptr<protocol::Value> parsedMessage = parseJSON(message);
+ if (!parsedMessage)
+ return;
+ std::unique_ptr<protocol::DictionaryValue> messageObject = DictionaryValue::cast(std::move(parsedMessage));
+ if (!messageObject)
+ return;
+
+ int callId = 0;
+ protocol::Value* callIdValue = messageObject->get("id");
+ bool success = callIdValue->asNumber(&callId);
+ if (!success)
+ return;
+
+ protocol::Value* methodValue = messageObject->get("method");
+ String16 method;
+ success = methodValue && methodValue->asString(&method);
+ if (!success)
+ return;
+
+ size_t dotIndex = method.find(".");
+ if (dotIndex == kNotFound) {
+ reportProtocolError(m_frontendChannel, callId, DispatcherBase::MethodNotFound, "'" + method + "' wasn't found", nullptr);
+ return;
+ }
+ String16 domain = method.substring(0, dotIndex);
+ auto it = m_dispatchers.find(domain);
+ if (it == m_dispatchers.end()) {
+ reportProtocolError(m_frontendChannel, callId, DispatcherBase::MethodNotFound, "'" + method + "' wasn't found", nullptr);
+ return;
+ }
+ it->second->dispatch(callId, method, std::move(messageObject));
+}
+
+UberDispatcher::~UberDispatcher() = default;
+
+} // namespace protocol
+} // namespace blink
diff --git a/deps/v8_inspector/platform/inspector_protocol/DispatcherBase.h b/deps/v8_inspector/platform/inspector_protocol/DispatcherBase.h
new file mode 100644
index 0000000000..6e8ae28f9e
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/DispatcherBase.h
@@ -0,0 +1,97 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DispatcherBase_h
+#define DispatcherBase_h
+
+#include "platform/inspector_protocol/BackendCallback.h"
+#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/Platform.h"
+#include "platform/inspector_protocol/String16.h"
+#include "platform/inspector_protocol/Values.h"
+
+namespace blink {
+namespace protocol {
+
+class FrontendChannel;
+class WeakPtr;
+
+class PLATFORM_EXPORT DispatcherBase {
+ PROTOCOL_DISALLOW_COPY(DispatcherBase);
+public:
+ static const char kInvalidRequest[];
+ class PLATFORM_EXPORT WeakPtr {
+ public:
+ explicit WeakPtr(DispatcherBase*);
+ ~WeakPtr();
+ DispatcherBase* get() { return m_dispatcher; }
+ void dispose() { m_dispatcher = nullptr; }
+
+ private:
+ DispatcherBase* m_dispatcher;
+ };
+
+ class PLATFORM_EXPORT Callback : public protocol::BackendCallback {
+ public:
+ Callback(std::unique_ptr<WeakPtr> backendImpl, int callId);
+ virtual ~Callback();
+ void dispose();
+
+ protected:
+ void sendIfActive(std::unique_ptr<protocol::DictionaryValue> partialMessage, const ErrorString& invocationError);
+
+ private:
+ std::unique_ptr<WeakPtr> m_backendImpl;
+ int m_callId;
+ };
+
+ explicit DispatcherBase(FrontendChannel*);
+ virtual ~DispatcherBase();
+
+ enum CommonErrorCode {
+ ParseError = -32700,
+ InvalidRequest = -32600,
+ MethodNotFound = -32601,
+ InvalidParams = -32602,
+ InternalError = -32603,
+ ServerError = -32000,
+ };
+
+ static bool getCommandName(const String16& message, String16* result);
+
+ virtual void dispatch(int callId, const String16& method, std::unique_ptr<protocol::DictionaryValue> messageObject) = 0;
+
+ void sendResponse(int callId, const ErrorString&, ErrorSupport*, std::unique_ptr<protocol::DictionaryValue> result);
+ void sendResponse(int callId, const ErrorString&, std::unique_ptr<protocol::DictionaryValue> result);
+ void sendResponse(int callId, const ErrorString&);
+
+ void reportProtocolError(int callId, CommonErrorCode, const String16& errorMessage, ErrorSupport* errors);
+ void clearFrontend();
+
+ std::unique_ptr<WeakPtr> weakPtr();
+
+private:
+ FrontendChannel* m_frontendChannel;
+ protocol::HashSet<WeakPtr*> m_weakPtrs;
+};
+
+class PLATFORM_EXPORT UberDispatcher {
+ PROTOCOL_DISALLOW_COPY(UberDispatcher);
+public:
+ explicit UberDispatcher(FrontendChannel*);
+ void registerBackend(const String16& name, std::unique_ptr<protocol::DispatcherBase>);
+ void dispatch(const String16& message);
+ FrontendChannel* channel() { return m_frontendChannel; }
+ virtual ~UberDispatcher();
+
+private:
+ FrontendChannel* m_frontendChannel;
+ protocol::HashMap<String16, std::unique_ptr<protocol::DispatcherBase>> m_dispatchers;
+};
+
+} // namespace platform
+} // namespace blink
+
+#endif // !defined(DispatcherBase_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/Dispatcher_cpp.template b/deps/v8_inspector/platform/inspector_protocol/Dispatcher_cpp.template
deleted file mode 100644
index bb7c17b5ee..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/Dispatcher_cpp.template
+++ /dev/null
@@ -1,365 +0,0 @@
-// This file is generated
-
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "platform/inspector_protocol/{{class_name}}.h"
-
-#include "platform/inspector_protocol/Collections.h"
-#include "platform/inspector_protocol/FrontendChannel.h"
-#include "platform/inspector_protocol/Parser.h"
-
-namespace blink {
-namespace protocol {
-
-using protocol::Maybe;
-
-class DispatcherImpl;
-
-class DispatcherImplWeakPtr {
-public:
- DispatcherImplWeakPtr(DispatcherImpl* dispatcher) : m_dispatcher(dispatcher) { }
- ~DispatcherImplWeakPtr();
- DispatcherImpl* get() { return m_dispatcher; }
- void dispose() { m_dispatcher = nullptr; }
-private:
- DispatcherImpl* m_dispatcher;
-};
-
-class DispatcherImpl : public Dispatcher {
-public:
- DispatcherImpl(FrontendChannel* frontendChannel)
- : m_frontendChannel(frontendChannel)
-{% for domain in api.domains %}
- , m_{{domain.domain | lower}}Agent(0)
-{% endfor %}
- {
-{% for domain in api.domains %}
- {% for command in domain.commands %}
- {% if "redirect" in command %}{% continue %}{% endif %}
- {% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
- m_dispatchMap.set("{{domain.domain}}.{{command.name}}", &DispatcherImpl::{{domain.domain}}_{{command.name}});
- {% endfor %}
-{% endfor %}
-
- // Initialize common errors.
- m_commonErrors.resize(LastEntry);
- m_commonErrors[ParseError] = -32700;
- m_commonErrors[InvalidRequest] = -32600;
- m_commonErrors[MethodNotFound] = -32601;
- m_commonErrors[InvalidParams] = -32602;
- m_commonErrors[InternalError] = -32603;
- m_commonErrors[ServerError] = -32000;
- }
-
- ~DispatcherImpl() { clearFrontend(); }
-
- virtual void clearFrontend()
- {
- m_frontendChannel = nullptr;
- for (auto& weak : m_weakPtrs)
- weak.first->dispose();
- m_weakPtrs.clear();
- }
-
- std::unique_ptr<DispatcherImplWeakPtr> weakPtr()
- {
- std::unique_ptr<DispatcherImplWeakPtr> weak(new DispatcherImplWeakPtr(this));
- m_weakPtrs.add(weak.get());
- return weak;
- }
-
- virtual void dispatch(int sessionId, const String16& message);
- virtual void reportProtocolError(int sessionId, int callId, CommonErrorCode, const String16& errorMessage, ErrorSupport* errors) const;
- using Dispatcher::reportProtocolError;
-
- void sendResponse(int sessionId, int callId, const ErrorString& invocationError, ErrorSupport* errors, std::unique_ptr<protocol::DictionaryValue> result);
-
-{% for domain in api.domains %}
- virtual void registerAgent(blink::protocol::Backend::{{domain.domain}}* agent) { DCHECK(!m_{{domain.domain | lower}}Agent); m_{{domain.domain | lower}}Agent = agent; }
-{% endfor %}
-
-private:
- friend class DispatcherCallbackBase;
- friend class DispatcherImplWeakPtr;
- using CallHandler = void (DispatcherImpl::*)(int sessionId, int callId, std::unique_ptr<DictionaryValue> messageObject, ErrorSupport* errors);
- using DispatchMap = protocol::HashMap<String16, CallHandler>;
-
-{% for domain in api.domains %}
- {% for command in domain.commands %}
- {% if "redirect" in command %}{% continue %}{% endif %}
- {% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
- void {{domain.domain}}_{{command.name}}(int sessionId, int callId, std::unique_ptr<DictionaryValue> requestMessageObject, ErrorSupport*);
- {% endfor %}
-{% endfor %}
-
- FrontendChannel* m_frontendChannel;
-
-{% for domain in api.domains %}
- Backend::{{domain.domain}}* m_{{domain.domain | lower}}Agent;
-{% endfor %}
-
- void sendResponse(int sessionId, int callId, ErrorString invocationError, std::unique_ptr<protocol::DictionaryValue> result)
- {
- sendResponse(sessionId, callId, invocationError, nullptr, std::move(result));
- }
-
- void sendResponse(int sessionId, int callId, ErrorString invocationError)
- {
- sendResponse(sessionId, callId, invocationError, nullptr, DictionaryValue::create());
- }
-
- static const char kInvalidRequest[];
-
- DispatchMap m_dispatchMap;
- protocol::Vector<int> m_commonErrors;
- protocol::HashSet<DispatcherImplWeakPtr*> m_weakPtrs;
-};
-
-class PLATFORM_EXPORT DispatcherCallbackBase : public protocol::Backend::CallbackBase {
-public:
- DispatcherCallbackBase(std::unique_ptr<DispatcherImplWeakPtr> backendImpl, int sessionId, int id)
- : m_backendImpl(std::move(backendImpl)), m_sessionId(sessionId), m_id(id) { }
- virtual ~DispatcherCallbackBase() { }
- void dispose() { m_backendImpl = nullptr; }
-
-protected:
- void sendIfActive(std::unique_ptr<protocol::DictionaryValue> partialMessage, const ErrorString& invocationError)
- {
- if (!m_backendImpl->get())
- return;
- m_backendImpl->get()->sendResponse(m_sessionId, m_id, invocationError, nullptr, std::move(partialMessage));
- m_backendImpl = nullptr;
- }
-
-private:
- std::unique_ptr<DispatcherImplWeakPtr> m_backendImpl;
- int m_sessionId;
- int m_id;
-};
-
-DispatcherImplWeakPtr::~DispatcherImplWeakPtr()
-{
- if (m_dispatcher)
- m_dispatcher->m_weakPtrs.remove(this);
-}
-
-const char DispatcherImpl::kInvalidRequest[] = "Invalid request";
-
-{% for domain in api.domains %}
- {% for command in domain.commands %}
- {% if "redirect" in command %}{% continue %}{% endif %}
- {% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
-
- {% if "async" in command %}
-
-class PLATFORM_EXPORT {{domain.domain}}{{command.name | to_title_case}}Callback : public Backend::{{domain.domain}}::{{command.name | to_title_case}}Callback, public DispatcherCallbackBase {
-public:
- {{domain.domain}}{{command.name | to_title_case}}Callback(std::unique_ptr<DispatcherImplWeakPtr> backendImpl, int sessionId, int id)
- : DispatcherCallbackBase(std::move(backendImpl), sessionId, id) { }
-
- void sendSuccess(
- {%- for parameter in command.returns -%}
- {%- if "optional" in parameter -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
- {%- else -%}
- {{resolve_type(parameter).pass_type}} {{parameter.name}}
- {%- endif -%}
- {%- if not loop.last -%}, {% endif -%}
- {%- endfor -%}) override
- {
- std::unique_ptr<protocol::DictionaryValue> resultObject = DictionaryValue::create();
- {% for parameter in command.returns %}
- {% if "optional" in parameter %}
- if ({{parameter.name}}.isJust())
- resultObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.fromJust()));
- {% else %}
- resultObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % parameter.name}}));
- {% endif %}
- {% endfor %}
- sendIfActive(std::move(resultObject), ErrorString());
- }
-
- void sendFailure(const ErrorString& error) override
- {
- DCHECK(error.length());
- sendIfActive(nullptr, error);
- }
-};
- {% endif %}
-
-void DispatcherImpl::{{domain.domain}}_{{command.name}}(int sessionId, int callId, std::unique_ptr<DictionaryValue> requestMessageObject, ErrorSupport* errors)
-{
- if (!m_{{domain.domain | lower}}Agent)
- errors->addError("{{domain.domain}} handler is not available.");
-
- if (errors->hasErrors()) {
- reportProtocolError(sessionId, callId, InvalidParams, kInvalidRequest, errors);
- return;
- }
- {% if "parameters" in command %}
-
- // Prepare input parameters.
- protocol::DictionaryValue* object = DictionaryValue::cast(requestMessageObject->get("params"));
- errors->push();
- {% for property in command.parameters %}
- protocol::Value* {{property.name}}Value = object ? object->get("{{property.name}}") : nullptr;
- {% if property.optional %}
- Maybe<{{resolve_type(property).raw_type}}> in_{{property.name}};
- if ({{property.name}}Value) {
- errors->setName("{{property.name}}");
- in_{{property.name}} = FromValue<{{resolve_type(property).raw_type}}>::parse({{property.name}}Value, errors);
- }
- {% else %}
- errors->setName("{{property.name}}");
- {{resolve_type(property).type}} in_{{property.name}} = FromValue<{{resolve_type(property).raw_type}}>::parse({{property.name}}Value, errors);
- {% endif %}
- {% endfor %}
- errors->pop();
- if (errors->hasErrors()) {
- reportProtocolError(sessionId, callId, InvalidParams, kInvalidRequest, errors);
- return;
- }
- {% endif %}
-
- {% if "async" in command %}
- std::unique_ptr<{{domain.domain}}{{command.name | to_title_case}}Callback> callback(new {{domain.domain}}{{command.name | to_title_case}}Callback(weakPtr(), sessionId, callId));
- {% elif "returns" in command %}
- // Declare output parameters.
- std::unique_ptr<protocol::DictionaryValue> result = DictionaryValue::create();
- {% for property in command.returns %}
- {% if "optional" in property %}
- Maybe<{{resolve_type(property).raw_type}}> out_{{property.name}};
- {% else %}
- {{resolve_type(property).type}} out_{{property.name}};
- {% endif %}
- {% endfor %}
- {% endif %}
-
- std::unique_ptr<DispatcherImplWeakPtr> weak = weakPtr();
- ErrorString error;
- m_{{domain.domain | lower}}Agent->{{command.name}}(&error
- {%- for property in command.parameters -%}
- {%- if "optional" in property -%}
- , in_{{property.name}}
- {%- else -%}
- , {{resolve_type(property).to_pass_type % ("in_" + property.name)}}
- {%- endif -%}
- {%- endfor %}
- {%- if "async" in command -%}
- , std::move(callback)
- {%- elif "returns" in command %}
- {%- for property in command.returns -%}
- , &out_{{property.name}}
- {%- endfor %}
- {% endif %});
- {% if "returns" in command and not("async" in command) %}
- if (!error.length()) {
- {% for parameter in command.returns %}
- {% if "optional" in parameter %}
- if (out_{{parameter.name}}.isJust())
- result->setValue("{{parameter.name}}", toValue(out_{{parameter.name}}.fromJust()));
- {% else %}
- result->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % ("out_" + parameter.name)}}));
- {% endif %}
- {% endfor %}
- }
- if (weak->get())
- weak->get()->sendResponse(sessionId, callId, error, std::move(result));
- {% elif not("async" in command) %}
- if (weak->get())
- weak->get()->sendResponse(sessionId, callId, error);
- {% endif %}
-}
- {% endfor %}
-{% endfor %}
-
-std::unique_ptr<Dispatcher> Dispatcher::create(FrontendChannel* frontendChannel)
-{
- return wrapUnique(new DispatcherImpl(frontendChannel));
-}
-
-void DispatcherImpl::dispatch(int sessionId, const String16& message)
-{
- int callId = 0;
- std::unique_ptr<protocol::Value> parsedMessage = parseJSON(message);
- DCHECK(parsedMessage);
- std::unique_ptr<protocol::DictionaryValue> messageObject = DictionaryValue::cast(std::move(parsedMessage));
- DCHECK(messageObject);
-
- protocol::Value* callIdValue = messageObject->get("id");
- bool success = callIdValue->asNumber(&callId);
- DCHECK(success);
-
- protocol::Value* methodValue = messageObject->get("method");
- String16 method;
- success = methodValue && methodValue->asString(&method);
- DCHECK(success);
-
- protocol::HashMap<String16, CallHandler>::iterator it = m_dispatchMap.find(method);
- if (it == m_dispatchMap.end()) {
- reportProtocolError(sessionId, callId, MethodNotFound, "'" + method + "' wasn't found");
- return;
- }
-
- protocol::ErrorSupport errors;
- ((*this).*(*it->second))(sessionId, callId, std::move(messageObject), &errors);
-}
-
-void DispatcherImpl::sendResponse(int sessionId, int callId, const ErrorString& invocationError, ErrorSupport* errors, std::unique_ptr<protocol::DictionaryValue> result)
-{
- if (invocationError.length() || (errors && errors->hasErrors())) {
- reportProtocolError(sessionId, callId, ServerError, invocationError, errors);
- return;
- }
-
- std::unique_ptr<protocol::DictionaryValue> responseMessage = DictionaryValue::create();
- responseMessage->setNumber("id", callId);
- responseMessage->setObject("result", std::move(result));
- if (m_frontendChannel)
- m_frontendChannel->sendProtocolResponse(sessionId, callId, std::move(responseMessage));
-}
-
-void Dispatcher::reportProtocolError(int sessionId, int callId, CommonErrorCode code, const String16& errorMessage) const
-{
- ErrorSupport errors;
- reportProtocolError(sessionId, callId, code, errorMessage, &errors);
-}
-
-void DispatcherImpl::reportProtocolError(int sessionId, int callId, CommonErrorCode code, const String16& errorMessage, ErrorSupport* errors) const
-{
- DCHECK(code >=0);
- DCHECK((unsigned)code < m_commonErrors.size());
- DCHECK(m_commonErrors[code]);
- std::unique_ptr<protocol::DictionaryValue> error = DictionaryValue::create();
- error->setNumber("code", m_commonErrors[code]);
- error->setString("message", errorMessage);
- DCHECK(error);
- if (errors && errors->hasErrors())
- error->setString("data", errors->errors());
- std::unique_ptr<protocol::DictionaryValue> message = DictionaryValue::create();
- message->setObject("error", std::move(error));
- message->setNumber("id", callId);
- if (m_frontendChannel)
- m_frontendChannel->sendProtocolResponse(sessionId, callId, std::move(message));
-}
-
-bool Dispatcher::getCommandName(const String16& message, String16* result)
-{
- std::unique_ptr<protocol::Value> value = parseJSON(message);
- if (!value)
- return false;
-
- protocol::DictionaryValue* object = DictionaryValue::cast(value.get());
- if (!object)
- return false;
-
- if (!object->getString("method", result))
- return false;
-
- return true;
-}
-
-} // namespace protocol
-} // namespace blink
diff --git a/deps/v8_inspector/platform/inspector_protocol/Dispatcher_h.template b/deps/v8_inspector/platform/inspector_protocol/Dispatcher_h.template
deleted file mode 100644
index 6a809bbff0..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/Dispatcher_h.template
+++ /dev/null
@@ -1,65 +0,0 @@
-// This file is generated
-
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef {{class_name}}_h
-#define {{class_name}}_h
-
-#include "platform/inspector_protocol/Backend.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
-
-namespace blink {
-namespace protocol {
-
-class FrontendChannel;
-class DispatcherImplWeakPtr;
-
-class PLATFORM_EXPORT Dispatcher {
-public:
- static std::unique_ptr<Dispatcher> create(FrontendChannel* frontendChannel);
- virtual ~Dispatcher() { }
-
- class PLATFORM_EXPORT CallbackBase {
- public:
- CallbackBase(std::unique_ptr<DispatcherImplWeakPtr> backendImpl, int sessionId, int id);
- virtual ~CallbackBase();
- void sendFailure(const ErrorString&);
- void dispose();
-
- protected:
- void sendIfActive(std::unique_ptr<protocol::DictionaryValue> partialMessage, const ErrorString& invocationError);
-
- private:
- std::unique_ptr<DispatcherImplWeakPtr> m_backendImpl;
- int m_sessionId;
- int m_id;
- };
-
-{% for domain in api.domains %}
- virtual void registerAgent(blink::protocol::Backend::{{domain.domain}}*) = 0;
-{% endfor %}
-
- virtual void clearFrontend() = 0;
-
- enum CommonErrorCode {
- ParseError = 0,
- InvalidRequest,
- MethodNotFound,
- InvalidParams,
- InternalError,
- ServerError,
- LastEntry,
- };
-
- void reportProtocolError(int sessionId, int callId, CommonErrorCode, const String16& errorMessage) const;
- virtual void reportProtocolError(int sessionId, int callId, CommonErrorCode, const String16& errorMessage, ErrorSupport*) const = 0;
- virtual void dispatch(int sessionId, const String16& message) = 0;
- static bool getCommandName(const String16& message, String16* result);
-};
-
-} // namespace protocol
-} // namespace blink
-
-#endif // !defined({{class_name}}_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.cpp b/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.cpp
index 87603e980b..dc9e66373e 100644
--- a/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.cpp
+++ b/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.cpp
@@ -5,7 +5,6 @@
#include "platform/inspector_protocol/ErrorSupport.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/Assertions.h"
namespace blink {
namespace protocol {
diff --git a/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.h b/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.h
index 98a3340f2c..bb7e064934 100644
--- a/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.h
+++ b/deps/v8_inspector/platform/inspector_protocol/ErrorSupport.h
@@ -5,13 +5,15 @@
#ifndef ErrorSupport_h
#define ErrorSupport_h
-#include "platform/PlatformExport.h"
#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
namespace blink {
namespace protocol {
+using ErrorString = String16;
+
class PLATFORM_EXPORT ErrorSupport {
public:
ErrorSupport();
@@ -34,4 +36,6 @@ private:
} // namespace platform
} // namespace blink
+using blink::protocol::ErrorString;
+
#endif // !defined(ErrorSupport_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/FrontendChannel.h b/deps/v8_inspector/platform/inspector_protocol/FrontendChannel.h
index 27ba557c4a..ee81e951ed 100644
--- a/deps/v8_inspector/platform/inspector_protocol/FrontendChannel.h
+++ b/deps/v8_inspector/platform/inspector_protocol/FrontendChannel.h
@@ -1,27 +1,6 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#ifndef FrontendChannel_h
#define FrontendChannel_h
@@ -31,12 +10,12 @@
namespace blink {
namespace protocol {
-class FrontendChannel {
+class PLATFORM_EXPORT FrontendChannel {
public:
virtual ~FrontendChannel() { }
- virtual void sendProtocolResponse(int sessionId, int callId, std::unique_ptr<protocol::DictionaryValue> message) = 0;
- virtual void sendProtocolNotification(std::unique_ptr<protocol::DictionaryValue> message) = 0;
- virtual void flush() = 0;
+ virtual void sendProtocolResponse(int callId, const String16& message) = 0;
+ virtual void sendProtocolNotification(const String16& message) = 0;
+ virtual void flushProtocolNotifications() = 0;
};
} // namespace protocol
diff --git a/deps/v8_inspector/platform/inspector_protocol/Frontend_cpp.template b/deps/v8_inspector/platform/inspector_protocol/Frontend_cpp.template
deleted file mode 100644
index 137dc8e2b1..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/Frontend_cpp.template
+++ /dev/null
@@ -1,53 +0,0 @@
-// This file is generated
-
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "platform/inspector_protocol/{{class_name}}.h"
-
-#include "platform/inspector_protocol/String16.h"
-
-namespace blink {
-namespace protocol {
-
-Frontend::Frontend(FrontendChannel* frontendChannel)
- : m_frontendChannel(frontendChannel)
-{% for domain in api.domains %}
- , m_{{domain.domain | lower}}(frontendChannel)
-{% endfor %}
-{
-}
-
-{% for domain in api.domains %}
- {% for event in domain.events %}
- {% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
-void Frontend::{{domain.domain}}::{{event.name}}(
- {%- for parameter in event.parameters %}
- {% if "optional" in parameter -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>&
- {%- else -%}
- {{resolve_type(parameter).pass_type}}
- {%- endif %} {{parameter.name}}{%- if not loop.last -%}, {% endif -%}
- {% endfor -%})
-{
- std::unique_ptr<protocol::DictionaryValue> jsonMessage = DictionaryValue::create();
- jsonMessage->setString("method", "{{domain.domain}}.{{event.name}}");
- std::unique_ptr<protocol::DictionaryValue> paramsObject = DictionaryValue::create();
- {% for parameter in event.parameters %}
- {% if "optional" in parameter %}
- if ({{parameter.name}}.isJust())
- paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.fromJust()));
- {% else %}
- paramsObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % parameter.name}}));
- {% endif %}
- {% endfor %}
- jsonMessage->setObject("params", std::move(paramsObject));
- if (m_frontendChannel)
- m_frontendChannel->sendProtocolNotification(std::move(jsonMessage));
-}
- {% endfor %}
-{% endfor %}
-
-} // namespace protocol
-} // namespace blink
diff --git a/deps/v8_inspector/platform/inspector_protocol/Frontend_h.template b/deps/v8_inspector/platform/inspector_protocol/Frontend_h.template
deleted file mode 100644
index 79cc64b48e..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/Frontend_h.template
+++ /dev/null
@@ -1,57 +0,0 @@
-// This file is generated
-
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef {{class_name}}_h
-#define {{class_name}}_h
-
-
-#include "platform/inspector_protocol/FrontendChannel.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
-
-namespace blink {
-namespace protocol {
-
-class PLATFORM_EXPORT Frontend {
-public:
- Frontend(FrontendChannel*);
- FrontendChannel* channel() { return m_frontendChannel; }
-
-{% for domain in api.domains %}
-
- class PLATFORM_EXPORT {{domain.domain}} {
- public:
- static {{domain.domain}}* from(Frontend* frontend) { return &(frontend->m_{{domain.domain | lower}}) ;}
- {{domain.domain}}(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
- {% for event in domain.events %}
- {% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
- void {{event.name}}(
- {%- for parameter in event.parameters -%}
- {%- if "optional" in parameter -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
- {%- else -%}
- {{resolve_type(parameter).pass_type}} {{parameter.name}}
- {%- endif -%}{%- if not loop.last -%}, {% endif -%}
- {%- endfor -%}
- );
- {% endfor %}
-
- void flush() { m_frontendChannel->flush(); }
- private:
- FrontendChannel* m_frontendChannel;
- };
-{% endfor %}
-
-private:
- FrontendChannel* m_frontendChannel;
-{% for domain in api.domains %}
- {{domain.domain}} m_{{domain.domain | lower}};
-{% endfor %}
-};
-
-} // namespace protocol
-} // namespace blink
-
-#endif // !defined({{class_name}}_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/Maybe.h b/deps/v8_inspector/platform/inspector_protocol/Maybe.h
index 652d5aa502..3fcd081d89 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Maybe.h
+++ b/deps/v8_inspector/platform/inspector_protocol/Maybe.h
@@ -5,8 +5,10 @@
#ifndef Maybe_h
#define Maybe_h
-#include "platform/PlatformExport.h"
-#include "wtf/Assertions.h"
+#include "platform/inspector_protocol/Platform.h"
+#include "platform/inspector_protocol/String16.h"
+
+#include <memory>
namespace blink {
namespace protocol {
diff --git a/deps/v8_inspector/platform/inspector_protocol/Object.cpp b/deps/v8_inspector/platform/inspector_protocol/Object.cpp
new file mode 100644
index 0000000000..7bb007d4b7
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/Object.cpp
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "platform/inspector_protocol/Object.h"
+
+namespace blink {
+namespace protocol {
+
+std::unique_ptr<Object> Object::parse(protocol::Value* value, ErrorSupport* errors)
+{
+ protocol::DictionaryValue* object = DictionaryValue::cast(value);
+ if (!object) {
+ errors->addError("object expected");
+ return nullptr;
+ }
+ return wrapUnique(new Object(wrapUnique(static_cast<DictionaryValue*>(object->clone().release()))));
+}
+
+std::unique_ptr<protocol::DictionaryValue> Object::serialize() const
+{
+ return DictionaryValue::cast(m_object->clone());
+}
+
+std::unique_ptr<Object> Object::clone() const
+{
+ return wrapUnique(new Object(DictionaryValue::cast(m_object->clone())));
+}
+
+Object::Object(std::unique_ptr<protocol::DictionaryValue> object) : m_object(std::move(object)) { }
+
+Object::~Object() { }
+
+} // namespace protocol
+} // namespace blink
diff --git a/deps/v8_inspector/platform/inspector_protocol/Object.h b/deps/v8_inspector/platform/inspector_protocol/Object.h
new file mode 100644
index 0000000000..22506c08d4
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/Object.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef Object_h
+#define Object_h
+
+#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/Platform.h"
+#include "platform/inspector_protocol/Values.h"
+
+namespace blink {
+namespace protocol {
+
+class PLATFORM_EXPORT Object {
+public:
+ static std::unique_ptr<Object> parse(protocol::Value*, ErrorSupport*);
+ ~Object();
+
+ std::unique_ptr<protocol::DictionaryValue> serialize() const;
+ std::unique_ptr<Object> clone() const;
+private:
+ explicit Object(std::unique_ptr<protocol::DictionaryValue>);
+ std::unique_ptr<protocol::DictionaryValue> m_object;
+};
+
+} // namespace platform
+} // namespace blink
+
+#endif // !defined(Object_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/Parser.cpp b/deps/v8_inspector/platform/inspector_protocol/Parser.cpp
index 4425660dca..1c267f871a 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Parser.cpp
+++ b/deps/v8_inspector/platform/inspector_protocol/Parser.cpp
@@ -6,7 +6,6 @@
#include "platform/inspector_protocol/String16.h"
#include "platform/inspector_protocol/Values.h"
-#include "wtf/Assertions.h"
namespace blink {
namespace protocol {
diff --git a/deps/v8_inspector/platform/inspector_protocol/Parser.h b/deps/v8_inspector/platform/inspector_protocol/Parser.h
index 5f2f44bf64..c6f700ee30 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Parser.h
+++ b/deps/v8_inspector/platform/inspector_protocol/Parser.h
@@ -5,9 +5,8 @@
#ifndef Parser_h
#define Parser_h
-#include "platform/PlatformExport.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/PtrUtil.h"
namespace blink {
namespace protocol {
diff --git a/deps/v8_inspector/platform/inspector_protocol/Platform.h b/deps/v8_inspector/platform/inspector_protocol/Platform.h
new file mode 100644
index 0000000000..76ba9302ab
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/Platform.h
@@ -0,0 +1,14 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef protocol_Platform_h
+#define protocol_Platform_h
+
+#if V8_INSPECTOR_USE_STL
+#include "platform/inspector_protocol/PlatformSTL.h"
+#else
+#include "platform/inspector_protocol/PlatformWTF.h"
+#endif // V8_INSPECTOR_USE_STL
+
+#endif // !defined(protocol_Platform_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/PlatformSTL.h b/deps/v8_inspector/platform/inspector_protocol/PlatformSTL.h
new file mode 100644
index 0000000000..3e687b994c
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/PlatformSTL.h
@@ -0,0 +1,281 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PlatformSTL_h
+#define PlatformSTL_h
+
+#include <memory>
+
+#define PLATFORM_EXPORT
+#ifndef CHECK
+#define CHECK(condition) ((void) 0)
+#endif
+#define DCHECK(condition) ((void) 0)
+#define NOTREACHED()
+#define DCHECK_EQ(i, j) DCHECK(i == j)
+#define DCHECK_GE(i, j) DCHECK(i >= j)
+#define DCHECK_LT(i, j) DCHECK(i < j)
+#define DCHECK_GT(i, j) DCHECK(i > j)
+template <typename T>
+inline void USE(T) { }
+
+#define DEFINE_STATIC_LOCAL(type, name, arguments) \
+ static type name;
+
+#if defined(__APPLE__) && !defined(_LIBCPP_VERSION)
+
+namespace std {
+
+template <typename T1, typename T2>
+struct is_convertible {
+private:
+ struct True_ {
+ char x[2];
+ };
+ struct False_ {
+ };
+
+ static True_ helper(T2 const &);
+ static False_ helper(...);
+
+public:
+ static bool const value = (
+ sizeof(True_) == sizeof(is_convertible::helper(T1()))
+ );
+};
+
+template <bool, class T = void>
+struct enable_if {
+};
+
+template <class T>
+struct enable_if<true, T> {
+ typedef T type;
+};
+
+template<class T>
+struct remove_extent {
+ typedef T type;
+};
+
+template<class T>
+struct remove_extent<T[]> {
+ typedef T type;
+};
+
+template<class T, std::size_t N>
+struct remove_extent<T[N]> {
+ typedef T type;
+};
+
+typedef decltype(nullptr) nullptr_t;
+
+template<class T, T v>
+struct integral_constant {
+ static constexpr T value = v;
+ typedef T value_type;
+ typedef integral_constant type;
+ constexpr operator value_type() const noexcept { return value; }
+ constexpr value_type operator()() const noexcept { return value; }
+};
+
+typedef integral_constant<bool, true> true_type;
+typedef integral_constant<bool, false> false_type;
+
+template<class T>
+struct is_array : false_type {};
+
+template<class T>
+struct is_array<T[]> : true_type {};
+
+template<class T, std::size_t N>
+struct is_array<T[N]> : true_type {};
+
+template <typename T>
+struct OwnedPtrDeleter {
+ static void deletePtr(T* ptr)
+ {
+ static_assert(sizeof(T) > 0, "type must be complete");
+ delete ptr;
+ }
+};
+
+template <typename T>
+struct OwnedPtrDeleter<T[]> {
+ static void deletePtr(T* ptr)
+ {
+ static_assert(sizeof(T) > 0, "type must be complete");
+ delete[] ptr;
+ }
+};
+
+template <class T, int n>
+struct OwnedPtrDeleter<T[n]> {
+ static_assert(sizeof(T) < 0, "do not use array with size as type");
+};
+
+template <typename T> class unique_ptr {
+public:
+ typedef typename remove_extent<T>::type ValueType;
+ typedef ValueType* PtrType;
+
+ unique_ptr() : m_ptr(nullptr) {}
+ unique_ptr(std::nullptr_t) : m_ptr(nullptr) {}
+ unique_ptr(unique_ptr&&);
+ template <typename U, typename = typename enable_if<is_convertible<U*, T*>::value>::type> unique_ptr(unique_ptr<U>&&);
+
+ ~unique_ptr()
+ {
+ OwnedPtrDeleter<T>::deletePtr(m_ptr);
+ m_ptr = nullptr;
+ }
+
+ PtrType get() const { return m_ptr; }
+
+ void reset(PtrType = nullptr);
+ PtrType release();
+
+ ValueType& operator*() const { DCHECK(m_ptr); return *m_ptr; }
+ PtrType operator->() const { DCHECK(m_ptr); return m_ptr; }
+
+ ValueType& operator[](std::ptrdiff_t i) const;
+
+ bool operator!() const { return !m_ptr; }
+ explicit operator bool() const { return m_ptr; }
+
+ unique_ptr& operator=(std::nullptr_t) { reset(); return *this; }
+
+
+ unique_ptr& operator=(unique_ptr&&);
+ template <typename U> unique_ptr& operator=(unique_ptr<U>&&);
+
+ void swap(unique_ptr& o) { std::swap(m_ptr, o.m_ptr); }
+
+ static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
+
+ explicit unique_ptr(PtrType ptr) : m_ptr(ptr) {}
+
+private:
+
+ // We should never have two unique_ptrs for the same underlying object
+ // (otherwise we'll get double-destruction), so these equality operators
+ // should never be needed.
+ template <typename U> bool operator==(const unique_ptr<U>&) const
+ {
+ static_assert(!sizeof(U*), "unique_ptrs should never be equal");
+ return false;
+ }
+ template <typename U> bool operator!=(const unique_ptr<U>&) const
+ {
+ static_assert(!sizeof(U*), "unique_ptrs should never be equal");
+ return false;
+ }
+
+ PtrType m_ptr;
+};
+
+
+template <typename T> inline void unique_ptr<T>::reset(PtrType ptr)
+{
+ PtrType p = m_ptr;
+ m_ptr = ptr;
+ OwnedPtrDeleter<T>::deletePtr(p);
+}
+
+template <typename T> inline typename unique_ptr<T>::PtrType unique_ptr<T>::release()
+{
+ PtrType ptr = m_ptr;
+ m_ptr = nullptr;
+ return ptr;
+}
+
+template <typename T> inline typename unique_ptr<T>::ValueType& unique_ptr<T>::operator[](std::ptrdiff_t i) const
+{
+ static_assert(is_array<T>::value, "elements access is possible for arrays only");
+ DCHECK(m_ptr);
+ DCHECK_GE(i, 0);
+ return m_ptr[i];
+}
+
+template <typename T> inline unique_ptr<T>::unique_ptr(unique_ptr<T>&& o)
+ : m_ptr(o.release())
+{
+}
+
+template <typename T>
+template <typename U, typename> inline unique_ptr<T>::unique_ptr(unique_ptr<U>&& o)
+ : m_ptr(o.release())
+{
+ static_assert(!is_array<T>::value, "pointers to array must never be converted");
+}
+
+template <typename T> inline unique_ptr<T>& unique_ptr<T>::operator=(unique_ptr<T>&& o)
+{
+ PtrType ptr = m_ptr;
+ m_ptr = o.release();
+ DCHECK(!ptr || m_ptr != ptr);
+ OwnedPtrDeleter<T>::deletePtr(ptr);
+
+ return *this;
+}
+
+template <typename T>
+template <typename U> inline unique_ptr<T>& unique_ptr<T>::operator=(unique_ptr<U>&& o)
+{
+ static_assert(!is_array<T>::value, "pointers to array must never be converted");
+ PtrType ptr = m_ptr;
+ m_ptr = o.release();
+ DCHECK(!ptr || m_ptr != ptr);
+ OwnedPtrDeleter<T>::deletePtr(ptr);
+
+ return *this;
+}
+
+template <typename T> inline void swap(unique_ptr<T>& a, unique_ptr<T>& b)
+{
+ a.swap(b);
+}
+
+template <typename T, typename U> inline bool operator==(const unique_ptr<T>& a, U* b)
+{
+ return a.get() == b;
+}
+
+template <typename T, typename U> inline bool operator==(T* a, const unique_ptr<U>& b)
+{
+ return a == b.get();
+}
+
+template <typename T, typename U> inline bool operator!=(const unique_ptr<T>& a, U* b)
+{
+ return a.get() != b;
+}
+
+template <typename T, typename U> inline bool operator!=(T* a, const unique_ptr<U>& b)
+{
+ return a != b.get();
+}
+
+template <typename T> inline typename unique_ptr<T>::PtrType getPtr(const unique_ptr<T>& p)
+{
+ return p.get();
+}
+
+template <typename T>
+unique_ptr<T> move(unique_ptr<T>& ptr)
+{
+ return unique_ptr<T>(ptr.release());
+}
+
+}
+
+#endif // defined(__APPLE__) && !defined(_LIBCPP_VERSION)
+
+template <typename T>
+std::unique_ptr<T> wrapUnique(T* ptr)
+{
+ return std::unique_ptr<T>(ptr);
+}
+
+#endif // PlatformSTL_h
diff --git a/deps/v8_inspector/platform/inspector_protocol/PlatformWTF.h b/deps/v8_inspector/platform/inspector_protocol/PlatformWTF.h
new file mode 100644
index 0000000000..3cd659e688
--- /dev/null
+++ b/deps/v8_inspector/platform/inspector_protocol/PlatformWTF.h
@@ -0,0 +1,14 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PlatformWTF_h
+#define PlatformWTF_h
+
+#include "platform/PlatformExport.h"
+#include "wtf/Assertions.h"
+#include "wtf/PtrUtil.h"
+
+#include <memory>
+
+#endif // PlatformWTF_h
diff --git a/deps/v8_inspector/platform/inspector_protocol/String16STL.cpp b/deps/v8_inspector/platform/inspector_protocol/String16STL.cpp
index 9f6afbf075..08c3e448c3 100644
--- a/deps/v8_inspector/platform/inspector_protocol/String16STL.cpp
+++ b/deps/v8_inspector/platform/inspector_protocol/String16STL.cpp
@@ -4,14 +4,14 @@
#include "platform/inspector_protocol/String16STL.h"
+#include "platform/inspector_protocol/Platform.h"
+
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <functional>
#include <locale>
-#define DCHECK(k)
-
namespace blink {
namespace protocol {
@@ -283,7 +283,7 @@ ConversionResult convertUTF16ToUTF8(
* @return TRUE or FALSE
* @stable ICU 2.8
*/
-#define U_IS_BMP(c) ((uint32_t)(c)<=0xffff)
+#define U_IS_BMP(c) ((uint32_t)(c) <= 0xffff)
/**
* Is this code point a supplementary code point (U+10000..U+10ffff)?
@@ -291,7 +291,7 @@ ConversionResult convertUTF16ToUTF8(
* @return TRUE or FALSE
* @stable ICU 2.8
*/
-#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff)
+#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c) - 0x10000) <= 0xfffff)
/**
* Is this code point a surrogate (U+d800..U+dfff)?
@@ -299,7 +299,7 @@ ConversionResult convertUTF16ToUTF8(
* @return TRUE or FALSE
* @stable ICU 2.4
*/
-#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
+#define U_IS_SURROGATE(c) (((c) & 0xfffff800) == 0xd800)
/**
* Get the lead surrogate (0xd800..0xdbff) for a
@@ -308,7 +308,7 @@ ConversionResult convertUTF16ToUTF8(
* @return lead surrogate (U+d800..U+dbff) for supplementary
* @stable ICU 2.4
*/
-#define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0)
+#define U16_LEAD(supplementary) (UChar)(((supplementary) >> 10) + 0xd7c0)
/**
* Get the trail surrogate (0xdc00..0xdfff) for a
@@ -317,7 +317,7 @@ ConversionResult convertUTF16ToUTF8(
* @return trail surrogate (U+dc00..U+dfff) for supplementary
* @stable ICU 2.4
*/
-#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00)
+#define U16_TRAIL(supplementary) (UChar)(((supplementary) & 0x3ff) | 0xdc00)
// This must be called with the length pre-determined by the first byte.
// If presented with a length > 4, this returns false. The Unicode
@@ -480,7 +480,7 @@ ConversionResult convertUTF8ToUTF16(
// Helper to write a three-byte UTF-8 code point to the buffer, caller must check room is available.
static inline void putUTF8Triple(char*& buffer, UChar ch)
{
- DCHECK(ch >= 0x0800);
+ DCHECK_GE(ch, 0x0800);
*buffer++ = static_cast<char>(((ch >> 12) & 0x0F) | 0xE0);
*buffer++ = static_cast<char>(((ch >> 6) & 0x3F) | 0x80);
*buffer++ = static_cast<char>((ch & 0x3F) | 0x80);
diff --git a/deps/v8_inspector/platform/inspector_protocol/String16STL.h b/deps/v8_inspector/platform/inspector_protocol/String16STL.h
index 2ac0e2ea7f..e76e9775fb 100644
--- a/deps/v8_inspector/platform/inspector_protocol/String16STL.h
+++ b/deps/v8_inspector/platform/inspector_protocol/String16STL.h
@@ -5,10 +5,9 @@
#ifndef String16STL_h
#define String16STL_h
-#include <stdint.h>
-
#include <cstdlib>
#include <cstring>
+#include <stdint.h>
#include <string>
#include <vector>
@@ -37,6 +36,7 @@ public:
m_impl[i] = characters[i];
}
String16(const UChar* characters, size_t size) : m_impl(characters, size) { }
+ String16 isolatedCopy() const { return String16(m_impl); }
unsigned sizeInBytes() const { return m_impl.size() * sizeof(UChar); }
const UChar* characters16() const { return m_impl.c_str(); }
@@ -103,6 +103,13 @@ public:
return m_impl.rfind(str.m_impl, start);
}
+ bool startWith(const String16& s) const
+ {
+ if (m_impl.length() < s.m_impl.length())
+ return false;
+ return m_impl.substr(0, s.m_impl.length()) == s.m_impl;
+ }
+
bool endsWith(UChar character) const
{
return m_impl.length() && m_impl[m_impl.length() - 1] == character;
@@ -124,8 +131,8 @@ public:
}
private:
- static std::string intToString(int i);
- static std::string doubleToString(double d);
+ static std::string intToString(int);
+ static std::string doubleToString(double);
// presubmit: allow wstring
wstring m_impl;
mutable bool has_hash = false;
diff --git a/deps/v8_inspector/platform/inspector_protocol/String16WTF.h b/deps/v8_inspector/platform/inspector_protocol/String16WTF.h
index 4ee9c8df52..57a91d82c6 100644
--- a/deps/v8_inspector/platform/inspector_protocol/String16WTF.h
+++ b/deps/v8_inspector/platform/inspector_protocol/String16WTF.h
@@ -10,6 +10,7 @@
#include "wtf/text/StringBuilder.h"
#include "wtf/text/StringConcatenate.h"
#include "wtf/text/StringHash.h"
+#include "wtf/text/StringToNumber.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -35,6 +36,7 @@ public:
operator WTF::String() const { return m_impl; }
operator WebString() { return m_impl; }
const WTF::String& impl() const { return m_impl; }
+ String16 isolatedCopy() const { return String16(m_impl.isolatedCopy()); }
~String16() { }
@@ -73,7 +75,7 @@ private:
class String16Builder {
public:
String16Builder() { }
- void append(const String16& str) { m_impl.append(str); };
+ void append(const String16& str) { m_impl.append(StringView(str)); };
void append(UChar c) { m_impl.append(c); };
void append(LChar c) { m_impl.append(c); };
void append(char c) { m_impl.append(c); };
diff --git a/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_cpp.template b/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_cpp.template
index d80473a9b7..1aeef458f8 100644
--- a/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_cpp.template
+++ b/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_cpp.template
@@ -4,38 +4,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "platform/inspector_protocol/{{class_name}}.h"
+#include "{{output_package}}/{{domain.domain}}.h"
+
+#include "platform/inspector_protocol/DispatcherBase.h"
namespace blink {
namespace protocol {
-
-std::unique_ptr<Object> Object::parse(protocol::Value* value, ErrorSupport* errors)
-{
- protocol::DictionaryValue* object = DictionaryValue::cast(value);
- if (!object) {
- errors->addError("object expected");
- return nullptr;
- }
- return wrapUnique(new Object(wrapUnique(static_cast<DictionaryValue*>(object->clone().release()))));
-}
-
-std::unique_ptr<protocol::DictionaryValue> Object::serialize() const
-{
- return DictionaryValue::cast(m_object->clone());
-}
-
-std::unique_ptr<Object> Object::clone() const
-{
- return wrapUnique(new Object(DictionaryValue::cast(m_object->clone())));
-}
-
-Object::Object(std::unique_ptr<protocol::DictionaryValue> object) : m_object(std::move(object)) { }
-Object::~Object() { }
+namespace {{domain.domain}} {
// ------------- Enum values from types.
-{% for domain in api.domains %}
-namespace {{domain.domain}} {
+const char Metainfo::domainName[] = "{{domain.domain}}";
{% for type in domain.types %}
{% if "enum" in type %}
@@ -103,16 +82,13 @@ std::unique_ptr<{{type.id}}> {{type.id}}::clone() const
return parse(serialize().get(), &errors);
}
{% endfor %}
-} // {{domain.domain}}
-{% endfor %}
// ------------- Enum values from params.
-{% for domain in api.domains %}
+
{% for command in join_arrays(domain, ["commands", "events"]) %}
{% for param in join_arrays(command, ["parameters", "returns"]) %}
{% if "enum" in param %}
-namespace {{domain.domain}} {
namespace {{command.name | to_title_case}} {
namespace {{param.name | to_title_case}}Enum {
{% for literal in param.enum %}
@@ -120,11 +96,205 @@ const char* {{ literal | to_title_case}} = "{{literal}}";
{% endfor %}
} // {{param.name | to_title_case}}Enum
} // {{command.name | to_title_case }}
-} // {{domain.domain}}
{% endif %}
{% endfor %}
{% endfor %}
-{% endfor %}
+// ------------- Frontend notifications.
+ {% for event in domain.events %}
+ {% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
+
+void Frontend::{{event.name}}(
+ {%- for parameter in event.parameters %}
+ {% if "optional" in parameter -%}
+ const Maybe<{{resolve_type(parameter).raw_type}}>&
+ {%- else -%}
+ {{resolve_type(parameter).pass_type}}
+ {%- endif %} {{parameter.name}}{%- if not loop.last -%}, {% endif -%}
+ {% endfor -%})
+{
+ std::unique_ptr<protocol::DictionaryValue> jsonMessage = DictionaryValue::create();
+ jsonMessage->setString("method", "{{domain.domain}}.{{event.name}}");
+ std::unique_ptr<protocol::DictionaryValue> paramsObject = DictionaryValue::create();
+ {% for parameter in event.parameters %}
+ {% if "optional" in parameter %}
+ if ({{parameter.name}}.isJust())
+ paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.fromJust()));
+ {% else %}
+ paramsObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % parameter.name}}));
+ {% endif %}
+ {% endfor %}
+ jsonMessage->setObject("params", std::move(paramsObject));
+ if (m_frontendChannel)
+ m_frontendChannel->sendProtocolNotification(jsonMessage->toJSONString());
+}
+ {% endfor %}
+
+// --------------------- Dispatcher.
+
+class DispatcherImpl : public protocol::DispatcherBase {
+public:
+ DispatcherImpl(FrontendChannel* frontendChannel, Backend* backend)
+ : DispatcherBase(frontendChannel)
+ , m_backend(backend) {
+ {% for command in domain.commands %}
+ {% if "redirect" in command %}{% continue %}{% endif %}
+ {% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
+ m_dispatchMap.set("{{domain.domain}}.{{command.name}}", &DispatcherImpl::{{command.name}});
+ {% endfor %}
+ }
+ ~DispatcherImpl() override { }
+ void dispatch(int callId, const String16& method, std::unique_ptr<protocol::DictionaryValue> messageObject) override;
+
+protected:
+ using CallHandler = void (DispatcherImpl::*)(int callId, std::unique_ptr<DictionaryValue> messageObject, ErrorSupport* errors);
+ using DispatchMap = protocol::HashMap<String16, CallHandler>;
+ DispatchMap m_dispatchMap;
+
+ {% for command in domain.commands %}
+ {% if "redirect" in command %}{% continue %}{% endif %}
+ {% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
+ void {{command.name}}(int callId, std::unique_ptr<DictionaryValue> requestMessageObject, ErrorSupport*);
+ {% endfor %}
+
+ Backend* m_backend;
+};
+
+void DispatcherImpl::dispatch(int callId, const String16& method, std::unique_ptr<protocol::DictionaryValue> messageObject)
+{
+ protocol::HashMap<String16, CallHandler>::iterator it = m_dispatchMap.find(method);
+ if (it == m_dispatchMap.end()) {
+ reportProtocolError(callId, MethodNotFound, "'" + method + "' wasn't found", nullptr);
+ return;
+ }
+
+ protocol::ErrorSupport errors;
+ ((*this).*(*it->second))(callId, std::move(messageObject), &errors);
+}
+
+ {% for command in domain.commands %}
+ {% if "redirect" in command %}{% continue %}{% endif %}
+ {% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
+ {% if "async" in command %}
+
+class {{command.name | to_title_case}}CallbackImpl : public Backend::{{command.name | to_title_case}}Callback, public DispatcherBase::Callback {
+public:
+ {{command.name | to_title_case}}CallbackImpl(std::unique_ptr<DispatcherBase::WeakPtr> backendImpl, int callId)
+ : DispatcherBase::Callback(std::move(backendImpl), callId) { }
+
+ void sendSuccess(
+ {%- for parameter in command.returns -%}
+ {%- if "optional" in parameter -%}
+ const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
+ {%- else -%}
+ {{resolve_type(parameter).pass_type}} {{parameter.name}}
+ {%- endif -%}
+ {%- if not loop.last -%}, {% endif -%}
+ {%- endfor -%}) override
+ {
+ std::unique_ptr<protocol::DictionaryValue> resultObject = DictionaryValue::create();
+ {% for parameter in command.returns %}
+ {% if "optional" in parameter %}
+ if ({{parameter.name}}.isJust())
+ resultObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.fromJust()));
+ {% else %}
+ resultObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % parameter.name}}));
+ {% endif %}
+ {% endfor %}
+ sendIfActive(std::move(resultObject), ErrorString());
+ }
+
+ void sendFailure(const ErrorString& error) override
+ {
+ DCHECK(error.length());
+ sendIfActive(nullptr, error);
+ }
+
+};
+ {% endif %}
+
+void DispatcherImpl::{{command.name}}(int callId, std::unique_ptr<DictionaryValue> requestMessageObject, ErrorSupport* errors)
+{
+ {% if "parameters" in command %}
+ // Prepare input parameters.
+ protocol::DictionaryValue* object = DictionaryValue::cast(requestMessageObject->get("params"));
+ errors->push();
+ {% for property in command.parameters %}
+ protocol::Value* {{property.name}}Value = object ? object->get("{{property.name}}") : nullptr;
+ {% if property.optional %}
+ Maybe<{{resolve_type(property).raw_type}}> in_{{property.name}};
+ if ({{property.name}}Value) {
+ errors->setName("{{property.name}}");
+ in_{{property.name}} = FromValue<{{resolve_type(property).raw_type}}>::parse({{property.name}}Value, errors);
+ }
+ {% else %}
+ errors->setName("{{property.name}}");
+ {{resolve_type(property).type}} in_{{property.name}} = FromValue<{{resolve_type(property).raw_type}}>::parse({{property.name}}Value, errors);
+ {% endif %}
+ {% endfor %}
+ errors->pop();
+ if (errors->hasErrors()) {
+ reportProtocolError(callId, InvalidParams, kInvalidRequest, errors);
+ return;
+ }
+ {% endif %}
+ {% if "async" in command %}
+ std::unique_ptr<{{command.name | to_title_case}}CallbackImpl> callback(new {{command.name | to_title_case}}CallbackImpl(weakPtr(), callId));
+ {% elif "returns" in command %}
+ // Declare output parameters.
+ std::unique_ptr<protocol::DictionaryValue> result = DictionaryValue::create();
+ {% for property in command.returns %}
+ {% if "optional" in property %}
+ Maybe<{{resolve_type(property).raw_type}}> out_{{property.name}};
+ {% else %}
+ {{resolve_type(property).type}} out_{{property.name}};
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+ std::unique_ptr<DispatcherBase::WeakPtr> weak = weakPtr();
+ ErrorString error;
+ m_backend->{{command.name}}(&error
+ {%- for property in command.parameters -%}
+ {%- if "optional" in property -%}
+ , in_{{property.name}}
+ {%- else -%}
+ , {{resolve_type(property).to_pass_type % ("in_" + property.name)}}
+ {%- endif -%}
+ {%- endfor %}
+ {%- if "async" in command -%}
+ , std::move(callback)
+ {%- elif "returns" in command %}
+ {%- for property in command.returns -%}
+ , &out_{{property.name}}
+ {%- endfor %}
+ {% endif %});
+ {% if "returns" in command and not("async" in command) %}
+ if (!error.length()) {
+ {% for parameter in command.returns %}
+ {% if "optional" in parameter %}
+ if (out_{{parameter.name}}.isJust())
+ result->setValue("{{parameter.name}}", toValue(out_{{parameter.name}}.fromJust()));
+ {% else %}
+ result->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % ("out_" + parameter.name)}}));
+ {% endif %}
+ {% endfor %}
+ }
+ if (weak->get())
+ weak->get()->sendResponse(callId, error, std::move(result));
+ {% elif not("async" in command) %}
+ if (weak->get())
+ weak->get()->sendResponse(callId, error);
+ {% endif %}
+}
+ {% endfor %}
+
+// static
+void Dispatcher::wire(UberDispatcher* dispatcher, Backend* backend)
+{
+ dispatcher->registerBackend("{{domain.domain}}", wrapUnique(new DispatcherImpl(dispatcher->channel(), backend)));
+}
+
+} // {{domain.domain}}
} // namespace protocol
} // namespace blink
diff --git a/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template b/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template
index 144fcb149f..05ca81d3a5 100644
--- a/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template
+++ b/deps/v8_inspector/platform/inspector_protocol/TypeBuilder_h.template
@@ -4,41 +4,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef {{class_name}}_h
-#define {{class_name}}_h
-
-#include "platform/PlatformExport.h"
+#ifndef protocol_{{domain.domain}}_h
+#define protocol_{{domain.domain}}_h
+
+{% if export_macro == "PLATFORM_EXPORT" %}
+#include "platform/inspector_protocol/Platform.h"
+{% else %}
+#include "core/CoreExport.h"
+{% endif %}
#include "platform/inspector_protocol/Array.h"
+#include "platform/inspector_protocol/BackendCallback.h"
+#include "platform/inspector_protocol/DispatcherBase.h"
#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/FrontendChannel.h"
#include "platform/inspector_protocol/Maybe.h"
+#include "platform/inspector_protocol/Object.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
#include "platform/inspector_protocol/Values.h"
#include "platform/inspector_protocol/ValueConversions.h"
-#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
+{% for name in domain.dependencies %}
+#include "{{output_package}}/{{name}}.h"
+{% endfor %}
namespace blink {
namespace protocol {
-
-using ErrorString = String16;
-
-class PLATFORM_EXPORT Object {
-public:
- static std::unique_ptr<Object> parse(protocol::Value* value, ErrorSupport* errors);
- ~Object();
-
- std::unique_ptr<protocol::DictionaryValue> serialize() const;
- std::unique_ptr<Object> clone() const;
-private:
- Object(std::unique_ptr<protocol::DictionaryValue> object);
- std::unique_ptr<protocol::DictionaryValue> m_object;
-};
-
-{% for domain in api.domains %}
-
-// ------------- Forward declarations and typedefs.
-
namespace {{domain.domain}} {
+
+// ------------- Forward and enum declarations.
{% for type in domain.types %}
{% if type.type == "object" %}
{% if "properties" in type %}
@@ -53,55 +46,38 @@ using {{type.id}} = Object;
using {{type.id}} = {{resolve_type(type).type}};
{% endif %}
{% endfor %}
-} // {{domain.domain}}
-{% endfor %}
-
-// ------------- Enum values from types.
-{% for domain in api.domains %}
{% for type in domain.types %}
{% if "enum" in type %}
-namespace {{domain.domain}} {
namespace {{type.id}}Enum {
{% for literal in type.enum %}
-PLATFORM_EXPORT extern const char* {{ literal | dash_to_camelcase}};
+{{export_macro}} extern const char* {{ literal | dash_to_camelcase}};
{% endfor %}
} // {{type.id}}Enum
-} // {{domain.domain}}
{% endif %}
{% endfor %}
-{% endfor %}
-
-// ------------- Enum values from params.
-{% for domain in api.domains %}
{% for command in join_arrays(domain, ["commands", "events"]) %}
{% for param in join_arrays(command, ["parameters", "returns"]) %}
{% if "enum" in param %}
-namespace {{domain.domain}} {
namespace {{command.name | to_title_case}} {
namespace {{param.name | to_title_case}}Enum {
{% for literal in param.enum %}
-PLATFORM_EXPORT extern const char* {{ literal | dash_to_camelcase}};
+{{export_macro}} extern const char* {{ literal | dash_to_camelcase}};
{% endfor %}
} // {{param.name | to_title_case}}Enum
} // {{command.name | to_title_case }}
-} // {{domain.domain}}
{% endif %}
{% endfor %}
{% endfor %}
-{% endfor %}
// ------------- Type and builder declarations.
-{% for domain in api.domains %}
-
-namespace {{domain.domain}} {
{% for type in domain.types %}
{% if not (type.type == "object") or not ("properties" in type) %}{% continue %}{% endif %}
{% set type_def = type_definition(domain.domain + "." + type.id)%}
// {{type.description}}
-class PLATFORM_EXPORT {{type.id}} {
+class {{export_macro}} {{type.id}} {
public:
static std::unique_ptr<{{type.id}}> parse(protocol::Value* value, ErrorSupport* errors);
@@ -109,7 +85,7 @@ public:
{% for property in type.properties %}
{% if "enum" in property %}
- struct PLATFORM_EXPORT {{property.name | to_title_case}}Enum {
+ struct {{export_macro}} {{property.name | to_title_case}}Enum {
{% for literal in property.enum %}
static const char* {{ literal | dash_to_camelcase}};
{% endfor %}
@@ -207,12 +183,103 @@ private:
{% endfor %}
-} // {{domain.domain}}
-{% endfor %}
+// ------------- Backend interface.
+
+class {{export_macro}} Backend {
+public:
+ {% for command in domain.commands %}
+ {% if "redirect" in command %}{% continue %}{% endif %}
+ {% if ("handlers" in command) and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
+ {% if "async" in command %}
+ class {{export_macro}} {{command.name | to_title_case}}Callback : public BackendCallback {
+ public:
+ virtual void sendSuccess(
+ {%- for parameter in command.returns -%}
+ {%- if "optional" in parameter -%}
+ const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
+ {%- else -%}
+ {{resolve_type(parameter).pass_type}} {{parameter.name}}
+ {%- endif -%}
+ {%- if not loop.last -%}, {% endif -%}
+ {%- endfor -%}
+ ) = 0;
+ };
+ {% endif %}
+ virtual void {{command.name}}(ErrorString*
+ {%- for parameter in command.parameters -%}
+ {%- if "optional" in parameter -%}
+ , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter.name}}
+ {%- else -%}
+ , {{resolve_type(parameter).pass_type}} in_{{parameter.name}}
+ {%- endif -%}
+ {%- endfor -%}
+ {%- if "async" in command -%}
+ , std::unique_ptr<{{command.name | to_title_case}}Callback> callback
+ {%- else -%}
+ {%- for parameter in command.returns -%}
+ {%- if "optional" in parameter -%}
+ , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name}}
+ {%- else -%}
+ , {{resolve_type(parameter).type}}* out_{{parameter.name}}
+ {%- endif -%}
+ {%- endfor -%}
+ {%- endif -%}
+ ) = 0;
+ {% endfor %}
+
+ {% if not has_disable(domain.commands) %}
+ virtual void disable(ErrorString*) { }
+ {% endif %}
+
+protected:
+ virtual ~Backend() { }
+};
+// ------------- Frontend interface.
+
+class {{export_macro}} Frontend {
+public:
+ Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
+ {% for event in domain.events %}
+ {% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
+ void {{event.name}}(
+ {%- for parameter in event.parameters -%}
+ {%- if "optional" in parameter -%}
+ const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
+ {%- else -%}
+ {{resolve_type(parameter).pass_type}} {{parameter.name}}
+ {%- endif -%}{%- if not loop.last -%}, {% endif -%}
+ {%- endfor -%}
+ );
+ {% endfor %}
+
+ void flush() { m_frontendChannel->flushProtocolNotifications(); }
+private:
+ FrontendChannel* m_frontendChannel;
+};
+
+// ------------- Dispatcher.
+
+class {{export_macro}} Dispatcher {
+public:
+ static void wire(UberDispatcher*, blink::protocol::{{domain.domain}}::Backend*);
+
+private:
+ Dispatcher() { }
+};
+
+// ------------- Metainfo.
+
+class {{export_macro}} Metainfo {
+public:
+ using BackendClass = Backend;
+ using FrontendClass = Frontend;
+ using DispatcherClass = Dispatcher;
+ static const char domainName[];
+};
+
+} // namespace {{domain.domain}}
} // namespace protocol
} // namespace blink
-using blink::protocol::ErrorString;
-
-#endif // !defined({{class_name}}_h)
+#endif // !defined(protocol_{{domain.domain}}_h)
diff --git a/deps/v8_inspector/platform/inspector_protocol/ValueConversions.h b/deps/v8_inspector/platform/inspector_protocol/ValueConversions.h
index 4a5066c928..b82f04f588 100644
--- a/deps/v8_inspector/platform/inspector_protocol/ValueConversions.h
+++ b/deps/v8_inspector/platform/inspector_protocol/ValueConversions.h
@@ -5,8 +5,8 @@
#ifndef ValueConversions_h
#define ValueConversions_h
-#include "platform/PlatformExport.h"
#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
#include "platform/inspector_protocol/Values.h"
@@ -36,14 +36,7 @@ template<typename T> std::unique_ptr<protocol::Value> toValue(T* param)
template<typename T> std::unique_ptr<protocol::Value> toValue(const std::unique_ptr<T>& param)
{
- static_assert(sizeof(T) == 0, "use raw pointer version.");
- return nullptr;
-}
-
-template<typename T> std::unique_ptr<protocol::Value> toValue(std::unique_ptr<T> param)
-{
- static_assert(sizeof(T) == 0, "use raw pointer version.");
- return nullptr;
+ return toValue(param.get());
}
template<typename T>
diff --git a/deps/v8_inspector/platform/inspector_protocol/Values.cpp b/deps/v8_inspector/platform/inspector_protocol/Values.cpp
index 979e3d8b2b..9cc1ca51bf 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Values.cpp
+++ b/deps/v8_inspector/platform/inspector_protocol/Values.cpp
@@ -6,7 +6,6 @@
#include "platform/inspector_protocol/Parser.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/Assertions.h"
#include <cmath>
namespace blink {
@@ -346,7 +345,7 @@ void ListValue::pushValue(std::unique_ptr<protocol::Value> value)
protocol::Value* ListValue::at(size_t index)
{
- CHECK(index < m_data.size());
+ DCHECK_LT(index, m_data.size());
return m_data[index];
}
diff --git a/deps/v8_inspector/platform/inspector_protocol/Values.h b/deps/v8_inspector/platform/inspector_protocol/Values.h
index 4202d33ec8..e4a719286f 100644
--- a/deps/v8_inspector/platform/inspector_protocol/Values.h
+++ b/deps/v8_inspector/platform/inspector_protocol/Values.h
@@ -5,11 +5,10 @@
#ifndef Values_h
#define Values_h
-#include "platform/PlatformExport.h"
#include "platform/inspector_protocol/Allocator.h"
#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/PtrUtil.h"
namespace blink {
namespace protocol {
@@ -27,7 +26,7 @@ public:
static std::unique_ptr<Value> null()
{
- return std::unique_ptr<Value>(new Value());
+ return wrapUnique(new Value());
}
enum ValueType {
diff --git a/deps/v8_inspector/platform/inspector_protocol/generate-inspector-protocol-version b/deps/v8_inspector/platform/inspector_protocol/generate-inspector-protocol-version
index 514b6dfca4..65738d6f38 100755
--- a/deps/v8_inspector/platform/inspector_protocol/generate-inspector-protocol-version
+++ b/deps/v8_inspector/platform/inspector_protocol/generate-inspector-protocol-version
@@ -45,10 +45,18 @@
#
# Adding --show_changes to the command line prints out a list of valid public API changes.
+import collections
+import copy
import os.path
+import optparse
import re
import sys
+try:
+ import json
+except ImportError:
+ import simplejson as json
+
def list_to_map(items, key):
result = {}
for item in items:
@@ -56,28 +64,34 @@ def list_to_map(items, key):
result[item[key]] = item
return result
+
def named_list_to_map(container, name, key):
if name in container:
return list_to_map(container[name], key)
return {}
+
def removed(reverse):
if reverse:
return "added"
return "removed"
+
def required(reverse):
if reverse:
return "optional"
return "required"
-def compare_schemas(schema_1, schema_2, reverse):
+
+def compare_schemas(d_1, d_2, reverse):
errors = []
- types_1 = normalize_types_in_schema(schema_1)
- types_2 = normalize_types_in_schema(schema_2)
+ domains_1 = copy.deepcopy(d_1)
+ domains_2 = copy.deepcopy(d_2)
+ types_1 = normalize_types_in_schema(domains_1)
+ types_2 = normalize_types_in_schema(domains_2)
- domains_by_name_1 = list_to_map(schema_1, "domain")
- domains_by_name_2 = list_to_map(schema_2, "domain")
+ domains_by_name_1 = list_to_map(domains_1, "domain")
+ domains_by_name_2 = list_to_map(domains_2, "domain")
for name in domains_by_name_1:
domain_1 = domains_by_name_1[name]
@@ -87,6 +101,7 @@ def compare_schemas(schema_1, schema_2, reverse):
compare_domains(domain_1, domains_by_name_2[name], types_1, types_2, errors, reverse)
return errors
+
def compare_domains(domain_1, domain_2, types_map_1, types_map_2, errors, reverse):
domain_name = domain_1["domain"]
commands_1 = named_list_to_map(domain_1, "commands", "name")
@@ -107,6 +122,7 @@ def compare_domains(domain_1, domain_2, types_map_1, types_map_2, errors, revers
continue
compare_events(domain_name, event_1, events_2[name], types_map_1, types_map_2, errors, reverse)
+
def compare_commands(domain_name, command_1, command_2, types_map_1, types_map_2, errors, reverse):
context = domain_name + "." + command_1["name"]
@@ -119,12 +135,14 @@ def compare_commands(domain_name, command_1, command_2, types_map_1, types_map_2
returns_2 = named_list_to_map(command_2, "returns", "name")
compare_params_list(context, "response parameter", returns_1, returns_2, types_map_1, types_map_2, 0, errors, reverse)
+
def compare_events(domain_name, event_1, event_2, types_map_1, types_map_2, errors, reverse):
context = domain_name + "." + event_1["name"]
params_1 = named_list_to_map(event_1, "parameters", "name")
params_2 = named_list_to_map(event_2, "parameters", "name")
compare_params_list(context, "parameter", params_1, params_2, types_map_1, types_map_2, 0, errors, reverse)
+
def compare_params_list(context, kind, params_1, params_2, types_map_1, types_map_2, depth, errors, reverse):
for name in params_1:
param_1 = params_1[name]
@@ -141,6 +159,7 @@ def compare_params_list(context, kind, params_1, params_2, types_map_1, types_ma
type_2 = extract_type(param_2, types_map_2, errors)
compare_types(context + "." + name, kind, type_1, type_2, types_map_1, types_map_2, depth, errors, reverse)
+
def compare_types(context, kind, type_1, type_2, types_map_1, types_map_2, depth, errors, reverse):
if depth > 10:
return
@@ -165,6 +184,7 @@ def compare_types(context, kind, type_1, type_2, types_map_1, types_map_2, depth
item_type_2 = extract_type(type_2["items"], types_map_2, errors)
compare_types(context, kind, item_type_1, item_type_2, types_map_1, types_map_2, depth + 1, errors, reverse)
+
def extract_type(typed_object, types_map, errors):
if "type" in typed_object:
result = { "id": "<transient>", "type": typed_object["type"] }
@@ -180,13 +200,15 @@ def extract_type(typed_object, types_map, errors):
types_map[ref] = { "id": "<transient>", "type": "object" }
return types_map[ref]
-def normalize_types_in_schema(schema):
+
+def normalize_types_in_schema(domains):
types = {}
- for domain in schema:
+ for domain in domains:
domain_name = domain["domain"]
normalize_types(domain, domain_name, types)
return types
+
def normalize_types(obj, domain_name, types):
if isinstance(obj, list):
for item in obj:
@@ -201,12 +223,16 @@ def normalize_types(obj, domain_name, types):
else:
normalize_types(value, domain_name, types)
-def load_json(filename):
- input_file = open(filename, "r")
+
+def load_schema(file, domains):
+ if not os.path.isfile(file):
+ return
+ input_file = open(file, "r")
json_string = input_file.read()
- json_string = re.sub(":\s*true", ": True", json_string)
- json_string = re.sub(":\s*false", ": False", json_string)
- return eval(json_string)
+ parsed_json = json.loads(json_string)
+ domains += parsed_json["domains"]
+ return parsed_json["version"]
+
def self_test():
def create_test_schema_1():
@@ -392,72 +418,61 @@ def self_test():
compare_schemas(create_test_schema_2(), create_test_schema_1(), True)))
+
+def load_domains_and_baselines(file, domains, baseline_domains):
+ version = load_schema(os.path.normpath(file), domains)
+ suffix = "-%s.%s.json" % (version["major"], version["minor"])
+ baseline_file = file.replace(".json", suffix)
+ load_schema(os.path.normpath(baseline_file), baseline_domains)
+ return version
+
+
def main():
if not self_test():
sys.stderr.write("Self-test failed")
return 1
- if len(sys.argv) < 4 or sys.argv[1] != "-o":
- sys.stderr.write("Usage: %s -o OUTPUT_FILE INPUT_FILE [--show-changes]\n" % sys.argv[0])
+ cmdline_parser = optparse.OptionParser()
+ cmdline_parser.add_option("--show_changes")
+ cmdline_parser.add_option("--o")
+ arg_options, arg_values = cmdline_parser.parse_args()
+
+ if len(arg_values) < 1 or not arg_options.o:
+ sys.stderr.write("Usage: %s --o OUTPUT_FILE [--show_changes] PROTOCOL_FOLDER1 ?PROTOCOL_FOLDER2 \n" % sys.argv[0])
return 1
- output_path = sys.argv[2]
+ output_path = arg_options.o
output_file = open(output_path, "w")
- input_path = sys.argv[3]
- dir_name = os.path.dirname(input_path)
- schema = load_json(input_path)
-
- major = schema["version"]["major"]
- minor = schema["version"]["minor"]
- version = "%s.%s" % (major, minor)
- if len(dir_name) == 0:
- dir_name = "."
- baseline_path = os.path.normpath(dir_name + "/Inspector-" + version + ".json")
- baseline_schema = load_json(baseline_path)
+ domains = []
+ baseline_domains = []
+ version = load_domains_and_baselines(arg_values[0], domains, baseline_domains)
+ if len(arg_values) > 1:
+ load_domains_and_baselines(arg_values[1], domains, baseline_domains)
expected_errors = [
"Debugger.globalObjectCleared: event has been removed"
]
- errors = compare_schemas(baseline_schema["domains"], schema["domains"], False)
+ errors = compare_schemas(baseline_domains, domains, False)
unexpected_errors = []
for i in range(len(errors)):
if errors[i] not in expected_errors:
unexpected_errors.append(errors[i])
if len(unexpected_errors) > 0:
- sys.stderr.write(" Compatibility with %s: FAILED\n" % version)
+ sys.stderr.write(" Compatibility checks FAILED\n")
for error in unexpected_errors:
sys.stderr.write( " %s\n" % error)
return 1
- if len(sys.argv) > 4 and sys.argv[4] == "--show-changes":
- changes = compare_schemas(
- load_json(input_path)["domains"], load_json(baseline_path)["domains"], True)
+ if arg_options.show_changes:
+ changes = compare_schemas(domains, baseline_domains, True)
if len(changes) > 0:
print " Public changes since %s:" % version
for change in changes:
print " %s" % change
- output_file.write("""
-#ifndef InspectorProtocolVersion_h
-#define InspectorProtocolVersion_h
-
-#include "platform/inspector_protocol/String16.h"
-
-namespace blink {
-
-String inspectorProtocolVersion() { return "%s"; }
-
-int inspectorProtocolVersionMajor() { return %s; }
-
-int inspectorProtocolVersionMinor() { return %s; }
-
-}
-
-#endif // !defined(InspectorProtocolVersion_h)
-""" % (version, major, minor))
-
+ json.dump({"version": version, "domains": domains}, output_file, indent=4, sort_keys=False, separators=(',', ': '))
output_file.close()
if __name__ == '__main__':
diff --git a/deps/v8_inspector/platform/inspector_protocol/protocol.gyp b/deps/v8_inspector/platform/inspector_protocol/protocol.gyp
deleted file mode 100644
index e30f531e7e..0000000000
--- a/deps/v8_inspector/platform/inspector_protocol/protocol.gyp
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'blink_platform_output_dir': '<(SHARED_INTERMEDIATE_DIR)/blink/platform',
- 'jinja_module_files': [
- # jinja2/__init__.py contains version string, so sufficient for package
- '../../deps/jinja2/jinja2/__init__.py',
- '../../deps/markupsafe/markupsafe/__init__.py', # jinja2 dep
- ],
- },
-
- 'targets': [
- {
- # GN version: //third_party/WebKit/Source/platform/inspector_protocol_sources
- 'target_name': 'protocol_sources',
- 'type': 'none',
- 'dependencies': [
- 'protocol_version'
- ],
- 'actions': [
- {
- 'action_name': 'generateInspectorProtocolBackendSources',
- 'inputs': [
- '<@(jinja_module_files)',
- # The python script in action below.
- 'CodeGenerator.py',
- # Input files for the script.
- '../../devtools/protocol.json',
- 'Backend_h.template',
- 'Dispatcher_h.template',
- 'Dispatcher_cpp.template',
- 'Frontend_h.template',
- 'Frontend_cpp.template',
- 'TypeBuilder_h.template',
- 'TypeBuilder_cpp.template',
- ],
- 'outputs': [
- '<(blink_platform_output_dir)/inspector_protocol/Backend.h',
- '<(blink_platform_output_dir)/inspector_protocol/Dispatcher.cpp',
- '<(blink_platform_output_dir)/inspector_protocol/Dispatcher.h',
- '<(blink_platform_output_dir)/inspector_protocol/Frontend.cpp',
- '<(blink_platform_output_dir)/inspector_protocol/Frontend.h',
- '<(blink_platform_output_dir)/inspector_protocol/TypeBuilder.cpp',
- '<(blink_platform_output_dir)/inspector_protocol/TypeBuilder.h',
- ],
- 'action': [
- 'python',
- 'CodeGenerator.py',
- '../../devtools/protocol.json',
- '--output_dir', '<(blink_platform_output_dir)/inspector_protocol',
- ],
- 'message': 'Generating Inspector protocol backend sources from protocol.json',
- },
- ]
- },
- {
- # GN version: //third_party/WebKit/Source/platform/inspector_protocol_version
- 'target_name': 'protocol_version',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'generateInspectorProtocolVersion',
- 'inputs': [
- 'generate-inspector-protocol-version',
- '../../devtools/protocol.json',
- ],
- 'outputs': [
- '<(blink_platform_output_dir)/inspector_protocol/InspectorProtocolVersion.h',
- ],
- 'variables': {
- 'generator_include_dirs': [
- ],
- },
- 'action': [
- 'python',
- 'generate-inspector-protocol-version',
- '-o',
- '<@(_outputs)',
- '<@(_inputs)'
- ],
- 'message': 'Validate inspector protocol for backwards compatibility and generate version file',
- }
- ]
- },
- ], # targets
-}
diff --git a/deps/v8_inspector/platform/v8_inspector/Atomics.h b/deps/v8_inspector/platform/v8_inspector/Atomics.h
index 8076f19588..56cb3ab7ab 100644
--- a/deps/v8_inspector/platform/v8_inspector/Atomics.h
+++ b/deps/v8_inspector/platform/v8_inspector/Atomics.h
@@ -7,14 +7,16 @@
#include <stdint.h>
-#if COMPILER(MSVC)
+#if defined(_MSC_VER)
#include <windows.h>
#endif
namespace blink {
-#if COMPILER(MSVC)
+#if defined(_MSC_VER)
+
inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(reinterpret_cast<long volatile*>(addend)); }
+
#else
inline int atomicAdd(int volatile* addend, int increment) { return __sync_add_and_fetch(addend, increment); }
diff --git a/deps/v8_inspector/platform/v8_inspector/InjectedScript.cpp b/deps/v8_inspector/platform/v8_inspector/InjectedScript.cpp
index 65ed3bdce9..868fdeabb4 100644
--- a/deps/v8_inspector/platform/v8_inspector/InjectedScript.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/InjectedScript.cpp
@@ -335,7 +335,7 @@ std::unique_ptr<protocol::Runtime::ExceptionDetails> InjectedScript::createExcep
v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace();
if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
- exceptionDetailsObject->setStack(m_context->debugger()->createStackTrace(stackTrace, stackTrace->GetFrameCount())->buildInspectorObject());
+ exceptionDetailsObject->setStack(m_context->debugger()->createStackTrace(stackTrace)->buildInspectorObject());
return exceptionDetailsObject;
}
@@ -366,18 +366,10 @@ void InjectedScript::wrapEvaluateResult(ErrorString* errorString, v8::MaybeLocal
}
}
-v8::MaybeLocal<v8::Object> InjectedScript::commandLineAPI(ErrorString* errorString)
+v8::Local<v8::Object> InjectedScript::commandLineAPI()
{
- v8::Isolate* isolate = m_context->isolate();
- if (m_commandLineAPI.IsEmpty()) {
- V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "installCommandLineAPI");
- function.appendArgument(V8Console::createCommandLineAPI(m_context));
- bool hadException = false;
- v8::Local<v8::Value> extension = function.call(hadException, false);
- if (hasInternalError(errorString, hadException || extension.IsEmpty() || !extension->IsObject()))
- return v8::MaybeLocal<v8::Object>();
- m_commandLineAPI.Reset(isolate, extension.As<v8::Object>());
- }
+ if (m_commandLineAPI.IsEmpty())
+ m_commandLineAPI.Reset(m_context->isolate(), V8Console::createCommandLineAPI(m_context));
return m_commandLineAPI.Get(m_context->isolate());
}
@@ -413,17 +405,8 @@ bool InjectedScript::Scope::initialize()
bool InjectedScript::Scope::installCommandLineAPI()
{
- DCHECK(m_injectedScript && !m_context.IsEmpty() && m_global.IsEmpty());
- v8::Local<v8::Object> extensionObject;
- if (!m_injectedScript->commandLineAPI(m_errorString).ToLocal(&extensionObject))
- return false;
- m_extensionPrivate = V8Debugger::scopeExtensionPrivate(m_debugger->isolate());
- v8::Local<v8::Object> global = m_context->Global();
- if (!global->SetPrivate(m_context, m_extensionPrivate, extensionObject).FromMaybe(false)) {
- *m_errorString = "Internal error";
- return false;
- }
- m_global = global;
+ DCHECK(m_injectedScript && !m_context.IsEmpty() && !m_commandLineAPIScope.get());
+ m_commandLineAPIScope.reset(new V8Console::CommandLineAPIScope(m_context, m_injectedScript->commandLineAPI(), m_context->Global()));
return true;
}
@@ -454,12 +437,7 @@ void InjectedScript::Scope::pretendUserGesture()
void InjectedScript::Scope::cleanup()
{
- v8::Local<v8::Object> global;
- if (m_global.ToLocal(&global)) {
- DCHECK(!m_context.IsEmpty());
- global->DeletePrivate(m_context, m_extensionPrivate);
- m_global = v8::MaybeLocal<v8::Object>();
- }
+ m_commandLineAPIScope.reset();
if (!m_context.IsEmpty()) {
m_context->Exit();
m_context.Clear();
diff --git a/deps/v8_inspector/platform/v8_inspector/InjectedScript.h b/deps/v8_inspector/platform/v8_inspector/InjectedScript.h
index 8a33e73f53..7dae28aba9 100644
--- a/deps/v8_inspector/platform/v8_inspector/InjectedScript.h
+++ b/deps/v8_inspector/platform/v8_inspector/InjectedScript.h
@@ -32,11 +32,12 @@
#define InjectedScript_h
#include "platform/inspector_protocol/Allocator.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/InjectedScriptNative.h"
#include "platform/v8_inspector/InspectedContext.h"
+#include "platform/v8_inspector/V8Console.h"
#include "platform/v8_inspector/V8DebuggerImpl.h"
-#include "wtf/PtrUtil.h"
+#include "platform/v8_inspector/protocol/Runtime.h"
#include <v8.h>
@@ -114,8 +115,7 @@ public:
v8::HandleScope m_handleScope;
v8::TryCatch m_tryCatch;
v8::Local<v8::Context> m_context;
- v8::Local<v8::Private> m_extensionPrivate;
- v8::MaybeLocal<v8::Object> m_global;
+ std::unique_ptr<V8Console::CommandLineAPIScope> m_commandLineAPIScope;
bool m_ignoreExceptionsAndMuteConsole;
V8DebuggerImpl::PauseOnExceptionsState m_previousPauseOnExceptionsState;
bool m_userGesture;
@@ -162,7 +162,7 @@ private:
bool canAccessInspectedWindow() const;
v8::Local<v8::Value> v8Value() const;
v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, const String16& groupName, bool forceValueType, bool generatePreview) const;
- v8::MaybeLocal<v8::Object> commandLineAPI(ErrorString*);
+ v8::Local<v8::Object> commandLineAPI();
InspectedContext* m_context;
v8::Global<v8::Value> m_value;
diff --git a/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.cpp b/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.cpp
index 723eb867fa..89e48fcbf1 100644
--- a/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.cpp
@@ -5,7 +5,6 @@
#include "platform/v8_inspector/InjectedScriptNative.h"
#include "platform/inspector_protocol/Values.h"
-#include "wtf/Assertions.h"
namespace blink {
diff --git a/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.h b/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.h
index 435bcdb8b7..63d2a30f3c 100644
--- a/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.h
+++ b/deps/v8_inspector/platform/v8_inspector/InjectedScriptNative.h
@@ -6,8 +6,8 @@
#define InjectedScriptNative_h
#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/PtrUtil.h"
#include <v8.h>
namespace blink {
diff --git a/deps/v8_inspector/platform/v8_inspector/InjectedScriptSource.js b/deps/v8_inspector/platform/v8_inspector/InjectedScriptSource.js
index bf0ed2bfd2..0e0c4f8d28 100644
--- a/deps/v8_inspector/platform/v8_inspector/InjectedScriptSource.js
+++ b/deps/v8_inspector/platform/v8_inspector/InjectedScriptSource.js
@@ -54,20 +54,6 @@ function push(array, var_args)
}
/**
- * @param {(!Arguments.<T>|!NodeList)} array
- * @param {number=} index
- * @return {!Array.<T>}
- * @template T
- */
-function slice(array, index)
-{
- var result = [];
- for (var i = index || 0, j = 0; i < array.length; ++i, ++j)
- result[j] = array[i];
- return result;
-}
-
-/**
* @param {*} obj
* @return {string}
* @suppress {uselessCode}
@@ -405,7 +391,7 @@ InjectedScript.prototype = {
if (descriptor) {
if (accessorPropertiesOnly && !("get" in descriptor || "set" in descriptor))
continue;
- if ("get" in descriptor && "set" in descriptor && name != "__proto__" && InjectedScriptHost.formatAccessorsAsProperties(object) && !doesAttributeHaveObservableSideEffectOnGet(object, name)) {
+ if ("get" in descriptor && "set" in descriptor && name != "__proto__" && InjectedScriptHost.formatAccessorsAsProperties(object, descriptor.get) && !doesAttributeHaveObservableSideEffectOnGet(object, name)) {
descriptor.value = InjectedScriptHost.suppressWarningsAndCallFunction(function(attribute) { return this[attribute]; }, object, [property]);
descriptor.isOwn = true;
delete descriptor.get;
@@ -535,30 +521,6 @@ InjectedScript.prototype = {
},
/**
- * @param {!Object} nativeCommandLineAPI
- * @return {!Object}
- */
- installCommandLineAPI: function(nativeCommandLineAPI)
- {
- // NOTE: This list contains only not native Command Line API methods. For full list: V8Console.
- // NOTE: Argument names of these methods will be printed in the console, so use pretty names!
- var members = [ "$", "$$", "$x", "monitorEvents", "unmonitorEvents", "getEventListeners" ];
- for (var member of members)
- nativeCommandLineAPI[member] = CommandLineAPIImpl[member];
- var functionToStringMap = new Map([
- ["$", "function $(selector, [startNode]) { [Command Line API] }"],
- ["$$", "function $$(selector, [startNode]) { [Command Line API] }"],
- ["$x", "function $x(xpath, [startNode]) { [Command Line API] }"],
- ["monitorEvents", "function monitorEvents(object, [types]) { [Command Line API] }"],
- ["unmonitorEvents", "function unmonitorEvents(object, [types]) { [Command Line API] }"],
- ["getEventListeners", "function getEventListeners(node) { [Command Line API] }"]
- ]);
- for (let entry of functionToStringMap)
- nativeCommandLineAPI[entry[0]].toString = (() => entry[1]);
- return nativeCommandLineAPI;
- },
-
- /**
* @param {*} object
* @return {boolean}
*/
@@ -618,7 +580,12 @@ InjectedScript.prototype = {
return toString(obj);
if (subtype === "node") {
- var description = obj.nodeName.toLowerCase();
+ var description = "";
+ if (obj.nodeName)
+ description = obj.nodeName.toLowerCase();
+ else if (obj.constructor)
+ description = obj.constructor.name.toLowerCase();
+
switch (obj.nodeType) {
case 1 /* Node.ELEMENT_NODE */:
description += obj.id ? "#" + obj.id : "";
@@ -1044,179 +1011,5 @@ InjectedScript.RemoteObject.prototype = {
__proto__: null
}
-var CommandLineAPIImpl = { __proto__: null }
-
-/**
- * @param {string} selector
- * @param {!Node=} opt_startNode
- * @return {*}
- */
-CommandLineAPIImpl.$ = function (selector, opt_startNode)
-{
- if (CommandLineAPIImpl._canQuerySelectorOnNode(opt_startNode))
- return opt_startNode.querySelector(selector);
-
- return inspectedGlobalObject.document.querySelector(selector);
-}
-
-/**
- * @param {string} selector
- * @param {!Node=} opt_startNode
- * @return {*}
- */
-CommandLineAPIImpl.$$ = function (selector, opt_startNode)
-{
- if (CommandLineAPIImpl._canQuerySelectorOnNode(opt_startNode))
- return slice(opt_startNode.querySelectorAll(selector));
- return slice(inspectedGlobalObject.document.querySelectorAll(selector));
-}
-
-/**
- * @param {!Node=} node
- * @return {boolean}
- */
-CommandLineAPIImpl._canQuerySelectorOnNode = function(node)
-{
- return !!node && InjectedScriptHost.subtype(node) === "node" && (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
-}
-
-/**
- * @param {string} xpath
- * @param {!Node=} opt_startNode
- * @return {*}
- */
-CommandLineAPIImpl.$x = function(xpath, opt_startNode)
-{
- var doc = (opt_startNode && opt_startNode.ownerDocument) || inspectedGlobalObject.document;
- var result = doc.evaluate(xpath, opt_startNode || doc, null, XPathResult.ANY_TYPE, null);
- switch (result.resultType) {
- case XPathResult.NUMBER_TYPE:
- return result.numberValue;
- case XPathResult.STRING_TYPE:
- return result.stringValue;
- case XPathResult.BOOLEAN_TYPE:
- return result.booleanValue;
- default:
- var nodes = [];
- var node;
- while (node = result.iterateNext())
- push(nodes, node);
- return nodes;
- }
-}
-
-/**
- * @param {!Object} object
- * @param {!Array.<string>|string=} opt_types
- */
-CommandLineAPIImpl.monitorEvents = function(object, opt_types)
-{
- if (!object || !object.addEventListener || !object.removeEventListener)
- return;
- var types = CommandLineAPIImpl._normalizeEventTypes(opt_types);
- for (var i = 0; i < types.length; ++i) {
- object.removeEventListener(types[i], CommandLineAPIImpl._logEvent, false);
- object.addEventListener(types[i], CommandLineAPIImpl._logEvent, false);
- }
-}
-
-/**
- * @param {!Object} object
- * @param {!Array.<string>|string=} opt_types
- */
-CommandLineAPIImpl.unmonitorEvents = function(object, opt_types)
-{
- if (!object || !object.addEventListener || !object.removeEventListener)
- return;
- var types = CommandLineAPIImpl._normalizeEventTypes(opt_types);
- for (var i = 0; i < types.length; ++i)
- object.removeEventListener(types[i], CommandLineAPIImpl._logEvent, false);
-}
-
-/**
- * @param {!Node} node
- * @return {!Object|undefined}
- */
-CommandLineAPIImpl.getEventListeners = function(node)
-{
- var result = nullifyObjectProto(InjectedScriptHost.getEventListeners(node));
- if (!result)
- return;
-
- // TODO(dtapuska): Remove this one closure compiler is updated
- // to handle EventListenerOptions and passive event listeners
- // has shipped. Don't JSDoc these otherwise it will fail.
- // @param {boolean} capture
- // @param {boolean} passive
- // @return {boolean|undefined|{capture: (boolean|undefined), passive: boolean}}
- function eventListenerOptions(capture, passive)
- {
- return {"capture": capture, "passive": passive};
- }
-
- /**
- * @param {!Node} node
- * @param {string} type
- * @param {function()} listener
- * @param {boolean} capture
- * @param {boolean} passive
- */
- function removeEventListenerWrapper(node, type, listener, capture, passive)
- {
- node.removeEventListener(type, listener, eventListenerOptions(capture, passive));
- }
-
- /** @this {{type: string, listener: function(), useCapture: boolean, passive: boolean}} */
- var removeFunc = function()
- {
- removeEventListenerWrapper(node, this.type, this.listener, this.useCapture, this.passive);
- }
- for (var type in result) {
- var listeners = result[type];
- for (var i = 0, listener; listener = listeners[i]; ++i) {
- listener["type"] = type;
- listener["remove"] = removeFunc;
- }
- }
- return result;
-}
-
-/**
- * @param {!Array.<string>|string=} types
- * @return {!Array.<string>}
- */
-CommandLineAPIImpl._normalizeEventTypes = function(types)
-{
- if (typeof types === "undefined")
- types = ["mouse", "key", "touch", "pointer", "control", "load", "unload", "abort", "error", "select", "input", "change", "submit", "reset", "focus", "blur", "resize", "scroll", "search", "devicemotion", "deviceorientation"];
- else if (typeof types === "string")
- types = [types];
-
- var result = [];
- for (var i = 0; i < types.length; ++i) {
- if (types[i] === "mouse")
- push(result, "click", "dblclick", "mousedown", "mouseeenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "mouseleave", "mousewheel");
- else if (types[i] === "key")
- push(result, "keydown", "keyup", "keypress", "textInput");
- else if (types[i] === "touch")
- push(result, "touchstart", "touchmove", "touchend", "touchcancel");
- else if (types[i] === "pointer")
- push(result, "pointerover", "pointerout", "pointerenter", "pointerleave", "pointerdown", "pointerup", "pointermove", "pointercancel", "gotpointercapture", "lostpointercapture");
- else if (types[i] === "control")
- push(result, "resize", "scroll", "zoom", "focus", "blur", "select", "input", "change", "submit", "reset");
- else
- push(result, types[i]);
- }
- return result;
-}
-
-/**
- * @param {!Event} event
- */
-CommandLineAPIImpl._logEvent = function(event)
-{
- inspectedGlobalObject.console.log(event.type, event);
-}
-
return injectedScript;
})
diff --git a/deps/v8_inspector/platform/v8_inspector/InspectorWrapper.cpp b/deps/v8_inspector/platform/v8_inspector/InspectorWrapper.cpp
deleted file mode 100644
index 4f5f278417..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/InspectorWrapper.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "platform/v8_inspector/InspectorWrapper.h"
-
-#include "platform/v8_inspector/V8Compat.h"
-#include "platform/v8_inspector/public/V8DebuggerClient.h"
-#include "wtf/Assertions.h"
-
-#include <v8-debug.h>
-
-namespace blink {
-
-v8::Local<v8::FunctionTemplate> InspectorWrapperBase::createWrapperTemplate(v8::Isolate* isolate, const char* className, const protocol::Vector<V8MethodConfiguration>& methods, const protocol::Vector<V8AttributeConfiguration>& attributes)
-{
- v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate::New(isolate);
-
- functionTemplate->SetClassName(v8::String::NewFromUtf8(isolate, className, v8::NewStringType::kInternalized).ToLocalChecked());
- v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate();
-
- for (auto& config : attributes) {
- v8::Local<v8::Name> v8name = v8::String::NewFromUtf8(isolate, config.name, v8::NewStringType::kInternalized).ToLocalChecked();
- instanceTemplate->SetAccessor(v8name, config.callback);
- }
-
- for (auto& config : methods) {
- v8::Local<v8::Name> v8name = v8::String::NewFromUtf8(isolate, config.name, v8::NewStringType::kInternalized).ToLocalChecked();
- v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate::New(isolate, config.callback);
- functionTemplate->RemovePrototype();
- instanceTemplate->Set(v8name, functionTemplate, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly));
- }
-
- return functionTemplate;
-}
-
-v8::Local<v8::Object> InspectorWrapperBase::createWrapper(v8::Local<v8::FunctionTemplate> constructorTemplate, v8::Local<v8::Context> context)
-{
- v8::MicrotasksScope microtasks(context->GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
- v8::Local<v8::Function> function;
- if (!constructorTemplate->GetFunction(context).ToLocal(&function))
- return v8::Local<v8::Object>();
-
- v8::Local<v8::Object> result;
- if (!function->NewInstance(context).ToLocal(&result))
- return v8::Local<v8::Object>();
- return result;
-}
-
-void* InspectorWrapperBase::unwrap(v8::Local<v8::Context> context, v8::Local<v8::Object> object, const char* name)
-{
- v8::Isolate* isolate = context->GetIsolate();
- DCHECK(context != v8::Debug::GetDebugContext(isolate));
-
- v8::Local<v8::Private> privateKey = v8::Private::ForApi(isolate, v8::String::NewFromUtf8(isolate, name, v8::NewStringType::kInternalized).ToLocalChecked());
-
- v8::Local<v8::Value> value;
- if (!object->GetPrivate(context, privateKey).ToLocal(&value))
- return nullptr;
- if (!value->IsExternal())
- return nullptr;
- return value.As<v8::External>()->Value();
-}
-
-v8::Local<v8::String> InspectorWrapperBase::v8InternalizedString(v8::Isolate* isolate, const char* name)
-{
- return v8::String::NewFromUtf8(isolate, name, v8::NewStringType::kInternalized).ToLocalChecked();
-}
-
-} // namespace blink
diff --git a/deps/v8_inspector/platform/v8_inspector/InspectorWrapper.h b/deps/v8_inspector/platform/v8_inspector/InspectorWrapper.h
deleted file mode 100644
index e28697dbd7..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/InspectorWrapper.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef InspectorWrapper_h
-#define InspectorWrapper_h
-
-#include "platform/inspector_protocol/Collections.h"
-#include <v8.h>
-
-namespace blink {
-
-class InspectorWrapperBase {
-public:
- struct V8MethodConfiguration {
- const char* name;
- v8::FunctionCallback callback;
- };
-
- struct V8AttributeConfiguration {
- const char* name;
- v8::AccessorNameGetterCallback callback;
- };
-
- static v8::Local<v8::FunctionTemplate> createWrapperTemplate(v8::Isolate*, const char* className, const protocol::Vector<V8MethodConfiguration>& methods, const protocol::Vector<V8AttributeConfiguration>& attributes);
-
-protected:
- static v8::Local<v8::Object> createWrapper(v8::Local<v8::FunctionTemplate>, v8::Local<v8::Context>);
- static void* unwrap(v8::Local<v8::Context>, v8::Local<v8::Object>, const char* name);
-
- static v8::Local<v8::String> v8InternalizedString(v8::Isolate*, const char* name);
-};
-
-template<class T, char* const hiddenPropertyName, char* const className>
-class InspectorWrapper final : public InspectorWrapperBase {
-public:
- class WeakCallbackData final {
- public:
- WeakCallbackData(v8::Isolate* isolate, T* impl, v8::Local<v8::Object> wrapper)
- : m_impl(impl)
- , m_persistent(isolate, wrapper)
- {
- m_persistent.SetWeak(this, &WeakCallbackData::weakCallback, v8::WeakCallbackType::kParameter);
- }
-
- T* m_impl;
- std::unique_ptr<T> m_implOwn;
-
- private:
- static void weakCallback(const v8::WeakCallbackInfo<WeakCallbackData>& info)
- {
- delete info.GetParameter();
- }
-
- v8::Global<v8::Object> m_persistent;
- };
-
- static v8::Local<v8::FunctionTemplate> createWrapperTemplate(v8::Isolate* isolate, const protocol::Vector<V8MethodConfiguration>& methods, const protocol::Vector<V8AttributeConfiguration>& attributes)
- {
- return InspectorWrapperBase::createWrapperTemplate(isolate, className, methods, attributes);
- }
-
- static v8::Local<v8::Object> wrap(v8::Local<v8::FunctionTemplate> constructorTemplate, v8::Local<v8::Context> context, T* object)
- {
- v8::Context::Scope contextScope(context);
- v8::Local<v8::Object> result = InspectorWrapperBase::createWrapper(constructorTemplate, context);
- if (result.IsEmpty())
- return v8::Local<v8::Object>();
- v8::Isolate* isolate = context->GetIsolate();
- v8::Local<v8::External> objectReference = v8::External::New(isolate, new WeakCallbackData(isolate, object, result));
-
- v8::Local<v8::Private> privateKey = v8::Private::ForApi(isolate, v8::String::NewFromUtf8(isolate, hiddenPropertyName, v8::NewStringType::kInternalized).ToLocalChecked());
- result->SetPrivate(context, privateKey, objectReference);
- return result;
- }
-
- static T* unwrap(v8::Local<v8::Context> context, v8::Local<v8::Object> object)
- {
- void* data = InspectorWrapperBase::unwrap(context, object, hiddenPropertyName);
- if (!data)
- return nullptr;
- return reinterpret_cast<WeakCallbackData*>(data)->m_impl;
- }
-};
-
-} // namespace blink
-
-#endif // InspectorWrapper_h
diff --git a/deps/v8_inspector/platform/v8_inspector/JavaScriptCallFrame.h b/deps/v8_inspector/platform/v8_inspector/JavaScriptCallFrame.h
index e34d1d03ec..6f9693522e 100644
--- a/deps/v8_inspector/platform/v8_inspector/JavaScriptCallFrame.h
+++ b/deps/v8_inspector/platform/v8_inspector/JavaScriptCallFrame.h
@@ -32,9 +32,8 @@
#define JavaScriptCallFrame_h
#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/PtrUtil.h"
#include <v8.h>
namespace blink {
diff --git a/deps/v8_inspector/platform/v8_inspector/OWNERS b/deps/v8_inspector/platform/v8_inspector/OWNERS
index c34ad775ca..8787a9d384 100644
--- a/deps/v8_inspector/platform/v8_inspector/OWNERS
+++ b/deps/v8_inspector/platform/v8_inspector/OWNERS
@@ -3,3 +3,9 @@ caseq@chromium.org
dgozman@chromium.org
kozyatinskiy@chromium.org
pfeldman@chromium.org
+
+# Changes to remote debugging protocol require devtools review to
+# ensure backwards compatibility and committment to maintain.
+per-file js_protocol.json=set noparent
+per-file js_protocol.json=dgozman@chromium.org
+per-file js_protocol.json=pfeldman@chromium.org
diff --git a/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.cpp b/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.cpp
index 1f0332b44f..9a2a6c0088 100644
--- a/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.cpp
@@ -5,8 +5,8 @@
#include "platform/v8_inspector/RemoteObjectId.h"
#include "platform/inspector_protocol/Parser.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/Values.h"
-#include "wtf/PtrUtil.h"
namespace blink {
diff --git a/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.h b/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.h
index ae1cf47ca4..af3c4b801f 100644
--- a/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.h
+++ b/deps/v8_inspector/platform/v8_inspector/RemoteObjectId.h
@@ -5,9 +5,9 @@
#ifndef RemoteObjectId_h
#define RemoteObjectId_h
+#include "platform/inspector_protocol/ErrorSupport.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
-#include "wtf/PtrUtil.h"
namespace blink {
diff --git a/deps/v8_inspector/platform/v8_inspector/V8Compat.h b/deps/v8_inspector/platform/v8_inspector/V8Compat.h
index 0f5b12cbb6..17d104f773 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8Compat.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8Compat.h
@@ -7,7 +7,7 @@
#include <v8.h>
-#if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1)
+#if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
namespace v8 {
// In standalone V8 inspector this is expected to be noop anyways...
@@ -23,6 +23,6 @@ public:
} // namespace v8
-#endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1)
+#endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
#endif // V8Compat_h
diff --git a/deps/v8_inspector/platform/v8_inspector/V8Console.cpp b/deps/v8_inspector/platform/v8_inspector/V8Console.cpp
index f3f7fe171e..d10b326d15 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8Console.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8Console.cpp
@@ -4,6 +4,7 @@
#include "platform/v8_inspector/V8Console.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
#include "platform/v8_inspector/InjectedScript.h"
#include "platform/v8_inspector/InspectedContext.h"
@@ -76,18 +77,18 @@ public:
return m_debuggerClient;
}
- void addMessage(MessageType type, MessageLevel level, bool allowEmptyArguments, int skipArgumentCount)
+ void addMessage(MessageType type, MessageLevel level, String16 emptyText, int skipArgumentCount)
{
- if (!allowEmptyArguments && !m_info.Length())
+ if (emptyText.isEmpty() && !m_info.Length())
return;
if (V8DebuggerClient* debuggerClient = ensureDebuggerClient())
- debuggerClient->reportMessageToConsole(m_context, type, level, String16(), &m_info, skipArgumentCount, -1);
+ debuggerClient->reportMessageToConsole(m_context, type, level, m_info.Length() <= skipArgumentCount ? emptyText : String16(), &m_info, skipArgumentCount);
}
void addMessage(MessageType type, MessageLevel level, const String16& message)
{
if (V8DebuggerClient* debuggerClient = ensureDebuggerClient())
- debuggerClient->reportMessageToConsole(m_context, type, level, message, nullptr, 0 /* skipArgumentsCount */, 1 /* maxStackSize */);
+ debuggerClient->reportMessageToConsole(m_context, type, level, message, nullptr, 0 /* skipArgumentsCount */);
}
void addDeprecationMessage(const char* id, const String16& message)
@@ -95,7 +96,7 @@ public:
if (checkAndSetPrivateFlagOnConsole(id, false))
return;
if (V8DebuggerClient* debuggerClient = ensureDebuggerClient())
- debuggerClient->reportMessageToConsole(m_context, LogMessageType, WarningMessageLevel, message, nullptr, 0 /* skipArgumentsCount */, 0 /* maxStackSize */);
+ debuggerClient->reportMessageToConsole(m_context, LogMessageType, WarningMessageLevel, message, nullptr, 0 /* skipArgumentsCount */);
}
bool firstArgToBoolean(bool defaultValue)
@@ -191,8 +192,8 @@ public:
V8ProfilerAgentImpl* profilerAgent()
{
if (V8InspectorSessionImpl* session = currentSession()) {
- if (session && session->profilerAgentImpl()->enabled())
- return session->profilerAgentImpl();
+ if (session && session->profilerAgent()->enabled())
+ return session->profilerAgent();
}
return nullptr;
}
@@ -200,8 +201,8 @@ public:
V8DebuggerAgentImpl* debuggerAgent()
{
if (V8InspectorSessionImpl* session = currentSession()) {
- if (session && session->debuggerAgentImpl()->enabled())
- return session->debuggerAgentImpl();
+ if (session && session->debuggerAgent()->enabled())
+ return session->debuggerAgent();
}
return nullptr;
}
@@ -266,67 +267,67 @@ void createBoundFunctionProperty(v8::Local<v8::Context> context, v8::Local<v8::O
void V8Console::debugCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(LogMessageType, DebugMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(LogMessageType, DebugMessageLevel, String16(), 0);
}
void V8Console::errorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(LogMessageType, ErrorMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(LogMessageType, ErrorMessageLevel, String16(), 0);
}
void V8Console::infoCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(LogMessageType, InfoMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(LogMessageType, InfoMessageLevel, String16(), 0);
}
void V8Console::logCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(LogMessageType, LogMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(LogMessageType, LogMessageLevel, String16(), 0);
}
void V8Console::warnCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(LogMessageType, WarningMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(LogMessageType, WarningMessageLevel, String16(), 0);
}
void V8Console::dirCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(DirMessageType, LogMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(DirMessageType, LogMessageLevel, String16(), 0);
}
void V8Console::dirxmlCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(DirXMLMessageType, LogMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(DirXMLMessageType, LogMessageLevel, String16(), 0);
}
void V8Console::tableCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(TableMessageType, LogMessageLevel, false, 0);
+ ConsoleHelper(info).addMessage(TableMessageType, LogMessageLevel, String16(), 0);
}
void V8Console::traceCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(TraceMessageType, LogMessageLevel, true, 0);
+ ConsoleHelper(info).addMessage(TraceMessageType, LogMessageLevel, String16("console.trace"), 0);
}
void V8Console::groupCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(StartGroupMessageType, LogMessageLevel, true, 0);
+ ConsoleHelper(info).addMessage(StartGroupMessageType, LogMessageLevel, String16("console.group"), 0);
}
void V8Console::groupCollapsedCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(StartGroupCollapsedMessageType, LogMessageLevel, true, 0);
+ ConsoleHelper(info).addMessage(StartGroupCollapsedMessageType, LogMessageLevel, String16("console.groupCollapsed"), 0);
}
void V8Console::groupEndCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(EndGroupMessageType, LogMessageLevel, true, 0);
+ ConsoleHelper(info).addMessage(EndGroupMessageType, LogMessageLevel, String16("console.groupEnd"), 0);
}
void V8Console::clearCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ConsoleHelper(info).addMessage(ClearMessageType, LogMessageLevel, true, 0);
+ ConsoleHelper(info).addMessage(ClearMessageType, LogMessageLevel, String16("console.clear"), 0);
}
void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -356,7 +357,7 @@ void V8Console::assertCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
ConsoleHelper helper(info);
if (helper.firstArgToBoolean(false))
return;
- helper.addMessage(AssertMessageType, ErrorMessageLevel, true, 1);
+ helper.addMessage(AssertMessageType, ErrorMessageLevel, String16("console.assert"), 1);
if (V8DebuggerAgentImpl* debuggerAgent = helper.debuggerAgent())
debuggerAgent->breakProgramOnException(protocol::Debugger::Paused::ReasonEnum::Assert, nullptr);
}
@@ -448,7 +449,7 @@ void V8Console::memoryGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&
{
if (V8DebuggerClient* client = ConsoleHelper(info).ensureDebuggerClient()) {
v8::Local<v8::Value> memoryValue;
- if (!client->memoryInfo(info.GetIsolate(), info.GetIsolate()->GetCurrentContext(), info.Holder()).ToLocal(&memoryValue))
+ if (!client->memoryInfo(info.GetIsolate(), info.GetIsolate()->GetCurrentContext()).ToLocal(&memoryValue))
return;
info.GetReturnValue().Set(memoryValue);
}
@@ -597,7 +598,7 @@ static void inspectImpl(const v8::FunctionCallbackInfo<v8::Value>& info, bool co
if (copyToClipboard)
hints->setBoolean("copyToClipboard", true);
if (V8InspectorSessionImpl* session = helper.currentSession())
- session->runtimeAgentImpl()->inspect(std::move(wrappedObject), std::move(hints));
+ session->runtimeAgent()->inspect(std::move(wrappedObject), std::move(hints));
}
void V8Console::inspectCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -656,6 +657,9 @@ v8::Local<v8::Object> V8Console::createConsole(InspectedContext* inspectedContex
createBoundFunctionProperty(context, console, "timeEnd", V8Console::timeEndCallback);
createBoundFunctionProperty(context, console, "timeStamp", V8Console::timeStampCallback);
+ bool success = console->SetPrototype(context, v8::Object::New(isolate)).FromMaybe(false);
+ DCHECK(success);
+
if (hasMemoryAttribute)
console->SetAccessorProperty(toV8StringInternalized(isolate, "memory"), v8::Function::New(isolate, V8Console::memoryGetterCallback, console), v8::Function::New(isolate, V8Console::memorySetterCallback), static_cast<v8::PropertyAttribute>(v8::None), v8::DEFAULT);
@@ -663,6 +667,12 @@ v8::Local<v8::Object> V8Console::createConsole(InspectedContext* inspectedContex
return console;
}
+void V8Console::clearInspectedContextIfNeeded(v8::Local<v8::Context> context, v8::Local<v8::Object> console)
+{
+ v8::Isolate* isolate = context->GetIsolate();
+ console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::External::New(isolate, nullptr));
+}
+
v8::Local<v8::Object> V8Console::createCommandLineAPI(InspectedContext* inspectedContext)
{
v8::Local<v8::Context> context = inspectedContext->context();
@@ -693,38 +703,101 @@ v8::Local<v8::Object> V8Console::createCommandLineAPI(InspectedContext* inspecte
createBoundFunctionProperty(context, commandLineAPI, "$3", V8Console::inspectedObject3);
createBoundFunctionProperty(context, commandLineAPI, "$4", V8Console::inspectedObject4);
+ inspectedContext->debugger()->client()->installAdditionalCommandLineAPI(context, commandLineAPI);
+
commandLineAPI->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::External::New(isolate, inspectedContext));
return commandLineAPI;
}
-void V8Console::clearInspectedContextIfNeeded(v8::Local<v8::Context> context, v8::Local<v8::Object> console)
+static bool isCommandLineAPIGetter(const String16& name)
{
- v8::Isolate* isolate = context->GetIsolate();
- console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::External::New(isolate, nullptr));
+ if (name.length() != 2)
+ return false;
+ // $0 ... $4, $_
+ return name[0] == '$' && ((name[1] >= '0' && name[1] <= '4') || name[1] == '_');
+}
+
+void V8Console::CommandLineAPIScope::accessorGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ CommandLineAPIScope* scope = static_cast<CommandLineAPIScope*>(info.Data().As<v8::External>()->Value());
+ DCHECK(scope);
+
+ v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
+ if (scope->m_cleanup) {
+ bool removed = info.Holder()->Delete(context, name).FromMaybe(false);
+ DCHECK(removed);
+ return;
+ }
+ v8::Local<v8::Object> commandLineAPI = scope->m_commandLineAPI;
+
+ v8::Local<v8::Value> value;
+ if (!commandLineAPI->Get(context, name).ToLocal(&value))
+ return;
+ if (isCommandLineAPIGetter(toProtocolStringWithTypeCheck(name))) {
+ DCHECK(value->IsFunction());
+ v8::MicrotasksScope microtasks(info.GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
+ if (value.As<v8::Function>()->Call(context, commandLineAPI, 0, nullptr).ToLocal(&value))
+ info.GetReturnValue().Set(value);
+ } else {
+ info.GetReturnValue().Set(value);
+ }
+}
+
+void V8Console::CommandLineAPIScope::accessorSetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ CommandLineAPIScope* scope = static_cast<CommandLineAPIScope*>(info.Data().As<v8::External>()->Value());
+ v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
+ if (!info.Holder()->Delete(context, name).FromMaybe(false))
+ return;
+ if (!info.Holder()->CreateDataProperty(context, name, value).FromMaybe(false))
+ return;
+ bool removed = scope->m_installedMethods->Delete(context, name).FromMaybe(false);
+ DCHECK(removed);
}
-bool V8Debugger::isCommandLineAPIMethod(const String16& name)
+V8Console::CommandLineAPIScope::CommandLineAPIScope(v8::Local<v8::Context> context, v8::Local<v8::Object> commandLineAPI, v8::Local<v8::Object> global)
+ : m_context(context)
+ , m_commandLineAPI(commandLineAPI)
+ , m_global(global)
+ , m_installedMethods(v8::Set::New(context->GetIsolate()))
+ , m_cleanup(false)
{
- static protocol::HashSet<String16> methods;
- if (methods.size() == 0) {
- const char* members[] = { "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",
- "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventListeners",
- "debug", "undebug", "monitor", "unmonitor", "table" };
- for (size_t i = 0; i < PROTOCOL_ARRAY_LENGTH(members); ++i)
- methods.add(members[i]);
+ v8::Local<v8::Array> names;
+ if (!m_commandLineAPI->GetOwnPropertyNames(context).ToLocal(&names))
+ return;
+ v8::Local<v8::External> externalThis = v8::External::New(context->GetIsolate(), this);
+ for (size_t i = 0; i < names->Length(); ++i) {
+ v8::Local<v8::Value> name;
+ if (!names->Get(context, i).ToLocal(&name) || !name->IsName())
+ continue;
+ if (m_global->Has(context, name).FromMaybe(true))
+ continue;
+ if (!m_installedMethods->Add(context, name).ToLocal(&m_installedMethods))
+ continue;
+ if (!m_global->SetAccessor(context, v8::Local<v8::Name>::Cast(name), CommandLineAPIScope::accessorGetterCallback,
+ CommandLineAPIScope::accessorSetterCallback, externalThis,
+ v8::DEFAULT, v8::DontEnum).FromMaybe(false)) {
+ bool removed = m_installedMethods->Delete(context, name).FromMaybe(false);
+ DCHECK(removed);
+ continue;
+ }
}
- return methods.find(name) != methods.end();
}
-bool V8Debugger::isCommandLineAPIGetter(const String16& name)
+V8Console::CommandLineAPIScope::~CommandLineAPIScope()
{
- protocol::HashSet<String16> getters;
- if (getters.size() == 0) {
- const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" };
- for (size_t i = 0; i < PROTOCOL_ARRAY_LENGTH(members); ++i)
- getters.add(members[i]);
+ m_cleanup = true;
+ v8::Local<v8::Array> names = m_installedMethods->AsArray();
+ for (size_t i = 0; i < names->Length(); ++i) {
+ v8::Local<v8::Value> name;
+ if (!names->Get(m_context, i).ToLocal(&name) || !name->IsName())
+ continue;
+ if (name->IsString()) {
+ v8::Local<v8::Value> descriptor;
+ bool success = m_global->GetOwnPropertyDescriptor(m_context, v8::Local<v8::String>::Cast(name)).ToLocal(&descriptor);
+ DCHECK(success);
+ }
}
- return getters.find(name) != getters.end();
}
} // namespace blink
diff --git a/deps/v8_inspector/platform/v8_inspector/V8Console.h b/deps/v8_inspector/platform/v8_inspector/V8Console.h
index bd5fb8cd29..b539f4c0ad 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8Console.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8Console.h
@@ -5,6 +5,7 @@
#ifndef V8Console_h
#define V8Console_h
+#include "platform/inspector_protocol/Allocator.h"
#include <v8.h>
namespace blink {
@@ -16,8 +17,25 @@ class InspectedContext;
class V8Console {
public:
static v8::Local<v8::Object> createConsole(InspectedContext*, bool hasMemoryAttribute);
- static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*);
static void clearInspectedContextIfNeeded(v8::Local<v8::Context>, v8::Local<v8::Object> console);
+ static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*);
+
+ class CommandLineAPIScope {
+ PROTOCOL_DISALLOW_COPY(CommandLineAPIScope);
+ public:
+ CommandLineAPIScope(v8::Local<v8::Context>, v8::Local<v8::Object> commandLineAPI, v8::Local<v8::Object> global);
+ ~CommandLineAPIScope();
+
+ private:
+ static void accessorGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void accessorSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
+
+ v8::Local<v8::Context> m_context;
+ v8::Local<v8::Object> m_commandLineAPI;
+ v8::Local<v8::Object> m_global;
+ v8::Local<v8::Set> m_installedMethods;
+ bool m_cleanup;
+ };
private:
static void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&);
@@ -43,7 +61,7 @@ private:
static void timeCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void timeEndCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void timeStampCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- // TODO(philipj): There is no spec for the Memory Info API, see blink-dev:
+ // TODO(foolip): There is no spec for the Memory Info API, see blink-dev:
// https://groups.google.com/a/chromium.org/d/msg/blink-dev/g5YRCGpC9vs/b4OJz71NmPwJ
static void memoryGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void memorySetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
diff --git a/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.cpp
index 57cad6bdb3..e95d4af0f5 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.cpp
@@ -155,12 +155,12 @@ static std::unique_ptr<protocol::Debugger::Location> buildProtocolLocation(const
.setColumnNumber(columnNumber).build();
}
-V8DebuggerAgentImpl::V8DebuggerAgentImpl(V8InspectorSessionImpl* session)
+V8DebuggerAgentImpl::V8DebuggerAgentImpl(V8InspectorSessionImpl* session, protocol::FrontendChannel* frontendChannel, protocol::DictionaryValue* state)
: m_debugger(session->debugger())
, m_session(session)
, m_enabled(false)
- , m_state(nullptr)
- , m_frontend(nullptr)
+ , m_state(state)
+ , m_frontend(frontendChannel)
, m_isolate(m_debugger->isolate())
, m_breakReason(protocol::Debugger::Paused::ReasonEnum::Other)
, m_scheduledDebuggerStep(NoStep)
@@ -223,7 +223,6 @@ void V8DebuggerAgentImpl::enable(ErrorString* errorString)
}
enable();
- DCHECK(m_frontend);
}
void V8DebuggerAgentImpl::disable(ErrorString*)
@@ -272,19 +271,6 @@ void V8DebuggerAgentImpl::internalSetAsyncCallStackDepth(int depth)
}
}
-void V8DebuggerAgentImpl::setInspectorState(protocol::DictionaryValue* state)
-{
- m_state = state;
-}
-
-void V8DebuggerAgentImpl::clearFrontend()
-{
- ErrorString error;
- disable(&error);
- DCHECK(m_frontend);
- m_frontend = nullptr;
-}
-
void V8DebuggerAgentImpl::restore()
{
DCHECK(!m_enabled);
@@ -1027,6 +1013,7 @@ void V8DebuggerAgentImpl::asyncTaskStarted(void* task)
if (!m_maxAsyncCallStackDepth)
return;
+ m_currentTasks.append(task);
V8StackTraceImpl* stack = m_asyncTaskStacks.get(task);
// Needs to support following order of events:
// - asyncTaskScheduled
@@ -1035,7 +1022,7 @@ void V8DebuggerAgentImpl::asyncTaskStarted(void* task)
// - asyncTaskCanceled <-- canceled before finished
// <-- async stack requested here -->
// - asyncTaskFinished
- m_currentStacks.append(stack ? stack->clone() : nullptr);
+ m_currentStacks.append(stack ? stack->cloneImpl() : nullptr);
}
void V8DebuggerAgentImpl::asyncTaskFinished(void* task)
@@ -1046,6 +1033,9 @@ void V8DebuggerAgentImpl::asyncTaskFinished(void* task)
if (!m_currentStacks.size())
return;
+ DCHECK(m_currentTasks.last() == task);
+ m_currentTasks.removeLast();
+
m_currentStacks.removeLast();
if (!m_recurringTasks.contains(task))
m_asyncTaskStacks.remove(task);
@@ -1056,6 +1046,7 @@ void V8DebuggerAgentImpl::allAsyncTasksCanceled()
m_asyncTaskStacks.clear();
m_recurringTasks.clear();
m_currentStacks.clear();
+ m_currentTasks.clear();
}
void V8DebuggerAgentImpl::setBlackboxPatterns(ErrorString* errorString, std::unique_ptr<protocol::Array<String16>> patterns)
@@ -1079,7 +1070,7 @@ void V8DebuggerAgentImpl::setBlackboxPatterns(ErrorString* errorString, std::uni
bool V8DebuggerAgentImpl::setBlackboxPattern(ErrorString* errorString, const String16& pattern)
{
- std::unique_ptr<V8Regex> regex = wrapUnique(new V8Regex(m_debugger, pattern, true /** caseSensitive */, false /** multiline */));
+ std::unique_ptr<V8Regex> regex(new V8Regex(m_debugger, pattern, true /** caseSensitive */, false /** multiline */));
if (!regex->isValid()) {
*errorString = "Pattern parser error: " + regex->errorMessage();
return false;
@@ -1283,9 +1274,9 @@ void V8DebuggerAgentImpl::didParseSource(const V8DebuggerParsedScript& parsedScr
const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr;
const bool* deprecatedCommentWasUsedParam = deprecatedCommentWasUsed ? &deprecatedCommentWasUsed : nullptr;
if (parsedScript.success)
- m_frontend->scriptParsed(parsedScript.scriptId, scriptURL, script.startLine(), script.startColumn(), script.endLine(), script.endColumn(), executionContextId, script.hash(), isContentScriptParam, isInternalScriptParam, isLiveEditParam, sourceMapURLParam, hasSourceURLParam, deprecatedCommentWasUsedParam);
+ m_frontend.scriptParsed(parsedScript.scriptId, scriptURL, script.startLine(), script.startColumn(), script.endLine(), script.endColumn(), executionContextId, script.hash(), isContentScriptParam, isInternalScriptParam, isLiveEditParam, sourceMapURLParam, hasSourceURLParam, deprecatedCommentWasUsedParam);
else
- m_frontend->scriptFailedToParse(parsedScript.scriptId, scriptURL, script.startLine(), script.startColumn(), script.endLine(), script.endColumn(), executionContextId, script.hash(), isContentScriptParam, isInternalScriptParam, sourceMapURLParam, hasSourceURLParam, deprecatedCommentWasUsedParam);
+ m_frontend.scriptFailedToParse(parsedScript.scriptId, scriptURL, script.startLine(), script.startColumn(), script.endLine(), script.endColumn(), executionContextId, script.hash(), isContentScriptParam, isInternalScriptParam, sourceMapURLParam, hasSourceURLParam, deprecatedCommentWasUsedParam);
m_scripts.set(parsedScript.scriptId, script);
@@ -1311,7 +1302,7 @@ void V8DebuggerAgentImpl::didParseSource(const V8DebuggerParsedScript& parsedScr
breakpointObject->getString(DebuggerAgentState::condition, &breakpoint.condition);
std::unique_ptr<protocol::Debugger::Location> location = resolveBreakpoint(cookie.first, parsedScript.scriptId, breakpoint, UserBreakpointSource);
if (location)
- m_frontend->breakpointResolved(cookie.first, std::move(location));
+ m_frontend.breakpointResolved(cookie.first, std::move(location));
}
}
@@ -1371,7 +1362,7 @@ V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(v8::Local<v8
}
ErrorString errorString;
- m_frontend->paused(currentCallFrames(&errorString), m_breakReason, std::move(m_breakAuxData), std::move(hitBreakpointIds), currentAsyncStackTrace());
+ m_frontend.paused(currentCallFrames(&errorString), m_breakReason, std::move(m_breakAuxData), std::move(hitBreakpointIds), currentAsyncStackTrace());
m_scheduledDebuggerStep = NoStep;
m_javaScriptPauseScheduled = false;
m_steppingFromFramework = false;
@@ -1392,7 +1383,7 @@ void V8DebuggerAgentImpl::didContinue()
JavaScriptCallFrames emptyCallFrames;
m_pausedCallFrames.swap(emptyCallFrames);
clearBreakDetails();
- m_frontend->resumed();
+ m_frontend.resumed();
}
void V8DebuggerAgentImpl::breakProgram(const String16& breakReason, std::unique_ptr<protocol::DictionaryValue> data)
diff --git a/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.h b/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.h
index a2651970b7..ab04bb50a4 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8DebuggerAgentImpl.h
@@ -6,11 +6,9 @@
#define V8DebuggerAgentImpl_h
#include "platform/inspector_protocol/Collections.h"
-#include "platform/inspector_protocol/Dispatcher.h"
-#include "platform/inspector_protocol/Frontend.h"
#include "platform/inspector_protocol/String16.h"
#include "platform/v8_inspector/V8DebuggerImpl.h"
-#include "platform/v8_inspector/public/V8DebuggerAgent.h"
+#include "platform/v8_inspector/protocol/Debugger.h"
namespace blink {
@@ -26,7 +24,7 @@ class DictionaryValue;
using protocol::Maybe;
-class V8DebuggerAgentImpl : public V8DebuggerAgent {
+class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
PROTOCOL_DISALLOW_COPY(V8DebuggerAgentImpl);
public:
enum SkipPauseRequest {
@@ -43,17 +41,13 @@ public:
MonitorCommandBreakpointSource
};
- explicit V8DebuggerAgentImpl(V8InspectorSessionImpl*);
+ V8DebuggerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, protocol::DictionaryValue* state);
~V8DebuggerAgentImpl() override;
-
- void setInspectorState(protocol::DictionaryValue*) override;
- void setFrontend(protocol::Frontend::Debugger* frontend) override { m_frontend = frontend; }
- void clearFrontend() override;
- void restore() override;
- void disable(ErrorString*) override;
+ void restore();
// Part of the protocol.
void enable(ErrorString*) override;
+ void disable(ErrorString*) override;
void setBreakpointsActive(ErrorString*, bool active) override;
void setSkipAllPauses(ErrorString*, bool skipped) override;
void setBreakpointByUrl(ErrorString*,
@@ -212,7 +206,7 @@ private:
V8InspectorSessionImpl* m_session;
bool m_enabled;
protocol::DictionaryValue* m_state;
- protocol::Frontend::Debugger* m_frontend;
+ protocol::Debugger::Frontend m_frontend;
v8::Isolate* m_isolate;
v8::Global<v8::Context> m_pausedContext;
JavaScriptCallFrames m_pausedCallFrames;
@@ -237,6 +231,7 @@ private:
AsyncTaskToStackTrace m_asyncTaskStacks;
protocol::HashSet<void*> m_recurringTasks;
int m_maxAsyncCallStackDepth;
+ protocol::Vector<void*> m_currentTasks;
protocol::Vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks;
std::unique_ptr<V8Regex> m_blackboxPattern;
protocol::HashMap<String16, protocol::Vector<std::pair<int, int>>> m_blackboxedPositions;
diff --git a/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.cpp
index 6cb4371ede..387bc4b866 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.cpp
@@ -158,8 +158,8 @@ V8DebuggerAgentImpl* V8DebuggerImpl::findEnabledDebuggerAgent(int contextGroupId
if (!contextGroupId)
return nullptr;
V8InspectorSessionImpl* session = m_sessions.get(contextGroupId);
- if (session && session->debuggerAgentImpl()->enabled())
- return session->debuggerAgentImpl();
+ if (session && session->debuggerAgent()->enabled())
+ return session->debuggerAgent();
return nullptr;
}
@@ -457,7 +457,7 @@ static V8DebuggerImpl* toV8DebuggerImpl(v8::Local<v8::Value> data)
void V8DebuggerImpl::breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- DCHECK(2 == info.Length());
+ DCHECK_EQ(info.Length(), 2);
V8DebuggerImpl* thisPtr = toV8DebuggerImpl(info.Data());
v8::Local<v8::Context> pausedContext = thisPtr->m_isolate->GetCurrentContext();
v8::Local<v8::Value> exception;
@@ -572,12 +572,7 @@ void V8DebuggerImpl::handleV8AsyncTaskEvent(V8DebuggerAgentImpl* agent, v8::Loca
String16 type = toProtocolStringWithTypeCheck(callInternalGetterFunction(eventData, "type"));
String16 name = toProtocolStringWithTypeCheck(callInternalGetterFunction(eventData, "name"));
int id = callInternalGetterFunction(eventData, "id")->ToInteger(m_isolate)->Value();
-
- m_pausedContext = context;
- m_executionState = executionState;
agent->didReceiveV8AsyncTaskEvent(context, type, name, id);
- m_pausedContext.Clear();
- m_executionState.Clear();
}
V8DebuggerParsedScript V8DebuggerImpl::createParsedScript(v8::Local<v8::Object> object, bool success)
@@ -730,16 +725,16 @@ v8::Local<v8::Script> V8DebuggerImpl::compileInternalScript(v8::Local<v8::Contex
return script;
}
-std::unique_ptr<V8StackTrace> V8DebuggerImpl::createStackTrace(v8::Local<v8::StackTrace> stackTrace, size_t maxStackSize)
+std::unique_ptr<V8StackTrace> V8DebuggerImpl::createStackTrace(v8::Local<v8::StackTrace> stackTrace)
{
V8DebuggerAgentImpl* agent = findEnabledDebuggerAgent(m_isolate->GetCurrentContext());
- return V8StackTraceImpl::create(agent, stackTrace, maxStackSize);
+ return V8StackTraceImpl::create(agent, stackTrace, V8StackTrace::maxCallStackSizeToCapture);
}
-std::unique_ptr<V8InspectorSession> V8DebuggerImpl::connect(int contextGroupId)
+std::unique_ptr<V8InspectorSession> V8DebuggerImpl::connect(int contextGroupId, protocol::FrontendChannel* channel, V8InspectorSessionClient* client, const String16* state)
{
DCHECK(!m_sessions.contains(contextGroupId));
- std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::create(this, contextGroupId);
+ std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::create(this, contextGroupId, channel, client, state);
m_sessions.set(contextGroupId, session.get());
return std::move(session);
}
@@ -769,7 +764,7 @@ void V8DebuggerImpl::contextCreated(const V8ContextInfo& info)
m_contexts.get(info.contextGroupId)->set(contextId, std::move(contextOwner));
if (V8InspectorSessionImpl* session = m_sessions.get(info.contextGroupId))
- session->runtimeAgentImpl()->reportExecutionContextCreated(inspectedContext);
+ session->runtimeAgent()->reportExecutionContextCreated(inspectedContext);
}
void V8DebuggerImpl::contextDestroyed(v8::Local<v8::Context> context)
@@ -781,7 +776,7 @@ void V8DebuggerImpl::contextDestroyed(v8::Local<v8::Context> context)
InspectedContext* inspectedContext = m_contexts.get(contextGroupId)->get(contextId);
if (V8InspectorSessionImpl* session = m_sessions.get(contextGroupId))
- session->runtimeAgentImpl()->reportExecutionContextDestroyed(inspectedContext);
+ session->runtimeAgent()->reportExecutionContextDestroyed(inspectedContext);
m_contexts.get(contextGroupId)->remove(contextId);
if (m_contexts.get(contextGroupId)->isEmpty())
diff --git a/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.h b/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.h
index 48f335004a..b62a2a003a 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8DebuggerImpl.h
@@ -31,11 +31,12 @@
#ifndef V8DebuggerImpl_h
#define V8DebuggerImpl_h
-#include "platform/inspector_protocol/TypeBuilder.h"
+#include "platform/inspector_protocol/Maybe.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/JavaScriptCallFrame.h"
#include "platform/v8_inspector/V8DebuggerScript.h"
+#include "platform/v8_inspector/protocol/Debugger.h"
#include "platform/v8_inspector/public/V8Debugger.h"
-#include "wtf/PtrUtil.h"
#include <v8-debug.h>
#include <v8.h>
@@ -106,7 +107,7 @@ public:
v8::Local<v8::Context> regexContext();
// V8Debugger implementation
- std::unique_ptr<V8InspectorSession> connect(int contextGroupId) override;
+ std::unique_ptr<V8InspectorSession> connect(int contextGroupId, protocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state) override;
void contextCreated(const V8ContextInfo&) override;
void contextDestroyed(v8::Local<v8::Context>) override;
void resetContextGroup(int contextGroupId) override;
@@ -114,7 +115,7 @@ public:
void didExecuteScript(v8::Local<v8::Context>) override;
void idleStarted() override;
void idleFinished() override;
- std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t maxStackSize) override;
+ std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>) override;
std::unique_ptr<V8StackTrace> captureStackTrace(size_t maxStackSize) override;
using ContextByIdMap = protocol::HashMap<int, std::unique_ptr<InspectedContext>>;
diff --git a/deps/v8_inspector/platform/v8_inspector/V8FunctionCall.cpp b/deps/v8_inspector/platform/v8_inspector/V8FunctionCall.cpp
index 872758129d..83e24d79be 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8FunctionCall.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8FunctionCall.cpp
@@ -30,11 +30,11 @@
#include "platform/v8_inspector/V8FunctionCall.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/V8Compat.h"
#include "platform/v8_inspector/V8DebuggerImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
#include "platform/v8_inspector/public/V8DebuggerClient.h"
-#include "wtf/PtrUtil.h"
#include <v8.h>
diff --git a/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp
index b6f8179cc0..3281d1ba1d 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp
@@ -28,7 +28,7 @@ static const char samplingHeapProfilerInterval[] = "samplingHeapProfilerInterval
class HeapSnapshotProgress final : public v8::ActivityControl {
public:
- HeapSnapshotProgress(protocol::Frontend::HeapProfiler* frontend)
+ HeapSnapshotProgress(protocol::HeapProfiler::Frontend* frontend)
: m_frontend(frontend) { }
ControlOption ReportProgressValue(int done, int total) override
{
@@ -40,7 +40,7 @@ public:
return kContinue;
}
private:
- protocol::Frontend::HeapProfiler* m_frontend;
+ protocol::HeapProfiler::Frontend* m_frontend;
};
class GlobalObjectNameResolver final : public v8::HeapProfiler::ObjectNameResolver {
@@ -81,7 +81,7 @@ private:
class HeapSnapshotOutputStream final : public v8::OutputStream {
public:
- HeapSnapshotOutputStream(protocol::Frontend::HeapProfiler* frontend)
+ HeapSnapshotOutputStream(protocol::HeapProfiler::Frontend* frontend)
: m_frontend(frontend) { }
void EndOfStream() override { }
int GetChunkSize() override { return 102400; }
@@ -92,7 +92,7 @@ public:
return kContinue;
}
private:
- protocol::Frontend::HeapProfiler* m_frontend;
+ protocol::HeapProfiler::Frontend* m_frontend;
};
v8::Local<v8::Object> objectByHeapObjectId(v8::Isolate* isolate, int id)
@@ -117,7 +117,7 @@ private:
class HeapStatsStream final : public v8::OutputStream {
public:
- HeapStatsStream(protocol::Frontend::HeapProfiler* frontend)
+ HeapStatsStream(protocol::HeapProfiler::Frontend* frontend)
: m_frontend(frontend)
{
}
@@ -132,7 +132,7 @@ public:
WriteResult WriteHeapStatsChunk(v8::HeapStatsUpdate* updateData, int count) override
{
- DCHECK(count > 0);
+ DCHECK_GT(count, 0);
std::unique_ptr<protocol::Array<int>> statsDiff = protocol::Array<int>::create();
for (int i = 0; i < count; ++i) {
statsDiff->addItem(updateData[i].index);
@@ -144,14 +144,16 @@ public:
}
private:
- protocol::Frontend::HeapProfiler* m_frontend;
+ protocol::HeapProfiler::Frontend* m_frontend;
};
} // namespace
-V8HeapProfilerAgentImpl::V8HeapProfilerAgentImpl(V8InspectorSessionImpl* session)
+V8HeapProfilerAgentImpl::V8HeapProfilerAgentImpl(V8InspectorSessionImpl* session, protocol::FrontendChannel* frontendChannel, protocol::DictionaryValue* state)
: m_session(session)
, m_isolate(session->debugger()->isolate())
+ , m_frontend(frontendChannel)
+ , m_state(state)
, m_hasTimer(false)
{
}
@@ -160,18 +162,10 @@ V8HeapProfilerAgentImpl::~V8HeapProfilerAgentImpl()
{
}
-void V8HeapProfilerAgentImpl::clearFrontend()
-{
- ErrorString error;
- disable(&error);
- DCHECK(m_frontend);
- m_frontend = nullptr;
-}
-
void V8HeapProfilerAgentImpl::restore()
{
if (m_state->booleanProperty(HeapProfilerAgentState::heapProfilerEnabled, false))
- m_frontend->resetProfiles();
+ m_frontend.resetProfiles();
if (m_state->booleanProperty(HeapProfilerAgentState::heapObjectsTrackingEnabled, false))
startTrackingHeapObjectsInternal(m_state->booleanProperty(HeapProfilerAgentState::allocationTrackingEnabled, false));
#if V8_MAJOR_VERSION >= 5
@@ -232,7 +226,7 @@ void V8HeapProfilerAgentImpl::takeHeapSnapshot(ErrorString* errorString, const p
}
std::unique_ptr<HeapSnapshotProgress> progress;
if (reportProgress.fromMaybe(false))
- progress = wrapUnique(new HeapSnapshotProgress(m_frontend));
+ progress = wrapUnique(new HeapSnapshotProgress(&m_frontend));
GlobalObjectNameResolver resolver(m_session);
const v8::HeapSnapshot* snapshot = profiler->TakeHeapSnapshot(progress.get(), &resolver);
@@ -240,7 +234,7 @@ void V8HeapProfilerAgentImpl::takeHeapSnapshot(ErrorString* errorString, const p
*errorString = "Failed to take heap snapshot";
return;
}
- HeapSnapshotOutputStream stream(m_frontend);
+ HeapSnapshotOutputStream stream(&m_frontend);
snapshot->Serialize(&stream);
const_cast<v8::HeapSnapshot*>(snapshot)->Delete();
}
@@ -308,11 +302,9 @@ void V8HeapProfilerAgentImpl::getHeapObjectId(ErrorString* errorString, const St
void V8HeapProfilerAgentImpl::requestHeapStatsUpdate()
{
- if (!m_frontend)
- return;
- HeapStatsStream stream(m_frontend);
+ HeapStatsStream stream(&m_frontend);
v8::SnapshotObjectId lastSeenObjectId = m_isolate->GetHeapProfiler()->GetHeapStats(&stream);
- m_frontend->lastSeenObjectId(lastSeenObjectId, m_session->debugger()->client()->currentTimeMS());
+ m_frontend.lastSeenObjectId(lastSeenObjectId, m_session->debugger()->client()->currentTimeMS());
}
// static
diff --git a/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.h b/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.h
index 082e533d60..bc201afab9 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8HeapProfilerAgentImpl.h
@@ -6,7 +6,10 @@
#define V8HeapProfilerAgentImpl_h
#include "platform/inspector_protocol/Allocator.h"
-#include "platform/v8_inspector/public/V8HeapProfilerAgent.h"
+#include "platform/inspector_protocol/String16.h"
+#include "platform/v8_inspector/protocol/HeapProfiler.h"
+
+#include <v8.h>
namespace blink {
@@ -14,16 +17,12 @@ class V8InspectorSessionImpl;
using protocol::Maybe;
-class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent {
+class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend {
PROTOCOL_DISALLOW_COPY(V8HeapProfilerAgentImpl);
public:
- explicit V8HeapProfilerAgentImpl(V8InspectorSessionImpl*);
+ V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, protocol::DictionaryValue* state);
~V8HeapProfilerAgentImpl() override;
-
- void setInspectorState(protocol::DictionaryValue* state) override { m_state = state; }
- void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_frontend = frontend; }
- void clearFrontend() override;
- void restore() override;
+ void restore();
void collectGarbage(ErrorString*) override;
@@ -50,7 +49,7 @@ private:
V8InspectorSessionImpl* m_session;
v8::Isolate* m_isolate;
- protocol::Frontend::HeapProfiler* m_frontend;
+ protocol::HeapProfiler::Frontend m_frontend;
protocol::DictionaryValue* m_state;
bool m_hasTimer;
};
diff --git a/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.cpp b/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.cpp
index e25431f3cb..e7f9bed382 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.cpp
@@ -10,7 +10,6 @@
#include "platform/v8_inspector/V8DebuggerImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
#include "platform/v8_inspector/public/V8DebuggerClient.h"
-#include "platform/v8_inspector/public/V8EventListenerInfo.h"
namespace blink {
@@ -49,9 +48,7 @@ v8::Local<v8::Object> V8InjectedScriptHost::create(v8::Local<v8::Context> contex
setFunctionProperty(context, injectedScriptHost, "subtype", V8InjectedScriptHost::subtypeCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "collectionEntries", V8InjectedScriptHost::collectionEntriesCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "getInternalProperties", V8InjectedScriptHost::getInternalPropertiesCallback, debuggerExternal);
- setFunctionProperty(context, injectedScriptHost, "getEventListeners", V8InjectedScriptHost::getEventListenersCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "suppressWarningsAndCallFunction", V8InjectedScriptHost::suppressWarningsAndCallFunctionCallback, debuggerExternal);
- setFunctionProperty(context, injectedScriptHost, "setNonEnumProperty", V8InjectedScriptHost::setNonEnumPropertyCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "bind", V8InjectedScriptHost::bindCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "proxyTargetValue", V8InjectedScriptHost::proxyTargetValueCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "prototype", V8InjectedScriptHost::prototypeCallback, debuggerExternal);
@@ -69,9 +66,13 @@ void V8InjectedScriptHost::internalConstructorNameCallback(const v8::FunctionCal
void V8InjectedScriptHost::formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- if (info.Length() < 1)
+ DCHECK_EQ(info.Length(), 2);
+ info.GetReturnValue().Set(false);
+ if (!info[1]->IsFunction())
+ return;
+ // Check that function is user-defined.
+ if (info[1].As<v8::Function>()->ScriptId() != v8::UnboundScript::kNoScriptId)
return;
-
info.GetReturnValue().Set(unwrapDebugger(info)->client()->formatAccessorsAsProperties(info[0]));
}
@@ -153,48 +154,6 @@ void V8InjectedScriptHost::getInternalPropertiesCallback(const v8::FunctionCallb
info.GetReturnValue().Set(properties);
}
-static v8::Local<v8::Array> wrapListenerFunctions(v8::Isolate* isolate, const V8EventListenerInfoList& listeners, const String16& type)
-{
- v8::Local<v8::Array> result = v8::Array::New(isolate);
- size_t handlersCount = listeners.size();
- for (size_t i = 0, outputIndex = 0; i < handlersCount; ++i) {
- if (listeners[i].eventType != type)
- continue;
- v8::Local<v8::Object> function = listeners[i].handler;
- v8::Local<v8::Object> listenerEntry = v8::Object::New(isolate);
- listenerEntry->Set(toV8StringInternalized(isolate, "listener"), function);
- listenerEntry->Set(toV8StringInternalized(isolate, "useCapture"), v8::Boolean::New(isolate, listeners[i].useCapture));
- listenerEntry->Set(toV8StringInternalized(isolate, "passive"), v8::Boolean::New(isolate, listeners[i].passive));
- result->Set(v8::Number::New(isolate, outputIndex++), listenerEntry);
- }
- return result;
-}
-
-void V8InjectedScriptHost::getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- if (info.Length() < 1)
- return;
-
- V8DebuggerClient* client = unwrapDebugger(info)->client();
- V8EventListenerInfoList listenerInfo;
- // eventListeners call can produce message on ErrorEvent during lazy event listener compilation.
- client->muteWarningsAndDeprecations();
- client->eventListeners(info[0], listenerInfo);
- client->unmuteWarningsAndDeprecations();
-
- v8::Local<v8::Object> result = v8::Object::New(info.GetIsolate());
- protocol::HashSet<String16> types;
- for (auto& info : listenerInfo)
- types.add(info.eventType);
- for (const auto& it : types) {
- v8::Local<v8::Array> listeners = wrapListenerFunctions(info.GetIsolate(), listenerInfo, it.first);
- if (!listeners->Length())
- continue;
- result->Set(toV8String(info.GetIsolate(), it.first), listeners);
- }
- info.GetReturnValue().Set(result);
-}
-
void V8InjectedScriptHost::suppressWarningsAndCallFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (info.Length() < 2 || info.Length() > 3 || !info[0]->IsFunction()) {
@@ -235,17 +194,6 @@ void V8InjectedScriptHost::suppressWarningsAndCallFunctionCallback(const v8::Fun
client->unmuteWarningsAndDeprecations();
}
-void V8InjectedScriptHost::setNonEnumPropertyCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- if (info.Length() < 3 || !info[0]->IsObject() || !info[1]->IsString())
- return;
-
- v8::Local<v8::Object> object = info[0].As<v8::Object>();
- v8::Maybe<bool> success = object->DefineOwnProperty(info.GetIsolate()->GetCurrentContext(), info[1].As<v8::String>(), info[2], v8::DontEnum);
- USE(success);
- DCHECK(!success.IsNothing());
-}
-
void V8InjectedScriptHost::bindCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (info.Length() < 2 || !info[1]->IsString())
@@ -278,9 +226,4 @@ void V8InjectedScriptHost::prototypeCallback(const v8::FunctionCallbackInfo<v8::
info.GetReturnValue().Set(info[0].As<v8::Object>()->GetPrototype());
}
-v8::Local<v8::Private> V8Debugger::scopeExtensionPrivate(v8::Isolate* isolate)
-{
- return v8::Private::ForApi(isolate, toV8StringInternalized(isolate, "V8Debugger#scopeExtension"));
-}
-
} // namespace blink
diff --git a/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.h b/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.h
index a05dd29cee..d21bbdd33e 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8InjectedScriptHost.h
@@ -27,13 +27,9 @@ private:
static void formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::Value>&);
static void isTypedArrayCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void subtypeCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- static void generatorObjectDetailsCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void collectionEntriesCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void suppressWarningsAndCallFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- static void setNonEnumPropertyCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- static void setFunctionVariableValueCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void bindCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void proxyTargetValueCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void prototypeCallback(const v8::FunctionCallbackInfo<v8::Value>&);
diff --git a/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.cpp
index 6453ce649e..1c584e713e 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.cpp
@@ -4,6 +4,7 @@
#include "platform/v8_inspector/V8InspectorSessionImpl.h"
+#include "platform/inspector_protocol/Parser.h"
#include "platform/v8_inspector/InjectedScript.h"
#include "platform/v8_inspector/InspectedContext.h"
#include "platform/v8_inspector/RemoteObjectId.h"
@@ -19,53 +20,81 @@ namespace blink {
const char V8InspectorSession::backtraceObjectGroup[] = "backtrace";
-std::unique_ptr<V8InspectorSessionImpl> V8InspectorSessionImpl::create(V8DebuggerImpl* debugger, int contextGroupId)
+// static
+bool V8InspectorSession::isV8ProtocolMethod(const String16& method)
{
- return wrapUnique(new V8InspectorSessionImpl(debugger, contextGroupId));
+ return method.startWith("Debugger.") || method.startWith("HeapProfiler.") || method.startWith("Profiler.") || method.startWith("Runtime.");
}
-V8InspectorSessionImpl::V8InspectorSessionImpl(V8DebuggerImpl* debugger, int contextGroupId)
+std::unique_ptr<V8InspectorSessionImpl> V8InspectorSessionImpl::create(V8DebuggerImpl* debugger, int contextGroupId, protocol::FrontendChannel* channel, V8InspectorSessionClient* client, const String16* state)
+{
+ return wrapUnique(new V8InspectorSessionImpl(debugger, contextGroupId, channel, client, state));
+}
+
+V8InspectorSessionImpl::V8InspectorSessionImpl(V8DebuggerImpl* debugger, int contextGroupId, protocol::FrontendChannel* channel, V8InspectorSessionClient* client, const String16* savedState)
: m_contextGroupId(contextGroupId)
, m_debugger(debugger)
- , m_client(nullptr)
+ , m_client(client)
, m_customObjectFormatterEnabled(false)
, m_instrumentationCounter(0)
- , m_runtimeAgent(wrapUnique(new V8RuntimeAgentImpl(this)))
- , m_debuggerAgent(wrapUnique(new V8DebuggerAgentImpl(this)))
- , m_heapProfilerAgent(wrapUnique(new V8HeapProfilerAgentImpl(this)))
- , m_profilerAgent(wrapUnique(new V8ProfilerAgentImpl(this)))
+ , m_dispatcher(channel)
+ , m_state(nullptr)
+ , m_runtimeAgent(nullptr)
+ , m_debuggerAgent(nullptr)
+ , m_heapProfilerAgent(nullptr)
+ , m_profilerAgent(nullptr)
{
-}
+ if (savedState) {
+ std::unique_ptr<protocol::Value> state = protocol::parseJSON(*savedState);
+ if (state)
+ m_state = protocol::DictionaryValue::cast(std::move(state));
+ if (!m_state)
+ m_state = protocol::DictionaryValue::create();
+ } else {
+ m_state = protocol::DictionaryValue::create();
+ }
-V8InspectorSessionImpl::~V8InspectorSessionImpl()
-{
- discardInjectedScripts();
- m_debugger->disconnect(this);
-}
+ m_runtimeAgent = wrapUnique(new V8RuntimeAgentImpl(this, channel, agentState(protocol::Runtime::Metainfo::domainName)));
+ protocol::Runtime::Dispatcher::wire(&m_dispatcher, m_runtimeAgent.get());
-V8DebuggerAgent* V8InspectorSessionImpl::debuggerAgent()
-{
- return m_debuggerAgent.get();
-}
+ m_debuggerAgent = wrapUnique(new V8DebuggerAgentImpl(this, channel, agentState(protocol::Debugger::Metainfo::domainName)));
+ protocol::Debugger::Dispatcher::wire(&m_dispatcher, m_debuggerAgent.get());
-V8HeapProfilerAgent* V8InspectorSessionImpl::heapProfilerAgent()
-{
- return m_heapProfilerAgent.get();
-}
+ m_profilerAgent = wrapUnique(new V8ProfilerAgentImpl(this, channel, agentState(protocol::Profiler::Metainfo::domainName)));
+ protocol::Profiler::Dispatcher::wire(&m_dispatcher, m_profilerAgent.get());
-V8ProfilerAgent* V8InspectorSessionImpl::profilerAgent()
-{
- return m_profilerAgent.get();
+ m_heapProfilerAgent = wrapUnique(new V8HeapProfilerAgentImpl(this, channel, agentState(protocol::HeapProfiler::Metainfo::domainName)));
+ protocol::HeapProfiler::Dispatcher::wire(&m_dispatcher, m_heapProfilerAgent.get());
+
+ if (savedState) {
+ m_runtimeAgent->restore();
+ m_debuggerAgent->restore();
+ m_heapProfilerAgent->restore();
+ m_profilerAgent->restore();
+ }
}
-V8RuntimeAgent* V8InspectorSessionImpl::runtimeAgent()
+V8InspectorSessionImpl::~V8InspectorSessionImpl()
{
- return m_runtimeAgent.get();
+ ErrorString errorString;
+ m_profilerAgent->disable(&errorString);
+ m_heapProfilerAgent->disable(&errorString);
+ m_debuggerAgent->disable(&errorString);
+ m_runtimeAgent->disable(&errorString);
+
+ discardInjectedScripts();
+ m_debugger->disconnect(this);
}
-void V8InspectorSessionImpl::setClient(V8InspectorSessionClient* client)
+protocol::DictionaryValue* V8InspectorSessionImpl::agentState(const String16& name)
{
- m_client = client;
+ protocol::DictionaryValue* state = m_state->getObject(name);
+ if (!state) {
+ std::unique_ptr<protocol::DictionaryValue> newState = protocol::DictionaryValue::create();
+ state = newState.get();
+ m_state->setObject(name, std::move(newState));
+ }
+ return state;
}
void V8InspectorSessionImpl::reset()
@@ -203,14 +232,24 @@ void V8InspectorSessionImpl::reportAllContexts(V8RuntimeAgentImpl* agent)
void V8InspectorSessionImpl::changeInstrumentationCounter(int delta)
{
- DCHECK(m_instrumentationCounter + delta >= 0);
- if (!m_instrumentationCounter && m_client)
+ DCHECK_GE(m_instrumentationCounter + delta, 0);
+ if (!m_instrumentationCounter)
m_client->startInstrumenting();
m_instrumentationCounter += delta;
- if (!m_instrumentationCounter && m_client)
+ if (!m_instrumentationCounter)
m_client->stopInstrumenting();
}
+void V8InspectorSessionImpl::dispatchProtocolMessage(const String16& message)
+{
+ m_dispatcher.dispatch(message);
+}
+
+String16 V8InspectorSessionImpl::stateJSON()
+{
+ return m_state->toJSONString();
+}
+
void V8InspectorSessionImpl::addInspectedObject(std::unique_ptr<V8InspectorSession::Inspectable> inspectable)
{
m_inspectedObjects.prepend(std::move(inspectable));
@@ -251,6 +290,18 @@ void V8InspectorSessionImpl::setSkipAllPauses(bool skip)
m_debuggerAgent->setSkipAllPauses(&errorString, skip);
}
+void V8InspectorSessionImpl::resume()
+{
+ ErrorString errorString;
+ m_debuggerAgent->resume(&errorString);
+}
+
+void V8InspectorSessionImpl::stepOver()
+{
+ ErrorString errorString;
+ m_debuggerAgent->stepOver(&errorString);
+}
+
void V8InspectorSessionImpl::asyncTaskScheduled(const String16& taskName, void* task, bool recurring)
{
m_debuggerAgent->asyncTaskScheduled(taskName, task, recurring);
diff --git a/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.h b/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.h
index ecc1087605..bf90eb241d 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8InspectorSessionImpl.h
@@ -7,12 +7,12 @@
#include "platform/inspector_protocol/Allocator.h"
#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/DispatcherBase.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
+#include "platform/v8_inspector/protocol/Runtime.h"
#include "platform/v8_inspector/public/V8InspectorSession.h"
#include "platform/v8_inspector/public/V8InspectorSessionClient.h"
-#include "platform/v8_inspector/public/V8RuntimeAgent.h"
-#include "wtf/PtrUtil.h"
#include <v8.h>
@@ -29,14 +29,14 @@ class V8RuntimeAgentImpl;
class V8InspectorSessionImpl : public V8InspectorSession {
PROTOCOL_DISALLOW_COPY(V8InspectorSessionImpl);
public:
- static std::unique_ptr<V8InspectorSessionImpl> create(V8DebuggerImpl*, int contextGroupId);
+ static std::unique_ptr<V8InspectorSessionImpl> create(V8DebuggerImpl*, int contextGroupId, protocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state);
~V8InspectorSessionImpl();
V8DebuggerImpl* debugger() const { return m_debugger; }
V8InspectorSessionClient* client() const { return m_client; }
- V8DebuggerAgentImpl* debuggerAgentImpl() { return m_debuggerAgent.get(); }
- V8ProfilerAgentImpl* profilerAgentImpl() { return m_profilerAgent.get(); }
- V8RuntimeAgentImpl* runtimeAgentImpl() { return m_runtimeAgent.get(); }
+ V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); }
+ V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); }
+ V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); }
int contextGroupId() const { return m_contextGroupId; }
InjectedScript* findInjectedScript(ErrorString*, int contextId);
@@ -48,17 +48,16 @@ public:
void changeInstrumentationCounter(int delta);
// V8InspectorSession implementation.
- void setClient(V8InspectorSessionClient*) override;
+ void dispatchProtocolMessage(const String16& message) override;
+ String16 stateJSON() override;
void addInspectedObject(std::unique_ptr<V8InspectorSession::Inspectable>) override;
- V8DebuggerAgent* debuggerAgent() override;
- V8HeapProfilerAgent* heapProfilerAgent() override;
- V8ProfilerAgent* profilerAgent() override;
- V8RuntimeAgent* runtimeAgent() override;
void schedulePauseOnNextStatement(const String16& breakReason, std::unique_ptr<protocol::DictionaryValue> data) override;
void cancelPauseOnNextStatement() override;
void breakProgram(const String16& breakReason, std::unique_ptr<protocol::DictionaryValue> data) override;
void breakProgramOnException(const String16& breakReason, std::unique_ptr<protocol::DictionaryValue> data) override;
void setSkipAllPauses(bool) override;
+ void resume() override;
+ void stepOver() override;
void asyncTaskScheduled(const String16& taskName, void* task, bool recurring) override;
void asyncTaskCanceled(void* task) override;
void asyncTaskStarted(void* task) override;
@@ -73,7 +72,8 @@ public:
static const unsigned kInspectedObjectBufferSize = 5;
private:
- V8InspectorSessionImpl(V8DebuggerImpl*, int contextGroupId);
+ V8InspectorSessionImpl(V8DebuggerImpl*, int contextGroupId, protocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state);
+ protocol::DictionaryValue* agentState(const String16& name);
int m_contextGroupId;
V8DebuggerImpl* m_debugger;
@@ -81,6 +81,9 @@ private:
bool m_customObjectFormatterEnabled;
int m_instrumentationCounter;
+ protocol::UberDispatcher m_dispatcher;
+ std::unique_ptr<protocol::DictionaryValue> m_state;
+
std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent;
std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent;
std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent;
diff --git a/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.cpp
index dd5c2e5825..92762f73dc 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.cpp
@@ -121,11 +121,11 @@ public:
String16 m_title;
};
-V8ProfilerAgentImpl::V8ProfilerAgentImpl(V8InspectorSessionImpl* session)
+V8ProfilerAgentImpl::V8ProfilerAgentImpl(V8InspectorSessionImpl* session, protocol::FrontendChannel* frontendChannel, protocol::DictionaryValue* state)
: m_session(session)
, m_isolate(m_session->debugger()->isolate())
- , m_state(nullptr)
- , m_frontend(nullptr)
+ , m_state(state)
+ , m_frontend(frontendChannel)
, m_enabled(false)
, m_recordingCPUProfile(false)
{
@@ -139,18 +139,16 @@ void V8ProfilerAgentImpl::consoleProfile(const String16& title)
{
if (!m_enabled)
return;
- DCHECK(m_frontend);
String16 id = nextProfileId();
m_startedProfiles.append(ProfileDescriptor(id, title));
startProfiling(id);
- m_frontend->consoleProfileStarted(id, currentDebugLocation(m_session->debugger()), title);
+ m_frontend.consoleProfileStarted(id, currentDebugLocation(m_session->debugger()), title);
}
void V8ProfilerAgentImpl::consoleProfileEnd(const String16& title)
{
if (!m_enabled)
return;
- DCHECK(m_frontend);
String16 id;
String16 resolvedTitle;
// Take last started profile if no title was passed.
@@ -176,7 +174,7 @@ void V8ProfilerAgentImpl::consoleProfileEnd(const String16& title)
if (!profile)
return;
std::unique_ptr<protocol::Debugger::Location> location = currentDebugLocation(m_session->debugger());
- m_frontend->consoleProfileFinished(id, std::move(location), std::move(profile), resolvedTitle);
+ m_frontend.consoleProfileFinished(id, std::move(location), std::move(profile), resolvedTitle);
}
void V8ProfilerAgentImpl::enable(ErrorString*)
@@ -211,14 +209,6 @@ void V8ProfilerAgentImpl::setSamplingInterval(ErrorString* error, int interval)
m_isolate->GetCpuProfiler()->SetSamplingInterval(interval);
}
-void V8ProfilerAgentImpl::clearFrontend()
-{
- ErrorString error;
- disable(&error);
- DCHECK(m_frontend);
- m_frontend = nullptr;
-}
-
void V8ProfilerAgentImpl::restore()
{
DCHECK(!m_enabled);
diff --git a/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.h b/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.h
index 76bbfd4306..7fa5f49b46 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8ProfilerAgentImpl.h
@@ -6,9 +6,8 @@
#define V8ProfilerAgentImpl_h
#include "platform/inspector_protocol/Allocator.h"
-#include "platform/inspector_protocol/Frontend.h"
#include "platform/inspector_protocol/String16.h"
-#include "platform/v8_inspector/public/V8ProfilerAgent.h"
+#include "platform/v8_inspector/protocol/Profiler.h"
namespace v8 {
class Isolate;
@@ -18,18 +17,14 @@ namespace blink {
class V8InspectorSessionImpl;
-class V8ProfilerAgentImpl : public V8ProfilerAgent {
+class V8ProfilerAgentImpl : public protocol::Profiler::Backend {
PROTOCOL_DISALLOW_COPY(V8ProfilerAgentImpl);
public:
- explicit V8ProfilerAgentImpl(V8InspectorSessionImpl*);
+ V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, protocol::DictionaryValue* state);
~V8ProfilerAgentImpl() override;
bool enabled() const { return m_enabled; }
-
- void setInspectorState(protocol::DictionaryValue* state) override { m_state = state; }
- void setFrontend(protocol::Frontend::Profiler* frontend) override { m_frontend = frontend; }
- void clearFrontend() override;
- void restore() override;
+ void restore();
void enable(ErrorString*) override;
void disable(ErrorString*) override;
@@ -51,7 +46,7 @@ private:
V8InspectorSessionImpl* m_session;
v8::Isolate* m_isolate;
protocol::DictionaryValue* m_state;
- protocol::Frontend::Profiler* m_frontend;
+ protocol::Profiler::Frontend m_frontend;
bool m_enabled;
bool m_recordingCPUProfile;
class ProfileDescriptor;
diff --git a/deps/v8_inspector/platform/v8_inspector/V8Regex.cpp b/deps/v8_inspector/platform/v8_inspector/V8Regex.cpp
index d29c916aa2..304b715f79 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8Regex.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8Regex.cpp
@@ -4,7 +4,6 @@
#include "platform/v8_inspector/V8Regex.h"
-#include "platform/inspector_protocol/Collections.h"
#include "platform/v8_inspector/V8Compat.h"
#include "platform/v8_inspector/V8DebuggerImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
diff --git a/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index 6a2611f87e..dc45b11875 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -56,10 +56,10 @@ static bool hasInternalError(ErrorString* errorString, bool hasError)
return hasError;
}
-V8RuntimeAgentImpl::V8RuntimeAgentImpl(V8InspectorSessionImpl* session)
+V8RuntimeAgentImpl::V8RuntimeAgentImpl(V8InspectorSessionImpl* session, protocol::FrontendChannel* FrontendChannel, protocol::DictionaryValue* state)
: m_session(session)
- , m_state(nullptr)
- , m_frontend(nullptr)
+ , m_state(state)
+ , m_frontend(FrontendChannel)
, m_debugger(session->debugger())
, m_enabled(false)
{
@@ -343,29 +343,11 @@ void V8RuntimeAgentImpl::runScript(ErrorString* errorString,
scope.injectedScript()->wrapEvaluateResult(errorString, maybeResultValue, scope.tryCatch(), objectGroup.fromMaybe(""), false, false, result, nullptr, exceptionDetails);
}
-void V8RuntimeAgentImpl::setInspectorState(protocol::DictionaryValue* state)
-{
- m_state = state;
-}
-
-void V8RuntimeAgentImpl::setFrontend(protocol::Frontend::Runtime* frontend)
-{
- m_frontend = frontend;
-}
-
-void V8RuntimeAgentImpl::clearFrontend()
-{
- ErrorString error;
- disable(&error);
- DCHECK(m_frontend);
- m_frontend = nullptr;
-}
-
void V8RuntimeAgentImpl::restore()
{
if (!m_state->booleanProperty(V8RuntimeAgentImplState::runtimeEnabled, false))
return;
- m_frontend->executionContextsCleared();
+ m_frontend.executionContextsCleared();
ErrorString error;
enable(&error);
if (m_state->booleanProperty(V8RuntimeAgentImplState::customObjectFormatterEnabled, false))
@@ -402,7 +384,7 @@ void V8RuntimeAgentImpl::reset()
for (auto& idContext : *contexts)
idContext.second->setReported(false);
}
- m_frontend->executionContextsCleared();
+ m_frontend.executionContextsCleared();
}
}
@@ -417,21 +399,21 @@ void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context
.setName(context->humanReadableName())
.setOrigin(context->origin())
.setFrameId(context->frameId()).build();
- m_frontend->executionContextCreated(std::move(description));
+ m_frontend.executionContextCreated(std::move(description));
}
void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* context)
{
if (m_enabled && context->isReported()) {
context->setReported(false);
- m_frontend->executionContextDestroyed(context->contextId());
+ m_frontend.executionContextDestroyed(context->contextId());
}
}
void V8RuntimeAgentImpl::inspect(std::unique_ptr<protocol::Runtime::RemoteObject> objectToInspect, std::unique_ptr<protocol::DictionaryValue> hints)
{
if (m_enabled)
- m_frontend->inspectRequested(std::move(objectToInspect), std::move(hints));
+ m_frontend.inspectRequested(std::move(objectToInspect), std::move(hints));
}
} // namespace blink
diff --git a/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.h b/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.h
index 3870106acb..7eb2b13545 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8RuntimeAgentImpl.h
@@ -32,8 +32,10 @@
#define V8RuntimeAgentImpl_h
#include "platform/inspector_protocol/Allocator.h"
-#include "platform/inspector_protocol/Frontend.h"
-#include "platform/v8_inspector/public/V8RuntimeAgent.h"
+#include "platform/inspector_protocol/String16.h"
+#include "platform/v8_inspector/protocol/Runtime.h"
+
+#include <v8.h>
namespace blink {
@@ -49,17 +51,12 @@ class DictionaryValue;
using protocol::Maybe;
-class V8RuntimeAgentImpl : public V8RuntimeAgent {
+class V8RuntimeAgentImpl : public protocol::Runtime::Backend {
PROTOCOL_DISALLOW_COPY(V8RuntimeAgentImpl);
public:
- explicit V8RuntimeAgentImpl(V8InspectorSessionImpl*);
+ V8RuntimeAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, protocol::DictionaryValue* state);
~V8RuntimeAgentImpl() override;
-
- // State management methods.
- void setInspectorState(protocol::DictionaryValue*) override;
- void setFrontend(protocol::Frontend::Runtime*) override;
- void clearFrontend() override;
- void restore() override;
+ void restore();
// Part of the protocol.
void enable(ErrorString*) override;
@@ -122,7 +119,7 @@ public:
private:
V8InspectorSessionImpl* m_session;
protocol::DictionaryValue* m_state;
- protocol::Frontend::Runtime* m_frontend;
+ protocol::Runtime::Frontend m_frontend;
V8DebuggerImpl* m_debugger;
bool m_enabled;
protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>> m_compiledScripts;
diff --git a/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.cpp b/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.cpp
index 3cba145eaf..650c71eb95 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.cpp
@@ -4,11 +4,11 @@
#include "platform/v8_inspector/V8StackTraceImpl.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
#include "platform/v8_inspector/V8DebuggerAgentImpl.h"
#include "platform/v8_inspector/V8DebuggerImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
-#include "wtf/PtrUtil.h"
#include <v8-debug.h>
#include <v8-profiler.h>
@@ -72,7 +72,7 @@ V8StackTraceImpl::Frame::~Frame()
{
}
-// buildInspectorObject() and ScriptCallStack's toTracedValue() should set the same fields.
+// buildInspectorObject() and SourceLocation's toTracedValue() should set the same fields.
// If either of them is modified, the other should be also modified.
std::unique_ptr<protocol::Runtime::CallFrame> V8StackTraceImpl::Frame::buildInspectorObject() const
{
@@ -85,6 +85,11 @@ std::unique_ptr<protocol::Runtime::CallFrame> V8StackTraceImpl::Frame::buildInsp
.build();
}
+V8StackTraceImpl::Frame V8StackTraceImpl::Frame::isolatedCopy() const
+{
+ return Frame(m_functionName.isolatedCopy(), m_scriptId.isolatedCopy(), m_scriptName.isolatedCopy(), m_lineNumber, m_columnNumber);
+}
+
std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::create(V8DebuggerAgentImpl* agent, v8::Local<v8::StackTrace> stackTrace, size_t maxStackSize, const String16& description)
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
@@ -107,7 +112,7 @@ std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::create(V8DebuggerAgentImpl*
if (stackTrace.IsEmpty() && !asyncCallChain)
return nullptr;
- std::unique_ptr<V8StackTraceImpl> result(new V8StackTraceImpl(description, frames, asyncCallChain ? asyncCallChain->clone() : nullptr));
+ std::unique_ptr<V8StackTraceImpl> result(new V8StackTraceImpl(description, frames, asyncCallChain ? asyncCallChain->cloneImpl() : nullptr));
// Crop to not exceed maxAsyncCallChainDepth.
V8StackTraceImpl* deepest = result.get();
@@ -135,10 +140,28 @@ std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::capture(V8DebuggerAgentImpl*
return V8StackTraceImpl::create(agent, stackTrace, maxStackSize, description);
}
-std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::clone()
+std::unique_ptr<V8StackTrace> V8StackTraceImpl::clone()
+{
+ return cloneImpl();
+}
+
+std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::cloneImpl()
{
protocol::Vector<Frame> framesCopy(m_frames);
- return wrapUnique(new V8StackTraceImpl(m_description, framesCopy, m_parent ? m_parent->clone() : nullptr));
+ return wrapUnique(new V8StackTraceImpl(m_description, framesCopy, m_parent ? m_parent->cloneImpl() : nullptr));
+}
+
+std::unique_ptr<V8StackTrace> V8StackTraceImpl::isolatedCopy()
+{
+ return isolatedCopyImpl();
+}
+
+std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::isolatedCopyImpl()
+{
+ protocol::Vector<Frame> frames;
+ for (size_t i = 0; i < m_frames.size(); i++)
+ frames.append(m_frames.at(i).isolatedCopy());
+ return wrapUnique(new V8StackTraceImpl(m_description.isolatedCopy(), frames, m_parent ? m_parent->isolatedCopyImpl() : nullptr));
}
V8StackTraceImpl::V8StackTraceImpl(const String16& description, protocol::Vector<Frame>& frames, std::unique_ptr<V8StackTraceImpl> parent)
diff --git a/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.h b/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.h
index 9b9bd1920a..721789319b 100644
--- a/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.h
+++ b/deps/v8_inspector/platform/v8_inspector/V8StackTraceImpl.h
@@ -6,8 +6,8 @@
#define V8StackTraceImpl_h
#include "platform/inspector_protocol/Collections.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/public/V8StackTrace.h"
-#include "wtf/PtrUtil.h"
namespace blink {
@@ -31,6 +31,7 @@ public:
const String16& sourceURL() const { return m_scriptName; }
int lineNumber() const { return m_lineNumber; }
int columnNumber() const { return m_columnNumber; }
+ Frame isolatedCopy() const;
private:
friend class V8StackTraceImpl;
@@ -47,7 +48,10 @@ public:
static std::unique_ptr<V8StackTraceImpl> create(V8DebuggerAgentImpl*, v8::Local<v8::StackTrace>, size_t maxStackSize, const String16& description = String16());
static std::unique_ptr<V8StackTraceImpl> capture(V8DebuggerAgentImpl*, size_t maxStackSize, const String16& description = String16());
- std::unique_ptr<V8StackTraceImpl> clone();
+ std::unique_ptr<V8StackTrace> clone() override;
+ std::unique_ptr<V8StackTraceImpl> cloneImpl();
+ std::unique_ptr<V8StackTrace> isolatedCopy() override;
+ std::unique_ptr<V8StackTraceImpl> isolatedCopyImpl();
std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObjectForTail(V8DebuggerAgentImpl*) const;
~V8StackTraceImpl() override;
diff --git a/deps/v8_inspector/platform/v8_inspector/injected_script_externs.js b/deps/v8_inspector/platform/v8_inspector/injected_script_externs.js
index a543e5471f..218010938c 100644
--- a/deps/v8_inspector/platform/v8_inspector/injected_script_externs.js
+++ b/deps/v8_inspector/platform/v8_inspector/injected_script_externs.js
@@ -8,12 +8,6 @@ function InjectedScriptHostClass()
}
/**
- * @param {*} objectId
- * @param {!Object} hints
- */
-InjectedScriptHostClass.prototype.inspect = function(objectId, hints) {}
-
-/**
* @param {*} obj
* @return {string}
*/
@@ -21,9 +15,10 @@ InjectedScriptHostClass.prototype.internalConstructorName = function(obj) {}
/**
* @param {*} obj
+ * @param {function()|undefined} func
* @return {boolean}
*/
-InjectedScriptHostClass.prototype.formatAccessorsAsProperties = function(obj) {}
+InjectedScriptHostClass.prototype.formatAccessorsAsProperties = function(obj, func) {}
/**
* @param {*} obj
@@ -50,12 +45,6 @@ InjectedScriptHostClass.prototype.collectionEntries = function(obj) {}
InjectedScriptHostClass.prototype.getInternalProperties = function(obj) {}
/**
- * @param {!EventTarget} target
- * @return {!Object|undefined}
- */
-InjectedScriptHostClass.prototype.getEventListeners = function(target) {}
-
-/**
* @param {!Function} fn
* @param {*} receiver
* @param {!Array.<*>=} argv
@@ -64,13 +53,6 @@ InjectedScriptHostClass.prototype.getEventListeners = function(target) {}
InjectedScriptHostClass.prototype.suppressWarningsAndCallFunction = function(fn, receiver, argv) {}
/**
- * @param {!Object} obj
- * @param {string} key
- * @param {*} value
- */
-InjectedScriptHostClass.prototype.setNonEnumProperty = function(obj, key, value) {}
-
-/**
* @param {*} value
* @param {string} groupName
* @return {number}
diff --git a/deps/v8_inspector/platform/v8_inspector/js_protocol-1.1.json b/deps/v8_inspector/platform/v8_inspector/js_protocol-1.1.json
new file mode 100644
index 0000000000..8961f3bbd2
--- /dev/null
+++ b/deps/v8_inspector/platform/v8_inspector/js_protocol-1.1.json
@@ -0,0 +1,1866 @@
+{
+ "domains": [
+ {
+ "domain": "Runtime",
+ "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "string",
+ "description": "Unique object identifier."
+ },
+ {
+ "id": "RemoteObject",
+ "type": "object",
+ "description": "Mirror object referencing original JavaScript object.",
+ "properties": [
+ {
+ "name": "type",
+ "type": "string",
+ "enum": [
+ "object",
+ "function",
+ "undefined",
+ "string",
+ "number",
+ "boolean"
+ ],
+ "description": "Object type."
+ },
+ {
+ "name": "subtype",
+ "type": "string",
+ "optional": true,
+ "enum": [
+ "array",
+ "null",
+ "node",
+ "regexp",
+ "date"
+ ],
+ "description": "Object subtype hint. Specified for <code>object</code> type values only."
+ },
+ {
+ "name": "className",
+ "type": "string",
+ "optional": true,
+ "description": "Object class (constructor) name. Specified for <code>object</code> type values only."
+ },
+ {
+ "name": "value",
+ "type": "any",
+ "optional": true,
+ "description": "Remote object value (in case of primitive values or JSON values if it was requested)."
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "optional": true,
+ "description": "String representation of the object."
+ },
+ {
+ "name": "objectId",
+ "$ref": "RemoteObjectId",
+ "optional": true,
+ "description": "Unique object identifier (for non-primitive values)."
+ },
+ {
+ "name": "preview",
+ "$ref": "ObjectPreview",
+ "optional": true,
+ "description": "Preview containing abbreviated property values.",
+ "hidden": true
+ }
+ ]
+ },
+ {
+ "id": "ObjectPreview",
+ "type": "object",
+ "hidden": true,
+ "description": "Object containing abbreviated remote object value.",
+ "properties": [
+ {
+ "name": "lossless",
+ "type": "boolean",
+ "description": "Determines whether preview is lossless (contains all information of the original object)."
+ },
+ {
+ "name": "overflow",
+ "type": "boolean",
+ "description": "True iff some of the properties of the original did not fit."
+ },
+ {
+ "name": "properties",
+ "type": "array",
+ "items": {
+ "$ref": "PropertyPreview"
+ },
+ "description": "List of the properties."
+ }
+ ]
+ },
+ {
+ "id": "PropertyPreview",
+ "type": "object",
+ "hidden": true,
+ "properties": [
+ {
+ "name": "name",
+ "type": "string",
+ "description": "Property name."
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "enum": [
+ "object",
+ "function",
+ "undefined",
+ "string",
+ "number",
+ "boolean"
+ ],
+ "description": "Object type."
+ },
+ {
+ "name": "value",
+ "type": "string",
+ "optional": true,
+ "description": "User-friendly property value string."
+ },
+ {
+ "name": "valuePreview",
+ "$ref": "ObjectPreview",
+ "optional": true,
+ "description": "Nested value preview."
+ },
+ {
+ "name": "subtype",
+ "type": "string",
+ "optional": true,
+ "enum": [
+ "array",
+ "null",
+ "node",
+ "regexp",
+ "date"
+ ],
+ "description": "Object subtype hint. Specified for <code>object</code> type values only."
+ }
+ ]
+ },
+ {
+ "id": "PropertyDescriptor",
+ "type": "object",
+ "description": "Object property descriptor.",
+ "properties": [
+ {
+ "name": "name",
+ "type": "string",
+ "description": "Property name."
+ },
+ {
+ "name": "value",
+ "$ref": "RemoteObject",
+ "optional": true,
+ "description": "The value associated with the property."
+ },
+ {
+ "name": "writable",
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the value associated with the property may be changed (data descriptors only)."
+ },
+ {
+ "name": "get",
+ "$ref": "RemoteObject",
+ "optional": true,
+ "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)."
+ },
+ {
+ "name": "set",
+ "$ref": "RemoteObject",
+ "optional": true,
+ "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)."
+ },
+ {
+ "name": "configurable",
+ "type": "boolean",
+ "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object."
+ },
+ {
+ "name": "enumerable",
+ "type": "boolean",
+ "description": "True if this property shows up during enumeration of the properties on the corresponding object."
+ },
+ {
+ "name": "wasThrown",
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the result was thrown during the evaluation."
+ },
+ {
+ "name": "isOwn",
+ "optional": true,
+ "type": "boolean",
+ "description": "True if the property is owned for the object.",
+ "hidden": true
+ }
+ ]
+ },
+ {
+ "id": "InternalPropertyDescriptor",
+ "type": "object",
+ "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
+ "properties": [
+ {
+ "name": "name",
+ "type": "string",
+ "description": "Conventional property name."
+ },
+ {
+ "name": "value",
+ "$ref": "RemoteObject",
+ "optional": true,
+ "description": "The value associated with the property."
+ }
+ ],
+ "hidden": true
+ },
+ {
+ "id": "CallArgument",
+ "type": "object",
+ "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.",
+ "properties": [
+ {
+ "name": "value",
+ "type": "any",
+ "optional": true,
+ "description": "Primitive value."
+ },
+ {
+ "name": "objectId",
+ "$ref": "RemoteObjectId",
+ "optional": true,
+ "description": "Remote object handle."
+ }
+ ]
+ },
+ {
+ "id": "ExecutionContextId",
+ "type": "integer",
+ "description": "Id of an execution context."
+ },
+ {
+ "id": "ExecutionContextDescription",
+ "type": "object",
+ "description": "Description of an isolated world.",
+ "properties": [
+ {
+ "name": "id",
+ "$ref": "ExecutionContextId",
+ "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed."
+ },
+ {
+ "name": "isPageContext",
+ "type": "boolean",
+ "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.",
+ "hidden": true
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "description": "Human readable name describing given context.",
+ "hidden": true
+ },
+ {
+ "name": "frameId",
+ "type": "string",
+ "description": "Id of the owning frame."
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "evaluate",
+ "parameters": [
+ {
+ "name": "expression",
+ "type": "string",
+ "description": "Expression to evaluate."
+ },
+ {
+ "name": "objectGroup",
+ "type": "string",
+ "optional": true,
+ "description": "Symbolic group name that can be used to release multiple objects."
+ },
+ {
+ "name": "includeCommandLineAPI",
+ "type": "boolean",
+ "optional": true,
+ "description": "Determines whether Command Line API should be available during the evaluation.",
+ "hidden": true
+ },
+ {
+ "name": "doNotPauseOnExceptionsAndMuteConsole",
+ "type": "boolean",
+ "optional": true,
+ "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.",
+ "hidden": true
+ },
+ {
+ "name": "contextId",
+ "$ref": "Runtime.ExecutionContextId",
+ "optional": true,
+ "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page."
+ },
+ {
+ "name": "returnByValue",
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the result is expected to be a JSON object that should be sent by value."
+ },
+ {
+ "name": "generatePreview",
+ "type": "boolean",
+ "optional": true,
+ "hidden": true,
+ "description": "Whether preview should be generated for the result."
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "$ref": "RemoteObject",
+ "description": "Evaluation result."
+ },
+ {
+ "name": "wasThrown",
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the result was thrown during the evaluation."
+ }
+ ],
+ "description": "Evaluates expression on global object."
+ },
+ {
+ "name": "callFunctionOn",
+ "parameters": [
+ {
+ "name": "objectId",
+ "$ref": "RemoteObjectId",
+ "description": "Identifier of the object to call function on."
+ },
+ {
+ "name": "functionDeclaration",
+ "type": "string",
+ "description": "Declaration of the function to call."
+ },
+ {
+ "name": "arguments",
+ "type": "array",
+ "items": {
+ "$ref": "CallArgument",
+ "description": "Call argument."
+ },
+ "optional": true,
+ "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object."
+ },
+ {
+ "name": "doNotPauseOnExceptionsAndMuteConsole",
+ "type": "boolean",
+ "optional": true,
+ "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.",
+ "hidden": true
+ },
+ {
+ "name": "returnByValue",
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the result is expected to be a JSON object which should be sent by value."
+ },
+ {
+ "name": "generatePreview",
+ "type": "boolean",
+ "optional": true,
+ "hidden": true,
+ "description": "Whether preview should be generated for the result."
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "$ref": "RemoteObject",
+ "description": "Call result."
+ },
+ {
+ "name": "wasThrown",
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the result was thrown during the evaluation."
+ }
+ ],
+ "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
+ },
+ {
+ "name": "getProperties",
+ "parameters": [
+ {
+ "name": "objectId",
+ "$ref": "RemoteObjectId",
+ "description": "Identifier of the object to return properties for."
+ },
+ {
+ "name": "ownProperties",
+ "optional": true,
+ "type": "boolean",
+ "description": "If true, returns properties belonging only to the element itself, not to its prototype chain."
+ },
+ {
+ "name": "accessorPropertiesOnly",
+ "optional": true,
+ "type": "boolean",
+ "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.",
+ "hidden": true
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "type": "array",
+ "items": {
+ "$ref": "PropertyDescriptor"
+ },
+ "description": "Object properties."
+ },
+ {
+ "name": "internalProperties",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "InternalPropertyDescriptor"
+ },
+ "description": "Internal object properties (only of the element itself).",
+ "hidden": true
+ }
+ ],
+ "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
+ },
+ {
+ "name": "releaseObject",
+ "parameters": [
+ {
+ "name": "objectId",
+ "$ref": "RemoteObjectId",
+ "description": "Identifier of the object to release."
+ }
+ ],
+ "description": "Releases remote object with given id."
+ },
+ {
+ "name": "releaseObjectGroup",
+ "parameters": [
+ {
+ "name": "objectGroup",
+ "type": "string",
+ "description": "Symbolic object group name."
+ }
+ ],
+ "description": "Releases all remote objects that belong to a given group."
+ },
+ {
+ "name": "run",
+ "hidden": true,
+ "description": "Tells inspected instance(worker or page) that it can run in case it was started paused."
+ },
+ {
+ "name": "enable",
+ "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context."
+ },
+ {
+ "name": "disable",
+ "hidden": true,
+ "description": "Disables reporting of execution contexts creation."
+ }
+ ],
+ "events": [
+ {
+ "name": "executionContextCreated",
+ "parameters": [
+ {
+ "name": "context",
+ "$ref": "ExecutionContextDescription",
+ "description": "A newly created execution contex."
+ }
+ ],
+ "description": "Issued when new execution context is created."
+ }
+ ]
+ },
+ {
+ "domain": "Debugger",
+ "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
+ "types": [
+ {
+ "id": "SearchMatch",
+ "type": "object",
+ "description": "Search match for resource.",
+ "properties": [
+ {
+ "name": "lineNumber",
+ "type": "number",
+ "description": "Line number in resource content."
+ },
+ {
+ "name": "lineContent",
+ "type": "string",
+ "description": "Line with match content."
+ }
+ ],
+ "hidden": true
+ },
+ {
+ "id": "BreakpointId",
+ "type": "string",
+ "description": "Breakpoint identifier."
+ },
+ {
+ "id": "ScriptId",
+ "type": "string",
+ "description": "Unique script identifier."
+ },
+ {
+ "id": "CallFrameId",
+ "type": "string",
+ "description": "Call frame identifier."
+ },
+ {
+ "id": "Location",
+ "type": "object",
+ "properties": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>."
+ },
+ {
+ "name": "lineNumber",
+ "type": "integer",
+ "description": "Line number in the script (0-based)."
+ },
+ {
+ "name": "columnNumber",
+ "type": "integer",
+ "optional": true,
+ "description": "Column number in the script (0-based)."
+ }
+ ],
+ "description": "Location in the source code."
+ },
+ {
+ "id": "FunctionDetails",
+ "hidden": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "location",
+ "$ref": "Location",
+ "description": "Location of the function."
+ },
+ {
+ "name": "name",
+ "type": "string",
+ "optional": true,
+ "description": "Name of the function. Not present for anonymous functions."
+ },
+ {
+ "name": "displayName",
+ "type": "string",
+ "optional": true,
+ "description": "Display name of the function(specified in 'displayName' property on the function object)."
+ },
+ {
+ "name": "inferredName",
+ "type": "string",
+ "optional": true,
+ "description": "Name of the function inferred from its initial assignment."
+ },
+ {
+ "name": "scopeChain",
+ "type": "array",
+ "optional": true,
+ "items": {
+ "$ref": "Scope"
+ },
+ "description": "Scope chain for this closure."
+ }
+ ],
+ "description": "Information about the function."
+ },
+ {
+ "id": "CallFrame",
+ "type": "object",
+ "properties": [
+ {
+ "name": "callFrameId",
+ "$ref": "CallFrameId",
+ "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused."
+ },
+ {
+ "name": "functionName",
+ "type": "string",
+ "description": "Name of the JavaScript function called on this call frame."
+ },
+ {
+ "name": "location",
+ "$ref": "Location",
+ "description": "Location in the source code."
+ },
+ {
+ "name": "scopeChain",
+ "type": "array",
+ "items": {
+ "$ref": "Scope"
+ },
+ "description": "Scope chain for this call frame."
+ },
+ {
+ "name": "this",
+ "$ref": "Runtime.RemoteObject",
+ "description": "<code>this</code> object for this call frame."
+ }
+ ],
+ "description": "JavaScript call frame. Array of call frames form the call stack."
+ },
+ {
+ "id": "Scope",
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "type": "string",
+ "enum": [
+ "global",
+ "local",
+ "with",
+ "closure",
+ "catch"
+ ],
+ "description": "Scope type."
+ },
+ {
+ "name": "object",
+ "$ref": "Runtime.RemoteObject",
+ "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties."
+ }
+ ],
+ "description": "Scope description."
+ },
+ {
+ "id": "SetScriptSourceError",
+ "type": "object",
+ "properties": [
+ {
+ "name": "compileError",
+ "optional": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "message",
+ "type": "string",
+ "description": "Compiler error message"
+ },
+ {
+ "name": "lineNumber",
+ "type": "integer",
+ "description": "Compile error line number (1-based)"
+ },
+ {
+ "name": "columnNumber",
+ "type": "integer",
+ "description": "Compile error column number (1-based)"
+ }
+ ]
+ }
+ ],
+ "description": "Error data for setScriptSource command. compileError is a case type for uncompilable script source error.",
+ "hidden": true
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
+ },
+ {
+ "name": "disable",
+ "description": "Disables debugger for given page."
+ },
+ {
+ "name": "setBreakpointsActive",
+ "parameters": [
+ {
+ "name": "active",
+ "type": "boolean",
+ "description": "New value for breakpoints active state."
+ }
+ ],
+ "description": "Activates / deactivates all breakpoints on the page."
+ },
+ {
+ "name": "setSkipAllPauses",
+ "hidden": true,
+ "parameters": [
+ {
+ "name": "skipped",
+ "type": "boolean",
+ "description": "New value for skip pauses state."
+ },
+ {
+ "name": "untilReload",
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether page reload should set skipped to false."
+ }
+ ],
+ "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
+ },
+ {
+ "name": "setBreakpointByUrl",
+ "parameters": [
+ {
+ "name": "lineNumber",
+ "type": "integer",
+ "description": "Line number to set breakpoint at."
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "optional": true,
+ "description": "URL of the resources to set breakpoint on."
+ },
+ {
+ "name": "urlRegex",
+ "type": "string",
+ "optional": true,
+ "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified."
+ },
+ {
+ "name": "columnNumber",
+ "type": "integer",
+ "optional": true,
+ "description": "Offset in the line to set breakpoint at."
+ },
+ {
+ "name": "condition",
+ "type": "string",
+ "optional": true,
+ "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true."
+ },
+ {
+ "name": "isAntibreakpoint",
+ "type": "boolean",
+ "optional": true,
+ "hidden": true,
+ "description": "Creates pseudo-breakpoint that prevents debugger from pausing on exception at this location."
+ }
+ ],
+ "returns": [
+ {
+ "name": "breakpointId",
+ "$ref": "BreakpointId",
+ "description": "Id of the created breakpoint for further reference."
+ },
+ {
+ "name": "locations",
+ "type": "array",
+ "items": {
+ "$ref": "Location"
+ },
+ "description": "List of the locations this breakpoint resolved into upon addition."
+ }
+ ],
+ "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
+ },
+ {
+ "name": "setBreakpoint",
+ "parameters": [
+ {
+ "name": "location",
+ "$ref": "Location",
+ "description": "Location to set breakpoint in."
+ },
+ {
+ "name": "condition",
+ "type": "string",
+ "optional": true,
+ "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true."
+ }
+ ],
+ "returns": [
+ {
+ "name": "breakpointId",
+ "$ref": "BreakpointId",
+ "description": "Id of the created breakpoint for further reference."
+ },
+ {
+ "name": "actualLocation",
+ "$ref": "Location",
+ "description": "Location this breakpoint resolved into."
+ }
+ ],
+ "description": "Sets JavaScript breakpoint at a given location."
+ },
+ {
+ "name": "removeBreakpoint",
+ "parameters": [
+ {
+ "name": "breakpointId",
+ "$ref": "BreakpointId"
+ }
+ ],
+ "description": "Removes JavaScript breakpoint."
+ },
+ {
+ "name": "continueToLocation",
+ "parameters": [
+ {
+ "name": "location",
+ "$ref": "Location",
+ "description": "Location to continue to."
+ },
+ {
+ "name": "interstatementLocation",
+ "type": "boolean",
+ "optional": true,
+ "hidden": true,
+ "description": "Allows breakpoints at the intemediate positions inside statements."
+ }
+ ],
+ "description": "Continues execution until specific location is reached."
+ },
+ {
+ "name": "stepOver",
+ "description": "Steps over the statement."
+ },
+ {
+ "name": "stepInto",
+ "description": "Steps into the function call."
+ },
+ {
+ "name": "stepOut",
+ "description": "Steps out of the function call."
+ },
+ {
+ "name": "pause",
+ "description": "Stops on the next JavaScript statement."
+ },
+ {
+ "name": "resume",
+ "description": "Resumes JavaScript execution."
+ },
+ {
+ "name": "searchInContent",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Id of the script to search in."
+ },
+ {
+ "name": "query",
+ "type": "string",
+ "description": "String to search for."
+ },
+ {
+ "name": "caseSensitive",
+ "type": "boolean",
+ "optional": true,
+ "description": "If true, search is case sensitive."
+ },
+ {
+ "name": "isRegex",
+ "type": "boolean",
+ "optional": true,
+ "description": "If true, treats string parameter as regex."
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "type": "array",
+ "items": {
+ "$ref": "SearchMatch"
+ },
+ "description": "List of search matches."
+ }
+ ],
+ "description": "Searches for given string in script content."
+ },
+ {
+ "name": "canSetScriptSource",
+ "returns": [
+ {
+ "name": "result",
+ "type": "boolean",
+ "description": "True if <code>setScriptSource</code> is supported."
+ }
+ ],
+ "description": "Always returns true."
+ },
+ {
+ "name": "setScriptSource",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Id of the script to edit."
+ },
+ {
+ "name": "scriptSource",
+ "type": "string",
+ "description": "New content of the script."
+ },
+ {
+ "name": "preview",
+ "type": "boolean",
+ "optional": true,
+ "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.",
+ "hidden": true
+ }
+ ],
+ "returns": [
+ {
+ "name": "callFrames",
+ "type": "array",
+ "optional": true,
+ "items": {
+ "$ref": "CallFrame"
+ },
+ "description": "New stack trace in case editing has happened while VM was stopped."
+ },
+ {
+ "name": "result",
+ "type": "object",
+ "optional": true,
+ "description": "VM-specific description of the changes applied.",
+ "hidden": true
+ }
+ ],
+ "error": {
+ "$ref": "SetScriptSourceError"
+ },
+ "description": "Edits JavaScript source live."
+ },
+ {
+ "name": "restartFrame",
+ "parameters": [
+ {
+ "name": "callFrameId",
+ "$ref": "CallFrameId",
+ "description": "Call frame identifier to evaluate on."
+ }
+ ],
+ "returns": [
+ {
+ "name": "callFrames",
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ },
+ "description": "New stack trace."
+ },
+ {
+ "name": "result",
+ "type": "object",
+ "description": "VM-specific description.",
+ "hidden": true
+ }
+ ],
+ "hidden": true,
+ "description": "Restarts particular call frame from the beginning."
+ },
+ {
+ "name": "getScriptSource",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Id of the script to get source for."
+ }
+ ],
+ "returns": [
+ {
+ "name": "scriptSource",
+ "type": "string",
+ "description": "Script source."
+ }
+ ],
+ "description": "Returns source for the script with given id."
+ },
+ {
+ "name": "getFunctionDetails",
+ "hidden": true,
+ "parameters": [
+ {
+ "name": "functionId",
+ "$ref": "Runtime.RemoteObjectId",
+ "description": "Id of the function to get location for."
+ }
+ ],
+ "returns": [
+ {
+ "name": "details",
+ "$ref": "FunctionDetails",
+ "description": "Information about the function."
+ }
+ ],
+ "description": "Returns detailed informtation on given function."
+ },
+ {
+ "name": "setPauseOnExceptions",
+ "parameters": [
+ {
+ "name": "state",
+ "type": "string",
+ "enum": [
+ "none",
+ "uncaught",
+ "all"
+ ],
+ "description": "Pause on exceptions mode."
+ }
+ ],
+ "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>."
+ },
+ {
+ "name": "evaluateOnCallFrame",
+ "parameters": [
+ {
+ "name": "callFrameId",
+ "$ref": "CallFrameId",
+ "description": "Call frame identifier to evaluate on."
+ },
+ {
+ "name": "expression",
+ "type": "string",
+ "description": "Expression to evaluate."
+ },
+ {
+ "name": "objectGroup",
+ "type": "string",
+ "optional": true,
+ "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)."
+ },
+ {
+ "name": "includeCommandLineAPI",
+ "type": "boolean",
+ "optional": true,
+ "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.",
+ "hidden": true
+ },
+ {
+ "name": "doNotPauseOnExceptionsAndMuteConsole",
+ "type": "boolean",
+ "optional": true,
+ "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.",
+ "hidden": true
+ },
+ {
+ "name": "returnByValue",
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the result is expected to be a JSON object that should be sent by value."
+ },
+ {
+ "name": "generatePreview",
+ "type": "boolean",
+ "optional": true,
+ "hidden": true,
+ "description": "Whether preview should be generated for the result."
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "$ref": "Runtime.RemoteObject",
+ "description": "Object wrapper for the evaluation result."
+ },
+ {
+ "name": "wasThrown",
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the result was thrown during the evaluation."
+ }
+ ],
+ "description": "Evaluates expression on a given call frame."
+ },
+ {
+ "name": "compileScript",
+ "hidden": true,
+ "parameters": [
+ {
+ "name": "expression",
+ "type": "string",
+ "description": "Expression to compile."
+ },
+ {
+ "name": "sourceURL",
+ "type": "string",
+ "description": "Source url to be set for the script."
+ }
+ ],
+ "returns": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "optional": true,
+ "description": "Id of the script."
+ },
+ {
+ "name": "syntaxErrorMessage",
+ "type": "string",
+ "optional": true,
+ "description": "Syntax error message if compilation failed."
+ }
+ ],
+ "description": "Compiles expression."
+ },
+ {
+ "name": "runScript",
+ "hidden": true,
+ "parameters": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Id of the script to run."
+ },
+ {
+ "name": "contextId",
+ "$ref": "Runtime.ExecutionContextId",
+ "optional": true,
+ "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page."
+ },
+ {
+ "name": "objectGroup",
+ "type": "string",
+ "optional": true,
+ "description": "Symbolic group name that can be used to release multiple objects."
+ },
+ {
+ "name": "doNotPauseOnExceptionsAndMuteConsole",
+ "type": "boolean",
+ "optional": true,
+ "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state."
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "$ref": "Runtime.RemoteObject",
+ "description": "Run result."
+ },
+ {
+ "name": "wasThrown",
+ "type": "boolean",
+ "optional": true,
+ "description": "True if the result was thrown during the script run."
+ }
+ ],
+ "description": "Runs script with given id in a given context."
+ },
+ {
+ "name": "setOverlayMessage",
+ "parameters": [
+ {
+ "name": "message",
+ "type": "string",
+ "optional": true,
+ "description": "Overlay message to display when paused in debugger."
+ }
+ ],
+ "hidden": true,
+ "description": "Sets overlay message."
+ },
+ {
+ "name": "setVariableValue",
+ "parameters": [
+ {
+ "name": "scopeNumber",
+ "type": "integer",
+ "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually."
+ },
+ {
+ "name": "variableName",
+ "type": "string",
+ "description": "Variable name."
+ },
+ {
+ "name": "newValue",
+ "$ref": "Runtime.CallArgument",
+ "description": "New variable value."
+ },
+ {
+ "name": "callFrameId",
+ "$ref": "CallFrameId",
+ "optional": true,
+ "description": "Id of callframe that holds variable."
+ },
+ {
+ "name": "functionObjectId",
+ "$ref": "Runtime.RemoteObjectId",
+ "optional": true,
+ "description": "Object id of closure (function) that holds variable."
+ }
+ ],
+ "hidden": true,
+ "description": "Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually."
+ },
+ {
+ "name": "getStepInPositions",
+ "parameters": [
+ {
+ "name": "callFrameId",
+ "$ref": "CallFrameId",
+ "description": "Id of a call frame where the current statement should be analized"
+ }
+ ],
+ "returns": [
+ {
+ "name": "stepInPositions",
+ "type": "array",
+ "items": {
+ "$ref": "Location"
+ },
+ "optional": true,
+ "description": "experimental"
+ }
+ ],
+ "hidden": true,
+ "description": "Lists all positions where step-in is possible for a current statement in a specified call frame"
+ },
+ {
+ "name": "getBacktrace",
+ "returns": [
+ {
+ "name": "callFrames",
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ },
+ "description": "Call stack the virtual machine stopped on."
+ }
+ ],
+ "hidden": true,
+ "description": "Returns call stack including variables changed since VM was paused. VM must be paused."
+ },
+ {
+ "name": "skipStackFrames",
+ "parameters": [
+ {
+ "name": "script",
+ "optional": true,
+ "type": "string",
+ "description": "Regular expression defining the scripts to ignore while stepping."
+ }
+ ],
+ "hidden": true,
+ "description": "Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."
+ }
+ ],
+ "events": [
+ {
+ "name": "globalObjectCleared",
+ "description": "Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload."
+ },
+ {
+ "name": "scriptParsed",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Identifier of the script parsed."
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "description": "URL or name of the script parsed (if any)."
+ },
+ {
+ "name": "startLine",
+ "type": "integer",
+ "description": "Line offset of the script within the resource with given URL (for script tags)."
+ },
+ {
+ "name": "startColumn",
+ "type": "integer",
+ "description": "Column offset of the script within the resource with given URL."
+ },
+ {
+ "name": "endLine",
+ "type": "integer",
+ "description": "Last line of the script."
+ },
+ {
+ "name": "endColumn",
+ "type": "integer",
+ "description": "Length of the last line of the script."
+ },
+ {
+ "name": "isContentScript",
+ "type": "boolean",
+ "optional": true,
+ "description": "Determines whether this script is a user extension script."
+ },
+ {
+ "name": "sourceMapURL",
+ "type": "string",
+ "optional": true,
+ "description": "URL of source map associated with script (if any)."
+ },
+ {
+ "name": "hasSourceURL",
+ "type": "boolean",
+ "optional": true,
+ "description": "True, if this script has sourceURL.",
+ "hidden": true
+ }
+ ],
+ "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
+ },
+ {
+ "name": "scriptFailedToParse",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "$ref": "ScriptId",
+ "description": "Identifier of the script parsed."
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "description": "URL or name of the script parsed (if any)."
+ },
+ {
+ "name": "startLine",
+ "type": "integer",
+ "description": "Line offset of the script within the resource with given URL (for script tags)."
+ },
+ {
+ "name": "startColumn",
+ "type": "integer",
+ "description": "Column offset of the script within the resource with given URL."
+ },
+ {
+ "name": "endLine",
+ "type": "integer",
+ "description": "Last line of the script."
+ },
+ {
+ "name": "endColumn",
+ "type": "integer",
+ "description": "Length of the last line of the script."
+ },
+ {
+ "name": "isContentScript",
+ "type": "boolean",
+ "optional": true,
+ "description": "Determines whether this script is a user extension script."
+ },
+ {
+ "name": "sourceMapURL",
+ "type": "string",
+ "optional": true,
+ "description": "URL of source map associated with script (if any)."
+ },
+ {
+ "name": "hasSourceURL",
+ "type": "boolean",
+ "optional": true,
+ "description": "True, if this script has sourceURL.",
+ "hidden": true
+ }
+ ],
+ "description": "Fired when virtual machine fails to parse the script."
+ },
+ {
+ "name": "breakpointResolved",
+ "parameters": [
+ {
+ "name": "breakpointId",
+ "$ref": "BreakpointId",
+ "description": "Breakpoint unique identifier."
+ },
+ {
+ "name": "location",
+ "$ref": "Location",
+ "description": "Actual breakpoint location."
+ }
+ ],
+ "description": "Fired when breakpoint is resolved to an actual script and location."
+ },
+ {
+ "name": "paused",
+ "parameters": [
+ {
+ "name": "callFrames",
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ },
+ "description": "Call stack the virtual machine stopped on."
+ },
+ {
+ "name": "reason",
+ "type": "string",
+ "enum": [
+ "XHR",
+ "DOM",
+ "EventListener",
+ "exception",
+ "assert",
+ "CSPViolation",
+ "debugCommand",
+ "other"
+ ],
+ "description": "Pause reason."
+ },
+ {
+ "name": "data",
+ "type": "object",
+ "optional": true,
+ "description": "Object containing break-specific auxiliary properties."
+ },
+ {
+ "name": "hitBreakpoints",
+ "type": "array",
+ "optional": true,
+ "items": {
+ "type": "string"
+ },
+ "description": "Hit breakpoints IDs",
+ "hidden": true
+ }
+ ],
+ "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
+ },
+ {
+ "name": "resumed",
+ "description": "Fired when the virtual machine resumed execution."
+ }
+ ]
+ },
+ {
+ "domain": "Profiler",
+ "hidden": true,
+ "types": [
+ {
+ "id": "ProfileHeader",
+ "type": "object",
+ "description": "Profile header.",
+ "properties": [
+ {
+ "name": "title",
+ "type": "string",
+ "description": "Profile title."
+ },
+ {
+ "name": "uid",
+ "type": "integer",
+ "description": "Unique identifier of the profile."
+ }
+ ]
+ },
+ {
+ "id": "CPUProfileNode",
+ "type": "object",
+ "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
+ "properties": [
+ {
+ "name": "functionName",
+ "type": "string",
+ "description": "Function name."
+ },
+ {
+ "name": "scriptId",
+ "$ref": "Debugger.ScriptId",
+ "description": "Script identifier."
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "description": "URL."
+ },
+ {
+ "name": "lineNumber",
+ "type": "integer",
+ "description": "Line number."
+ },
+ {
+ "name": "hitCount",
+ "type": "integer",
+ "description": "Number of samples where this node was on top of the call stack."
+ },
+ {
+ "name": "callUID",
+ "type": "number",
+ "description": "Call UID."
+ },
+ {
+ "name": "children",
+ "type": "array",
+ "items": {
+ "$ref": "CPUProfileNode"
+ },
+ "description": "Child nodes."
+ },
+ {
+ "name": "deoptReason",
+ "type": "string",
+ "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."
+ },
+ {
+ "name": "id",
+ "optional": true,
+ "type": "integer",
+ "description": "Unique id of the node."
+ }
+ ]
+ },
+ {
+ "id": "CPUProfile",
+ "type": "object",
+ "description": "Profile.",
+ "properties": [
+ {
+ "name": "head",
+ "$ref": "CPUProfileNode"
+ },
+ {
+ "name": "startTime",
+ "type": "number",
+ "description": "Profiling start time in seconds."
+ },
+ {
+ "name": "endTime",
+ "type": "number",
+ "description": "Profiling end time in seconds."
+ },
+ {
+ "name": "samples",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "Ids of samples top nodes."
+ }
+ ]
+ },
+ {
+ "id": "HeapSnapshotObjectId",
+ "type": "string",
+ "description": "Heap snashot object id."
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable"
+ },
+ {
+ "name": "disable"
+ },
+ {
+ "name": "start"
+ },
+ {
+ "name": "stop",
+ "returns": [
+ {
+ "name": "header",
+ "$ref": "ProfileHeader",
+ "description": "The header of the recorded profile."
+ }
+ ]
+ },
+ {
+ "name": "getProfileHeaders",
+ "returns": [
+ {
+ "name": "headers",
+ "type": "array",
+ "items": {
+ "$ref": "ProfileHeader"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCPUProfile",
+ "parameters": [
+ {
+ "name": "uid",
+ "type": "integer"
+ }
+ ],
+ "returns": [
+ {
+ "name": "profile",
+ "$ref": "CPUProfile"
+ }
+ ]
+ },
+ {
+ "name": "removeProfile",
+ "parameters": [
+ {
+ "name": "type",
+ "type": "string"
+ },
+ {
+ "name": "uid",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "clearProfiles"
+ }
+ ],
+ "events": [
+ {
+ "name": "addProfileHeader",
+ "parameters": [
+ {
+ "name": "header",
+ "$ref": "ProfileHeader"
+ }
+ ]
+ },
+ {
+ "name": "setRecordingProfile",
+ "parameters": [
+ {
+ "name": "isProfiling",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "resetProfiles"
+ }
+ ]
+ },
+ {
+ "domain": "HeapProfiler",
+ "hidden": true,
+ "types": [
+ {
+ "id": "ProfileHeader",
+ "type": "object",
+ "description": "Profile header.",
+ "properties": [
+ {
+ "name": "title",
+ "type": "string",
+ "description": "Profile title."
+ },
+ {
+ "name": "uid",
+ "type": "integer",
+ "description": "Unique identifier of the profile."
+ },
+ {
+ "name": "maxJSObjectId",
+ "type": "integer",
+ "optional": true,
+ "description": "Last seen JS object Id."
+ }
+ ]
+ },
+ {
+ "id": "HeapSnapshotObjectId",
+ "type": "string",
+ "description": "Heap snashot object id."
+ }
+ ],
+ "commands": [
+ {
+ "name": "getProfileHeaders",
+ "returns": [
+ {
+ "name": "headers",
+ "type": "array",
+ "items": {
+ "$ref": "ProfileHeader"
+ }
+ }
+ ]
+ },
+ {
+ "name": "startTrackingHeapObjects"
+ },
+ {
+ "name": "stopTrackingHeapObjects"
+ },
+ {
+ "name": "getHeapSnapshot",
+ "parameters": [
+ {
+ "name": "uid",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "removeProfile",
+ "parameters": [
+ {
+ "name": "uid",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "clearProfiles"
+ },
+ {
+ "name": "takeHeapSnapshot",
+ "parameters": [
+ {
+ "name": "reportProgress",
+ "type": "boolean",
+ "optional": true,
+ "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken."
+ }
+ ]
+ },
+ {
+ "name": "collectGarbage"
+ },
+ {
+ "name": "getObjectByHeapObjectId",
+ "parameters": [
+ {
+ "name": "objectId",
+ "$ref": "HeapSnapshotObjectId"
+ },
+ {
+ "name": "objectGroup",
+ "type": "string",
+ "optional": true,
+ "description": "Symbolic group name that can be used to release multiple objects."
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "$ref": "Runtime.RemoteObject",
+ "description": "Evaluation result."
+ }
+ ]
+ },
+ {
+ "name": "getHeapObjectId",
+ "parameters": [
+ {
+ "name": "objectId",
+ "$ref": "Runtime.RemoteObjectId",
+ "description": "Identifier of the object to get heap object id for."
+ }
+ ],
+ "returns": [
+ {
+ "name": "heapSnapshotObjectId",
+ "$ref": "HeapSnapshotObjectId",
+ "description": "Id of the heap snapshot object corresponding to the passed remote object id."
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "addProfileHeader",
+ "parameters": [
+ {
+ "name": "header",
+ "$ref": "ProfileHeader"
+ }
+ ]
+ },
+ {
+ "name": "addHeapSnapshotChunk",
+ "parameters": [
+ {
+ "name": "uid",
+ "type": "integer"
+ },
+ {
+ "name": "chunk",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "finishHeapSnapshot",
+ "parameters": [
+ {
+ "name": "uid",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "resetProfiles"
+ },
+ {
+ "name": "reportHeapSnapshotProgress",
+ "parameters": [
+ {
+ "name": "done",
+ "type": "integer"
+ },
+ {
+ "name": "total",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "lastSeenObjectId",
+ "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
+ "parameters": [
+ {
+ "name": "lastSeenObjectId",
+ "type": "integer"
+ },
+ {
+ "name": "timestamp",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "name": "heapStatsUpdate",
+ "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
+ "parameters": [
+ {
+ "name": "statsUpdate",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "version": {
+ "major": "1",
+ "minor": "1"
+ }
+} \ No newline at end of file
diff --git a/deps/v8_inspector/platform/v8_inspector/js_protocol.json b/deps/v8_inspector/platform/v8_inspector/js_protocol.json
new file mode 100644
index 0000000000..9ae7e60cb0
--- /dev/null
+++ b/deps/v8_inspector/platform/v8_inspector/js_protocol.json
@@ -0,0 +1,976 @@
+{
+ "version": { "major": "1", "minor": "1" },
+ "domains": [{
+ "domain": "Runtime",
+ "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
+ "types": [
+ {
+ "id": "ScriptId",
+ "type": "string",
+ "description": "Unique script identifier."
+ },
+ {
+ "id": "RemoteObjectId",
+ "type": "string",
+ "description": "Unique object identifier."
+ },
+ {
+ "id": "RemoteObject",
+ "type": "object",
+ "description": "Mirror object referencing original JavaScript object.",
+ "properties": [
+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
+ { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
+ { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." },
+ { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
+ { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "hidden": true },
+ { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "hidden": true}
+ ]
+ },
+ {
+ "id": "CustomPreview",
+ "type": "object",
+ "hidden": true,
+ "properties": [
+ { "name": "header", "type": "string"},
+ { "name": "hasBody", "type": "boolean"},
+ { "name": "formatterObjectId", "$ref": "RemoteObjectId"},
+ { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" },
+ { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true }
+ ]
+ },
+ {
+ "id": "ObjectPreview",
+ "type": "object",
+ "hidden": true,
+ "description": "Object containing abbreviated remote object value.",
+ "properties": [
+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
+ { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
+ { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." },
+ { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." },
+ { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." }
+ ]
+ },
+ {
+ "id": "PropertyPreview",
+ "type": "object",
+ "hidden": true,
+ "properties": [
+ { "name": "name", "type": "string", "description": "Property name." },
+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." },
+ { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
+ { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
+ ]
+ },
+ {
+ "id": "EntryPreview",
+ "type": "object",
+ "hidden": true,
+ "properties": [
+ { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." },
+ { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." }
+ ]
+ },
+ {
+ "id": "PropertyDescriptor",
+ "type": "object",
+ "description": "Object property descriptor.",
+ "properties": [
+ { "name": "name", "type": "string", "description": "Property name or symbol description." },
+ { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
+ { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
+ { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
+ { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
+ { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
+ { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
+ { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true },
+ { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type.", "hidden": true }
+ ]
+ },
+ {
+ "id": "InternalPropertyDescriptor",
+ "type": "object",
+ "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
+ "properties": [
+ { "name": "name", "type": "string", "description": "Conventional property name." },
+ { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }
+ ],
+ "hidden": true
+ },
+ {
+ "id": "CallArgument",
+ "type": "object",
+ "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.",
+ "properties": [
+ { "name": "value", "type": "any", "optional": true, "description": "Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." },
+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." },
+ { "name": "type", "optional": true, "hidden": true, "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }
+ ]
+ },
+ {
+ "id": "ExecutionContextId",
+ "type": "integer",
+ "description": "Id of an execution context."
+ },
+ {
+ "id": "ExecutionContextDescription",
+ "type": "object",
+ "description": "Description of an isolated world.",
+ "properties": [
+ { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
+ { "name": "isDefault", "type": "boolean", "description": "Whether context is the default page context (as opposite to e.g. context of content script).", "hidden": true },
+ { "name": "origin", "type": "string", "description": "Execution context origin.", "hidden": true},
+ { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true},
+ { "name": "frameId", "type": "string", "description": "Id of the owning frame. May be an empty string if the context is not associated with a frame." }
+ ]
+ },
+ {
+ "id": "ExceptionDetails",
+ "type": "object",
+ "description": "Detailed information on exception (or error) that was thrown during script compilation or execution.",
+ "properties": [
+ { "name": "text", "type": "string", "description": "Exception text." },
+ { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
+ { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." },
+ { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
+ { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." },
+ { "name": "stack", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." }
+ ]
+ },
+ {
+ "id": "CallFrame",
+ "type": "object",
+ "description": "Stack entry for runtime errors and assertions.",
+ "properties": [
+ { "name": "functionName", "type": "string", "description": "JavaScript function name." },
+ { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." },
+ { "name": "url", "type": "string", "description": "JavaScript script name or url." },
+ { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." },
+ { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." }
+ ]
+ },
+ {
+ "id": "StackTrace",
+ "type": "object",
+ "description": "Call frames for assertions or error messages.",
+ "properties": [
+ { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." },
+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
+ { "name": "parent", "$ref": "StackTrace", "optional": true, "hidden": true, "hidden": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "evaluate",
+ "parameters": [
+ { "name": "expression", "type": "string", "description": "Expression to evaluate." },
+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true },
+ { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
+ { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
+ { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." },
+ { "name": "userGesture", "type": "boolean", "optional": true, "hidden": true, "description": "Whether execution should be treated as initiated by user in the UI." }
+ ],
+ "returns": [
+ { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."}
+ ],
+ "description": "Evaluates expression on global object."
+ },
+ {
+ "name": "callFunctionOn",
+ "parameters": [
+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
+ { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
+ { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." },
+ { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
+ { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." },
+ { "name": "userGesture", "type": "boolean", "optional": true, "hidden": true, "description": "Whether execution should be treated as initiated by user in the UI." }
+ ],
+ "returns": [
+ { "name": "result", "$ref": "RemoteObject", "description": "Call result." },
+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
+ ],
+ "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
+ },
+ {
+ "name": "getProperties",
+ "parameters": [
+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
+ { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." },
+ { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true },
+ { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the results." }
+ ],
+ "returns": [
+ { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." },
+ { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself).", "hidden": true },
+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."}
+ ],
+ "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
+ },
+ {
+ "name": "releaseObject",
+ "parameters": [
+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
+ ],
+ "description": "Releases remote object with given id."
+ },
+ {
+ "name": "releaseObjectGroup",
+ "parameters": [
+ { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
+ ],
+ "description": "Releases all remote objects that belong to a given group."
+ },
+ {
+ "name": "run",
+ "hidden": true,
+ "description": "Tells inspected instance(worker or page) that it can run in case it was started paused."
+ },
+ {
+ "name": "enable",
+ "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context."
+ },
+ {
+ "name": "disable",
+ "hidden": true,
+ "description": "Disables reporting of execution contexts creation."
+ },
+ {
+ "name": "setCustomObjectFormatterEnabled",
+ "parameters": [
+ {
+ "name": "enabled",
+ "type": "boolean"
+ }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "compileScript",
+ "hidden": true,
+ "parameters": [
+ { "name": "expression", "type": "string", "description": "Expression to compile." },
+ { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." },
+ { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." },
+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter is used to specify one of those contexts." }
+ ],
+ "returns": [
+ { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
+ ],
+ "description": "Compiles expression."
+ },
+ {
+ "name": "runScript",
+ "hidden": true,
+ "parameters": [
+ { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter is used to specify one of those contexts." },
+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
+ { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." },
+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." }
+ ],
+ "returns": [
+ { "name": "result", "$ref": "RemoteObject", "description": "Run result." },
+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
+ ],
+ "description": "Runs script with given id in a given context."
+ }
+ ],
+ "events": [
+ {
+ "name": "executionContextCreated",
+ "parameters": [
+ { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." }
+ ],
+ "description": "Issued when new execution context is created."
+ },
+ {
+ "name": "executionContextDestroyed",
+ "parameters": [
+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" }
+ ],
+ "description": "Issued when execution context is destroyed."
+ },
+ {
+ "name": "executionContextsCleared",
+ "description": "Issued when all executionContexts were cleared in browser"
+ },
+ {
+ "name": "inspectRequested",
+ "parameters": [
+ { "name": "object", "$ref": "RemoteObject" },
+ { "name": "hints", "type": "object" }
+ ],
+ "hidden": true
+ }
+ ]
+ },
+ {
+ "domain": "Debugger",
+ "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
+ "dependencies": ["Runtime"],
+ "types": [
+ {
+ "id": "BreakpointId",
+ "type": "string",
+ "description": "Breakpoint identifier."
+ },
+ {
+ "id": "CallFrameId",
+ "type": "string",
+ "description": "Call frame identifier."
+ },
+ {
+ "id": "Location",
+ "type": "object",
+ "properties": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
+ { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }
+ ],
+ "description": "Location in the source code."
+ },
+ {
+ "id": "ScriptPosition",
+ "hidden": true,
+ "type": "object",
+ "properties": [
+ { "name": "line", "type": "integer" },
+ { "name": "column", "type": "integer" }
+ ],
+ "description": "Location in the source code."
+ },
+ {
+ "id": "FunctionDetails",
+ "hidden": true,
+ "type": "object",
+ "properties": [
+ { "name": "location", "$ref": "Location", "optional": true, "description": "Location of the function, none for native functions." },
+ { "name": "functionName", "type": "string", "description": "Name of the function." },
+ { "name": "isGenerator", "type": "boolean", "description": "Whether this is a generator function." },
+ { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." }
+ ],
+ "description": "Information about the function."
+ },
+ {
+ "id": "GeneratorObjectDetails",
+ "hidden": true,
+ "type": "object",
+ "properties": [
+ { "name": "function", "$ref": "Runtime.RemoteObject", "description": "Generator function." },
+ { "name": "functionName", "type": "string", "description": "Name of the generator function." },
+ { "name": "status", "type": "string", "enum": ["running", "suspended", "closed"], "description": "Current generator object status." },
+ { "name": "location", "$ref": "Location", "optional": true, "description": "If suspended, location where generator function was suspended (e.g. location of the last 'yield'). Otherwise, location of the generator function." }
+ ],
+ "description": "Information about the generator object."
+ },
+ {
+ "id": "CollectionEntry",
+ "hidden": true,
+ "type": "object",
+ "properties": [
+ { "name": "key", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Entry key of a map-like collection, otherwise not provided." },
+ { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Entry value." }
+ ],
+ "description": "Collection entry."
+ },
+ {
+ "id": "CallFrame",
+ "type": "object",
+ "properties": [
+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." },
+ { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." },
+ { "name": "functionLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code." },
+ { "name": "location", "$ref": "Location", "description": "Location in the source code." },
+ { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." },
+ { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." },
+ { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "The value being returned, if the function is at return point." }
+ ],
+ "description": "JavaScript call frame. Array of call frames form the call stack."
+ },
+ {
+ "id": "Scope",
+ "type": "object",
+ "properties": [
+ { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script"], "description": "Scope type." },
+ { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." },
+ { "name": "name", "type": "string", "optional": true, "hidden": true },
+ { "name": "startLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code where scope starts" },
+ { "name": "endLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code where scope ends" }
+ ],
+ "description": "Scope description."
+ },
+ {
+ "id": "SetScriptSourceError",
+ "type": "object",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Compiler error message" },
+ { "name": "lineNumber", "type": "integer", "description": "Compile error line number (1-based)" },
+ { "name": "columnNumber", "type": "integer", "description": "Compile error column number (1-based)" }
+ ],
+ "description": "Error data for setScriptSource command. Contains uncompilable script source error.",
+ "hidden": true
+ },
+ {
+ "id": "SearchMatch",
+ "type": "object",
+ "description": "Search match for resource.",
+ "properties": [
+ { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
+ { "name": "lineContent", "type": "string", "description": "Line with match content." }
+ ],
+ "hidden": true
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
+ },
+ {
+ "name": "disable",
+ "description": "Disables debugger for given page."
+ },
+ {
+ "name": "setBreakpointsActive",
+ "parameters": [
+ { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
+ ],
+ "description": "Activates / deactivates all breakpoints on the page."
+ },
+ {
+ "name": "setSkipAllPauses",
+ "hidden": true,
+ "parameters": [
+ { "name": "skipped", "type": "boolean", "description": "New value for skip pauses state." }
+ ],
+ "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
+ },
+ {
+ "name": "setBreakpointByUrl",
+ "parameters": [
+ { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
+ { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
+ { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
+ { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
+ ],
+ "returns": [
+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
+ { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." }
+ ],
+ "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
+ },
+ {
+ "name": "setBreakpoint",
+ "parameters": [
+ { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
+ { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
+ ],
+ "returns": [
+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
+ { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
+ ],
+ "description": "Sets JavaScript breakpoint at a given location."
+ },
+ {
+ "name": "removeBreakpoint",
+ "parameters": [
+ { "name": "breakpointId", "$ref": "BreakpointId" }
+ ],
+ "description": "Removes JavaScript breakpoint."
+ },
+ {
+ "name": "continueToLocation",
+ "parameters": [
+ { "name": "location", "$ref": "Location", "description": "Location to continue to." },
+ { "name": "interstatementLocation", "type": "boolean", "optional": true, "hidden": true, "description": "Allows breakpoints at the intemediate positions inside statements." }
+ ],
+ "description": "Continues execution until specific location is reached."
+ },
+ {
+ "name": "stepOver",
+ "description": "Steps over the statement."
+ },
+ {
+ "name": "stepInto",
+ "description": "Steps into the function call."
+ },
+ {
+ "name": "stepOut",
+ "description": "Steps out of the function call."
+ },
+ {
+ "name": "pause",
+ "description": "Stops on the next JavaScript statement."
+ },
+ {
+ "name": "resume",
+ "description": "Resumes JavaScript execution."
+ },
+ {
+ "name": "searchInContent",
+ "parameters": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." },
+ { "name": "query", "type": "string", "description": "String to search for." },
+ { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
+ { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
+ ],
+ "returns": [
+ { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." }
+ ],
+ "description": "Searches for given string in script content."
+ },
+ {
+ "name": "canSetScriptSource",
+ "returns": [
+ { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }
+ ],
+ "description": "Always returns true."
+ },
+ {
+ "name": "setScriptSource",
+ "parameters": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." },
+ { "name": "scriptSource", "type": "string", "description": "New content of the script." },
+ { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true }
+ ],
+ "returns": [
+ { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." },
+ { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes.", "hidden": true },
+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true },
+ { "name": "compileError", "optional": true, "$ref": "SetScriptSourceError", "description": "Error data if any." }
+ ],
+ "description": "Edits JavaScript source live."
+ },
+ {
+ "name": "restartFrame",
+ "parameters": [
+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
+ ],
+ "returns": [
+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." },
+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
+ ],
+ "hidden": true,
+ "description": "Restarts particular call frame from the beginning."
+ },
+ {
+ "name": "getScriptSource",
+ "parameters": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." }
+ ],
+ "returns": [
+ { "name": "scriptSource", "type": "string", "description": "Script source." }
+ ],
+ "description": "Returns source for the script with given id."
+ },
+ {
+ "name": "getFunctionDetails",
+ "hidden": true,
+ "parameters": [
+ { "name": "functionId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the function to get details for." }
+ ],
+ "returns": [
+ { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." }
+ ],
+ "description": "Returns detailed information on given function."
+ },
+ {
+ "name": "getGeneratorObjectDetails",
+ "hidden": true,
+ "parameters": [
+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the generator object to get details for." }
+ ],
+ "returns": [
+ { "name": "details", "$ref": "GeneratorObjectDetails", "description": "Information about the generator object." }
+ ],
+ "description": "Returns detailed information on given generator object."
+ },
+ {
+ "name": "getCollectionEntries",
+ "hidden": true,
+ "parameters": [
+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the collection to get entries for." }
+ ],
+ "returns": [
+ { "name": "entries", "type": "array", "items": { "$ref": "CollectionEntry" }, "description": "Array of collection entries." }
+ ],
+ "description": "Returns entries of given collection."
+ },
+ {
+ "name": "setPauseOnExceptions",
+ "parameters": [
+ { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
+ ],
+ "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>."
+ },
+ {
+ "name": "evaluateOnCallFrame",
+ "parameters": [
+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." },
+ { "name": "expression", "type": "string", "description": "Expression to evaluate." },
+ { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true },
+ { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
+ { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }
+ ],
+ "returns": [
+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." },
+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
+ { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."}
+ ],
+ "description": "Evaluates expression on a given call frame."
+ },
+ {
+ "name": "setVariableValue",
+ "parameters": [
+ { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
+ { "name": "variableName", "type": "string", "description": "Variable name." },
+ { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." }
+ ],
+ "hidden": true,
+ "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually."
+ },
+ {
+ "name": "getBacktrace",
+ "returns": [
+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
+ ],
+ "hidden": true,
+ "description": "Returns call stack including variables changed since VM was paused. VM must be paused."
+ },
+ {
+ "name": "setAsyncCallStackDepth",
+ "parameters": [
+ { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." }
+ ],
+ "hidden": true,
+ "description": "Enables or disables async call stacks tracking."
+ },
+ {
+ "name": "setBlackboxPatterns",
+ "parameters": [
+ { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." }
+ ],
+ "hidden": true,
+ "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."
+ },
+ {
+ "name": "setBlackboxedRanges",
+ "parameters": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." },
+ { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } }
+ ],
+ "hidden": true,
+ "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted."
+ }
+ ],
+ "events": [
+ {
+ "name": "scriptParsed",
+ "parameters": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
+ { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
+ { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
+ { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
+ { "name": "endLine", "type": "integer", "description": "Last line of the script." },
+ { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context.", "hidden": true },
+ { "name": "hash", "type": "string", "hidden": true, "description": "Content hash of the script."},
+ { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
+ { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true },
+ { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "hidden": true },
+ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
+ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true },
+ { "name": "deprecatedCommentWasUsed", "type": "boolean", "optional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@ sourceMappingURL' was used."}
+ ],
+ "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
+ },
+ {
+ "name": "scriptFailedToParse",
+ "parameters": [
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
+ { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
+ { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
+ { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
+ { "name": "endLine", "type": "integer", "description": "Last line of the script." },
+ { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context.", "hidden": true },
+ { "name": "hash", "type": "string", "hidden": true, "description": "Content hash of the script."},
+ { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
+ { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true },
+ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
+ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true },
+ { "name": "deprecatedCommentWasUsed", "type": "boolean", "optional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@ sourceMappingURL' was used."}
+ ],
+ "description": "Fired when virtual machine fails to parse the script."
+ },
+ {
+ "name": "breakpointResolved",
+ "parameters": [
+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." },
+ { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
+ ],
+ "description": "Fired when breakpoint is resolved to an actual script and location."
+ },
+ {
+ "name": "paused",
+ "parameters": [
+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
+ { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "debugCommand", "promiseRejection", "other" ], "description": "Pause reason." },
+ { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
+ { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden": true },
+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true }
+ ],
+ "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
+ },
+ {
+ "name": "resumed",
+ "description": "Fired when the virtual machine resumed execution."
+ }
+ ]
+ },
+ {
+ "domain": "Profiler",
+ "dependencies": ["Runtime", "Debugger"],
+ "hidden": true,
+ "types": [
+ {
+ "id": "CPUProfileNode",
+ "type": "object",
+ "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
+ "properties": [
+ { "name": "functionName", "type": "string", "description": "Function name." },
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier." },
+ { "name": "url", "type": "string", "description": "URL." },
+ { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." },
+ { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." },
+ { "name": "hitCount", "type": "integer", "description": "Number of samples where this node was on top of the call stack." },
+ { "name": "callUID", "type": "number", "description": "Call UID." },
+ { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." },
+ { "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
+ { "name": "id", "type": "integer", "description": "Unique id of the node." },
+ { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "description": "An array of source position ticks." }
+ ]
+ },
+ {
+ "id": "CPUProfile",
+ "type": "object",
+ "description": "Profile.",
+ "properties": [
+ { "name": "head", "$ref": "CPUProfileNode" },
+ { "name": "startTime", "type": "number", "description": "Profiling start time in seconds." },
+ { "name": "endTime", "type": "number", "description": "Profiling end time in seconds." },
+ { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." },
+ { "name": "timestamps", "optional": true, "type": "array", "items": { "type": "number" }, "description": "Timestamps of the samples in microseconds." }
+ ]
+ },
+ {
+ "id": "PositionTickInfo",
+ "type": "object",
+ "description": "Specifies a number of samples attributed to a certain source position.",
+ "properties": [
+ { "name": "line", "type": "integer", "description": "Source line number (1-based)." },
+ { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable"
+ },
+ {
+ "name": "disable"
+ },
+ {
+ "name": "setSamplingInterval",
+ "parameters": [
+ { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." }
+ ],
+ "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started."
+ },
+ {
+ "name": "start"
+ },
+ {
+ "name": "stop",
+ "returns": [
+ { "name": "profile", "$ref": "CPUProfile", "description": "Recorded profile." }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "consoleProfileStarted",
+ "parameters": [
+ { "name": "id", "type": "string" },
+ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." },
+ { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argument to console.profile()." }
+
+ ],
+ "description": "Sent when new profile recodring is started using console.profile() call."
+ },
+ {
+ "name": "consoleProfileFinished",
+ "parameters": [
+ { "name": "id", "type": "string" },
+ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." },
+ { "name": "profile", "$ref": "CPUProfile" },
+ { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argunet to console.profile()." }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "HeapProfiler",
+ "dependencies": ["Runtime"],
+ "hidden": true,
+ "types": [
+ {
+ "id": "HeapSnapshotObjectId",
+ "type": "string",
+ "description": "Heap snapshot object id."
+ },
+ {
+ "id": "SamplingHeapProfileNode",
+ "type": "object",
+ "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.",
+ "properties": [
+ { "name": "functionName", "type": "string", "description": "Function name." },
+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier." },
+ { "name": "url", "type": "string", "description": "URL." },
+ { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." },
+ { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." },
+ { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." },
+ { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." }
+ ]
+ },
+ {
+ "id": "SamplingHeapProfile",
+ "type": "object",
+ "description": "Profile.",
+ "properties": [
+ { "name": "head", "$ref": "SamplingHeapProfileNode" }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable"
+ },
+ {
+ "name": "disable"
+ },
+ {
+ "name": "startTrackingHeapObjects",
+ "parameters": [
+ { "name": "trackAllocations", "type": "boolean", "optional": true }
+ ]
+ },
+ {
+ "name": "stopTrackingHeapObjects",
+ "parameters": [
+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." }
+ ]
+
+ },
+ {
+ "name": "takeHeapSnapshot",
+ "parameters": [
+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
+ ]
+ },
+ {
+ "name": "collectGarbage"
+ },
+ {
+ "name": "getObjectByHeapObjectId",
+ "parameters": [
+ { "name": "objectId", "$ref": "HeapSnapshotObjectId" },
+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
+ ],
+ "returns": [
+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
+ ]
+ },
+ {
+ "name": "addInspectedHeapObject",
+ "parameters": [
+ { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." }
+ ],
+ "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
+ },
+ {
+ "name": "getHeapObjectId",
+ "parameters": [
+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
+ ],
+ "returns": [
+ { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
+ ]
+ },
+ {
+ "name": "startSampling",
+ "parameters": [
+ { "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes." }
+ ]
+ },
+ {
+ "name": "stopSampling",
+ "returns": [
+ { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "addHeapSnapshotChunk",
+ "parameters": [
+ { "name": "chunk", "type": "string" }
+ ]
+ },
+ {
+ "name": "resetProfiles"
+ },
+ {
+ "name": "reportHeapSnapshotProgress",
+ "parameters": [
+ { "name": "done", "type": "integer" },
+ { "name": "total", "type": "integer" },
+ { "name": "finished", "type": "boolean", "optional": true }
+ ]
+ },
+ {
+ "name": "lastSeenObjectId",
+ "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
+ "parameters": [
+ { "name": "lastSeenObjectId", "type": "integer" },
+ { "name": "timestamp", "type": "number" }
+ ]
+ },
+ {
+ "name": "heapStatsUpdate",
+ "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
+ "parameters": [
+ { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."}
+ ]
+ }
+ ]
+ }]
+}
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8ContentSearchUtil.h b/deps/v8_inspector/platform/v8_inspector/public/V8ContentSearchUtil.h
index 565fc9673d..35cf12331f 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8ContentSearchUtil.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8ContentSearchUtil.h
@@ -5,9 +5,8 @@
#ifndef V8ContentSearchUtil_h
#define V8ContentSearchUtil_h
-#include "platform/PlatformExport.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/inspector_protocol/String16.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
namespace blink {
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8Debugger.h b/deps/v8_inspector/platform/v8_inspector/public/V8Debugger.h
index c4fa6cfd78..b605d8a15e 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8Debugger.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8Debugger.h
@@ -5,9 +5,8 @@
#ifndef V8Debugger_h
#define V8Debugger_h
-#include "platform/PlatformExport.h"
-#include "platform/inspector_protocol/Frontend.h"
-#include "wtf/PtrUtil.h"
+#include "platform/inspector_protocol/Platform.h"
+#include "platform/inspector_protocol/String16.h"
#include <v8.h>
@@ -16,23 +15,16 @@ namespace blink {
class V8ContextInfo;
class V8DebuggerClient;
class V8InspectorSession;
+class V8InspectorSessionClient;
class V8StackTrace;
namespace protocol {
class DictionaryValue;
+class FrontendChannel;
}
class PLATFORM_EXPORT V8Debugger {
public:
- template <typename T>
- class Agent {
- public:
- virtual void setInspectorState(protocol::DictionaryValue*) = 0;
- virtual void setFrontend(T*) = 0;
- virtual void clearFrontend() = 0;
- virtual void restore() = 0;
- };
-
static std::unique_ptr<V8Debugger> create(v8::Isolate*, V8DebuggerClient*);
virtual ~V8Debugger() { }
@@ -48,14 +40,10 @@ public:
virtual void idleStarted() = 0;
virtual void idleFinished() = 0;
- virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId) = 0;
+ virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, protocol::FrontendChannel*, V8InspectorSessionClient*, const String16* state) = 0;
virtual bool isPaused() = 0;
- static v8::Local<v8::Private> scopeExtensionPrivate(v8::Isolate*);
- static bool isCommandLineAPIMethod(const String16& name);
- static bool isCommandLineAPIGetter(const String16& name);
-
- virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t maxStackSize) = 0;
+ virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>) = 0;
virtual std::unique_ptr<V8StackTrace> captureStackTrace(size_t maxStackSize) = 0;
};
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerAgent.h b/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerAgent.h
deleted file mode 100644
index 6a18e62fca..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerAgent.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8DebuggerAgent_h
-#define V8DebuggerAgent_h
-
-#include "platform/PlatformExport.h"
-#include "platform/inspector_protocol/Dispatcher.h"
-#include "platform/v8_inspector/public/V8Debugger.h"
-
-namespace blink {
-
-class V8RuntimeAgent;
-
-class PLATFORM_EXPORT V8DebuggerAgent : public protocol::Backend::Debugger, public V8Debugger::Agent<protocol::Frontend::Debugger> {
-public:
- virtual ~V8DebuggerAgent() { }
-};
-
-} // namespace blink
-
-
-#endif // V8DebuggerAgent_h
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerClient.h b/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerClient.h
index 29b041ce29..e927d4cc66 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerClient.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8DebuggerClient.h
@@ -5,11 +5,10 @@
#ifndef V8DebuggerClient_h
#define V8DebuggerClient_h
-#include "platform/PlatformExport.h"
+#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/public/ConsoleAPITypes.h"
#include "platform/v8_inspector/public/ConsoleTypes.h"
#include "platform/v8_inspector/public/V8ContextInfo.h"
-#include "platform/v8_inspector/public/V8EventListenerInfo.h"
#include <v8.h>
@@ -26,7 +25,6 @@ public:
virtual void unmuteConsole() = 0;
virtual void beginUserGesture() = 0;
virtual void endUserGesture() = 0;
- virtual void eventListeners(v8::Local<v8::Value>, V8EventListenerInfoList&) = 0;
virtual bool callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Local<v8::Context> target) = 0;
virtual String16 valueSubtype(v8::Local<v8::Value>) = 0;
virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) = 0;
@@ -35,13 +33,14 @@ public:
virtual int ensureDefaultContextInGroup(int contextGroupId) = 0;
virtual bool isInspectableHeapObject(v8::Local<v8::Object>) = 0;
- virtual void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLevel, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments, unsigned skipArgumentCount, int maxStackSize) = 0;
+ virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::Object>) = 0;
+ virtual void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLevel, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments, unsigned skipArgumentCount) = 0;
virtual void consoleTime(const String16& title) = 0;
virtual void consoleTimeEnd(const String16& title) = 0;
virtual void consoleTimeStamp(const String16& title) = 0;
- virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Object> creationContext) = 0;
+ virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Context>) = 0;
typedef void (*TimerCallback)(void*);
virtual void startRepeatingTimer(double, TimerCallback, void* data) = 0;
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8EventListenerInfo.h b/deps/v8_inspector/platform/v8_inspector/public/V8EventListenerInfo.h
deleted file mode 100644
index 03370be8da..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/public/V8EventListenerInfo.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8EventListenerInfo_h
-#define V8EventListenerInfo_h
-
-#include "platform/inspector_protocol/Collections.h"
-#include "platform/inspector_protocol/String16.h"
-
-#include <v8.h>
-
-namespace blink {
-
-class V8EventListenerInfo {
-public:
- V8EventListenerInfo(const String16& eventType, bool useCapture, bool passive, v8::Local<v8::Object> handler)
- : eventType(eventType)
- , useCapture(useCapture)
- , passive(passive)
- , handler(handler)
- {
- }
-
- const String16 eventType;
- bool useCapture;
- bool passive;
- v8::Local<v8::Object> handler;
-
-};
-
-using V8EventListenerInfoList = protocol::Vector<V8EventListenerInfo>;
-
-} // namespace blink
-
-#endif // V8EventListenerInfo_h
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8HeapProfilerAgent.h b/deps/v8_inspector/platform/v8_inspector/public/V8HeapProfilerAgent.h
deleted file mode 100644
index ac3f522a3f..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/public/V8HeapProfilerAgent.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8HeapProfilerAgent_h
-#define V8HeapProfilerAgent_h
-
-#include "platform/PlatformExport.h"
-#include "platform/inspector_protocol/Dispatcher.h"
-#include "platform/v8_inspector/public/V8Debugger.h"
-
-namespace blink {
-
-class V8RuntimeAgent;
-
-class PLATFORM_EXPORT V8HeapProfilerAgent : public protocol::Backend::HeapProfiler, public V8Debugger::Agent<protocol::Frontend::HeapProfiler> {
-public:
- virtual ~V8HeapProfilerAgent() { }
-};
-
-} // namespace blink
-
-#endif // !defined(V8HeapProfilerAgent_h)
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.cpp b/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.cpp
index 0ab85c7340..fadab16d7e 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.cpp
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.cpp
@@ -5,33 +5,16 @@
#include "platform/v8_inspector/public/V8Inspector.h"
-#include "platform/inspector_protocol/Dispatcher.h"
+#include "platform/inspector_protocol/DispatcherBase.h"
#include "platform/v8_inspector/V8StringUtil.h"
#include "platform/v8_inspector/public/V8Debugger.h"
-#include "platform/v8_inspector/public/V8DebuggerAgent.h"
#include "platform/v8_inspector/public/V8DebuggerClient.h"
-#include "platform/v8_inspector/public/V8HeapProfilerAgent.h"
-#include "platform/v8_inspector/public/V8ProfilerAgent.h"
-#include "platform/v8_inspector/public/V8RuntimeAgent.h"
namespace blink {
V8Inspector::V8Inspector(v8::Isolate* isolate, v8::Local<v8::Context> context)
{
m_debugger = V8Debugger::create(isolate, this);
- m_session = m_debugger->connect(1);
- m_session->setClient(this);
- m_state = protocol::DictionaryValue::create();
- m_state->setValue("runtime", protocol::DictionaryValue::create());
- m_state->setValue("debugger", protocol::DictionaryValue::create());
- m_state->setValue("profiler", protocol::DictionaryValue::create());
- m_state->setValue("heapProfiler", protocol::DictionaryValue::create());
-
- m_session->runtimeAgent()->setInspectorState(m_state->getObject("runtime"));
- m_session->debuggerAgent()->setInspectorState(m_state->getObject("debugger"));
- m_session->profilerAgent()->setInspectorState(m_state->getObject("profiler"));
- m_session->heapProfilerAgent()->setInspectorState(m_state->getObject("heapProfiler"));
-
m_debugger->contextCreated(V8ContextInfo(context, 1, true, "",
"NodeJS Main Context", "", false));
}
@@ -41,10 +24,6 @@ V8Inspector::~V8Inspector()
disconnectFrontend();
}
-void V8Inspector::eventListeners(v8::Local<v8::Value> value, V8EventListenerInfoList& result)
-{
-}
-
bool V8Inspector::callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Local<v8::Context> target)
{
return true;
@@ -62,44 +41,18 @@ bool V8Inspector::formatAccessorsAsProperties(v8::Local<v8::Value> value)
void V8Inspector::connectFrontend(protocol::FrontendChannel* channel)
{
- DCHECK(!m_frontend);
- m_frontend = wrapUnique(new protocol::Frontend(channel));
- m_dispatcher = protocol::Dispatcher::create(channel);
-
- m_dispatcher->registerAgent((protocol::Backend::Debugger*)m_session->debuggerAgent());
- m_dispatcher->registerAgent(m_session->heapProfilerAgent());
- m_dispatcher->registerAgent(m_session->profilerAgent());
- m_dispatcher->registerAgent(m_session->runtimeAgent());
-
- m_session->debuggerAgent()->setFrontend(
- protocol::Frontend::Debugger::from(m_frontend.get()));
- m_session->heapProfilerAgent()->setFrontend(
- protocol::Frontend::HeapProfiler::from(m_frontend.get()));
- m_session->profilerAgent()->setFrontend(
- protocol::Frontend::Profiler::from(m_frontend.get()));
- m_session->runtimeAgent()->setFrontend(
- protocol::Frontend::Runtime::from(m_frontend.get()));
+ m_session = m_debugger->connect(1, channel, this, &m_state);
}
void V8Inspector::disconnectFrontend()
{
- if (!m_frontend)
- return;
- m_dispatcher->clearFrontend();
- m_dispatcher.reset();
-
- m_session->debuggerAgent()->clearFrontend();
- m_session->heapProfilerAgent()->clearFrontend();
- m_session->profilerAgent()->clearFrontend();
- m_session->runtimeAgent()->clearFrontend();
-
- m_frontend.reset();
+ m_session.reset();
}
void V8Inspector::dispatchMessageFromFrontend(const String16& message)
{
- if (m_dispatcher)
- m_dispatcher->dispatch(1, message);
+ if (m_session)
+ m_session->dispatchProtocolMessage(message);
}
int V8Inspector::ensureDefaultContextInGroup(int contextGroupId)
@@ -109,7 +62,6 @@ int V8Inspector::ensureDefaultContextInGroup(int contextGroupId)
void V8Inspector::muteConsole()
{
-
}
void V8Inspector::unmuteConsole()
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.h b/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.h
index 33763014a8..38bbc88774 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8Inspector.h
@@ -5,11 +5,11 @@
#ifndef V8Inspector_h
#define V8Inspector_h
+#include "platform/inspector_protocol/Platform.h"
#include "platform/v8_inspector/public/V8DebuggerClient.h"
-#include "platform/v8_inspector/public/V8InspectorSessionClient.h"
#include "platform/v8_inspector/public/V8InspectorSession.h"
+#include "platform/v8_inspector/public/V8InspectorSessionClient.h"
-#include "wtf/PtrUtil.h"
#include <v8.h>
namespace blink {
@@ -35,7 +35,6 @@ public:
void dispatchMessageFromFrontend(const String16& message);
private:
- void eventListeners(v8::Local<v8::Value>, V8EventListenerInfoList&) override;
bool callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Local<v8::Context> target) override;
String16 valueSubtype(v8::Local<v8::Value>) override;
bool formatAccessorsAsProperties(v8::Local<v8::Value>) override;
@@ -53,11 +52,12 @@ private:
void consoleTime(const String16& title) override { }
void consoleTimeEnd(const String16& title) override { }
void consoleTimeStamp(const String16& title) override { }
- v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Object> creationContext) override
+ v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*, v8::Local<v8::Context>) override
{
return v8::MaybeLocal<v8::Value>();
}
- void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLevel, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments, unsigned skipArgumentCount, int maxStackSize) override { }
+ void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLevel, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments, unsigned skipArgumentCount) override { }
+ void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::Object>) override { }
// V8InspectorSessionClient
void startInstrumenting() override { }
@@ -71,9 +71,7 @@ private:
std::unique_ptr<V8Debugger> m_debugger;
std::unique_ptr<V8InspectorSession> m_session;
- std::unique_ptr<protocol::Dispatcher> m_dispatcher;
- std::unique_ptr<protocol::Frontend> m_frontend;
- std::unique_ptr<protocol::DictionaryValue> m_state;
+ String16 m_state;
};
}
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSession.h b/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSession.h
index dfb9ff6386..e9ad175afc 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSession.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSession.h
@@ -5,9 +5,8 @@
#ifndef V8InspectorSession_h
#define V8InspectorSession_h
-#include "platform/PlatformExport.h"
-#include "platform/inspector_protocol/TypeBuilder.h"
-#include "wtf/PtrUtil.h"
+#include "platform/inspector_protocol/Platform.h"
+#include "platform/v8_inspector/protocol/Runtime.h"
#include <v8.h>
@@ -32,7 +31,9 @@ public:
virtual ~V8InspectorSession() { }
- virtual void setClient(V8InspectorSessionClient*) = 0;
+ static bool isV8ProtocolMethod(const String16& method);
+ virtual void dispatchProtocolMessage(const String16& message) = 0;
+ virtual String16 stateJSON() = 0;
virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0;
// API for the embedder to report native activities.
@@ -41,6 +42,8 @@ public:
virtual void breakProgram(const String16& breakReason, std::unique_ptr<protocol::DictionaryValue> data) = 0;
virtual void breakProgramOnException(const String16& breakReason, std::unique_ptr<protocol::DictionaryValue> data) = 0;
virtual void setSkipAllPauses(bool) = 0;
+ virtual void resume() = 0;
+ virtual void stepOver() = 0;
// API to report async call stacks.
virtual void asyncTaskScheduled(const String16& taskName, void* task, bool recurring) = 0;
@@ -55,11 +58,6 @@ public:
virtual std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Context>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) = 0;
virtual v8::Local<v8::Value> findObject(ErrorString*, const String16& objectId, v8::Local<v8::Context>* = nullptr, String16* objectGroup = nullptr) = 0;
virtual void releaseObjectGroup(const String16&) = 0;
-
- virtual V8DebuggerAgent* debuggerAgent() = 0;
- virtual V8HeapProfilerAgent* heapProfilerAgent() = 0;
- virtual V8ProfilerAgent* profilerAgent() = 0;
- virtual V8RuntimeAgent* runtimeAgent() = 0;
};
} // namespace blink
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSessionClient.h b/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSessionClient.h
index e4775ffc16..87772b3cca 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSessionClient.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8InspectorSessionClient.h
@@ -5,13 +5,15 @@
#ifndef V8InspectorSessionClient_h
#define V8InspectorSessionClient_h
-#include "platform/PlatformExport.h"
+#include "platform/inspector_protocol/FrontendChannel.h"
+#include "platform/inspector_protocol/Platform.h"
#include <v8.h>
namespace blink {
-class PLATFORM_EXPORT V8InspectorSessionClient {
+class PLATFORM_EXPORT V8InspectorSessionClient
+{
public:
virtual ~V8InspectorSessionClient() { }
virtual void startInstrumenting() = 0;
@@ -24,5 +26,4 @@ public:
} // namespace blink
-
#endif // V8InspectorSessionClient_h
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8ProfilerAgent.h b/deps/v8_inspector/platform/v8_inspector/public/V8ProfilerAgent.h
deleted file mode 100644
index dacf8a0bc3..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/public/V8ProfilerAgent.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8ProfilerAgent_h
-#define V8ProfilerAgent_h
-
-#include "platform/PlatformExport.h"
-#include "platform/inspector_protocol/Dispatcher.h"
-#include "platform/v8_inspector/public/V8Debugger.h"
-
-namespace blink {
-
-class PLATFORM_EXPORT V8ProfilerAgent : public protocol::Backend::Profiler, public V8Debugger::Agent<protocol::Frontend::Profiler> {
-public:
- virtual ~V8ProfilerAgent() { }
-};
-
-} // namespace blink
-
-
-#endif // !defined(V8ProfilerAgent_h)
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8RuntimeAgent.h b/deps/v8_inspector/platform/v8_inspector/public/V8RuntimeAgent.h
deleted file mode 100644
index 917114f42b..0000000000
--- a/deps/v8_inspector/platform/v8_inspector/public/V8RuntimeAgent.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8RuntimeAgent_h
-#define V8RuntimeAgent_h
-
-#include "platform/PlatformExport.h"
-#include "platform/inspector_protocol/Dispatcher.h"
-#include "platform/v8_inspector/public/V8Debugger.h"
-
-namespace blink {
-
-class InjectedScriptManager;
-
-class PLATFORM_EXPORT V8RuntimeAgent : public protocol::Backend::Runtime, public V8Debugger::Agent<protocol::Frontend::Runtime> {
-public:
- virtual ~V8RuntimeAgent() { }
-};
-
-} // namespace blink
-
-#endif // V8RuntimeAgent_h
diff --git a/deps/v8_inspector/platform/v8_inspector/public/V8StackTrace.h b/deps/v8_inspector/platform/v8_inspector/public/V8StackTrace.h
index da716c99bf..6d5c4804c4 100644
--- a/deps/v8_inspector/platform/v8_inspector/public/V8StackTrace.h
+++ b/deps/v8_inspector/platform/v8_inspector/public/V8StackTrace.h
@@ -5,8 +5,9 @@
#ifndef V8StackTrace_h
#define V8StackTrace_h
-#include "platform/inspector_protocol/TypeBuilder.h"
-#include "wtf/PtrUtil.h"
+#include "platform/inspector_protocol/Platform.h"
+#include "platform/inspector_protocol/String16.h"
+#include "platform/v8_inspector/protocol/Runtime.h"
#include <v8.h>
@@ -35,6 +36,8 @@ public:
virtual ~V8StackTrace() { }
virtual std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const = 0;
virtual String16 toString() const = 0;
+ virtual std::unique_ptr<V8StackTrace> clone() = 0;
+ virtual std::unique_ptr<V8StackTrace> isolatedCopy() = 0; // Safe to pass between threads.
};
} // namespace blink
diff --git a/deps/v8_inspector/platform/v8_inspector/v8_inspector.gyp b/deps/v8_inspector/platform/v8_inspector/v8_inspector.gyp
index 20df5e8bc3..a9b31dc1d4 100644
--- a/deps/v8_inspector/platform/v8_inspector/v8_inspector.gyp
+++ b/deps/v8_inspector/platform/v8_inspector/v8_inspector.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'blink_platform_output_dir': '<(SHARED_INTERMEDIATE_DIR)/blink/platform',
+ },
'targets': [
{
# GN version: //third_party/WebKit/Source/platform:inspector_injected_script
@@ -44,5 +47,191 @@
# Since this target generates header files, it needs to be a hard dependency.
'hard_dependency': 1,
},
+ {
+ # GN version: //third_party/WebKit/Source/platform:inspector_protocol_sources
+ 'target_name': 'protocol_sources',
+ 'type': 'none',
+ 'dependencies': ['protocol_version'],
+ 'variables': {
+ 'conditions': [
+ ['debug_devtools=="node"', {
+ # Node build
+ 'jinja_module_files': [
+ '../../deps/jinja2/jinja2/__init__.py',
+ '../../deps/markupsafe/markupsafe/__init__.py', # jinja2 dep
+ ],
+ }, {
+ 'jinja_module_files': [
+ '<(DEPTH)/third_party/jinja2/__init__.py',
+ '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
+ ],
+ }
+ ],
+ ],
+ },
+ 'actions': [
+ {
+ 'action_name': 'generateV8InspectorProtocolBackendSources',
+ 'inputs': [
+ '<@(jinja_module_files)',
+ # The python script in action below.
+ '../inspector_protocol/CodeGenerator.py',
+ # Source code templates.
+ '../inspector_protocol/TypeBuilder_h.template',
+ '../inspector_protocol/TypeBuilder_cpp.template',
+ # Protocol definitions
+ 'js_protocol.json',
+ ],
+ 'outputs': [
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Debugger.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Debugger.h',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/HeapProfiler.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/HeapProfiler.h',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Profiler.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Profiler.h',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Runtime.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Runtime.h',
+ ],
+ 'action': [
+ 'python',
+ '../inspector_protocol/CodeGenerator.py',
+ '--protocol', 'js_protocol.json',
+ '--string_type', 'String16',
+ '--export_macro', 'PLATFORM_EXPORT',
+ '--output_dir', '<(blink_platform_output_dir)/v8_inspector/protocol',
+ '--output_package', 'platform/v8_inspector/protocol',
+ ],
+ 'message': 'Generating protocol backend sources from json definitions.',
+ },
+ ]
+ },
+ {
+ # GN version: //third_party/WebKit/Source/core/inspector:protocol_version
+ 'target_name': 'protocol_version',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'generateV8InspectorProtocolVersion',
+ 'inputs': [
+ '../inspector_protocol/generate-inspector-protocol-version',
+ 'js_protocol.json',
+ ],
+ 'outputs': [
+ '<(blink_platform_output_dir)/v8_inspector/protocol.json',
+ ],
+ 'action': [
+ 'python',
+ '../inspector_protocol/generate-inspector-protocol-version',
+ '--o',
+ '<@(_outputs)',
+ 'js_protocol.json',
+ ],
+ 'message': 'Validate v8_inspector protocol for backwards compatibility and generate version file',
+ },
+ ]
+ },
+ {
+ 'target_name': 'v8_inspector_stl',
+ 'type': '<(component)',
+ 'dependencies': [
+ ':inspector_injected_script',
+ ':inspector_debugger_script',
+ ':protocol_sources',
+ ],
+ 'defines': [
+ 'V8_INSPECTOR_USE_STL=1'
+ ],
+ 'include_dirs': [
+ '../..',
+ '../../../v8/include',
+ '../../../v8',
+ '<(SHARED_INTERMEDIATE_DIR)/blink',
+ ],
+ 'sources': [
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Debugger.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Debugger.h',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/HeapProfiler.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/HeapProfiler.h',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Profiler.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Profiler.h',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Runtime.cpp',
+ '<(blink_platform_output_dir)/v8_inspector/protocol/Runtime.h',
+
+ '../inspector_protocol/Allocator.h',
+ '../inspector_protocol/Array.h',
+ '../inspector_protocol/Collections.h',
+ '../inspector_protocol/CollectionsSTL.h',
+ '../inspector_protocol/DispatcherBase.cpp',
+ '../inspector_protocol/DispatcherBase.h',
+ '../inspector_protocol/ErrorSupport.cpp',
+ '../inspector_protocol/ErrorSupport.h',
+ '../inspector_protocol/Maybe.h',
+ '../inspector_protocol/Parser.cpp',
+ '../inspector_protocol/Parser.h',
+ '../inspector_protocol/FrontendChannel.h',
+ '../inspector_protocol/String16.h',
+ '../inspector_protocol/String16STL.cpp',
+ '../inspector_protocol/String16STL.h',
+ '../inspector_protocol/Values.cpp',
+ '../inspector_protocol/Values.h',
+ '../inspector_protocol/ValueConversions.cpp',
+ '../inspector_protocol/ValueConversions.h',
+
+ 'Atomics.h',
+ 'IgnoreExceptionsScope.h',
+ 'InjectedScript.cpp',
+ 'InjectedScript.h',
+ 'InjectedScriptNative.cpp',
+ 'InjectedScriptNative.h',
+ 'InspectedContext.cpp',
+ 'InspectedContext.h',
+ 'JavaScriptCallFrame.cpp',
+ 'JavaScriptCallFrame.h',
+ 'MuteConsoleScope.h',
+ 'ScriptBreakpoint.h',
+ 'RemoteObjectId.cpp',
+ 'RemoteObjectId.h',
+ 'V8Console.cpp',
+ 'V8Console.h',
+ 'V8DebuggerAgentImpl.cpp',
+ 'V8DebuggerAgentImpl.h',
+ 'V8DebuggerImpl.cpp',
+ 'V8DebuggerImpl.h',
+ 'V8DebuggerScript.cpp',
+ 'V8DebuggerScript.h',
+ 'V8FunctionCall.cpp',
+ 'V8FunctionCall.h',
+ 'V8HeapProfilerAgentImpl.cpp',
+ 'V8HeapProfilerAgentImpl.h',
+ 'V8InjectedScriptHost.cpp',
+ 'V8InjectedScriptHost.h',
+ 'V8InspectorSessionImpl.cpp',
+ 'V8InspectorSessionImpl.h',
+ 'V8ProfilerAgentImpl.cpp',
+ 'V8ProfilerAgentImpl.h',
+ 'V8Regex.cpp',
+ 'V8Regex.h',
+ 'V8RuntimeAgentImpl.cpp',
+ 'V8RuntimeAgentImpl.h',
+ 'V8StackTraceImpl.cpp',
+ 'V8StackTraceImpl.h',
+ 'V8StringUtil.cpp',
+ 'V8StringUtil.h',
+ 'public/V8EventListenerInfo.h',
+ 'public/V8ContentSearchUtil.h',
+ 'public/V8ContextInfo.h',
+ 'public/V8Debugger.h',
+ 'public/V8DebuggerClient.h',
+ 'public/V8HeapProfilerAgent.h',
+ 'public/V8Inspector.cpp',
+ 'public/V8Inspector.h',
+ 'public/V8InspectorSession.h',
+ 'public/V8StackTrace.h',
+ 'public/V8ToProtocolValue.h',
+
+ '<(blink_platform_output_dir/v8_inspector/DebuggerScript.h',
+ '<(blink_platform_output_dir/v8_inspector/InjectedScriptSource.h',
+ ],
+ },
], # targets
}
diff --git a/deps/v8_inspector/v8_inspector.gyp b/deps/v8_inspector/v8_inspector.gyp
deleted file mode 100644
index 59d8843b8e..0000000000
--- a/deps/v8_inspector/v8_inspector.gyp
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- 'v8_inspector.gypi',
- ],
-
- 'targets': [
- {
- 'target_name': 'v8_inspector',
- 'type': '<(component)',
-
- 'dependencies': [
- 'platform/inspector_protocol/protocol.gyp:protocol_sources',
- 'platform/v8_inspector/v8_inspector.gyp:inspector_injected_script',
- 'platform/v8_inspector/v8_inspector.gyp:inspector_debugger_script',
- ],
- 'defines': [
- 'V8_INSPECTOR_USE_STL=1'
- ],
- 'include_dirs': [
- '.',
- 'deps/wtf',
- '../v8/include',
- '../v8',
- '<(SHARED_INTERMEDIATE_DIR)/blink',
- ],
- 'sources': [
- '<@(v8_inspector_files)',
- ],
- },
- ] # end targets
-}
diff --git a/deps/v8_inspector/v8_inspector.gypi b/deps/v8_inspector/v8_inspector.gypi
deleted file mode 100644
index aad781b684..0000000000
--- a/deps/v8_inspector/v8_inspector.gypi
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'v8_inspector_files': [
-
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/Backend.h',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/Dispatcher.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/Dispatcher.h',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/Frontend.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/Frontend.h',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/TypeBuilder.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/inspector_protocol/TypeBuilder.h',
- 'platform/v8_inspector/public/V8Inspector.cpp',
- 'platform/v8_inspector/public/V8Inspector.h',
-
- 'platform/inspector_protocol/Allocator.h',
- 'platform/inspector_protocol/Array.h',
- 'platform/inspector_protocol/Collections.h',
- 'platform/inspector_protocol/CollectionsSTL.h',
- 'platform/inspector_protocol/ErrorSupport.cpp',
- 'platform/inspector_protocol/ErrorSupport.h',
- 'platform/inspector_protocol/Maybe.h',
- 'platform/inspector_protocol/Parser.cpp',
- 'platform/inspector_protocol/Parser.h',
- 'platform/inspector_protocol/FrontendChannel.h',
- 'platform/inspector_protocol/String16.h',
- 'platform/inspector_protocol/String16STL.cpp',
- 'platform/inspector_protocol/String16STL.h',
- 'platform/inspector_protocol/Values.cpp',
- 'platform/inspector_protocol/Values.h',
- 'platform/inspector_protocol/ValueConversions.cpp',
- 'platform/inspector_protocol/ValueConversions.h',
- 'platform/v8_inspector/Atomics.h',
- 'platform/v8_inspector/InspectorWrapper.cpp',
- 'platform/v8_inspector/InspectorWrapper.h',
- 'platform/v8_inspector/IgnoreExceptionsScope.h',
- 'platform/v8_inspector/InjectedScript.cpp',
- 'platform/v8_inspector/InjectedScript.h',
- 'platform/v8_inspector/InjectedScriptNative.cpp',
- 'platform/v8_inspector/InjectedScriptNative.h',
- 'platform/v8_inspector/InspectedContext.cpp',
- 'platform/v8_inspector/InspectedContext.h',
- 'platform/v8_inspector/JavaScriptCallFrame.cpp',
- 'platform/v8_inspector/JavaScriptCallFrame.h',
- 'platform/v8_inspector/MuteConsoleScope.h',
- 'platform/v8_inspector/ScriptBreakpoint.h',
- 'platform/v8_inspector/RemoteObjectId.cpp',
- 'platform/v8_inspector/RemoteObjectId.h',
- 'platform/v8_inspector/V8Console.cpp',
- 'platform/v8_inspector/V8Console.h',
- 'platform/v8_inspector/V8DebuggerAgentImpl.cpp',
- 'platform/v8_inspector/V8DebuggerAgentImpl.h',
- 'platform/v8_inspector/V8DebuggerImpl.cpp',
- 'platform/v8_inspector/V8DebuggerImpl.h',
- 'platform/v8_inspector/V8DebuggerScript.cpp',
- 'platform/v8_inspector/V8DebuggerScript.h',
- 'platform/v8_inspector/V8FunctionCall.cpp',
- 'platform/v8_inspector/V8FunctionCall.h',
- 'platform/v8_inspector/V8HeapProfilerAgentImpl.cpp',
- 'platform/v8_inspector/V8HeapProfilerAgentImpl.h',
- 'platform/v8_inspector/V8InjectedScriptHost.cpp',
- 'platform/v8_inspector/V8InjectedScriptHost.h',
- 'platform/v8_inspector/V8InspectorSessionImpl.cpp',
- 'platform/v8_inspector/V8InspectorSessionImpl.h',
- 'platform/v8_inspector/V8ProfilerAgentImpl.cpp',
- 'platform/v8_inspector/V8ProfilerAgentImpl.h',
- 'platform/v8_inspector/V8Regex.cpp',
- 'platform/v8_inspector/V8Regex.h',
- 'platform/v8_inspector/V8RuntimeAgentImpl.cpp',
- 'platform/v8_inspector/V8RuntimeAgentImpl.h',
- 'platform/v8_inspector/V8StackTraceImpl.cpp',
- 'platform/v8_inspector/V8StackTraceImpl.h',
- 'platform/v8_inspector/V8StringUtil.cpp',
- 'platform/v8_inspector/V8StringUtil.h',
- 'platform/v8_inspector/public/V8EventListenerInfo.h',
- 'platform/v8_inspector/public/V8ContentSearchUtil.h',
- 'platform/v8_inspector/public/V8ContextInfo.h',
- 'platform/v8_inspector/public/V8Debugger.h',
- 'platform/v8_inspector/public/V8DebuggerAgent.h',
- 'platform/v8_inspector/public/V8DebuggerClient.h',
- 'platform/v8_inspector/public/V8HeapProfilerAgent.h',
- 'platform/v8_inspector/public/V8InspectorSession.h',
- 'platform/v8_inspector/public/V8ProfilerAgent.h',
- 'platform/v8_inspector/public/V8RuntimeAgent.h',
- 'platform/v8_inspector/public/V8StackTrace.h',
- 'platform/v8_inspector/public/V8ToProtocolValue.h',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/v8_inspector/DebuggerScript.h',
- '<(SHARED_INTERMEDIATE_DIR)/blink/platform/v8_inspector/InjectedScriptSource.h',
- ],
- }
-}