From 141bdf71640139e7a6de5ad33ac45f4e63a96a33 Mon Sep 17 00:00:00 2001 From: Sigurd Schneider Date: Tue, 18 Aug 2020 15:39:22 +0200 Subject: [PATCH] Update protocol DISABLE_THIRD_PARTY_CHECK=protocol update Bug: chromium:1051466 Change-Id: I2222517db877e10681511a9d967e41ba12244bad Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2362572 Reviewed-by: Wolfgang Beyer Commit-Queue: Sigurd Schneider --- .../generated/InspectorBackendCommands.js | 9 +++ front_end/generated/protocol-mapping.d.ts | 7 ++ front_end/generated/protocol-proxy-api.d.ts | 6 ++ front_end/generated/protocol.d.ts | 36 +++++++++ .../devtools_protocol/browser_protocol.json | 76 +++++++++++++++++++ .../devtools_protocol/browser_protocol.pdl | 33 ++++++++ 6 files changed, 167 insertions(+) diff --git a/front_end/generated/InspectorBackendCommands.js b/front_end/generated/InspectorBackendCommands.js index bd1e018e4f..f901e309b4 100644 --- a/front_end/generated/InspectorBackendCommands.js +++ b/front_end/generated/InspectorBackendCommands.js @@ -1421,6 +1421,13 @@ export function registerCommands(inspectorBackend) { SignatureValidityUrl: 'signatureValidityUrl', SignatureTimestamps: 'signatureTimestamps' }); + inspectorBackend.registerEnum('Network.CrossOriginOpenerPolicyValue', { + SameOrigin: 'SameOrigin', + SameOriginAllowPopups: 'SameOriginAllowPopups', + UnsafeNone: 'UnsafeNone', + SameOriginPlusCoep: 'SameOriginPlusCoep' + }); + inspectorBackend.registerEnum('Network.CrossOriginEmbedderPolicyValue', {None: 'None', RequireCorp: 'RequireCorp'}); inspectorBackend.registerEvent('Network.dataReceived', ['requestId', 'timestamp', 'dataLength', 'encodedDataLength']); inspectorBackend.registerEvent( 'Network.eventSourceMessageReceived', ['requestId', 'timestamp', 'eventName', 'eventId', 'data']); @@ -1562,6 +1569,8 @@ export function registerCommands(inspectorBackend) { {'name': 'userAgentMetadata', 'type': 'object', 'optional': true} ], []); + inspectorBackend.registerCommand( + 'Network.getSecurityIsolationStatus', [{'name': 'frameId', 'type': 'string', 'optional': true}], ['status']); // Overlay. inspectorBackend.registerEnum('Overlay.ColorFormat', {Rgb: 'rgb', Hsl: 'hsl', Hex: 'hex'}); diff --git a/front_end/generated/protocol-mapping.d.ts b/front_end/generated/protocol-mapping.d.ts index 99a54a4879..f671f74e8a 100644 --- a/front_end/generated/protocol-mapping.d.ts +++ b/front_end/generated/protocol-mapping.d.ts @@ -1804,6 +1804,13 @@ export namespace ProtocolMapping { * Allows overriding user agent with the given string. */ 'Network.setUserAgentOverride': {paramsType: [Protocol.Network.SetUserAgentOverrideRequest]; returnType: void;}; + /** + * Returns information about the COEP/COOP isolation status. + */ + 'Network.getSecurityIsolationStatus': { + paramsType: [Protocol.Network.GetSecurityIsolationStatusRequest?]; + returnType: Protocol.Network.GetSecurityIsolationStatusResponse; + }; /** * Disables domain notifications. */ diff --git a/front_end/generated/protocol-proxy-api.d.ts b/front_end/generated/protocol-proxy-api.d.ts index 2a5c4b72b9..938e436d6c 100644 --- a/front_end/generated/protocol-proxy-api.d.ts +++ b/front_end/generated/protocol-proxy-api.d.ts @@ -1781,6 +1781,12 @@ declare namespace ProtocolProxyApi { */ invoke_setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest): Promise; + + /** + * Returns information about the COEP/COOP isolation status. + */ + invoke_getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest): + Promise; } export interface NetworkDispatcher extends Protocol.Dispatcher { /** diff --git a/front_end/generated/protocol.d.ts b/front_end/generated/protocol.d.ts index e023d040e9..5caa3f9ecb 100644 --- a/front_end/generated/protocol.d.ts +++ b/front_end/generated/protocol.d.ts @@ -7125,6 +7125,31 @@ declare namespace Protocol { errors?: SignedExchangeError[]; } + export enum CrossOriginOpenerPolicyValue { + SameOrigin = 'SameOrigin', + SameOriginAllowPopups = 'SameOriginAllowPopups', + UnsafeNone = 'UnsafeNone', + SameOriginPlusCoep = 'SameOriginPlusCoep', + } + + export interface CrossOriginOpenerPolicyStatus { + value: CrossOriginOpenerPolicyValue; + } + + export enum CrossOriginEmbedderPolicyValue { + None = 'None', + RequireCorp = 'RequireCorp', + } + + export interface CrossOriginEmbedderPolicyStatus { + value: CrossOriginEmbedderPolicyValue; + } + + export interface SecurityIsolationStatus { + coop: CrossOriginOpenerPolicyStatus; + coep: CrossOriginEmbedderPolicyStatus; + } + export interface CanClearBrowserCacheResponse extends ProtocolResponseWithError { /** * True if browser cache can be cleared. @@ -7491,6 +7516,17 @@ declare namespace Protocol { userAgentMetadata?: Emulation.UserAgentMetadata; } + export interface GetSecurityIsolationStatusRequest { + /** + * If no frameId is provided, the status of the target is provided. + */ + frameId?: Page.FrameId; + } + + export interface GetSecurityIsolationStatusResponse extends ProtocolResponseWithError { + status: SecurityIsolationStatus; + } + /** * Fired when data chunk was received over the network. */ diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.json b/third_party/blink/public/devtools_protocol/browser_protocol.json index 78e52cb1e5..7fc9a6cdea 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.json +++ b/third_party/blink/public/devtools_protocol/browser_protocol.json @@ -10426,6 +10426,63 @@ } } ] + }, + { + "id": "CrossOriginOpenerPolicyValue", + "experimental": true, + "type": "string", + "enum": [ + "SameOrigin", + "SameOriginAllowPopups", + "UnsafeNone", + "SameOriginPlusCoep" + ] + }, + { + "id": "CrossOriginOpenerPolicyStatus", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "value", + "$ref": "CrossOriginOpenerPolicyValue" + } + ] + }, + { + "id": "CrossOriginEmbedderPolicyValue", + "experimental": true, + "type": "string", + "enum": [ + "None", + "RequireCorp" + ] + }, + { + "id": "CrossOriginEmbedderPolicyStatus", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "value", + "$ref": "CrossOriginEmbedderPolicyValue" + } + ] + }, + { + "id": "SecurityIsolationStatus", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "coop", + "$ref": "CrossOriginOpenerPolicyStatus" + }, + { + "name": "coep", + "$ref": "CrossOriginEmbedderPolicyStatus" + } + ] } ], "commands": [ @@ -11009,6 +11066,25 @@ "$ref": "Emulation.UserAgentMetadata" } ] + }, + { + "name": "getSecurityIsolationStatus", + "description": "Returns information about the COEP/COOP isolation status.", + "experimental": true, + "parameters": [ + { + "name": "frameId", + "description": "If no frameId is provided, the status of the target is provided.", + "optional": true, + "$ref": "Page.FrameId" + } + ], + "returns": [ + { + "name": "status", + "$ref": "SecurityIsolationStatus" + } + ] } ], "events": [ diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl index 31822baccd..2c7c25bf5c 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl @@ -5333,6 +5333,39 @@ domain Network # available, such as in the case of HTTP/2 or QUIC. optional string headersText + experimental type CrossOriginOpenerPolicyValue extends string + enum + SameOrigin + SameOriginAllowPopups + UnsafeNone + SameOriginPlusCoep + + experimental type CrossOriginOpenerPolicyStatus extends object + properties + CrossOriginOpenerPolicyValue value + + experimental type CrossOriginEmbedderPolicyValue extends string + enum + None + RequireCorp + + experimental type CrossOriginEmbedderPolicyStatus extends object + properties + CrossOriginEmbedderPolicyValue value + + experimental type SecurityIsolationStatus extends object + properties + CrossOriginOpenerPolicyStatus coop + CrossOriginEmbedderPolicyStatus coep + + # Returns information about the COEP/COOP isolation status. + experimental command getSecurityIsolationStatus + parameters + # If no frameId is provided, the status of the target is provided. + optional Page.FrameId frameId + returns + SecurityIsolationStatus status + # This domain provides various functionality related to drawing atop the inspected page. experimental domain Overlay depends on DOM