Skip to content

Commit e8cd2d7

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent a340b9b commit e8cd2d7

File tree

10 files changed

+268
-13
lines changed

10 files changed

+268
-13
lines changed

gen-src/ChromeDevtoolsProtocol/DevtoolsClientInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
use ChromeDevtoolsProtocol\Domain\TetheringDomainInterface;
4646
use ChromeDevtoolsProtocol\Domain\TracingDomainInterface;
4747
use ChromeDevtoolsProtocol\Domain\WebAudioDomainInterface;
48+
use ChromeDevtoolsProtocol\Domain\WebAuthnDomainInterface;
4849

4950
/**
5051
* Interface for Chrome devtools protocol client.
@@ -363,4 +364,12 @@ public function tracing(): TracingDomainInterface;
363364
* @experimental
364365
*/
365366
public function webAudio(): WebAudioDomainInterface;
367+
368+
369+
/**
370+
* This domain allows configuring virtual authenticators to test the WebAuthn API.
371+
*
372+
* @experimental
373+
*/
374+
public function webAuthn(): WebAuthnDomainInterface;
366375
}

gen-src/ChromeDevtoolsProtocol/DevtoolsClientTrait.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
use ChromeDevtoolsProtocol\Domain\TracingDomainInterface;
8989
use ChromeDevtoolsProtocol\Domain\WebAudioDomain;
9090
use ChromeDevtoolsProtocol\Domain\WebAudioDomainInterface;
91+
use ChromeDevtoolsProtocol\Domain\WebAuthnDomain;
92+
use ChromeDevtoolsProtocol\Domain\WebAuthnDomainInterface;
9193

