Skip to content

Commit b025517

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent e5c8d67 commit b025517

File tree

6 files changed

+156
-3
lines changed

6 files changed

+156
-3
lines changed

gen-src/ChromeDevtoolsProtocol/Domain/TargetDomain.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use ChromeDevtoolsProtocol\Model\Target\AttachToTargetRequest;
1010
use ChromeDevtoolsProtocol\Model\Target\AttachToTargetResponse;
1111
use ChromeDevtoolsProtocol\Model\Target\AttachedToTargetEvent;
12+
use ChromeDevtoolsProtocol\Model\Target\AutoAttachRelatedRequest;
1213
use ChromeDevtoolsProtocol\Model\Target\CloseTargetRequest;
1314
use ChromeDevtoolsProtocol\Model\Target\CloseTargetResponse;
1415
use ChromeDevtoolsProtocol\Model\Target\CreateBrowserContextRequest;
@@ -67,6 +68,12 @@ public function attachToTarget(ContextInterface $ctx, AttachToTargetRequest $req
6768
}
6869

6970

71+
public function autoAttachRelated(ContextInterface $ctx, AutoAttachRelatedRequest $request): void
72+
{
73+
$this->internalClient->executeCommand($ctx, 'Target.autoAttachRelated', $request);
74+
}
75+
76+
7077
public function closeTarget(ContextInterface $ctx, CloseTargetRequest $request): CloseTargetResponse
7178
{
7279
$response = $this->internalClient->executeCommand($ctx, 'Target.closeTarget', $request);

gen-src/ChromeDevtoolsProtocol/Domain/TargetDomainInterface.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use ChromeDevtoolsProtocol\Model\Target\AttachToTargetRequest;
99
use ChromeDevtoolsProtocol\Model\Target\AttachToTargetResponse;
1010
use ChromeDevtoolsProtocol\Model\Target\AttachedToTargetEvent;
11+
use ChromeDevtoolsProtocol\Model\Target\AutoAttachRelatedRequest;
1112
use ChromeDevtoolsProtocol\Model\Target\CloseTargetRequest;
1213
use ChromeDevtoolsProtocol\Model\Target\CloseTargetResponse;
1314
use ChromeDevtoolsProtocol\Model\Target\CreateBrowserContextRequest;
@@ -74,6 +75,17 @@ public function attachToBrowserTarget(ContextInterface $ctx): AttachToBrowserTar
7475
public function attachToTarget(ContextInterface $ctx, AttachToTargetRequest $request): AttachToTargetResponse;
7576

7677

78+
/**
79+
* Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. This cancel the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.
80+
*
81+
* @param ContextInterface $ctx
82+
* @param AutoAttachRelatedRequest $request
83+
*
84+
* @return void
85+
*/
86+
public function autoAttachRelated(ContextInterface $ctx, AutoAttachRelatedRequest $request): void;
87+
88+
7789
/**
7890
* Closes the target. If the target is a page that gets closed too.
7991
*
@@ -186,7 +198,7 @@ public function sendMessageToTarget(ContextInterface $ctx, SendMessageToTargetRe
186198

187199

188200
/**
189-
* Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets.
201+
* Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets.
190202
*
191203
* @param ContextInterface $ctx
192204
* @param SetAutoAttachRequest $request
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Target;
4+
5+
/**
6+
* Request for Target.autoAttachRelated command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class AutoAttachRelatedRequest implements \JsonSerializable
13+
{
14+
/** @var string */
15+
public $targetId;
16+
17+
/**
18+
* Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.
19+
*
20+
* @var bool
21+
*/
22+
public $waitForDebuggerOnStart;
23+
24+
25+
public static function fromJson($data)
26+
{
27+
$instance = new static();
28+
if (isset($data->targetId)) {
29+
$instance->targetId = (string)$data->targetId;
30+
}
31+
if (isset($data->waitForDebuggerOnStart)) {
32+
$instance->waitForDebuggerOnStart = (bool)$data->waitForDebuggerOnStart;
33+
}
34+
return $instance;
35+
}
36+
37+
38+
public function jsonSerialize()
39+
{
40+
$data = new \stdClass();
41+
if ($this->targetId !== null) {
42+
$data->targetId = $this->targetId;
43+
}
44+
if ($this->waitForDebuggerOnStart !== null) {
45+
$data->waitForDebuggerOnStart = $this->waitForDebuggerOnStart;
46+
}
47+
return $data;
48+
}
49+
50+
51+
/**
52+
* Create new instance using builder.
53+
*
54+
* @return AutoAttachRelatedRequestBuilder
55+
*/
56+
public static function builder(): AutoAttachRelatedRequestBuilder
57+
{
58+
return new AutoAttachRelatedRequestBuilder();
59+
}
60+
}
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\Target;
4+
5+
use ChromeDevtoolsProtocol\Exception\BuilderException;
6+
7+
/**
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class AutoAttachRelatedRequestBuilder
13+
{
14+
private $targetId;
15+
private $waitForDebuggerOnStart;
16+
17+
18+
/**
19+
* Validate non-optional parameters and return new instance.
20+
*/
21+
public function build(): AutoAttachRelatedRequest
22+
{
23+
$instance = new AutoAttachRelatedRequest();
24+
if ($this->targetId === null) {
25+
throw new BuilderException('Property [targetId] is required.');
26+
}
27+
$instance->targetId = $this->targetId;
28+
if ($this->waitForDebuggerOnStart === null) {
29+
throw new BuilderException('Property [waitForDebuggerOnStart] is required.');
30+
}
31+
$instance->waitForDebuggerOnStart = $this->waitForDebuggerOnStart;
32+
return $instance;
33+
}
34+
35+
36+
/**
37+
* @param string $targetId
38+
*
39+
* @return self
40+
*/
41+
public function setTargetId($targetId): self
42+
{
43+
$this->targetId = $targetId;
44+
return $this;
45+
}
46+
47+
48+
/**
49+
* @param bool $waitForDebuggerOnStart
50+
*
51+
* @return self
52+
*/
53+
public function setWaitForDebuggerOnStart($waitForDebuggerOnStart): self
54+
{
55+
$this->waitForDebuggerOnStart = $waitForDebuggerOnStart;
56+
return $this;
57+
}
58+
}

protocol.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22863,6 +22863,22 @@
2286322863
}
2286422864
]
2286522865
},
22866+
{
22867+
"name": "autoAttachRelated",
22868+
"description": "Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. This cancel the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.",
22869+
"experimental": true,
22870+
"parameters": [
22871+
{
22872+
"name": "targetId",
22873+
"$ref": "TargetID"
22874+
},
22875+
{
22876+
"name": "waitForDebuggerOnStart",
22877+
"description": "Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.",
22878+
"type": "boolean"
22879+
}
22880+
]
22881+
},
2286622882
{
2286722883
"name": "closeTarget",
2286822884
"description": "Closes the target. If the target is a page that gets closed too.",
@@ -23088,7 +23104,7 @@
2308823104
},
2308923105
{
2309023106
"name": "setAutoAttach",
23091-
"description": "Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets.",
23107+
"description": "Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets.",
2309223108
"experimental": true,
2309323109
"parameters": [
2309423110
{

protocol.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
60c074cb380576c321309d762bc10c96 protocol.json
1+
9305e2205e94398eeac0dc8309c2c2dc protocol.json

0 commit comments

Comments
 (0)