devtools-protocol 0.0.1498597 → 0.0.1501221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/json/browser_protocol.json +17895 -17678
  2. package/package.json +1 -1
  3. package/pdl/browser_protocol.pdl +47 -13824
  4. package/pdl/domains/Accessibility.pdl +290 -0
  5. package/pdl/domains/Animation.pdl +195 -0
  6. package/pdl/domains/Audits.pdl +755 -0
  7. package/pdl/domains/Autofill.pdl +106 -0
  8. package/pdl/domains/BackgroundService.pdl +77 -0
  9. package/pdl/domains/BluetoothEmulation.pdl +227 -0
  10. package/pdl/domains/Browser.pdl +345 -0
  11. package/pdl/domains/CSS.pdl +996 -0
  12. package/pdl/domains/CacheStorage.pdl +125 -0
  13. package/pdl/domains/Cast.pdl +62 -0
  14. package/pdl/domains/DOM.pdl +932 -0
  15. package/pdl/domains/DOMDebugger.pdl +128 -0
  16. package/pdl/domains/DOMSnapshot.pdl +319 -0
  17. package/pdl/domains/DOMStorage.pdl +72 -0
  18. package/pdl/domains/DeviceAccess.pdl +43 -0
  19. package/pdl/domains/DeviceOrientation.pdl +20 -0
  20. package/pdl/domains/Emulation.pdl +608 -0
  21. package/pdl/domains/EventBreakpoints.pdl +24 -0
  22. package/pdl/domains/Extensions.pdl +72 -0
  23. package/pdl/domains/FedCm.pdl +100 -0
  24. package/pdl/domains/Fetch.pdl +251 -0
  25. package/pdl/domains/FileSystem.pdl +41 -0
  26. package/pdl/domains/HeadlessExperimental.pdl +56 -0
  27. package/pdl/domains/IO.pdl +45 -0
  28. package/pdl/domains/IndexedDB.pdl +226 -0
  29. package/pdl/domains/Input.pdl +336 -0
  30. package/pdl/domains/Inspector.pdl +25 -0
  31. package/pdl/domains/LayerTree.pdl +178 -0
  32. package/pdl/domains/Log.pdl +93 -0
  33. package/pdl/domains/Media.pdl +106 -0
  34. package/pdl/domains/Memory.pdl +112 -0
  35. package/pdl/domains/Network.pdl +2039 -0
  36. package/pdl/domains/Overlay.pdl +498 -0
  37. package/pdl/domains/PWA.pdl +142 -0
  38. package/pdl/domains/Page.pdl +1767 -0
  39. package/pdl/domains/Performance.pdl +54 -0
  40. package/pdl/domains/PerformanceTimeline.pdl +71 -0
  41. package/pdl/domains/Preload.pdl +290 -0
  42. package/pdl/domains/Security.pdl +196 -0
  43. package/pdl/domains/ServiceWorker.pdl +121 -0
  44. package/pdl/domains/Storage.pdl +913 -0
  45. package/pdl/domains/SystemInfo.pdl +145 -0
  46. package/pdl/domains/Target.pdl +325 -0
  47. package/pdl/domains/Tethering.pdl +28 -0
  48. package/pdl/domains/Tracing.pdl +157 -0
  49. package/pdl/domains/WebAudio.pdl +205 -0
  50. package/pdl/domains/WebAuthn.pdl +230 -0
  51. package/types/protocol-mapping.d.ts +659 -635
  52. package/types/protocol-proxy-api.d.ts +543 -522
  53. package/types/protocol-tests-proxy-api.d.ts +628 -607
  54. package/types/protocol.d.ts +8062 -7911