9294
trait DevtoolsClientTrait
9395
{
@@ -609,4 +611,16 @@ public function webAudio(): WebAudioDomainInterface
609611
$domain = $this->domains['WebAudio'];
610612
return $domain;
611613
}
614+
615+
616+
public function webAuthn(): WebAuthnDomainInterface
617+
{
618+
if (!isset($this->domains['WebAuthn'])) {
619+
/** @var InternalClientInterface $this */
620+
$this->domains['WebAuthn'] = new WebAuthnDomain($this);
621+
}
622+
/** @var WebAuthnDomainInterface $domain */
623+
$domain = $this->domains['WebAuthn'];
624+
return $domain;
625+
}
612626
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Domain;
4+
5+
use ChromeDevtoolsProtocol\ContextInterface;
6+
use ChromeDevtoolsProtocol\InternalClientInterface;
7+
8+
class WebAuthnDomain implements WebAuthnDomainInterface
9+
{
10+
/** @var InternalClientInterface */
11+
public $internalClient;
12+
13+
14+
public function __construct(InternalClientInterface $internalClient)
15+
{
16+
$this->internalClient = $internalClient;
17+
}
18+
19+
20+
public function disable(ContextInterface $ctx): void
21+
{
22+
$request = new \stdClass();
23+
$this->internalClient->executeCommand($ctx, 'WebAuthn.disable', $request);
24+
}
25+
26+
27+
public function enable(ContextInterface $ctx): void
28+
{
29+
$request = new \stdClass();
30+
$this->internalClient->executeCommand($ctx, 'WebAuthn.enable', $request);
31+
}
32+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Domain;
4+
5+
use ChromeDevtoolsProtocol\ContextInterface;
6+
7+
/**
8+
* This domain allows configuring virtual authenticators to test the WebAuthn API.
9+
*
10+
* @experimental
11+
*
12+
* @generated This file has been auto-generated, do not edit.
13+
*
14+
* @author Jakub Kulhan <[email protected]>
15+
*/
16+
interface WebAuthnDomainInterface
17+
{
18+
/**
19+
* Disable the WebAuthn domain.
20+
*
21+
* @param ContextInterface $ctx
22+
*
23+
* @return void
24+
*/
25+
public function disable(ContextInterface $ctx): void;
26+
27+
28+
/**
29+
* Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.
30+
*
31+
* @param ContextInterface $ctx
32+
*
33+
* @return void
34+
*/
35+
public function enable(ContextInterface $ctx): void;
36+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Cast;
4+
5+
/**
6+
* Named type Cast.Sink.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class Sink implements \JsonSerializable
13+
{
14+
/** @var string */
15+
public $name;
16+
17+
/** @var string */
18+
public $id;
19+
20+
/**
21+
* Text describing the current session. Present only if there is an active session on the sink.
22+
*
23+
* @var string|null
24+
*/
25+
public $session;
26+
27+
28+
public static function fromJson($data)
29+
{
30+
$instance = new static();
31+
if (isset($data->name)) {
32+
$instance->name = (string)$data->name;
33+
}
34+
if (isset($data->id)) {
35+
$instance->id = (string)$data->id;
36+
}
37+
if (isset($data->session)) {
38+
$instance->session = (string)$data->session;
39+
}
40+
return $instance;
41+
}
42+
43+
44+
public function jsonSerialize()
45+
{
46+
$data = new \stdClass();
47+
if ($this->name !== null) {
48+
$data->name = $this->name;
49+
}
50+
if ($this->id !== null) {
51+
$data->id = $this->id;
52+
}
53+
if ($this->session !== null) {
54+
$data->session = $this->session;
55+
}
56+
return $data;
57+
}
58+
}

gen-src/ChromeDevtoolsProtocol/Model/Cast/SinksUpdatedEvent.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
*/
1212
final class SinksUpdatedEvent implements \JsonSerializable
1313
{
14-
/** @var string[] */
15-
public $sinkNames;
14+
/** @var Sink[] */
15+
public $sinks;
1616

1717

1818
public static function fromJson($data)
1919
{
2020
$instance = new static();
21-
if (isset($data->sinkNames)) {
22-
$instance->sinkNames = [];
23-
foreach ($data->sinkNames as $item) {
24-
$instance->sinkNames[] = (string)$item;
21+
if (isset($data->sinks)) {
22+
$instance->sinks = [];
23+
foreach ($data->sinks as $item) {
24+
$instance->sinks[] = Sink::fromJson($item);
2525
}
2626
}
2727
return $instance;
@@ -31,10 +31,10 @@ public static function fromJson($data)
3131
public function jsonSerialize()
3232
{
3333
$data = new \stdClass();
34-
if ($this->sinkNames !== null) {
35-
$data->sinkNames = [];
36-
foreach ($this->sinkNames as $item) {
37-
$data->sinkNames[] = $item;
34+
if ($this->sinks !== null) {
35+
$data->sinks = [];
36+
foreach ($this->sinks as $item) {
37+
$data->sinks[] = $item->jsonSerialize();
3838
}
3939
}
4040
return $data;

gen-src/ChromeDevtoolsProtocol/Model/Target/CreateTargetRequest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ final class CreateTargetRequest implements \JsonSerializable
4646
*/
4747
public $enableBeginFrameControl;
4848

49+
/**
50+
* Whether to create a new Window or Tab (chrome-only, false by default).
51+
*
52+
* @var bool|null
53+
*/
54+
public $newWindow;
55+
56+
/**
57+
* Whether to create the target in background or foreground (chrome-only, false by default).
58+
*
59+
* @var bool|null
60+
*/
61+
public $background;
62+
4963

5064
public static function fromJson($data)
5165
{
@@ -65,6 +79,12 @@ public static function fromJson($data)
6579
if (isset($data->enableBeginFrameControl)) {
6680
$instance->enableBeginFrameControl = (bool)$data->enableBeginFrameControl;
6781
}
82+
if (isset($data->newWindow)) {
83+
$instance->newWindow = (bool)$data->newWindow;
84+
}
85+
if (isset($data->background)) {
86+
$instance->background = (bool)$data->background;
87+
}
6888
return $instance;
6989
}
7090

@@ -87,6 +107,12 @@ public function jsonSerialize()
87107
if ($this->enableBeginFrameControl !== null) {
88108
$data->enableBeginFrameControl = $this->enableBeginFrameControl;
89109
}
110+
if ($this->newWindow !== null) {
111+
$data->newWindow = $this->newWindow;
112+
}
113+
if ($this->background !== null) {
114+
$data->background = $this->background;
115+
}
90116
return $data;
91117
}
92118

gen-src/ChromeDevtoolsProtocol/Model/Target/CreateTargetRequestBuilder.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ final class CreateTargetRequestBuilder
2121

2222
private $enableBeginFrameControl;
2323

24+
private $newWindow;
25+
26+
private $background;
27+
2428

2529
/**
2630
* Validate non-optional parameters and return new instance.
@@ -36,6 +40,8 @@ public function build(): CreateTargetRequest
3640
$instance->height = $this->height;
3741
$instance->browserContextId = $this->browserContextId;
3842
$instance->enableBeginFrameControl = $this->enableBeginFrameControl;
43+
$instance->newWindow = $this->newWindow;
44+
$instance->background = $this->background;
3945
return $instance;
4046
}
4147

@@ -98,4 +104,28 @@ public function setEnableBeginFrameControl($enableBeginFrameControl): self
98104
$this->enableBeginFrameControl = $enableBeginFrameControl;
99105
return $this;
100106
}
107+
108+
109+
/**
110+
* @param bool|null $newWindow
111+
*
112+
* @return self
113+
*/
114+
public function setNewWindow($newWindow): self
115+
{
116+
$this->newWindow = $newWindow;
117+
return $this;
118+
}
119+
120+
121+
/**
122+
* @param bool|null $background
123+
*
124+
* @return self
125+
*/
126+
public function setBackground($background): self
127+
{
128+
$this->background = $background;
129+
return $this;
130+
}
101131
}

protocol.json

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,28 @@
17471747
"domain": "Cast",
17481748
"description": "A domain for interacting with Cast, Presentation API, and Remote Playback API functionalities.",
17491749
"experimental": true,
1750+
"types": [
1751+
{
1752+
"id": "Sink",
1753+
"type": "object",
1754+
"properties": [
1755+
{
1756+
"name": "name",
1757+
"type": "string"
1758+
},
1759+
{
1760+
"name": "id",
1761+
"type": "string"
1762+
},
1763+
{
1764+
"name": "session",
1765+
"description": "Text describing the current session. Present only if there is an active session on the sink.",
1766+
"optional": true,
1767+
"type": "string"
1768+
}
1769+
]
1770+
}
1771+
],
17501772
"commands": [
17511773
{
17521774
"name": "disable",
@@ -1810,10 +1832,10 @@
18101832
"description": "This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.",
18111833
"parameters": [
18121834
{
1813-
"name": "sinkNames",
1835+
"name": "sinks",
18141836
"type": "array",
18151837
"items": {
1816-
"type": "string"
1838+
"$ref": "Sink"
18171839
}
18181840
}
18191841
]
@@ -17233,6 +17255,18 @@
1723317255
"experimental": true,
1723417256
"optional": true,
1723517257
"type": "boolean"
17258+
},
17259+
{
17260+
"name": "newWindow",
17261+
"description": "Whether to create a new Window or Tab (chrome-only, false by default).",
17262+
"optional": true,
17263+
"type": "boolean"
17264+
},
17265+
{
17266+
"name": "background",
17267+
"description": "Whether to create the target in background or foreground (chrome-only, false by default).",
17268+
"optional": true,
17269+
"type": "boolean"
1723617270
}
1723717271
],
1723817272
"returns": [
@@ -17981,6 +18015,22 @@
1798118015
]
1798218016
}
1798318017
]
18018+
},
18019+
{
18020+
"domain": "WebAuthn",
18021+
"description": "This domain allows configuring virtual authenticators to test the WebAuthn API.",
18022+
"experimental": true,
18023+
"commands": [
18024+
{
18025+
"name": "disable",
18026+
"description": "Disable the WebAuthn domain."
18027+
},
18028+
{
18029+
"name": "enable",
18030+
"description": "Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator."
18031+
}
18032+
],
18033+
"events": []
1798418034
}
1798518035
]
1798618036
}

protocol.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3a1628dd8bfea39c6146c3e71629b668 protocol.json
1+
d5302cae56bd421515dbc07c0f1729a3 protocol.json

0 commit comments

Comments
 (0)