Skip to content

Commit c95e446

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent d88f094 commit c95e446

12 files changed

+255
-4
lines changed

gen-src/ChromeDevtoolsProtocol/Domain/EmulationDomain.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use ChromeDevtoolsProtocol\ContextInterface;
66
use ChromeDevtoolsProtocol\InternalClientInterface;
77
use ChromeDevtoolsProtocol\Model\Emulation\CanEmulateResponse;
8+
use ChromeDevtoolsProtocol\Model\Emulation\SetAutoDarkModeOverrideRequest;
89
use ChromeDevtoolsProtocol\Model\Emulation\SetCPUThrottlingRateRequest;
910
use ChromeDevtoolsProtocol\Model\Emulation\SetDefaultBackgroundColorOverrideRequest;
1011
use ChromeDevtoolsProtocol\Model\Emulation\SetDeviceMetricsOverrideRequest;
@@ -78,6 +79,12 @@ public function resetPageScaleFactor(ContextInterface $ctx): void
7879
}
7980

8081

82+
public function setAutoDarkModeOverride(ContextInterface $ctx, SetAutoDarkModeOverrideRequest $request): void
83+
{
84+
$this->internalClient->executeCommand($ctx, 'Emulation.setAutoDarkModeOverride', $request);
85+
}
86+
87+
8188
public function setCPUThrottlingRate(ContextInterface $ctx, SetCPUThrottlingRateRequest $request): void
8289
{
8390
$this->internalClient->executeCommand($ctx, 'Emulation.setCPUThrottlingRate', $request);

gen-src/ChromeDevtoolsProtocol/Domain/EmulationDomainInterface.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use ChromeDevtoolsProtocol\ContextInterface;
66
use ChromeDevtoolsProtocol\Model\Emulation\CanEmulateResponse;
7+
use ChromeDevtoolsProtocol\Model\Emulation\SetAutoDarkModeOverrideRequest;
78
use ChromeDevtoolsProtocol\Model\Emulation\SetCPUThrottlingRateRequest;
89
use ChromeDevtoolsProtocol\Model\Emulation\SetDefaultBackgroundColorOverrideRequest;
910
use ChromeDevtoolsProtocol\Model\Emulation\SetDeviceMetricsOverrideRequest;
@@ -88,6 +89,17 @@ public function clearIdleOverride(ContextInterface $ctx): void;
8889
public function resetPageScaleFactor(ContextInterface $ctx): void;
8990

9091

92+
/**
93+
* Automatically render all web contents using a dark theme.
94+
*
95+
* @param ContextInterface $ctx
96+
* @param SetAutoDarkModeOverrideRequest $request
97+
*
98+
* @return void
99+
*/
100+
public function setAutoDarkModeOverride(ContextInterface $ctx, SetAutoDarkModeOverrideRequest $request): void;
101+
102+
91103
/**
92104
* Enables CPU throttling to emulate slow CPUs.
93105
*

gen-src/ChromeDevtoolsProtocol/Domain/NetworkDomain.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
use ChromeDevtoolsProtocol\Model\Network\LoadingFinishedEvent;
3434
use ChromeDevtoolsProtocol\Model\Network\ReplayXHRRequest;
3535
use ChromeDevtoolsProtocol\Model\Network\ReportingApiReportAddedEvent;
36+
use ChromeDevtoolsProtocol\Model\Network\ReportingApiReportUpdatedEvent;
3637
use ChromeDevtoolsProtocol\Model\Network\RequestInterceptedEvent;
3738
use ChromeDevtoolsProtocol\Model\Network\RequestServedFromCacheEvent;
3839
use ChromeDevtoolsProtocol\Model\Network\RequestWillBeSentEvent;
@@ -387,6 +388,20 @@ public function awaitReportingApiReportAdded(ContextInterface $ctx): ReportingAp
387388
}
388389

389390

391+
public function addReportingApiReportUpdatedListener(callable $listener): SubscriptionInterface
392+
{
393+
return $this->internalClient->addListener('Network.reportingApiReportUpdated', function ($event) use ($listener) {
394+
return $listener(ReportingApiReportUpdatedEvent::fromJson($event));
395+
});
396+
}
397+
398+
399+
public function awaitReportingApiReportUpdated(ContextInterface $ctx): ReportingApiReportUpdatedEvent
400+
{
401+
return ReportingApiReportUpdatedEvent::fromJson($this->internalClient->awaitEvent($ctx, 'Network.reportingApiReportUpdated'));
402+
}
403+
404+
390405
public function addRequestInterceptedListener(callable $listener): SubscriptionInterface
391406
{
392407
return $this->internalClient->addListener('Network.requestIntercepted', function ($event) use ($listener) {

gen-src/ChromeDevtoolsProtocol/Domain/NetworkDomainInterface.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use ChromeDevtoolsProtocol\Model\Network\LoadingFinishedEvent;
3333
use ChromeDevtoolsProtocol\Model\Network\ReplayXHRRequest;
3434
use ChromeDevtoolsProtocol\Model\Network\ReportingApiReportAddedEvent;
35+
use ChromeDevtoolsProtocol\Model\Network\ReportingApiReportUpdatedEvent;
3536
use ChromeDevtoolsProtocol\Model\Network\RequestInterceptedEvent;
3637
use ChromeDevtoolsProtocol\Model\Network\RequestServedFromCacheEvent;
3738
use ChromeDevtoolsProtocol\Model\Network\RequestWillBeSentEvent;
@@ -574,6 +575,30 @@ public function addReportingApiReportAddedListener(callable $listener): Subscrip
574575
public function awaitReportingApiReportAdded(ContextInterface $ctx): ReportingApiReportAddedEvent;
575576

576577

578+
/**
579+
* Subscribe to Network.reportingApiReportUpdated event.
580+
*
581+
* Listener will be called whenever event Network.reportingApiReportUpdated is fired.
582+
*
583+
* @param callable $listener
584+
*
585+
* @return SubscriptionInterface
586+
*/
587+
public function addReportingApiReportUpdatedListener(callable $listener): SubscriptionInterface;
588+
589+
590+
/**
591+
* Wait for Network.reportingApiReportUpdated event.
592+
*
593+
* Method will block until first Network.reportingApiReportUpdated event is fired.
594+
*
595+
* @param ContextInterface $ctx
596+
*
597+
* @return ReportingApiReportUpdatedEvent
598+
*/
599+
public function awaitReportingApiReportUpdated(ContextInterface $ctx): ReportingApiReportUpdatedEvent;
600+
601+
577602
/**
578603
* Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
579604
*
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Emulation;
4+
5+
/**
6+
* Request for Emulation.setAutoDarkModeOverride command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class SetAutoDarkModeOverrideRequest implements \JsonSerializable
13+
{
14+
/**
15+
* Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.
16+
*
17+
* @var bool|null
18+
*/
19+
public $enabled;
20+
21+
22+
public static function fromJson($data)
23+
{
24+
$instance = new static();
25+
if (isset($data->enabled)) {
26+
$instance->enabled = (bool)$data->enabled;
27+
}
28+
return $instance;
29+
}
30+
31+
32+
public function jsonSerialize()
33+
{
34+
$data = new \stdClass();
35+
if ($this->enabled !== null) {
36+
$data->enabled = $this->enabled;
37+
}
38+
return $data;
39+
}
40+
41+
42+
/**
43+
* Create new instance using builder.
44+
*
45+
* @return SetAutoDarkModeOverrideRequestBuilder
46+
*/
47+
public static function builder(): SetAutoDarkModeOverrideRequestBuilder
48+
{
49+
return new SetAutoDarkModeOverrideRequestBuilder();
50+
}
51+
52+
53+
/**
54+
* Create new empty instance.
55+
*
56+
* @return self
57+
*/
58+
public static function make(): self
59+
{
60+
return static::builder()->build();
61+
}
62+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Emulation;
4+
5+
/**
6+
* @generated This file has been auto-generated, do not edit.
7+
*
8+
* @author Jakub Kulhan <[email protected]>
9+
*/
10+
final class SetAutoDarkModeOverrideRequestBuilder
11+
{
12+
private $enabled;
13+
14+
15+
/**
16+
* Validate non-optional parameters and return new instance.
17+
*/
18+
public function build(): SetAutoDarkModeOverrideRequest
19+
{
20+
$instance = new SetAutoDarkModeOverrideRequest();
21+
$instance->enabled = $this->enabled;
22+
return $instance;
23+
}
24+
25+
26+
/**
27+
* @param bool|null $enabled
28+
*
29+
* @return self
30+
*/
31+
public function setEnabled($enabled): self
32+
{
33+
$this->enabled = $enabled;
34+
return $this;
35+
}
36+
}

gen-src/ChromeDevtoolsProtocol/Model/Network/ReportStatusEnum.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ final class ReportStatusEnum
1313
{
1414
const QUEUED = 'Queued';
1515
const PENDING = 'Pending';
16+
const MARKED_FOR_REMOVAL = 'MarkedForRemoval';
17+
const SUCCESS = 'Success';
1618
}

gen-src/ChromeDevtoolsProtocol/Model/Network/ReportingApiReport.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,19 @@ final class ReportingApiReport implements \JsonSerializable
4949
*/
5050
public $depth;
5151

52+
/**
53+
* The number of delivery attempts made so far, not including an active attempt.
54+
*
55+
* @var int
56+
*/
57+
public $completedAttempts;
58+
5259
/** @var object */
5360
public $body;
5461

62+
/** @var string */
63+
public $status;
64+
5565

5666
public static function fromJson($data)
5767
{
@@ -74,9 +84,15 @@ public static function fromJson($data)
7484
if (isset($data->depth)) {
7585
$instance->depth = (int)$data->depth;
7686
}
87+
if (isset($data->completedAttempts)) {
88+
$instance->completedAttempts = (int)$data->completedAttempts;
89+
}
7790
if (isset($data->body)) {
7891
$instance->body = $data->body;
7992
}
93+
if (isset($data->status)) {
94+
$instance->status = (string)$data->status;
95+
}
8096
return $instance;
8197
}
8298

@@ -102,9 +118,15 @@ public function jsonSerialize()
102118
if ($this->depth !== null) {
103119
$data->depth = $this->depth;
104120
}
121+
if ($this->completedAttempts !== null) {
122+
$data->completedAttempts = $this->completedAttempts;
123+
}
105124
if ($this->body !== null) {
106125
$data->body = $this->body;
107126
}
127+
if ($this->status !== null) {
128+
$data->status = $this->status;
129+
}
108130
return $data;
109131
}
110132
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Network;
4+
5+
/**
6+
* Named type Network.ReportingApiReportUpdatedEvent.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ReportingApiReportUpdatedEvent implements \JsonSerializable
13+
{
14+
/** @var ReportingApiReport */
15+
public $report;
16+
17+
18+
public static function fromJson($data)
19+
{
20+
$instance = new static();
21+
if (isset($data->report)) {
22+
$instance->report = ReportingApiReport::fromJson($data->report);
23+
}
24+
return $instance;
25+
}
26+
27+
28+
public function jsonSerialize()
29+
{
30+
$data = new \stdClass();
31+
if ($this->report !== null) {
32+
$data->report = $this->report->jsonSerialize();
33+
}
34+
return $data;
35+
}
36+
}

gen-src/ChromeDevtoolsProtocol/Model/Page/BackForwardCacheNotRestoredReasonEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ final class BackForwardCacheNotRestoredReasonEnum
105105
const KEYBOARD_LOCK = 'KeyboardLock';
106106
const WEB_O_T_P_SERVICE = 'WebOTPService';
107107
const OUTSTANDING_NETWORK_REQUEST_DIRECT_SOCKET = 'OutstandingNetworkRequestDirectSocket';
108-
const ISOLATED_WORLD_SCRIPT = 'IsolatedWorldScript';
108+
const INJECTED_JAVASCRIPT = 'InjectedJavascript';
109109
const INJECTED_STYLE_SHEET = 'InjectedStyleSheet';
110110
const CONTENT_SECURITY_HANDLER = 'ContentSecurityHandler';
111111
const CONTENT_WEB_AUTHENTICATION_A_P_I = 'ContentWebAuthenticationAPI';

0 commit comments

Comments
 (0)