Skip to content

Commit e79dd27

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent fb289df commit e79dd27

File tree

7 files changed

+182
-1
lines changed

7 files changed

+182
-1
lines changed

gen-src/ChromeDevtoolsProtocol/DevtoolsClientInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use ChromeDevtoolsProtocol\Domain\DeviceOrientationDomainInterface;
2222
use ChromeDevtoolsProtocol\Domain\EmulationDomainInterface;
2323
use ChromeDevtoolsProtocol\Domain\EventBreakpointsDomainInterface;
24+
use ChromeDevtoolsProtocol\Domain\FedCmDomainInterface;
2425
use ChromeDevtoolsProtocol\Domain\FetchDomainInterface;
2526
use ChromeDevtoolsProtocol\Domain\HeadlessExperimentalDomainInterface;
2627
use ChromeDevtoolsProtocol\Domain\HeapProfilerDomainInterface;
@@ -200,6 +201,14 @@ public function emulation(): EmulationDomainInterface;
200201
public function eventBreakpoints(): EventBreakpointsDomainInterface;
201202

202203

204+
/**
205+
* This domain allows interacting with the FedCM dialog.
206+
*
207+
* @experimental
208+
*/
209+
public function fedCm(): FedCmDomainInterface;
210+
211+
203212
/**
204213
* A domain for letting clients substitute browser's network layer with client code.
205214
*/

gen-src/ChromeDevtoolsProtocol/DevtoolsClientTrait.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
use ChromeDevtoolsProtocol\Domain\EmulationDomainInterface;
4141
use ChromeDevtoolsProtocol\Domain\EventBreakpointsDomain;
4242
use ChromeDevtoolsProtocol\Domain\EventBreakpointsDomainInterface;
43+
use ChromeDevtoolsProtocol\Domain\FedCmDomain;
44+
use ChromeDevtoolsProtocol\Domain\FedCmDomainInterface;
4345
use ChromeDevtoolsProtocol\Domain\FetchDomain;
4446
use ChromeDevtoolsProtocol\Domain\FetchDomainInterface;
4547
use ChromeDevtoolsProtocol\Domain\HeadlessExperimentalDomain;
@@ -333,6 +335,18 @@ public function eventBreakpoints(): EventBreakpointsDomainInterface
333335
}
334336

335337

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+
336350
public function fetch(): FetchDomainInterface
337351
{
338352
if (!isset($this->domains['Fetch'])) {
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
}

protocol.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10081,6 +10081,24 @@
1008110081
],
1008210082
"events": []
1008310083
},
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+
},
1008410102
{
1008510103
"domain": "Fetch",
1008610104
"description": "A domain for letting clients substitute browser's network layer with client code.",

protocol.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
506e354a921917d07e6468551b699bd1 protocol.json
1+
02c5e0749aef0b6ad99f6f5d32911f75 protocol.json

0 commit comments

Comments
 (0)