@@ -28,12 +28,12 @@ export namespace ProtocolProxyApi {
28
28
 
29
29
  Audits: AuditsApi;
30
30
 
31
- Extensions: ExtensionsApi;
32
-
33
31
  Autofill: AutofillApi;
34
32
 
35
33
  BackgroundService: BackgroundServiceApi;
36
34
 
35
+ BluetoothEmulation: BluetoothEmulationApi;
36
+
37
37
  Browser: BrowserApi;
38
38
 
39
39
  CSS: CSSApi;
@@ -46,22 +46,30 @@ export namespace ProtocolProxyApi {
46
46
 
47
47
  DOMDebugger: DOMDebuggerApi;
48
48
 
49
- EventBreakpoints: EventBreakpointsApi;
50
-
51
49
  DOMSnapshot: DOMSnapshotApi;
52
50
 
53
51
  DOMStorage: DOMStorageApi;
54
52
 
53
+ DeviceAccess: DeviceAccessApi;
54
+
55
55
  DeviceOrientation: DeviceOrientationApi;
56
56
 
57
57
  Emulation: EmulationApi;
58
58
 
59
- HeadlessExperimental: HeadlessExperimentalApi;
59
+ EventBreakpoints: EventBreakpointsApi;
60
60
 
61
- IO: IOApi;
61
+ Extensions: ExtensionsApi;
62
+
63
+ FedCm: FedCmApi;
64
+
65
+ Fetch: FetchApi;
62
66
 
63
67
  FileSystem: FileSystemApi;
64
68
 
69
+ HeadlessExperimental: HeadlessExperimentalApi;
70
+
71
+ IO: IOApi;
72
+
65
73
  IndexedDB: IndexedDBApi;
66
74
 
67
75
  Input: InputApi;
@@ -72,18 +80,24 @@ export namespace ProtocolProxyApi {
72
80
 
73
81
  Log: LogApi;
74
82
 
83
+ Media: MediaApi;
84
+
75
85
  Memory: MemoryApi;
76
86
 
77
87
  Network: NetworkApi;
78
88
 
79
89
  Overlay: OverlayApi;
80
90
 
91
+ PWA: PWAApi;
92
+
81
93
  Page: PageApi;
82
94
 
83
95
  Performance: PerformanceApi;
84
96
 
85
97
  PerformanceTimeline: PerformanceTimelineApi;
86
98
 
99
+ Preload: PreloadApi;
100
+
87
101
  Security: SecurityApi;
88
102
 
89
103
  ServiceWorker: ServiceWorkerApi;
@@ -98,24 +112,10 @@ export namespace ProtocolProxyApi {
98
112
 
99
113
  Tracing: TracingApi;
100
114
 
101
- Fetch: FetchApi;
102
-
103
115
  WebAudio: WebAudioApi;
104
116
 
105
117
  WebAuthn: WebAuthnApi;
106
118
 
107
- Media: MediaApi;
108
-
109
- DeviceAccess: DeviceAccessApi;
110
-
111
- Preload: PreloadApi;
112
-
113
- FedCm: FedCmApi;
114
-
115
- PWA: PWAApi;
116
-
117
- BluetoothEmulation: BluetoothEmulationApi;
118
-
119
119
  }
120
120
 
121
121
 
@@ -853,47 +853,6 @@ export namespace ProtocolProxyApi {
853
853
 
854
854
  }
855
855
 
856
- export interface ExtensionsApi {
857
- /**
858
- * Installs an unpacked extension from the filesystem similar to
859
- * --load-extension CLI flags. Returns extension ID once the extension
860
- * has been installed. Available if the client is connected using the
861
- * --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
862
- * flag is set.
863
- */
864
- loadUnpacked(params: Protocol.Extensions.LoadUnpackedRequest): Promise<Protocol.Extensions.LoadUnpackedResponse>;
865
-
866
- /**
867
- * Uninstalls an unpacked extension (others not supported) from the profile.
868
- * Available if the client is connected using the --remote-debugging-pipe flag
869
- * and the --enable-unsafe-extension-debugging.
870
- */
871
- uninstall(params: Protocol.Extensions.UninstallRequest): Promise<void>;
872
-
873
- /**
874
- * Gets data from extension storage in the given `storageArea`. If `keys` is
875
- * specified, these are used to filter the result.
876
- */
877
- getStorageItems(params: Protocol.Extensions.GetStorageItemsRequest): Promise<Protocol.Extensions.GetStorageItemsResponse>;
878
-
879
- /**
880
- * Removes `keys` from extension storage in the given `storageArea`.
881
- */
882
- removeStorageItems(params: Protocol.Extensions.RemoveStorageItemsRequest): Promise<void>;
883
-
884
- /**
885
- * Clears extension storage in the given `storageArea`.
886
- */
887
- clearStorageItems(params: Protocol.Extensions.ClearStorageItemsRequest): Promise<void>;
888
-
889
- /**
890
- * Sets `values` in extension storage in the given `storageArea`. The provided `values`
891
- * will be merged with existing values in the storage area.
892
- */
893
- setStorageItems(params: Protocol.Extensions.SetStorageItemsRequest): Promise<void>;
894
-
895
- }
896
-
897
856
  export interface AutofillApi {
898
857
  /**
899
858
  * Trigger autofill on a form identified by the fieldId.
@@ -957,6 +916,119 @@ export namespace ProtocolProxyApi {
957
916
 
958
917
  }
959
918
 
919
+ export interface BluetoothEmulationApi {
920
+ /**
921
+ * Enable the BluetoothEmulation domain.
922
+ */
923
+ enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise<void>;
924
+
925
+ /**
926
+ * Set the state of the simulated central.
927
+ */
928
+ setSimulatedCentralState(params: Protocol.BluetoothEmulation.SetSimulatedCentralStateRequest): Promise<void>;
929
+
930
+ /**
931
+ * Disable the BluetoothEmulation domain.
932
+ */
933
+ disable(): Promise<void>;
934
+
935
+ /**
936
+ * Simulates a peripheral with |address|, |name| and |knownServiceUuids|
937
+ * that has already been connected to the system.
938
+ */
939
+ simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise<void>;
940
+
941
+ /**
942
+ * Simulates an advertisement packet described in |entry| being received by
943
+ * the central.
944
+ */
945
+ simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise<void>;
946
+
947
+ /**
948
+ * Simulates the response code from the peripheral with |address| for a
949
+ * GATT operation of |type|. The |code| value follows the HCI Error Codes from
950
+ * Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
951
+ */
952
+ simulateGATTOperationResponse(params: Protocol.BluetoothEmulation.SimulateGATTOperationResponseRequest): Promise<void>;
953
+
954
+ /**
955
+ * Simulates the response from the characteristic with |characteristicId| for a
956
+ * characteristic operation of |type|. The |code| value follows the Error
957
+ * Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
958
+ * The |data| is expected to exist when simulating a successful read operation
959
+ * response.
960
+ */
961
+ simulateCharacteristicOperationResponse(params: Protocol.BluetoothEmulation.SimulateCharacteristicOperationResponseRequest): Promise<void>;
962
+
963
+ /**
964
+ * Simulates the response from the descriptor with |descriptorId| for a
965
+ * descriptor operation of |type|. The |code| value follows the Error
966
+ * Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
967
+ * The |data| is expected to exist when simulating a successful read operation
968
+ * response.
969
+ */
970
+ simulateDescriptorOperationResponse(params: Protocol.BluetoothEmulation.SimulateDescriptorOperationResponseRequest): Promise<void>;
971
+
972
+ /**
973
+ * Adds a service with |serviceUuid| to the peripheral with |address|.
974
+ */
975
+ addService(params: Protocol.BluetoothEmulation.AddServiceRequest): Promise<Protocol.BluetoothEmulation.AddServiceResponse>;
976
+
977
+ /**
978
+ * Removes the service respresented by |serviceId| from the simulated central.
979
+ */
980
+ removeService(params: Protocol.BluetoothEmulation.RemoveServiceRequest): Promise<void>;
981
+
982
+ /**
983
+ * Adds a characteristic with |characteristicUuid| and |properties| to the
984
+ * service represented by |serviceId|.
985
+ */
986
+ addCharacteristic(params: Protocol.BluetoothEmulation.AddCharacteristicRequest): Promise<Protocol.BluetoothEmulation.AddCharacteristicResponse>;
987
+
988
+ /**
989
+ * Removes the characteristic respresented by |characteristicId| from the
990
+ * simulated central.
991
+ */
992
+ removeCharacteristic(params: Protocol.BluetoothEmulation.RemoveCharacteristicRequest): Promise<void>;
993
+
994
+ /**
995
+ * Adds a descriptor with |descriptorUuid| to the characteristic respresented
996
+ * by |characteristicId|.
997
+ */
998
+ addDescriptor(params: Protocol.BluetoothEmulation.AddDescriptorRequest): Promise<Protocol.BluetoothEmulation.AddDescriptorResponse>;
999
+
1000
+ /**
1001
+ * Removes the descriptor with |descriptorId| from the simulated central.
1002
+ */
1003
+ removeDescriptor(params: Protocol.BluetoothEmulation.RemoveDescriptorRequest): Promise<void>;
1004
+
1005
+ /**
1006
+ * Simulates a GATT disconnection from the peripheral with |address|.
1007
+ */
1008
+ simulateGATTDisconnection(params: Protocol.BluetoothEmulation.SimulateGATTDisconnectionRequest): Promise<void>;
1009
+
1010
+ /**
1011
+ * Event for when a GATT operation of |type| to the peripheral with |address|
1012
+ * happened.
1013
+ */
1014
+ on(event: 'gattOperationReceived', listener: (params: Protocol.BluetoothEmulation.GattOperationReceivedEvent) => void): void;
1015
+
1016
+ /**
1017
+ * Event for when a characteristic operation of |type| to the characteristic
1018
+ * respresented by |characteristicId| happened. |data| and |writeType| is
1019
+ * expected to exist when |type| is write.
1020
+ */
1021
+ on(event: 'characteristicOperationReceived', listener: (params: Protocol.BluetoothEmulation.CharacteristicOperationReceivedEvent) => void): void;
1022
+
1023
+ /**
1024
+ * Event for when a descriptor operation of |type| to the descriptor
1025
+ * respresented by |descriptorId| happened. |data| is expected to exist when
1026
+ * |type| is write.
1027
+ */
1028
+ on(event: 'descriptorOperationReceived', listener: (params: Protocol.BluetoothEmulation.DescriptorOperationReceivedEvent) => void): void;
1029
+
1030
+ }
1031
+
960
1032
  export interface BrowserApi {
961
1033
  /**
962
1034
  * Set permission settings for given origin.
@@ -1899,24 +1971,6 @@ export namespace ProtocolProxyApi {
1899
1971
 
1900
1972
  }
1901
1973
 
1902
- export interface EventBreakpointsApi {
1903
- /**
1904
- * Sets breakpoint on particular native event.
1905
- */
1906
- setInstrumentationBreakpoint(params: Protocol.EventBreakpoints.SetInstrumentationBreakpointRequest): Promise<void>;
1907
-
1908
- /**
1909
- * Removes breakpoint on particular native event.
1910
- */
1911
- removeInstrumentationBreakpoint(params: Protocol.EventBreakpoints.RemoveInstrumentationBreakpointRequest): Promise<void>;
1912
-
1913
- /**
1914
- * Removes all breakpoints
1915
- */
1916
- disable(): Promise<void>;
1917
-
1918
- }
1919
-
1920
1974
  export interface DOMSnapshotApi {
1921
1975
  /**
1922
1976
  * Disables DOM snapshot agent for the given page.
@@ -1976,6 +2030,35 @@ export namespace ProtocolProxyApi {
1976
2030
 
1977
2031
  }
1978
2032
 
2033
+ export interface DeviceAccessApi {
2034
+ /**
2035
+ * Enable events in this domain.
2036
+ */
2037
+ enable(): Promise<void>;
2038
+
2039
+ /**
2040
+ * Disable events in this domain.
2041
+ */
2042
+ disable(): Promise<void>;
2043
+
2044
+ /**
2045
+ * Select a device in response to a DeviceAccess.deviceRequestPrompted event.
2046
+ */
2047
+ selectPrompt(params: Protocol.DeviceAccess.SelectPromptRequest): Promise<void>;
2048
+
2049
+ /**
2050
+ * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
2051
+ */
2052
+ cancelPrompt(params: Protocol.DeviceAccess.CancelPromptRequest): Promise<void>;
2053
+
2054
+ /**
2055
+ * A device request opened a user prompt to select a device. Respond with the
2056
+ * selectPrompt or cancelPrompt command.
2057
+ */
2058
+ on(event: 'deviceRequestPrompted', listener: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => void): void;
2059
+
2060
+ }
2061
+
1979
2062
  export interface DeviceOrientationApi {
1980
2063
  /**
1981
2064
  * Clears the overridden Device Orientation.
@@ -2261,27 +2344,229 @@ export namespace ProtocolProxyApi {
2261
2344
  setSmallViewportHeightDifferenceOverride(params: Protocol.Emulation.SetSmallViewportHeightDifferenceOverrideRequest): Promise<void>;
2262
2345
 
2263
2346
  /**
2264
- * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
2347
+ * Returns device's screen configuration.
2265
2348
  * @experimental
2266
2349
  */
2267
- on(event: 'virtualTimeBudgetExpired', listener: () => void): void;
2268
-
2269
- }
2350
+ getScreenInfos(): Promise<Protocol.Emulation.GetScreenInfosResponse>;
2270
2351
 
2271
- export interface HeadlessExperimentalApi {
2272
2352
  /**
2273
- * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
2274
- * screenshot from the resulting frame. Requires that the target was created with enabled
2275
- * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
2276
- * https://goo.gle/chrome-headless-rendering for more background.
2353
+ * Add a new screen to the device. Only supported in headless mode.
2354
+ * @experimental
2277
2355
  */
2278
- beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest): Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
2356
+ addScreen(params: Protocol.Emulation.AddScreenRequest): Promise<Protocol.Emulation.AddScreenResponse>;
2279
2357
 
2280
2358
  /**
2281
- * Disables headless events for the target.
2282
- * @deprecated
2359
+ * Remove screen from the device. Only supported in headless mode.
2360
+ * @experimental
2283
2361
  */
2284
- disable(): Promise<void>;
2362
+ removeScreen(params: Protocol.Emulation.RemoveScreenRequest): Promise<void>;
2363
+
2364
+ /**
2365
+ * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
2366
+ * @experimental
2367
+ */
2368
+ on(event: 'virtualTimeBudgetExpired', listener: () => void): void;
2369
+
2370
+ }
2371
+
2372
+ export interface EventBreakpointsApi {
2373
+ /**
2374
+ * Sets breakpoint on particular native event.
2375
+ */
2376
+ setInstrumentationBreakpoint(params: Protocol.EventBreakpoints.SetInstrumentationBreakpointRequest): Promise<void>;
2377
+
2378
+ /**
2379
+ * Removes breakpoint on particular native event.
2380
+ */
2381
+ removeInstrumentationBreakpoint(params: Protocol.EventBreakpoints.RemoveInstrumentationBreakpointRequest): Promise<void>;
2382
+
2383
+ /**
2384
+ * Removes all breakpoints
2385
+ */
2386
+ disable(): Promise<void>;
2387
+
2388
+ }
2389
+
2390
+ export interface ExtensionsApi {
2391
+ /**
2392
+ * Installs an unpacked extension from the filesystem similar to
2393
+ * --load-extension CLI flags. Returns extension ID once the extension
2394
+ * has been installed. Available if the client is connected using the
2395
+ * --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
2396
+ * flag is set.
2397
+ */
2398
+ loadUnpacked(params: Protocol.Extensions.LoadUnpackedRequest): Promise<Protocol.Extensions.LoadUnpackedResponse>;
2399
+
2400
+ /**
2401
+ * Uninstalls an unpacked extension (others not supported) from the profile.
2402
+ * Available if the client is connected using the --remote-debugging-pipe flag
2403
+ * and the --enable-unsafe-extension-debugging.
2404
+ */
2405
+ uninstall(params: Protocol.Extensions.UninstallRequest): Promise<void>;
2406
+
2407
+ /**
2408
+ * Gets data from extension storage in the given `storageArea`. If `keys` is
2409
+ * specified, these are used to filter the result.
2410
+ */
2411
+ getStorageItems(params: Protocol.Extensions.GetStorageItemsRequest): Promise<Protocol.Extensions.GetStorageItemsResponse>;
2412
+
2413
+ /**
2414
+ * Removes `keys` from extension storage in the given `storageArea`.
2415
+ */
2416
+ removeStorageItems(params: Protocol.Extensions.RemoveStorageItemsRequest): Promise<void>;
2417
+
2418
+ /**
2419
+ * Clears extension storage in the given `storageArea`.
2420
+ */
2421
+ clearStorageItems(params: Protocol.Extensions.ClearStorageItemsRequest): Promise<void>;
2422
+
2423
+ /**
2424
+ * Sets `values` in extension storage in the given `storageArea`. The provided `values`
2425
+ * will be merged with existing values in the storage area.
2426
+ */
2427
+ setStorageItems(params: Protocol.Extensions.SetStorageItemsRequest): Promise<void>;
2428
+
2429
+ }
2430
+
2431
+ export interface FedCmApi {
2432
+ enable(params: Protocol.FedCm.EnableRequest): Promise<void>;
2433
+
2434
+ disable(): Promise<void>;
2435
+
2436
+ selectAccount(params: Protocol.FedCm.SelectAccountRequest): Promise<void>;
2437
+
2438
+ clickDialogButton(params: Protocol.FedCm.ClickDialogButtonRequest): Promise<void>;
2439
+
2440
+ openUrl(params: Protocol.FedCm.OpenUrlRequest): Promise<void>;
2441
+
2442
+ dismissDialog(params: Protocol.FedCm.DismissDialogRequest): Promise<void>;
2443
+
2444
+ /**
2445
+ * Resets the cooldown time, if any, to allow the next FedCM call to show
2446
+ * a dialog even if one was recently dismissed by the user.
2447
+ */
2448
+ resetCooldown(): Promise<void>;
2449
+
2450
+ on(event: 'dialogShown', listener: (params: Protocol.FedCm.DialogShownEvent) => void): void;
2451
+
2452
+ /**
2453
+ * Triggered when a dialog is closed, either by user action, JS abort,
2454
+ * or a command below.
2455
+ */
2456
+ on(event: 'dialogClosed', listener: (params: Protocol.FedCm.DialogClosedEvent) => void): void;
2457
+
2458
+ }
2459
+
2460
+ export interface FetchApi {
2461
+ /**
2462
+ * Disables the fetch domain.
2463
+ */
2464
+ disable(): Promise<void>;
2465
+
2466
+ /**
2467
+ * Enables issuing of requestPaused events. A request will be paused until client
2468
+ * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
2469
+ */
2470
+ enable(params: Protocol.Fetch.EnableRequest): Promise<void>;
2471
+
2472
+ /**
2473
+ * Causes the request to fail with specified reason.
2474
+ */
2475
+ failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<void>;
2476
+
2477
+ /**
2478
+ * Provides response to the request.
2479
+ */
2480
+ fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<void>;
2481
+
2482
+ /**
2483
+ * Continues the request, optionally modifying some of its parameters.
2484
+ */
2485
+ continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<void>;
2486
+
2487
+ /**
2488
+ * Continues a request supplying authChallengeResponse following authRequired event.
2489
+ */
2490
+ continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest): Promise<void>;
2491
+
2492
+ /**
2493
+ * Continues loading of the paused response, optionally modifying the
2494
+ * response headers. If either responseCode or headers are modified, all of them
2495
+ * must be present.
2496
+ * @experimental
2497
+ */
2498
+ continueResponse(params: Protocol.Fetch.ContinueResponseRequest): Promise<void>;
2499
+
2500
+ /**
2501
+ * Causes the body of the response to be received from the server and
2502
+ * returned as a single string. May only be issued for a request that
2503
+ * is paused in the Response stage and is mutually exclusive with
2504
+ * takeResponseBodyForInterceptionAsStream. Calling other methods that
2505
+ * affect the request or disabling fetch domain before body is received
2506
+ * results in an undefined behavior.
2507
+ * Note that the response body is not available for redirects. Requests
2508
+ * paused in the _redirect received_ state may be differentiated by
2509
+ * `responseCode` and presence of `location` response header, see
2510
+ * comments to `requestPaused` for details.
2511
+ */
2512
+ getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest): Promise<Protocol.Fetch.GetResponseBodyResponse>;
2513
+
2514
+ /**
2515
+ * Returns a handle to the stream representing the response body.
2516
+ * The request must be paused in the HeadersReceived stage.
2517
+ * Note that after this command the request can't be continued
2518
+ * as is -- client either needs to cancel it or to provide the
2519
+ * response body.
2520
+ * The stream only supports sequential read, IO.read will fail if the position
2521
+ * is specified.
2522
+ * This method is mutually exclusive with getResponseBody.
2523
+ * Calling other methods that affect the request or disabling fetch
2524
+ * domain before body is received results in an undefined behavior.
2525
+ */
2526
+ takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest): Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
2527
+
2528
+ /**
2529
+ * Issued when the domain is enabled and the request URL matches the
2530
+ * specified filter. The request is paused until the client responds
2531
+ * with one of continueRequest, failRequest or fulfillRequest.
2532
+ * The stage of the request can be determined by presence of responseErrorReason
2533
+ * and responseStatusCode -- the request is at the response stage if either
2534
+ * of these fields is present and in the request stage otherwise.
2535
+ * Redirect responses and subsequent requests are reported similarly to regular
2536
+ * responses and requests. Redirect responses may be distinguished by the value
2537
+ * of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with
2538
+ * presence of the `location` header. Requests resulting from a redirect will
2539
+ * have `redirectedRequestId` field set.
2540
+ */
2541
+ on(event: 'requestPaused', listener: (params: Protocol.Fetch.RequestPausedEvent) => void): void;
2542
+
2543
+ /**
2544
+ * Issued when the domain is enabled with handleAuthRequests set to true.
2545
+ * The request is paused until client responds with continueWithAuth.
2546
+ */
2547
+ on(event: 'authRequired', listener: (params: Protocol.Fetch.AuthRequiredEvent) => void): void;
2548
+
2549
+ }
2550
+
2551
+ export interface FileSystemApi {
2552
+ getDirectory(params: Protocol.FileSystem.GetDirectoryRequest): Promise<Protocol.FileSystem.GetDirectoryResponse>;
2553
+
2554
+ }
2555
+
2556
+ export interface HeadlessExperimentalApi {
2557
+ /**
2558
+ * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
2559
+ * screenshot from the resulting frame. Requires that the target was created with enabled
2560
+ * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
2561
+ * https://goo.gle/chrome-headless-rendering for more background.
2562
+ */
2563
+ beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest): Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
2564
+
2565
+ /**
2566
+ * Disables headless events for the target.
2567
+ * @deprecated
2568
+ */
2569
+ disable(): Promise<void>;
2285
2570
 
