diff --git a/changelog.md b/changelog.md index 2ef54d1bcb..3df3f52567 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,57 @@ +## Roll protocol to r1309774 — _2024-06-04T04:27:00.000Z_ +###### Diff: [`24f369f...36abf63`](https://github.com/ChromeDevTools/devtools-protocol/compare/24f369f...36abf63) + +```diff +@@ browser_protocol.pdl:12406 @@ experimental domain PWA + string manifestId + + # Launches the installed web app, or an url in the same web app instead of the +- # default start url if it is provided. Returns a tab / web contents based +- # Target.TargetID which can be used to attach to via Target.attachToTarget or +- # similar APIs. ++ # default start url if it is provided. Returns a page Target.TargetID which ++ # can be used to attach to via Target.attachToTarget or similar APIs. + command launch + parameters + string manifestId +@@ -12419,16 +12418,15 @@ experimental domain PWA + + # Opens one or more local files from an installed web app identified by its + # manifestId. The web app needs to have file handlers registered to process +- # the files. The API returns one or more tabs / web contents' based +- # Target.TargetIDs which can be used to attach to via Target.attachToTarget or +- # similar APIs. ++ # the files. The API returns one or more page Target.TargetIDs which can be ++ # used to attach to via Target.attachToTarget or similar APIs. + # If some files in the parameters cannot be handled by the web app, they will + # be ignored. If none of the files can be handled, this API returns an error. + # If no files provided as the parameter, this API also returns an error. + # + # According to the definition of the file handlers in the manifest file, one +- # Target.TargetID may represent a tab handling one or more files. The order of +- # the returned Target.TargetIDs is also not guaranteed. ++ # Target.TargetID may represent a page handling one or more files. The order ++ # of the returned Target.TargetIDs is not guaranteed. + # + # TODO(crbug.com/339454034): Check the existences of the input files. + command launchFilesInApp +@@ -12438,3 +12436,10 @@ experimental domain PWA + returns + # IDs of the tab targets created as the result. + array of Target.TargetID targetIds ++ ++ # Opens the current page in its web app identified by the manifest id, needs ++ # to be called on a page target. This function returns immediately without ++ # waiting for the app finishing loading. ++ command openCurrentPageInApp ++ parameters ++ string manifestId +``` + ## Roll protocol to r1308459 — _2024-05-31T04:27:42.000Z_ -###### Diff: [`24b69f0...92c2e04`](https://github.com/ChromeDevTools/devtools-protocol/compare/24b69f0...92c2e04) +###### Diff: [`24b69f0...24f369f`](https://github.com/ChromeDevTools/devtools-protocol/compare/24b69f0...24f369f) ```diff @@ browser_protocol.pdl:7093 @@ domain Network @@ -11936,18 +11986,4 @@ index 09c420e..bd277eb 100644 # Information about amount of glyphs that were rendered with given font. type PlatformFontUsage extends object properties -``` - -## Roll protocol to r965299 — _2022-01-31T19:15:27.000Z_ -###### Diff: [`8c4f892...1600334`](https://github.com/ChromeDevTools/devtools-protocol/compare/8c4f892...1600334) - -```diff -@@ browser_protocol.pdl:6881 @@ domain Page - ch-ua-full-version-list - ch-ua-platform-version - ch-ua-reduced -+ ch-ua-wow64 - ch-viewport-height - ch-viewport-width - ch-width ``` \ No newline at end of file diff --git a/json/browser_protocol.json b/json/browser_protocol.json index c9ae237b86..f8aea56973 100644 --- a/json/browser_protocol.json +++ b/json/browser_protocol.json @@ -26253,7 +26253,7 @@ }, { "name": "launch", - "description": "Launches the installed web app, or an url in the same web app instead of the\ndefault start url if it is provided. Returns a tab / web contents based\nTarget.TargetID which can be used to attach to via Target.attachToTarget or\nsimilar APIs.", + "description": "Launches the installed web app, or an url in the same web app instead of the\ndefault start url if it is provided. Returns a page Target.TargetID which\ncan be used to attach to via Target.attachToTarget or similar APIs.", "parameters": [ { "name": "manifestId", @@ -26275,7 +26275,7 @@ }, { "name": "launchFilesInApp", - "description": "Opens one or more local files from an installed web app identified by its\nmanifestId. The web app needs to have file handlers registered to process\nthe files. The API returns one or more tabs / web contents' based\nTarget.TargetIDs which can be used to attach to via Target.attachToTarget or\nsimilar APIs.\nIf some files in the parameters cannot be handled by the web app, they will\nbe ignored. If none of the files can be handled, this API returns an error.\nIf no files provided as the parameter, this API also returns an error.\n\nAccording to the definition of the file handlers in the manifest file, one\nTarget.TargetID may represent a tab handling one or more files. The order of\nthe returned Target.TargetIDs is also not guaranteed.\n\nTODO(crbug.com/339454034): Check the existences of the input files.", + "description": "Opens one or more local files from an installed web app identified by its\nmanifestId. The web app needs to have file handlers registered to process\nthe files. The API returns one or more page Target.TargetIDs which can be\nused to attach to via Target.attachToTarget or similar APIs.\nIf some files in the parameters cannot be handled by the web app, they will\nbe ignored. If none of the files can be handled, this API returns an error.\nIf no files provided as the parameter, this API also returns an error.\n\nAccording to the definition of the file handlers in the manifest file, one\nTarget.TargetID may represent a page handling one or more files. The order\nof the returned Target.TargetIDs is not guaranteed.\n\nTODO(crbug.com/339454034): Check the existences of the input files.", "parameters": [ { "name": "manifestId", @@ -26299,6 +26299,16 @@ } } ] + }, + { + "name": "openCurrentPageInApp", + "description": "Opens the current page in its web app identified by the manifest id, needs\nto be called on a page target. This function returns immediately without\nwaiting for the app finishing loading.", + "parameters": [ + { + "name": "manifestId", + "type": "string" + } + ] } ] } diff --git a/package.json b/package.json index b6a119766a..c47c43c07d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "devtools-protocol", - "version": "0.0.1308459", + "version": "0.0.1309774", "description": "The Chrome DevTools Protocol JSON", "repository": "https://github.com/ChromeDevTools/devtools-protocol", "author": "The Chromium Authors", diff --git a/pdl/browser_protocol.pdl b/pdl/browser_protocol.pdl index 58df8f36a9..5475305e32 100644 --- a/pdl/browser_protocol.pdl +++ b/pdl/browser_protocol.pdl @@ -12406,9 +12406,8 @@ experimental domain PWA string manifestId # Launches the installed web app, or an url in the same web app instead of the - # default start url if it is provided. Returns a tab / web contents based - # Target.TargetID which can be used to attach to via Target.attachToTarget or - # similar APIs. + # default start url if it is provided. Returns a page Target.TargetID which + # can be used to attach to via Target.attachToTarget or similar APIs. command launch parameters string manifestId @@ -12419,16 +12418,15 @@ experimental domain PWA # Opens one or more local files from an installed web app identified by its # manifestId. The web app needs to have file handlers registered to process - # the files. The API returns one or more tabs / web contents' based - # Target.TargetIDs which can be used to attach to via Target.attachToTarget or - # similar APIs. + # the files. The API returns one or more page Target.TargetIDs which can be + # used to attach to via Target.attachToTarget or similar APIs. # If some files in the parameters cannot be handled by the web app, they will # be ignored. If none of the files can be handled, this API returns an error. # If no files provided as the parameter, this API also returns an error. # # According to the definition of the file handlers in the manifest file, one - # Target.TargetID may represent a tab handling one or more files. The order of - # the returned Target.TargetIDs is also not guaranteed. + # Target.TargetID may represent a page handling one or more files. The order + # of the returned Target.TargetIDs is not guaranteed. # # TODO(crbug.com/339454034): Check the existences of the input files. command launchFilesInApp @@ -12438,3 +12436,10 @@ experimental domain PWA returns # IDs of the tab targets created as the result. array of Target.TargetID targetIds + + # Opens the current page in its web app identified by the manifest id, needs + # to be called on a page target. This function returns immediately without + # waiting for the app finishing loading. + command openCurrentPageInApp + parameters + string manifestId diff --git a/types/protocol-mapping.d.ts b/types/protocol-mapping.d.ts index c9f58fd021..6aade1712d 100644 --- a/types/protocol-mapping.d.ts +++ b/types/protocol-mapping.d.ts @@ -4992,9 +4992,8 @@ export namespace ProtocolMapping { }; /** * Launches the installed web app, or an url in the same web app instead of the - * default start url if it is provided. Returns a tab / web contents based - * Target.TargetID which can be used to attach to via Target.attachToTarget or - * similar APIs. + * default start url if it is provided. Returns a page Target.TargetID which + * can be used to attach to via Target.attachToTarget or similar APIs. */ 'PWA.launch': { paramsType: [Protocol.PWA.LaunchRequest]; @@ -5003,16 +5002,15 @@ export namespace ProtocolMapping { /** * Opens one or more local files from an installed web app identified by its * manifestId. The web app needs to have file handlers registered to process - * the files. The API returns one or more tabs / web contents' based - * Target.TargetIDs which can be used to attach to via Target.attachToTarget or - * similar APIs. + * the files. The API returns one or more page Target.TargetIDs which can be + * used to attach to via Target.attachToTarget or similar APIs. * If some files in the parameters cannot be handled by the web app, they will * be ignored. If none of the files can be handled, this API returns an error. * If no files provided as the parameter, this API also returns an error. * * According to the definition of the file handlers in the manifest file, one - * Target.TargetID may represent a tab handling one or more files. The order of - * the returned Target.TargetIDs is also not guaranteed. + * Target.TargetID may represent a page handling one or more files. The order + * of the returned Target.TargetIDs is not guaranteed. * * TODO(crbug.com/339454034): Check the existences of the input files. */ @@ -5020,6 +5018,15 @@ export namespace ProtocolMapping { paramsType: [Protocol.PWA.LaunchFilesInAppRequest]; returnType: Protocol.PWA.LaunchFilesInAppResponse; }; + /** + * Opens the current page in its web app identified by the manifest id, needs + * to be called on a page target. This function returns immediately without + * waiting for the app finishing loading. + */ + 'PWA.openCurrentPageInApp': { + paramsType: [Protocol.PWA.OpenCurrentPageInAppRequest]; + returnType: void; + }; } } diff --git a/types/protocol-proxy-api.d.ts b/types/protocol-proxy-api.d.ts index 9a0f1d1371..35539294c9 100644 --- a/types/protocol-proxy-api.d.ts +++ b/types/protocol-proxy-api.d.ts @@ -4261,30 +4261,35 @@ export namespace ProtocolProxyApi { /** * Launches the installed web app, or an url in the same web app instead of the - * default start url if it is provided. Returns a tab / web contents based - * Target.TargetID which can be used to attach to via Target.attachToTarget or - * similar APIs. + * default start url if it is provided. Returns a page Target.TargetID which + * can be used to attach to via Target.attachToTarget or similar APIs. */ launch(params: Protocol.PWA.LaunchRequest): Promise; /** * Opens one or more local files from an installed web app identified by its * manifestId. The web app needs to have file handlers registered to process - * the files. The API returns one or more tabs / web contents' based - * Target.TargetIDs which can be used to attach to via Target.attachToTarget or - * similar APIs. + * the files. The API returns one or more page Target.TargetIDs which can be + * used to attach to via Target.attachToTarget or similar APIs. * If some files in the parameters cannot be handled by the web app, they will * be ignored. If none of the files can be handled, this API returns an error. * If no files provided as the parameter, this API also returns an error. * * According to the definition of the file handlers in the manifest file, one - * Target.TargetID may represent a tab handling one or more files. The order of - * the returned Target.TargetIDs is also not guaranteed. + * Target.TargetID may represent a page handling one or more files. The order + * of the returned Target.TargetIDs is not guaranteed. * * TODO(crbug.com/339454034): Check the existences of the input files. */ launchFilesInApp(params: Protocol.PWA.LaunchFilesInAppRequest): Promise; + /** + * Opens the current page in its web app identified by the manifest id, needs + * to be called on a page target. This function returns immediately without + * waiting for the app finishing loading. + */ + openCurrentPageInApp(params: Protocol.PWA.OpenCurrentPageInAppRequest): Promise; + } } diff --git a/types/protocol-tests-proxy-api.d.ts b/types/protocol-tests-proxy-api.d.ts index 412fc670c5..0a91d7e82b 100644 --- a/types/protocol-tests-proxy-api.d.ts +++ b/types/protocol-tests-proxy-api.d.ts @@ -4645,30 +4645,35 @@ export namespace ProtocolTestsProxyApi { /** * Launches the installed web app, or an url in the same web app instead of the - * default start url if it is provided. Returns a tab / web contents based - * Target.TargetID which can be used to attach to via Target.attachToTarget or - * similar APIs. + * default start url if it is provided. Returns a page Target.TargetID which + * can be used to attach to via Target.attachToTarget or similar APIs. */ launch(params: Protocol.PWA.LaunchRequest): Promise<{id: number, result: Protocol.PWA.LaunchResponse, sessionId: string}>; /** * Opens one or more local files from an installed web app identified by its * manifestId. The web app needs to have file handlers registered to process - * the files. The API returns one or more tabs / web contents' based - * Target.TargetIDs which can be used to attach to via Target.attachToTarget or - * similar APIs. + * the files. The API returns one or more page Target.TargetIDs which can be + * used to attach to via Target.attachToTarget or similar APIs. * If some files in the parameters cannot be handled by the web app, they will * be ignored. If none of the files can be handled, this API returns an error. * If no files provided as the parameter, this API also returns an error. * * According to the definition of the file handlers in the manifest file, one - * Target.TargetID may represent a tab handling one or more files. The order of - * the returned Target.TargetIDs is also not guaranteed. + * Target.TargetID may represent a page handling one or more files. The order + * of the returned Target.TargetIDs is not guaranteed. * * TODO(crbug.com/339454034): Check the existences of the input files. */ launchFilesInApp(params: Protocol.PWA.LaunchFilesInAppRequest): Promise<{id: number, result: Protocol.PWA.LaunchFilesInAppResponse, sessionId: string}>; + /** + * Opens the current page in its web app identified by the manifest id, needs + * to be called on a page target. This function returns immediately without + * waiting for the app finishing loading. + */ + openCurrentPageInApp(params: Protocol.PWA.OpenCurrentPageInAppRequest): Promise<{id: number, result: void, sessionId: string}>; + } } diff --git a/types/protocol.d.ts b/types/protocol.d.ts index 148581a951..cea9530f9a 100644 --- a/types/protocol.d.ts +++ b/types/protocol.d.ts @@ -18602,6 +18602,10 @@ export namespace Protocol { */ targetIds: Target.TargetID[]; } + + export interface OpenCurrentPageInAppRequest { + manifestId: string; + } } }