File tree Expand file tree Collapse file tree 7 files changed +182
-1
lines changed
gen-src/ChromeDevtoolsProtocol Expand file tree Collapse file tree 7 files changed +182
-1
lines changed Original file line number Diff line number Diff line change 21
21
use ChromeDevtoolsProtocol \Domain \DeviceOrientationDomainInterface ;
22
22
use ChromeDevtoolsProtocol \Domain \EmulationDomainInterface ;
23
23
use ChromeDevtoolsProtocol \Domain \EventBreakpointsDomainInterface ;
24
+ use ChromeDevtoolsProtocol \Domain \FedCmDomainInterface ;
24
25
use ChromeDevtoolsProtocol \Domain \FetchDomainInterface ;
25
26
use ChromeDevtoolsProtocol \Domain \HeadlessExperimentalDomainInterface ;
26
27
use ChromeDevtoolsProtocol \Domain \HeapProfilerDomainInterface ;
@@ -200,6 +201,14 @@ public function emulation(): EmulationDomainInterface;
200
201
public function eventBreakpoints (): EventBreakpointsDomainInterface ;
201
202
202
203
204
+ /**
205
+ * This domain allows interacting with the FedCM dialog.
206
+ *
207
+ * @experimental
208
+ */
209
+ public function fedCm (): FedCmDomainInterface ;
210
+
211
+
203
212
/**
204
213
* A domain for letting clients substitute browser's network layer with client code.
205
214
*/
Original file line number Diff line number Diff line change 40
40
use ChromeDevtoolsProtocol \Domain \EmulationDomainInterface ;
41
41
use ChromeDevtoolsProtocol \Domain \EventBreakpointsDomain ;
42
42
use ChromeDevtoolsProtocol \Domain \EventBreakpointsDomainInterface ;
43
+ use ChromeDevtoolsProtocol \Domain \FedCmDomain ;
44
+ use ChromeDevtoolsProtocol \Domain \FedCmDomainInterface ;
43
45
use ChromeDevtoolsProtocol \Domain \FetchDomain ;
44
46
use ChromeDevtoolsProtocol \Domain \FetchDomainInterface ;
45
47
use ChromeDevtoolsProtocol \Domain \HeadlessExperimentalDomain ;
@@ -333,6 +335,18 @@ public function eventBreakpoints(): EventBreakpointsDomainInterface
333
335
}
334
336
335
337
338
+ public function fedCm (): FedCmDomainInterface
339
+ {
340
+ if (!isset ($ this ->domains ['FedCm ' ])) {
341
+ /** @var InternalClientInterface $this */
342
+ $ this ->domains ['FedCm ' ] = new FedCmDomain ($ this );
343
+ }
344
+ /** @var FedCmDomainInterface $domain */
345
+ $ domain = $ this ->domains ['FedCm ' ];
346
+ return $ domain ;
347
+ }
348
+
349
+
336
350
public function fetch (): FetchDomainInterface
337
351
{
338
352
if (!isset ($ this ->domains ['Fetch ' ])) {
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace ChromeDevtoolsProtocol \Domain ;
4
+
5
+ use ChromeDevtoolsProtocol \ContextInterface ;
6
+ use ChromeDevtoolsProtocol \InternalClientInterface ;
7
+ use ChromeDevtoolsProtocol \Model \FedCm \DialogShownEvent ;
8
+ use ChromeDevtoolsProtocol \SubscriptionInterface ;
9
+
10
+ class FedCmDomain implements FedCmDomainInterface
11
+ {
12
+ /** @var InternalClientInterface */
13
+ public $ internalClient ;
14
+
15
+
16
+ public function __construct (InternalClientInterface $ internalClient )
17
+ {
18
+ $ this ->internalClient = $ internalClient ;
19
+ }
20
+
21
+
22
+ public function disable (ContextInterface $ ctx ): void
23
+ {
24
+ $ request = new \stdClass ();
25
+ $ this ->internalClient ->executeCommand ($ ctx , 'FedCm.disable ' , $ request );
26
+ }
27
+
28
+
29
+ public function enable (ContextInterface $ ctx ): void
30
+ {
31
+ $ request = new \stdClass ();
32
+ $ this ->internalClient ->executeCommand ($ ctx , 'FedCm.enable ' , $ request );
33
+ }
34
+
35
+
36
+ public function addDialogShownListener (callable $ listener ): SubscriptionInterface
37
+ {
38
+ return $ this ->internalClient ->addListener ('FedCm.dialogShown ' , function ($ event ) use ($ listener ) {
39
+ return $ listener (DialogShownEvent::fromJson ($ event ));
40
+ });
41
+ }
42
+
43
+
44
+ public function awaitDialogShown (ContextInterface $ ctx ): DialogShownEvent
45
+ {
46
+ return DialogShownEvent::fromJson ($ this ->internalClient ->awaitEvent ($ ctx , 'FedCm.dialogShown ' ));
47
+ }
48
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace ChromeDevtoolsProtocol \Domain ;
4
+
5
+ use ChromeDevtoolsProtocol \ContextInterface ;
6
+ use ChromeDevtoolsProtocol \Model \FedCm \DialogShownEvent ;
7
+ use ChromeDevtoolsProtocol \SubscriptionInterface ;
8
+
9
+ /**
10
+ * This domain allows interacting with the FedCM dialog.
11
+ *
12
+ * @experimental
13
+ *
14
+ * @generated This file has been auto-generated, do not edit.
15
+ *
16
+ * @author Jakub Kulhan <[email protected] >
17
+ */
18
+ interface FedCmDomainInterface
19
+ {
20
+ /**
21
+ * Call FedCm.disable command.
22
+ *
23
+ * @param ContextInterface $ctx
24
+ *
25
+ * @return void
26
+ */
27
+ public function disable (ContextInterface $ ctx ): void ;
28
+
29
+
30
+ /**
31
+ * Call FedCm.enable command.
32
+ *
33
+ * @param ContextInterface $ctx
34
+ *
35
+ * @return void
36
+ */
37
+ public function enable (ContextInterface $ ctx ): void ;
38
+
39
+
40
+ /**
41
+ * Subscribe to FedCm.dialogShown event.
42
+ *
43
+ * Listener will be called whenever event FedCm.dialogShown is fired.
44
+ *
45
+ * @param callable $listener
46
+ *
47
+ * @return SubscriptionInterface
48
+ */
49
+ public function addDialogShownListener (callable $ listener ): SubscriptionInterface ;
50
+
51
+
52
+ /**
53
+ * Wait for FedCm.dialogShown event.
54
+ *
55
+ * Method will block until first FedCm.dialogShown event is fired.
56
+ *
57
+ * @param ContextInterface $ctx
58
+ *
59
+ * @return DialogShownEvent
60
+ */
61
+ public function awaitDialogShown (ContextInterface $ ctx ): DialogShownEvent ;
62
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace ChromeDevtoolsProtocol \Model \FedCm ;
4
+
5
+ /**
6
+ * Named type FedCm.DialogShownEvent.
7
+ *
8
+ * @generated This file has been auto-generated, do not edit.
9
+ *
10
+ * @author Jakub Kulhan <[email protected] >
11
+ */
12
+ final class DialogShownEvent implements \JsonSerializable
13
+ {
14
+ /**
15
+ * @param object $data
16
+ * @return static
17
+ */
18
+ public static function fromJson ($ data )
19
+ {
20
+ $ instance = new static ();
21
+ return $ instance ;
22
+ }
23
+
24
+
25
+ public function jsonSerialize ()
26
+ {
27
+ $ data = new \stdClass ();
28
+ return $ data ;
29
+ }
30
+ }
Original file line number Diff line number Diff line change 10081
10081
],
10082
10082
"events": []
10083
10083
},
10084
+ {
10085
+ "domain": "FedCm",
10086
+ "description": "This domain allows interacting with the FedCM dialog.",
10087
+ "experimental": true,
10088
+ "events": [
10089
+ {
10090
+ "name": "dialogShown"
10091
+ }
10092
+ ],
10093
+ "commands": [
10094
+ {
10095
+ "name": "disable"
10096
+ },
10097
+ {
10098
+ "name": "enable"
10099
+ }
10100
+ ]
10101
+ },
10084
10102
{
10085
10103
"domain": "Fetch",
10086
10104
"description": "A domain for letting clients substitute browser's network layer with client code.",
Original file line number Diff line number Diff line change 1
- 506e354a921917d07e6468551b699bd1 protocol.json
1
+ 02c5e0749aef0b6ad99f6f5d32911f75 protocol.json
You can’t perform that action at this time.
0 commit comments