2286
2571
  /**
2287
2572
  * Enables headless events for the target.
@@ -2309,11 +2594,6 @@ export namespace ProtocolProxyApi {
2309
2594
 
2310
2595
  }
2311
2596
 
2312
- export interface FileSystemApi {
2313
- getDirectory(params: Protocol.FileSystem.GetDirectoryRequest): Promise<Protocol.FileSystem.GetDirectoryResponse>;
2314
-
2315
- }
2316
-
2317
2597
  export interface IndexedDBApi {
2318
2598
  /**
2319
2599
  * Clears all entries from an object store.
@@ -2560,6 +2840,48 @@ export namespace ProtocolProxyApi {
2560
2840
 
2561
2841
  }
2562
2842
 
2843
+ export interface MediaApi {
2844
+ /**
2845
+ * Enables the Media domain
2846
+ */
2847
+ enable(): Promise<void>;
2848
+
2849
+ /**
2850
+ * Disables the Media domain.
2851
+ */
2852
+ disable(): Promise<void>;
2853
+
2854
+ /**
2855
+ * This can be called multiple times, and can be used to set / override /
2856
+ * remove player properties. A null propValue indicates removal.
2857
+ */
2858
+ on(event: 'playerPropertiesChanged', listener: (params: Protocol.Media.PlayerPropertiesChangedEvent) => void): void;
2859
+
2860
+ /**
2861
+ * Send events as a list, allowing them to be batched on the browser for less
2862
+ * congestion. If batched, events must ALWAYS be in chronological order.
2863
+ */
2864
+ on(event: 'playerEventsAdded', listener: (params: Protocol.Media.PlayerEventsAddedEvent) => void): void;
2865
+
2866
+ /**
2867
+ * Send a list of any messages that need to be delivered.
2868
+ */
2869
+ on(event: 'playerMessagesLogged', listener: (params: Protocol.Media.PlayerMessagesLoggedEvent) => void): void;
2870
+
2871
+ /**
2872
+ * Send a list of any errors that need to be delivered.
2873
+ */
2874
+ on(event: 'playerErrorsRaised', listener: (params: Protocol.Media.PlayerErrorsRaisedEvent) => void): void;
2875
+
2876
+ /**
2877
+ * Called whenever a player is created, or when a new agent joins and receives
2878
+ * a list of active players. If an agent is restored, it will receive the full
2879
+ * list of player ids and all events again.
2880
+ */
2881
+ on(event: 'playersCreated', listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
2882
+
2883
+ }
2884
+
2563
2885
  export interface MemoryApi {
2564
2886
  /**
2565
2887
  * Retruns current DOM object counters.
@@ -3152,6 +3474,9 @@ export namespace ProtocolProxyApi {
3152
3474
 
3153
3475
  /**
3154
3476
  * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
3477
+ * Issue: the method does not handle device pixel ratio (DPR) correctly.
3478
+ * The coordinates currently have to be adjusted by the client
3479
+ * if DPR is not 1 (see crbug.com/437807128).
3155
3480
  */
3156
3481
  highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise<void>;
3157
3482
 
@@ -3265,7 +3590,93 @@ export namespace ProtocolProxyApi {
3265
3590
 
3266
3591
  }
3267
3592
 
3268
- export interface PageApi {
3593
+ export interface PWAApi {
3594
+ /**
3595
+ * Returns the following OS state for the given manifest id.
3596
+ */
3597
+ getOsAppState(params: Protocol.PWA.GetOsAppStateRequest): Promise<Protocol.PWA.GetOsAppStateResponse>;
3598
+
3599
+ /**
3600
+ * Installs the given manifest identity, optionally using the given installUrlOrBundleUrl
3601
+ *
3602
+ * IWA-specific install description:
3603
+ * manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId
3604
+ *
3605
+ * File installation mode:
3606
+ * The installUrlOrBundleUrl can be either file:// or http(s):// pointing
3607
+ * to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to
3608
+ * The .swbn file's signing key.
3609
+ *
3610
+ * Dev proxy installation mode:
3611
+ * installUrlOrBundleUrl must be http(s):// that serves dev mode IWA.
3612
+ * web_package::SignedWebBundleId must be of type dev proxy.
3613
+ *
3614
+ * The advantage of dev proxy mode is that all changes to IWA
3615
+ * automatically will be reflected in the running app without
3616
+ * reinstallation.
3617
+ *
3618
+ * To generate bundle id for proxy mode:
3619
+ * 1. Generate 32 random bytes.
3620
+ * 2. Add a specific suffix 0x00 at the end.
3621
+ * 3. Encode the entire sequence using Base32 without padding.
3622
+ *
3623
+ * If Chrome is not in IWA dev
3624
+ * mode, the installation will fail, regardless of the state of the allowlist.
3625
+ */
3626
+ install(params: Protocol.PWA.InstallRequest): Promise<void>;
3627
+
3628
+ /**
3629
+ * Uninstalls the given manifest_id and closes any opened app windows.
3630
+ */
3631
+ uninstall(params: Protocol.PWA.UninstallRequest): Promise<void>;
3632
+
3633
+ /**
3634
+ * Launches the installed web app, or an url in the same web app instead of the
3635
+ * default start url if it is provided. Returns a page Target.TargetID which
3636
+ * can be used to attach to via Target.attachToTarget or similar APIs.
3637
+ */
3638
+ launch(params: Protocol.PWA.LaunchRequest): Promise<Protocol.PWA.LaunchResponse>;
3639
+
3640
+ /**
3641
+ * Opens one or more local files from an installed web app identified by its
3642
+ * manifestId. The web app needs to have file handlers registered to process
3643
+ * the files. The API returns one or more page Target.TargetIDs which can be
3644
+ * used to attach to via Target.attachToTarget or similar APIs.
3645
+ * If some files in the parameters cannot be handled by the web app, they will
3646
+ * be ignored. If none of the files can be handled, this API returns an error.
3647
+ * If no files are provided as the parameter, this API also returns an error.
3648
+ *
3649
+ * According to the definition of the file handlers in the manifest file, one
3650
+ * Target.TargetID may represent a page handling one or more files. The order
3651
+ * of the returned Target.TargetIDs is not guaranteed.
3652
+ *
3653
+ * TODO(crbug.com/339454034): Check the existences of the input files.
3654
+ */
3655
+ launchFilesInApp(params: Protocol.PWA.LaunchFilesInAppRequest): Promise<Protocol.PWA.LaunchFilesInAppResponse>;
3656
+
3657
+ /**
3658
+ * Opens the current page in its web app identified by the manifest id, needs
3659
+ * to be called on a page target. This function returns immediately without
3660
+ * waiting for the app to finish loading.
3661
+ */
3662
+ openCurrentPageInApp(params: Protocol.PWA.OpenCurrentPageInAppRequest): Promise<void>;
3663
+
3664
+ /**
3665
+ * Changes user settings of the web app identified by its manifestId. If the
3666
+ * app was not installed, this command returns an error. Unset parameters will
3667
+ * be ignored; unrecognized values will cause an error.
3668
+ *
3669
+ * Unlike the ones defined in the manifest files of the web apps, these
3670
+ * settings are provided by the browser and controlled by the users, they
3671
+ * impact the way the browser handling the web apps.
3672
+ *
3673
+ * See the comment of each parameter.
3674
+ */
3675
+ changeAppUserSettings(params: Protocol.PWA.ChangeAppUserSettingsRequest): Promise<void>;
3676
+
3677
+ }
3678
+
3679
+ export interface PageApi {
3269
3680
  /**
3270
3681
  * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
3271
3682
  * @deprecated
@@ -3854,6 +4265,40 @@ export namespace ProtocolProxyApi {
3854
4265
 
3855
4266
  }
3856
4267
 
4268
+ export interface PreloadApi {
4269
+ enable(): Promise<void>;
4270
+
4271
+ disable(): Promise<void>;
4272
+
4273
+ /**
4274
+ * Upsert. Currently, it is only emitted when a rule set added.
4275
+ */
4276
+ on(event: 'ruleSetUpdated', listener: (params: Protocol.Preload.RuleSetUpdatedEvent) => void): void;
4277
+
4278
+ on(event: 'ruleSetRemoved', listener: (params: Protocol.Preload.RuleSetRemovedEvent) => void): void;
4279
+
4280
+ /**
4281
+ * Fired when a preload enabled state is updated.
4282
+ */
4283
+ on(event: 'preloadEnabledStateUpdated', listener: (params: Protocol.Preload.PreloadEnabledStateUpdatedEvent) => void): void;
4284
+
4285
+ /**
4286
+ * Fired when a prefetch attempt is updated.
4287
+ */
4288
+ on(event: 'prefetchStatusUpdated', listener: (params: Protocol.Preload.PrefetchStatusUpdatedEvent) => void): void;
4289
+
4290
+ /**
4291
+ * Fired when a prerender attempt is updated.
4292
+ */
4293
+ on(event: 'prerenderStatusUpdated', listener: (params: Protocol.Preload.PrerenderStatusUpdatedEvent) => void): void;
4294
+
4295
+ /**
4296
+ * Send a list of sources for all preloading attempts in a document.
4297
+ */
4298
+ on(event: 'preloadingAttemptSourcesUpdated', listener: (params: Protocol.Preload.PreloadingAttemptSourcesUpdatedEvent) => void): void;
4299
+
4300
+ }
4301
+
3857
4302
  export interface SecurityApi {
3858
4303
  /**
3859
4304
  * Disables tracking security state changes.
@@ -4477,97 +4922,6 @@ export namespace ProtocolProxyApi {
4477
4922
 
4478
4923
  }
4479
4924
 
4480
- export interface FetchApi {
4481
- /**
4482
- * Disables the fetch domain.
4483
- */
4484
- disable(): Promise<void>;
4485
-
4486
- /**
4487
- * Enables issuing of requestPaused events. A request will be paused until client
4488
- * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
4489
- */
4490
- enable(params: Protocol.Fetch.EnableRequest): Promise<void>;
4491
-
4492
- /**
4493
- * Causes the request to fail with specified reason.
4494
- */
4495
- failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<void>;
4496
-
4497
- /**
4498
- * Provides response to the request.
4499
- */
4500
- fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<void>;
4501
-
4502
- /**
4503
- * Continues the request, optionally modifying some of its parameters.
4504
- */
4505
- continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<void>;
4506
-
4507
- /**
4508
- * Continues a request supplying authChallengeResponse following authRequired event.
4509
- */
4510
- continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest): Promise<void>;
4511
-
4512
- /**
4513
- * Continues loading of the paused response, optionally modifying the
4514
- * response headers. If either responseCode or headers are modified, all of them
4515
- * must be present.
4516
- * @experimental
4517
- */
4518
- continueResponse(params: Protocol.Fetch.ContinueResponseRequest): Promise<void>;
4519
-
4520
- /**
4521
- * Causes the body of the response to be received from the server and
4522
- * returned as a single string. May only be issued for a request that
4523
- * is paused in the Response stage and is mutually exclusive with
4524
- * takeResponseBodyForInterceptionAsStream. Calling other methods that
4525
- * affect the request or disabling fetch domain before body is received
4526
- * results in an undefined behavior.
4527
- * Note that the response body is not available for redirects. Requests
4528
- * paused in the _redirect received_ state may be differentiated by
4529
- * `responseCode` and presence of `location` response header, see
4530
- * comments to `requestPaused` for details.
4531
- */
4532
- getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest): Promise<Protocol.Fetch.GetResponseBodyResponse>;
4533
-
4534
- /**
4535
- * Returns a handle to the stream representing the response body.
4536
- * The request must be paused in the HeadersReceived stage.
4537
- * Note that after this command the request can't be continued
4538
- * as is -- client either needs to cancel it or to provide the
4539
- * response body.
4540
- * The stream only supports sequential read, IO.read will fail if the position
4541
- * is specified.
4542
- * This method is mutually exclusive with getResponseBody.
4543
- * Calling other methods that affect the request or disabling fetch
4544
- * domain before body is received results in an undefined behavior.
4545
- */
4546
- takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest): Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
4547
-
4548
- /**
4549
- * Issued when the domain is enabled and the request URL matches the
4550
- * specified filter. The request is paused until the client responds
4551
- * with one of continueRequest, failRequest or fulfillRequest.
4552
- * The stage of the request can be determined by presence of responseErrorReason
4553
- * and responseStatusCode -- the request is at the response stage if either
4554
- * of these fields is present and in the request stage otherwise.
4555
- * Redirect responses and subsequent requests are reported similarly to regular
4556
- * responses and requests. Redirect responses may be distinguished by the value
4557
- * of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with
4558
- * presence of the `location` header. Requests resulting from a redirect will
4559
- * have `redirectedRequestId` field set.
4560
- */
4561
- on(event: 'requestPaused', listener: (params: Protocol.Fetch.RequestPausedEvent) => void): void;
4562
-
4563
- /**
4564
- * Issued when the domain is enabled with handleAuthRequests set to true.
4565
- * The request is paused until client responds with continueWithAuth.
4566
- */
4567
- on(event: 'authRequired', listener: (params: Protocol.Fetch.AuthRequiredEvent) => void): void;
4568
-
4569
- }
4570
-
4571
4925
  export interface WebAudioApi {
4572
4926
  /**
4573
4927
  * Enables the WebAudio domain and starts sending context lifetime events.
@@ -4745,339 +5099,6 @@ export namespace ProtocolProxyApi {
4745
5099
  on(event: 'credentialAsserted', listener: (params: Protocol.WebAuthn.CredentialAssertedEvent) => void): void;
4746
5100
 
4747
5101
  }
4748
-
4749
- export interface MediaApi {
4750
- /**
4751
- * Enables the Media domain
4752
- */
4753
- enable(): Promise<void>;
4754
-
4755
- /**
4756
- * Disables the Media domain.
4757
- */
4758
- disable(): Promise<void>;
4759
-
4760
- /**
4761
- * This can be called multiple times, and can be used to set / override /
4762
- * remove player properties. A null propValue indicates removal.
4763
- */
4764
- on(event: 'playerPropertiesChanged', listener: (params: Protocol.Media.PlayerPropertiesChangedEvent) => void): void;
4765
-
4766
- /**
4767
- * Send events as a list, allowing them to be batched on the browser for less
4768
- * congestion. If batched, events must ALWAYS be in chronological order.
4769
- */
4770
- on(event: 'playerEventsAdded', listener: (params: Protocol.Media.PlayerEventsAddedEvent) => void): void;
4771
-
4772
- /**
4773
- * Send a list of any messages that need to be delivered.
4774
- */
4775
- on(event: 'playerMessagesLogged', listener: (params: Protocol.Media.PlayerMessagesLoggedEvent) => void): void;
4776
-
4777
- /**
4778
- * Send a list of any errors that need to be delivered.
4779
- */
4780
- on(event: 'playerErrorsRaised', listener: (params: Protocol.Media.PlayerErrorsRaisedEvent) => void): void;
4781
-
4782
- /**
4783
- * Called whenever a player is created, or when a new agent joins and receives
4784
- * a list of active players. If an agent is restored, it will receive the full
4785
- * list of player ids and all events again.
4786
- */
4787
- on(event: 'playersCreated', listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
4788
-
4789
- }
4790
-
4791
- export interface DeviceAccessApi {
4792
- /**
4793
- * Enable events in this domain.
4794
- */
4795
- enable(): Promise<void>;
4796
-
4797
- /**
4798
- * Disable events in this domain.
4799
- */
4800
- disable(): Promise<void>;
4801
-
4802
- /**
4803
- * Select a device in response to a DeviceAccess.deviceRequestPrompted event.
4804
- */
4805
- selectPrompt(params: Protocol.DeviceAccess.SelectPromptRequest): Promise<void>;
4806
-
4807
- /**
4808
- * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
4809
- */
4810
- cancelPrompt(params: Protocol.DeviceAccess.CancelPromptRequest): Promise<void>;
4811
-
4812
- /**
4813
- * A device request opened a user prompt to select a device. Respond with the
4814
- * selectPrompt or cancelPrompt command.
4815
- */
4816
- on(event: 'deviceRequestPrompted', listener: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => void): void;
4817
-
4818
- }
4819
-
4820
- export interface PreloadApi {
4821
- enable(): Promise<void>;
4822
-
4823
- disable(): Promise<void>;
4824
-
4825
- /**
4826
- * Upsert. Currently, it is only emitted when a rule set added.
4827
- */
4828
- on(event: 'ruleSetUpdated', listener: (params: Protocol.Preload.RuleSetUpdatedEvent) => void): void;
4829
-
4830
- on(event: 'ruleSetRemoved', listener: (params: Protocol.Preload.RuleSetRemovedEvent) => void): void;
4831
-
4832
- /**
4833
- * Fired when a preload enabled state is updated.
4834
- */
4835
- on(event: 'preloadEnabledStateUpdated', listener: (params: Protocol.Preload.PreloadEnabledStateUpdatedEvent) => void): void;
4836
-
4837
- /**
4838
- * Fired when a prefetch attempt is updated.
4839
- */
4840
- on(event: 'prefetchStatusUpdated', listener: (params: Protocol.Preload.PrefetchStatusUpdatedEvent) => void): void;
4841
-
4842
- /**
4843
- * Fired when a prerender attempt is updated.
4844
- */
4845
- on(event: 'prerenderStatusUpdated', listener: (params: Protocol.Preload.PrerenderStatusUpdatedEvent) => void): void;
4846
-
4847
- /**
4848
- * Send a list of sources for all preloading attempts in a document.
4849
- */
4850
- on(event: 'preloadingAttemptSourcesUpdated', listener: (params: Protocol.Preload.PreloadingAttemptSourcesUpdatedEvent) => void): void;
4851
-
4852
- }
4853
-
4854
- export interface FedCmApi {
4855
- enable(params: Protocol.FedCm.EnableRequest): Promise<void>;
4856
-
4857
- disable(): Promise<void>;
4858
-
4859
- selectAccount(params: Protocol.FedCm.SelectAccountRequest): Promise<void>;
4860
-
4861
- clickDialogButton(params: Protocol.FedCm.ClickDialogButtonRequest): Promise<void>;
4862
-
4863
- openUrl(params: Protocol.FedCm.OpenUrlRequest): Promise<void>;
4864
-
4865
- dismissDialog(params: Protocol.FedCm.DismissDialogRequest): Promise<void>;
4866
-
4867
- /**
4868
- * Resets the cooldown time, if any, to allow the next FedCM call to show
4869
- * a dialog even if one was recently dismissed by the user.
4870
- */
4871
- resetCooldown(): Promise<void>;
4872
-
4873
- on(event: 'dialogShown', listener: (params: Protocol.FedCm.DialogShownEvent) => void): void;
4874
-
4875
- /**
4876
- * Triggered when a dialog is closed, either by user action, JS abort,
4877
- * or a command below.
4878
- */
4879
- on(event: 'dialogClosed', listener: (params: Protocol.FedCm.DialogClosedEvent) => void): void;
4880
-
4881
- }
4882
-
4883
- export interface PWAApi {
4884
- /**
4885
- * Returns the following OS state for the given manifest id.
4886
- */
4887
- getOsAppState(params: Protocol.PWA.GetOsAppStateRequest): Promise<Protocol.PWA.GetOsAppStateResponse>;
4888
-
4889
- /**
4890
- * Installs the given manifest identity, optionally using the given installUrlOrBundleUrl
4891
- *
4892
- * IWA-specific install description:
4893
- * manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId
4894
- *
4895
- * File installation mode:
4896
- * The installUrlOrBundleUrl can be either file:// or http(s):// pointing
4897
- * to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to
4898
- * The .swbn file's signing key.
4899
- *
4900
- * Dev proxy installation mode:
4901
- * installUrlOrBundleUrl must be http(s):// that serves dev mode IWA.
4902
- * web_package::SignedWebBundleId must be of type dev proxy.
4903
- *
4904
- * The advantage of dev proxy mode is that all changes to IWA
4905
- * automatically will be reflected in the running app without
4906
- * reinstallation.
4907
- *
4908
- * To generate bundle id for proxy mode:
4909
- * 1. Generate 32 random bytes.
4910
- * 2. Add a specific suffix 0x00 at the end.
4911
- * 3. Encode the entire sequence using Base32 without padding.
4912
- *
4913
- * If Chrome is not in IWA dev
4914
- * mode, the installation will fail, regardless of the state of the allowlist.
4915
- */
4916
- install(params: Protocol.PWA.InstallRequest): Promise<void>;
4917
-
4918
- /**
4919
- * Uninstalls the given manifest_id and closes any opened app windows.
4920
- */
4921
- uninstall(params: Protocol.PWA.UninstallRequest): Promise<void>;
4922
-
4923
- /**
4924
- * Launches the installed web app, or an url in the same web app instead of the
4925
- * default start url if it is provided. Returns a page Target.TargetID which
4926
- * can be used to attach to via Target.attachToTarget or similar APIs.
4927
- */
4928
- launch(params: Protocol.PWA.LaunchRequest): Promise<Protocol.PWA.LaunchResponse>;
4929
-
4930
- /**
4931
- * Opens one or more local files from an installed web app identified by its
4932
- * manifestId. The web app needs to have file handlers registered to process
4933
- * the files. The API returns one or more page Target.TargetIDs which can be
4934
- * used to attach to via Target.attachToTarget or similar APIs.
4935
- * If some files in the parameters cannot be handled by the web app, they will
4936
- * be ignored. If none of the files can be handled, this API returns an error.
4937
- * If no files are provided as the parameter, this API also returns an error.
4938
- *
4939
- * According to the definition of the file handlers in the manifest file, one
4940
- * Target.TargetID may represent a page handling one or more files. The order
4941
- * of the returned Target.TargetIDs is not guaranteed.
4942
- *
4943
- * TODO(crbug.com/339454034): Check the existences of the input files.
4944
- */
4945
- launchFilesInApp(params: Protocol.PWA.LaunchFilesInAppRequest): Promise<Protocol.PWA.LaunchFilesInAppResponse>;
4946
-
4947
- /**
4948
- * Opens the current page in its web app identified by the manifest id, needs
4949
- * to be called on a page target. This function returns immediately without
4950
- * waiting for the app to finish loading.
4951
- */
4952
- openCurrentPageInApp(params: Protocol.PWA.OpenCurrentPageInAppRequest): Promise<void>;
4953
-
4954
- /**
4955
- * Changes user settings of the web app identified by its manifestId. If the
4956
- * app was not installed, this command returns an error. Unset parameters will
4957
- * be ignored; unrecognized values will cause an error.
4958
- *
4959
- * Unlike the ones defined in the manifest files of the web apps, these
4960
- * settings are provided by the browser and controlled by the users, they
4961
- * impact the way the browser handling the web apps.
4962
- *
4963
- * See the comment of each parameter.
4964
- */
4965
- changeAppUserSettings(params: Protocol.PWA.ChangeAppUserSettingsRequest): Promise<void>;
4966
-
4967
- }
4968
-
4969
- export interface BluetoothEmulationApi {
4970
- /**
4971
- * Enable the BluetoothEmulation domain.
4972
- */
4973
- enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise<void>;
4974
-
4975
- /**
4976
- * Set the state of the simulated central.
4977
- */
4978
- setSimulatedCentralState(params: Protocol.BluetoothEmulation.SetSimulatedCentralStateRequest): Promise<void>;
4979
-
4980
- /**
4981
- * Disable the BluetoothEmulation domain.
4982
- */
4983
- disable(): Promise<void>;
4984
-
4985
- /**
4986
- * Simulates a peripheral with |address|, |name| and |knownServiceUuids|
4987
- * that has already been connected to the system.
4988
- */
4989
- simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise<void>;
4990
-
4991
- /**
4992
- * Simulates an advertisement packet described in |entry| being received by
4993
- * the central.
4994
- */
4995
- simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise<void>;
4996
-
4997
- /**
4998
- * Simulates the response code from the peripheral with |address| for a
4999
- * GATT operation of |type|. The |code| value follows the HCI Error Codes from
5000
- * Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
5001
- */
5002
- simulateGATTOperationResponse(params: Protocol.BluetoothEmulation.SimulateGATTOperationResponseRequest): Promise<void>;
5003
-
5004
- /**
5005
- * Simulates the response from the characteristic with |characteristicId| for a
5006
- * characteristic operation of |type|. The |code| value follows the Error
5007
- * Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
5008
- * The |data| is expected to exist when simulating a successful read operation
5009
- * response.
5010
- */
5011
- simulateCharacteristicOperationResponse(params: Protocol.BluetoothEmulation.SimulateCharacteristicOperationResponseRequest): Promise<void>;
5012
-
5013
- /**
5014
- * Simulates the response from the descriptor with |descriptorId| for a
5015
- * descriptor operation of |type|. The |code| value follows the Error
5016
- * Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
5017
- * The |data| is expected to exist when simulating a successful read operation
5018
- * response.
5019
- */
5020
- simulateDescriptorOperationResponse(params: Protocol.BluetoothEmulation.SimulateDescriptorOperationResponseRequest): Promise<void>;
5021
-
5022
- /**
5023
- * Adds a service with |serviceUuid| to the peripheral with |address|.
5024
- */
5025
- addService(params: Protocol.BluetoothEmulation.AddServiceRequest): Promise<Protocol.BluetoothEmulation.AddServiceResponse>;
5026
-
5027
- /**
5028
- * Removes the service respresented by |serviceId| from the simulated central.
5029
- */
5030
- removeService(params: Protocol.BluetoothEmulation.RemoveServiceRequest): Promise<void>;
5031
-
5032
- /**
5033
- * Adds a characteristic with |characteristicUuid| and |properties| to the
5034
- * service represented by |serviceId|.
5035
- */
5036
- addCharacteristic(params: Protocol.BluetoothEmulation.AddCharacteristicRequest): Promise<Protocol.BluetoothEmulation.AddCharacteristicResponse>;
5037
-
5038
- /**
5039
- * Removes the characteristic respresented by |characteristicId| from the
5040
- * simulated central.
5041
- */
5042
- removeCharacteristic(params: Protocol.BluetoothEmulation.RemoveCharacteristicRequest): Promise<void>;
5043
-
5044
- /**
5045
- * Adds a descriptor with |descriptorUuid| to the characteristic respresented
5046
- * by |characteristicId|.
5047
- */
5048
- addDescriptor(params: Protocol.BluetoothEmulation.AddDescriptorRequest): Promise<Protocol.BluetoothEmulation.AddDescriptorResponse>;
5049
-
5050
- /**
5051
- * Removes the descriptor with |descriptorId| from the simulated central.
5052
- */
5053
- removeDescriptor(params: Protocol.BluetoothEmulation.RemoveDescriptorRequest): Promise<void>;
5054
-
5055
- /**
5056
- * Simulates a GATT disconnection from the peripheral with |address|.
5057
- */
5058
- simulateGATTDisconnection(params: Protocol.BluetoothEmulation.SimulateGATTDisconnectionRequest): Promise<void>;
5059
-
5060
- /**
5061
- * Event for when a GATT operation of |type| to the peripheral with |address|
5062
- * happened.
5063
- */
5064
- on(event: 'gattOperationReceived', listener: (params: Protocol.BluetoothEmulation.GattOperationReceivedEvent) => void): void;
5065
-
5066
- /**
5067
- * Event for when a characteristic operation of |type| to the characteristic
5068
- * respresented by |characteristicId| happened. |data| and |writeType| is
5069
- * expected to exist when |type| is write.
5070
- */
5071
- on(event: 'characteristicOperationReceived', listener: (params: Protocol.BluetoothEmulation.CharacteristicOperationReceivedEvent) => void): void;
5072
-
5073
- /**
5074
- * Event for when a descriptor operation of |type| to the descriptor
5075
- * respresented by |descriptorId| happened. |data| is expected to exist when
5076
- * |type| is write.
5077
- */
5078
- on(event: 'descriptorOperationReceived', listener: (params: Protocol.BluetoothEmulation.DescriptorOperationReceivedEvent) => void): void;
5079
-
5080
- }
5081
5102
  }
5082
5103
 
5083
5104
  export default ProtocolProxyApi;