Skip to content
Snippets Groups Projects
browser_protocol.json 271 KiB
Newer Older
  • Learn to ignore specific revisions
  •                 "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",
    
            "experimental": 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",
    
            "dependencies": ["IO"],
            "experimental": true,
            "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",
                    "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": "" }
                    ]
    
                    "description": "Stop trace events collection."
    
                },
                {
                    "name": "getCategories",
                    "description": "Gets supported tracing categories.",
                    "returns": [
                        { "name": "categories", "type": "array", "items": { "type": "string" }, "description": "A list of supported tracing categories." }
    
                    ]
                },
                {
                    "name": "requestMemoryDump",
                    "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." }
                    ]
                },
                {
                    "name": "recordClockSyncMarker",
                    "description": "Record a clock sync marker in the trace.",
                    "parameters": [
                        { "name": "syncId", "type": "string", "description": "The ID of this clock sync marker" }
                    ]
    
                }
            ],
            "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."
    
                },
                {
                    "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." }
                    ]
    
                },
                {
                    "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." }
    
            "experimental": true,
            "dependencies": ["Runtime", "DOM"],
    
                    "id": "Animation",
    
                    "experimental": true,
    
                        { "name": "id", "type": "string", "description": "<code>Animation</code>'s id." },
                        { "name": "name", "type": "string", "description": "<code>Animation</code>'s name." },
                        { "name": "pausedState", "type": "boolean", "experimental": 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",
    
                    "experimental": true,
    
                        { "name": "delay", "type": "number", "description": "<code>AnimationEffect</code>'s delay." },
                        { "name": "endDelay", "type": "number", "description": "<code>AnimationEffect</code>'s end delay." },
                        { "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",
    
                        { "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": "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."
    
                    "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",
    
                        { "name": "animation", "$ref": "Animation", "description": "Animation that was started." }
    
                    "description": "Event for animation that has been started."
    
                    "name": "animationCanceled",
    
                        { "name": "id", "type": "string", "description": "Id of the animation that was cancelled."}
    
                    "description": "Event for when an animation has been cancelled."
    
            "experimental": true,
            "dependencies": ["DOM"],
    
            "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",
    
                    "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": "backendDOMNodeId", "$ref": "DOM.BackendNodeId", "description": "The BackendNodeId of the related DOM 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", "keyshortcuts", "roledescription" ],
    
                    "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", "modal", "pressed", "selected" ],
    
                    "description": "States which apply to widgets."
                },
                {
                    "id": "AXRelationshipAttributes",
                    "type": "string",
    
                    "enum": [ "activedescendant", "controls", "describedby", "details", "errormessage", "flowto", "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 },
                        { "name": "childIds", "type": "array", "items": { "$ref": "AXNodeId" }, "description": "IDs for each of this node's child nodes.", "optional": true },
                        { "name": "backendDOMNodeId", "$ref": "DOM.BackendNodeId", "description": "The backend ID for the associated DOM node, if any.", "optional": true }
    
                    ],
                    "description": "A node in the accessibility tree."
                }
            ],
            "commands": [
                {
    
                    "name": "getPartialAXTree",
    
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "ID of node to get the partial accessibility tree for." },
                        { "name": "fetchRelatives", "type": "boolean", "description": "Whether to fetch this nodes ancestors, siblings and children. Defaults to true.", "optional": true }
    
                        { "name": "nodes", "type": "array", "items": { "$ref": "AXNode" }, "description": "The <code>Accessibility.AXNode</code> for this DOM node, if it exists, plus its ancestors, siblings and children, if requested." }
                    ],
                    "description": "Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.",
                    "experimental": true
                }
            ]
        },
        {
            "domain": "Storage",
            "experimental": true,
            "types": [
                {
                    "id": "StorageType",
                    "type": "string",
                    "enum": [
                        "appcache",
                        "cookies",
                        "file_systems",
                        "indexeddb",
                        "local_storage",
                        "shader_cache",
                        "websql",
                        "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."
                }
            ]
        },
        {
            "domain": "Log",
            "description": "Provides access to log entries.",
            "dependencies": ["Runtime", "Network"],
            "experimental": true,
            "types": [
                {
                    "id": "LogEntry",
                    "type": "object",
                    "description": "Log entry.",
                    "properties": [
                        { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "storage", "appcache", "rendering", "security", "deprecation", "worker", "violation", "intervention", "other"], "description": "Log entry source." },
                        { "name": "level", "type": "string", "enum": ["verbose", "info", "warning", "error"], "description": "Log entry severity." },
                        { "name": "text", "type": "string", "description": "Logged text." },
                        { "name": "timestamp", "$ref": "Runtime.Timestamp", "description": "Timestamp when this entry was added." },
                        { "name": "url", "type": "string", "optional": true, "description": "URL of the resource if known." },
                        { "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number in the resource." },
                        { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace." },
                        { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this entry." },
                        { "name": "workerId", "type": "string", "optional": true, "description": "Identifier of the worker associated with this entry." }
                    ]
                },
                {
                    "id": "ViolationSetting",
                    "type": "object",
                    "description": "Violation configuration setting.",
                    "properties": [
                        { "name": "name", "type": "string", "enum": ["longTask", "longLayout", "blockedEvent", "blockedParser", "discouragedAPIUse", "handler", "recurringHandler"], "description": "Violation type." },
                        { "name": "threshold", "type": "number", "description": "Time threshold to trigger upon." }
                    ]
                }
            ],
            "commands": [
                {
                    "name": "enable",
                    "description": "Enables log domain, sends the entries collected so far to the client by means of the <code>entryAdded</code> notification."
                },
                {
                    "name": "disable",
                    "description": "Disables log domain, prevents further log entries from being reported to the client."
                },
                {
                    "name": "clear",
                    "description": "Clears the log."
                },
                {
                    "name": "startViolationsReport",
                    "parameters": [
                        { "name": "config", "type": "array", "items": { "$ref": "ViolationSetting" }, "description": "Configuration for violations." }
                    ],
                    "description": "start violation reporting."
                },
                {
                    "name": "stopViolationsReport",
                    "description": "Stop violation reporting."
                }
            ],
            "events": [
                {
                    "name": "entryAdded",
                    "parameters": [
                        { "name": "entry", "$ref": "LogEntry", "description": "The entry." }
                    ],
                    "description": "Issued when new message was logged."
                }
            ]
        },
        {
            "domain": "SystemInfo",
            "description": "The SystemInfo domain defines methods and events for querying low-level system information.",
            "experimental": true,
            "types": [
                {
                    "id": "GPUDevice",
                    "type": "object",
                    "properties": [
                        { "name": "vendorId", "type": "number", "description": "PCI ID of the GPU vendor, if available; 0 otherwise." },
                        { "name": "deviceId", "type": "number", "description": "PCI ID of the GPU device, if available; 0 otherwise." },
                        { "name": "vendorString", "type": "string", "description": "String description of the GPU vendor, if the PCI ID is not available." },
                        { "name": "deviceString", "type": "string", "description": "String description of the GPU device, if the PCI ID is not available." }
                    ],
                    "description": "Describes a single graphics processor (GPU)."
                },
                {
                    "id": "GPUInfo",
                    "type": "object",
                    "properties": [
                        { "name": "devices", "type": "array", "items": { "$ref": "GPUDevice" }, "description": "The graphics devices on the system. Element 0 is the primary GPU." },
                        { "name": "auxAttributes", "type": "object", "optional": true, "description": "An optional dictionary of additional GPU related attributes." },
                        { "name": "featureStatus", "type": "object", "optional": true, "description": "An optional dictionary of graphics features and their status." },
                        { "name": "driverBugWorkarounds", "type": "array", "items": { "type": "string" }, "description": "An optional array of GPU driver bug workarounds." }
    
                    "description": "Provides information about the GPU(s) on the system."
                }
            ],
            "commands": [
                {
                    "name": "getInfo",
                    "description": "Returns information about the system.",
                    "returns": [
                        { "name": "gpu", "$ref": "GPUInfo", "description": "Information about the GPUs on the system." },
                        { "name": "modelName", "type": "string", "description": "A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported." },
    
    svatal's avatar
    svatal committed
                        { "name": "modelVersion", "type": "string", "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported." },
                        { "name": "commandLine", "type": "string", "description": "The command line string used to launch the browser. Will be the empty string if not supported." }
    
                    ]
                }
            ]
        },
        {
            "domain": "Tethering",
            "description": "The Tethering domain defines methods and events for browser port binding.",
            "experimental": true,
            "commands": [
                {
                    "name": "bind",
                    "description": "Request browser port binding.",
                    "parameters": [
                        { "name": "port", "type": "integer", "description": "Port number to bind." }
                    ]
                },
                {
                    "name": "unbind",
                    "description": "Request browser port unbinding.",
                    "parameters": [
                        { "name": "port", "type": "integer", "description": "Port number to unbind." }
                    ]
                }
            ],
            "events": [
                {
                    "name": "accepted",
                    "description": "Informs that port was successfully bound and got a specified connection id.",
                    "parameters": [
                        {"name": "port", "type": "integer", "description": "Port number that was successfully bound." },
                        {"name": "connectionId", "type": "string", "description": "Connection id to be used." }
                    ]
    
    svatal's avatar
    svatal committed
        },
        {
            "domain": "Browser",
            "description": "The Browser domain defines methods and events for browser managing.",
            "experimental": true,
            "types": [
                {
                    "id": "WindowID",
                    "type": "integer"
                },
                {
                    "id": "WindowState",
                    "type": "string",
                    "enum": ["normal", "minimized", "maximized", "fullscreen"],
                    "description": "The state of the browser window."
                },
                {
                    "id": "Bounds",
                    "type": "object",
                    "description": "Browser window bounds information",
                    "properties": [
                        { "name": "left", "type": "integer", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels."},
                        { "name": "top", "type": "integer", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels."},
                        { "name": "width", "type": "integer", "optional": true, "description": "The window width in pixels."},
                        { "name": "height", "type": "integer", "optional": true, "description": "The window height in pixels."},
                        { "name": "windowState", "$ref": "WindowState", "optional": true, "description": "The window state. Default to normal."}
                    ]
                }
            ],
            "commands": [
                {
                    "name": "getWindowForTarget",
                    "description": "Get the browser window that contains the devtools target.",
                    "parameters": [
                        { "name": "targetId", "$ref": "Target.TargetID", "description": "Devtools agent host id." }
                    ],
                    "returns": [
                        { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." },
                        { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored window position and size are returned." }
                    ]
                },
                {
                    "name": "setWindowBounds",
                    "description": "Set position and/or size of the browser window.",
                    "parameters": [
                        { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." },
                        { "name": "bounds", "$ref": "Bounds", "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged." }
                    ]
                },
                {
                    "name": "getWindowBounds",
                    "description": "Get position and size of the browser window.",
                    "parameters": [
                        { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }
                    ],
                    "returns": [
                        { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored window position and size are returned." }
                    ]
                }
            ]
    
    svatal's avatar
    svatal committed
    }