chrome-devtools-frontend 1.0.1654411 → 1.0.1656897
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +116 -0
- package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +82 -0
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +123 -0
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +125 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +75 -0
- package/AUTHORS +1 -0
- package/config/owner/COMMON_OWNERS +0 -4
- package/docs/playbook.md +1 -1
- package/front_end/Tests.js +1 -0
- package/front_end/core/common/Settings.ts +47 -30
- package/front_end/core/sdk/CPUThrottlingManager.ts +10 -159
- package/front_end/core/sdk/ConsoleModel.ts +13 -11
- package/front_end/core/sdk/DOMDebuggerModel.ts +11 -5
- package/front_end/core/sdk/DOMModel.ts +7 -5
- package/front_end/core/sdk/EventBreakpointsModel.ts +9 -5
- package/front_end/core/sdk/IsolateManager.ts +6 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +5 -3
- package/front_end/core/sdk/SourceMapCache.ts +2 -4
- package/front_end/core/sdk/SourceMapManager.ts +8 -7
- package/front_end/core/sdk/TargetManager.ts +17 -0
- package/front_end/entrypoints/devtools_app/devtools_app.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +12 -36
- package/front_end/entrypoints/main/SimpleApp.ts +0 -13
- package/front_end/entrypoints/main/main-meta.ts +1 -1
- package/front_end/foundation/Universe.ts +110 -3
- package/front_end/generated/InspectorBackendCommands.ts +5 -1
- package/front_end/generated/SupportedCSSProperties.js +2 -6
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +15 -0
- package/front_end/generated/protocol.ts +36 -1
- package/front_end/models/ai_assistance/AiConversation.ts +0 -6
- package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -156
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -358
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -6
- package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +0 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +0 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -14
- package/front_end/models/autofill_manager/AutofillManager.ts +1 -2
- package/front_end/models/crux-manager/CrUXManager.ts +16 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -13
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +12 -9
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +18 -9
- package/front_end/models/project_settings/ProjectSettingsModel.ts +12 -11
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +14 -59
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +3 -29
- package/front_end/panels/application/DeviceBoundSessionsView.ts +15 -3
- package/front_end/panels/application/FrameDetailsView.ts +2 -1
- package/front_end/panels/application/ServiceWorkersView.ts +193 -161
- package/front_end/panels/application/serviceWorkersView.css +8 -0
- package/front_end/panels/common/CPUThrottlingOption.ts +142 -0
- package/front_end/panels/common/ThrottlingUtils.ts +9 -4
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +45 -0
- package/front_end/panels/elements/ElementsPanel.ts +35 -102
- package/front_end/panels/elements/ElementsTreeOutline.ts +0 -4
- package/front_end/panels/elements/elements-meta.ts +3 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +46 -45
- package/front_end/panels/mobile_throttling/CalibrationController.ts +6 -5
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +40 -13
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +13 -17
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +15 -13
- package/front_end/panels/network/NetworkLogView.ts +0 -9
- package/front_end/panels/network/NetworkPanel.ts +1 -63
- package/front_end/panels/network/RequestInitiatorView.ts +29 -4
- package/front_end/panels/network/components/HeaderSectionRow.css +9 -7
- package/front_end/panels/network/components/HeaderSectionRow.ts +20 -1
- package/front_end/panels/network/components/RequestHeaderSection.css +5 -3
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -2
- package/front_end/panels/network/components/RequestHeadersView.css +1 -1
- package/front_end/panels/security/SecurityPanel.ts +36 -23
- package/front_end/panels/settings/SettingsScreen.ts +18 -103
- package/front_end/panels/settings/settings-meta.ts +0 -24
- package/front_end/panels/timeline/TimelineController.ts +3 -2
- package/front_end/panels/timeline/TimelinePanel.ts +20 -3
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +15 -14
- package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -0
- package/front_end/panels/utils/utils.ts +25 -24
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +34 -55
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +96 -83
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +23 -13
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Input.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +3 -41
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +34 -55
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -3
- package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/api/Realm.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/api/Target.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +1 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +13 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +24 -13
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/LifecycleWatcher.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -76
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/httpUtils.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +3 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -7
- package/front_end/ui/helpers/OpenInNewTab.ts +15 -7
- package/front_end/ui/legacy/TabbedPane.ts +1 -108
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +172 -123
- package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +89 -0
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +10 -0
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +89 -40
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
- package/front_end/Images/navigationControls.png +0 -0
- package/front_end/Images/navigationControls_2x.png +0 -0
- package/front_end/Images/popoverArrows.png +0 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -746
- package/front_end/entrypoints/greendev_floaty/floaty.css +0 -301
- package/front_end/entrypoints/greendev_floaty/floaty.html +0 -38
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -415
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +0 -834
- package/front_end/models/ai_assistance/agents/GreenDevAgentAntigravityCliSocketClient.ts +0 -53
- package/front_end/models/ai_assistance/agents/GreenDevAgentGeminiCliSocketClient.ts +0 -117
- package/front_end/models/annotations/AnnotationRepository.ts +0 -238
- package/front_end/models/annotations/AnnotationType.ts +0 -10
- package/front_end/models/annotations/README.md +0 -7
- package/front_end/models/annotations/annotations.ts +0 -6
- package/front_end/models/greendev/Prototypes.ts +0 -68
- package/front_end/models/greendev/README.md +0 -5
- package/front_end/models/greendev/greendev.ts +0 -5
- package/front_end/panels/common/Annotation.ts +0 -184
- package/front_end/panels/common/AnnotationManager.ts +0 -208
- package/front_end/panels/common/annotation.css +0 -40
- package/front_end/panels/greendev/GreenDevPanel.css +0 -282
- package/front_end/panels/greendev/GreenDevPanel.ts +0 -364
- package/front_end/panels/greendev/GreenDevShared.ts +0 -13
- package/front_end/panels/greendev/greendev-meta.ts +0 -52
- package/front_end/panels/greendev/greendev.ts +0 -9
|
@@ -8,15 +8,13 @@ import type {DebugId, SourceMapV3} from './SourceMap.js';
|
|
|
8
8
|
|
|
9
9
|
/** A thin wrapper around the Cache API to store source map JSONs keyed on Debug IDs */
|
|
10
10
|
export class SourceMapCache {
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
static instance(): SourceMapCache {
|
|
11
|
+
static create(): SourceMapCache {
|
|
14
12
|
if (typeof window === 'undefined') {
|
|
15
13
|
// TODO(crbug.com/451502260): Move this behind a `HostRuntime` interface.
|
|
16
14
|
return IN_MEMORY_INSTANCE as unknown as
|
|
17
15
|
SourceMapCache; // TS doesn't like that our in-memory class doesn't have the same private fields.
|
|
18
16
|
}
|
|
19
|
-
return
|
|
17
|
+
return new SourceMapCache('devtools-source-map-cache');
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
static createForTest(name: string): SourceMapCache {
|
|
@@ -22,6 +22,7 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
|
|
|
22
22
|
readonly #clientData = new Map<T, ClientData>();
|
|
23
23
|
readonly #sourceMaps = new Map<SourceMap, T>();
|
|
24
24
|
#attachingClient: T|null = null;
|
|
25
|
+
readonly #sourceMapCache = SourceMapCache.create();
|
|
25
26
|
|
|
26
27
|
constructor(target: Target, factory?: SourceMapFactory<T>) {
|
|
27
28
|
super();
|
|
@@ -118,7 +119,7 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
|
|
|
118
119
|
// SourceMapManager in their respective constructors.
|
|
119
120
|
const resourceLoader = this.#target.targetManager().context.get(PageResourceLoader);
|
|
120
121
|
clientData.sourceMapPromise =
|
|
121
|
-
loadSourceMap(resourceLoader, sourceMapURL, client.debugId(), initiator)
|
|
122
|
+
loadSourceMap(resourceLoader, this.#sourceMapCache, sourceMapURL, client.debugId(), initiator)
|
|
122
123
|
.then(
|
|
123
124
|
payload => {
|
|
124
125
|
const sourceMap = this.#factory(sourceURL, sourceMapURL, payload, client);
|
|
@@ -185,14 +186,14 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
|
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
async function loadSourceMap(
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
async function loadSourceMap(resourceLoader: ResourceLoader, sourceMapCache: SourceMapCache,
|
|
190
|
+
url: Platform.DevToolsPath.UrlString, debugId: DebugId|null,
|
|
191
|
+
initiator: PageResourceLoadInitiator): Promise<SourceMapV3> {
|
|
191
192
|
try {
|
|
192
193
|
if (debugId) {
|
|
193
194
|
const securityOrigin = initiator.initiatorUrl ? Common.ParsedURL.ParsedURL.extractOrigin(initiator.initiatorUrl) :
|
|
194
195
|
Platform.DevToolsPath.EmptyUrlString;
|
|
195
|
-
const cachedSourceMap = await
|
|
196
|
+
const cachedSourceMap = await sourceMapCache.get(debugId, securityOrigin);
|
|
196
197
|
if (cachedSourceMap) {
|
|
197
198
|
return cachedSourceMap;
|
|
198
199
|
}
|
|
@@ -204,7 +205,7 @@ async function loadSourceMap(
|
|
|
204
205
|
// In case something goes wrong with updating the cache, we still want to use the source map.
|
|
205
206
|
const securityOrigin = initiator.initiatorUrl ? Common.ParsedURL.ParsedURL.extractOrigin(initiator.initiatorUrl) :
|
|
206
207
|
Platform.DevToolsPath.EmptyUrlString;
|
|
207
|
-
await
|
|
208
|
+
await sourceMapCache.set(sourceMap.debugId as DebugId, securityOrigin, sourceMap).catch();
|
|
208
209
|
}
|
|
209
210
|
return sourceMap;
|
|
210
211
|
} catch (cause) {
|
|
@@ -216,7 +217,7 @@ export async function tryLoadSourceMap(
|
|
|
216
217
|
resourceLoader: ResourceLoader, url: Platform.DevToolsPath.UrlString,
|
|
217
218
|
initiator: PageResourceLoadInitiator): Promise<SourceMapV3|null> {
|
|
218
219
|
try {
|
|
219
|
-
return await loadSourceMap(resourceLoader, url, null, initiator);
|
|
220
|
+
return await loadSourceMap(resourceLoader, SourceMapCache.create(), url, null, initiator);
|
|
220
221
|
} catch (cause) {
|
|
221
222
|
console.error(cause);
|
|
222
223
|
return null;
|
|
@@ -10,6 +10,7 @@ import {assertNotNullOrUndefined} from '../platform/platform.js';
|
|
|
10
10
|
import type * as ProtocolClient from '../protocol_client/protocol_client.js';
|
|
11
11
|
import * as Root from '../root/root.js';
|
|
12
12
|
|
|
13
|
+
import {FrameManager} from './FrameManager.js';
|
|
13
14
|
import {type RegistrationInfo, SDKModel, type SDKModelConstructor} from './SDKModel.js';
|
|
14
15
|
import {Target, Type as TargetType} from './Target.js';
|
|
15
16
|
|
|
@@ -31,6 +32,22 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
31
32
|
return this.context.get(Common.Settings.Settings);
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
// TODO(crbug.com/493763857): Remove fallback once all unit tests use TestUniverse.
|
|
36
|
+
getConsole(): Common.Console.Console {
|
|
37
|
+
if ('has' in this.context && typeof this.context.has === 'function' && !this.context.has(Common.Console.Console)) {
|
|
38
|
+
return Common.Console.Console.instance();
|
|
39
|
+
}
|
|
40
|
+
return this.context.get(Common.Console.Console);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// TODO(crbug.com/493763857): Remove fallback once all unit tests use TestUniverse.
|
|
44
|
+
getFrameManager(): FrameManager {
|
|
45
|
+
if ('has' in this.context && typeof this.context.has === 'function' && !this.context.has(FrameManager)) {
|
|
46
|
+
return FrameManager.instance();
|
|
47
|
+
}
|
|
48
|
+
return this.context.get(FrameManager);
|
|
49
|
+
}
|
|
50
|
+
|
|
34
51
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
35
52
|
#modelListeners: Platform.MapUtilities.Multimap<string|symbol|number, {
|
|
36
53
|
modelClass: SDKModelConstructor,
|
|
@@ -5,7 +5,6 @@ import '../shell/shell.js';
|
|
|
5
5
|
import '../../panels/css_overview/css_overview-meta.js';
|
|
6
6
|
import '../../panels/elements/elements-meta.js';
|
|
7
7
|
import '../../panels/browser_debugger/browser_debugger-meta.js';
|
|
8
|
-
import '../../panels/greendev/greendev-meta.js';
|
|
9
8
|
import '../../panels/network/network-meta.js';
|
|
10
9
|
import '../../panels/security/security-meta.js';
|
|
11
10
|
import '../../panels/emulation/emulation-meta.js';
|
|
@@ -45,12 +45,10 @@ import * as Foundation from '../../foundation/foundation.js';
|
|
|
45
45
|
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
|
46
46
|
import * as Badges from '../../models/badges/badges.js';
|
|
47
47
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
48
|
-
import * as Breakpoints from '../../models/breakpoints/breakpoints.js';
|
|
49
48
|
import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
|
|
50
49
|
import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
51
50
|
import * as LiveMetrics from '../../models/live-metrics/live-metrics.js';
|
|
52
51
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
53
|
-
import * as ProjectSettings from '../../models/project_settings/project_settings.js';
|
|
54
52
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
55
53
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
56
54
|
import * as Snippets from '../../panels/snippets/snippets.js';
|
|
@@ -180,6 +178,13 @@ export class MainImpl {
|
|
|
180
178
|
console.timeEnd(label);
|
|
181
179
|
}
|
|
182
180
|
|
|
181
|
+
static get universeForTest(): Foundation.Universe.Universe {
|
|
182
|
+
if (!MainImpl.instanceForTest) {
|
|
183
|
+
throw new Error('MainImpl not initialized yet!');
|
|
184
|
+
}
|
|
185
|
+
return MainImpl.instanceForTest.#universe;
|
|
186
|
+
}
|
|
187
|
+
|
|
183
188
|
async #loaded(): Promise<void> {
|
|
184
189
|
console.timeStamp('Main._loaded');
|
|
185
190
|
Root.Runtime.Runtime.setPlatform(Host.Platform.platform());
|
|
@@ -202,6 +207,8 @@ export class MainImpl {
|
|
|
202
207
|
logSettingAccess: VisualLogging.logSettingAccess,
|
|
203
208
|
runSettingsMigration: !Host.InspectorFrontendHost.isUnderTest(),
|
|
204
209
|
},
|
|
210
|
+
hostConfig: Root.Runtime.hostConfig,
|
|
211
|
+
inspectorFrontendHost: Host.InspectorFrontendHost.InspectorFrontendHostInstance,
|
|
205
212
|
};
|
|
206
213
|
this.#universe = new Foundation.Universe.Universe(creationOptions);
|
|
207
214
|
Root.DevToolsContext.setGlobalInstance(this.#universe.context as Root.DevToolsContext.WritableDevToolsContext);
|
|
@@ -406,7 +413,7 @@ export class MainImpl {
|
|
|
406
413
|
MainImpl.time('Main._createAppUI');
|
|
407
414
|
|
|
408
415
|
// Request filesystems early, we won't create connections until callback is fired. Things will happen in parallel.
|
|
409
|
-
const isolatedFileSystemManager =
|
|
416
|
+
const isolatedFileSystemManager = this.#universe.isolatedFileSystemManager;
|
|
410
417
|
isolatedFileSystemManager.addEventListener(
|
|
411
418
|
Persistence.IsolatedFileSystemManager.Events.FileSystemError,
|
|
412
419
|
event => Snackbar.Snackbar.Snackbar.show({message: event.data}));
|
|
@@ -441,7 +448,6 @@ export class MainImpl {
|
|
|
441
448
|
});
|
|
442
449
|
|
|
443
450
|
UI.DockController.DockController.instance({forceNew: true, canDock});
|
|
444
|
-
SDK.DOMDebuggerModel.DOMDebuggerManager.instance({forceNew: true});
|
|
445
451
|
const targetManager = SDK.TargetManager.TargetManager.instance();
|
|
446
452
|
targetManager.addEventListener(
|
|
447
453
|
SDK.TargetManager.Events.SUSPEND_STATE_CHANGED, this.#onSuspendStateChanged.bind(this));
|
|
@@ -455,13 +461,6 @@ export class MainImpl {
|
|
|
455
461
|
const outermostTarget = data?.outermostTarget();
|
|
456
462
|
targetManager.setScopeTarget(outermostTarget);
|
|
457
463
|
});
|
|
458
|
-
Breakpoints.BreakpointManager.BreakpointManager.instance({
|
|
459
|
-
forceNew: true,
|
|
460
|
-
workspace: Workspace.Workspace.WorkspaceImpl.instance(),
|
|
461
|
-
targetManager,
|
|
462
|
-
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),
|
|
463
|
-
settings: Common.Settings.Settings.instance(),
|
|
464
|
-
});
|
|
465
464
|
// @ts-expect-error e2e test global
|
|
466
465
|
self.Extensions.extensionServer = PanelCommon.ExtensionServer.ExtensionServer.instance({forceNew: true});
|
|
467
466
|
|
|
@@ -470,11 +469,7 @@ export class MainImpl {
|
|
|
470
469
|
isolatedFileSystemManager.addPlatformFileSystem(
|
|
471
470
|
'snippet://' as Platform.DevToolsPath.UrlString, new Snippets.ScriptSnippetFileSystem.SnippetFileSystem());
|
|
472
471
|
|
|
473
|
-
const persistenceImpl = Persistence.Persistence.PersistenceImpl.instance(
|
|
474
|
-
forceNew: true,
|
|
475
|
-
workspace: Workspace.Workspace.WorkspaceImpl.instance(),
|
|
476
|
-
breakpointManager: Breakpoints.BreakpointManager.BreakpointManager.instance(),
|
|
477
|
-
});
|
|
472
|
+
const persistenceImpl = Persistence.Persistence.PersistenceImpl.instance();
|
|
478
473
|
const linkDecorator = new PanelCommon.PersistenceUtils.LinkDecorator(persistenceImpl);
|
|
479
474
|
Components.Linkifier.Linkifier.setLinkDecorator(linkDecorator);
|
|
480
475
|
Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance(
|
|
@@ -482,25 +477,6 @@ export class MainImpl {
|
|
|
482
477
|
|
|
483
478
|
new ExecutionContextSelector(targetManager, UI.Context.Context.instance());
|
|
484
479
|
|
|
485
|
-
const projectSettingsModel = ProjectSettings.ProjectSettingsModel.ProjectSettingsModel.instance({
|
|
486
|
-
forceNew: true,
|
|
487
|
-
hostConfig: Root.Runtime.hostConfig,
|
|
488
|
-
pageResourceLoader: SDK.PageResourceLoader.PageResourceLoader.instance(),
|
|
489
|
-
targetManager,
|
|
490
|
-
});
|
|
491
|
-
|
|
492
|
-
const automaticFileSystemManager = Persistence.AutomaticFileSystemManager.AutomaticFileSystemManager.instance({
|
|
493
|
-
forceNew: true,
|
|
494
|
-
inspectorFrontendHost: Host.InspectorFrontendHost.InspectorFrontendHostInstance,
|
|
495
|
-
projectSettingsModel,
|
|
496
|
-
});
|
|
497
|
-
Persistence.AutomaticFileSystemWorkspaceBinding.AutomaticFileSystemWorkspaceBinding.instance({
|
|
498
|
-
forceNew: true,
|
|
499
|
-
automaticFileSystemManager,
|
|
500
|
-
isolatedFileSystemManager,
|
|
501
|
-
workspace: Workspace.Workspace.WorkspaceImpl.instance(),
|
|
502
|
-
});
|
|
503
|
-
|
|
504
480
|
LiveMetrics.LiveMetrics.instance();
|
|
505
481
|
CrUXManager.CrUXManager.instance();
|
|
506
482
|
|
|
@@ -573,7 +549,7 @@ export class MainImpl {
|
|
|
573
549
|
Host.InspectorFrontendHostAPI.Events.RevealSourceLine, this.#revealSourceLine, this);
|
|
574
550
|
|
|
575
551
|
const inspectorView = UI.InspectorView.InspectorView.instance();
|
|
576
|
-
|
|
552
|
+
this.#universe.networkPersistenceManager.addEventListener(
|
|
577
553
|
Persistence.NetworkPersistenceManager.Events.LOCAL_OVERRIDES_REQUESTED, event => {
|
|
578
554
|
inspectorView.displaySelectOverrideFolderInfobar(event.data);
|
|
579
555
|
});
|
|
@@ -13,20 +13,7 @@ export class SimpleApp implements UI.App.App {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
let simpleAppProviderInstance: SimpleAppProvider;
|
|
17
|
-
|
|
18
16
|
export class SimpleAppProvider implements UI.AppProvider.AppProvider {
|
|
19
|
-
static instance(opts: {
|
|
20
|
-
forceNew: boolean|null,
|
|
21
|
-
} = {forceNew: null}): SimpleAppProvider {
|
|
22
|
-
const {forceNew} = opts;
|
|
23
|
-
if (!simpleAppProviderInstance || forceNew) {
|
|
24
|
-
simpleAppProviderInstance = new SimpleAppProvider();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return simpleAppProviderInstance;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
17
|
createApp(): UI.App.App {
|
|
31
18
|
return new SimpleApp();
|
|
32
19
|
}
|
|
@@ -949,7 +949,7 @@ UI.Toolbar.registerToolbarItem({
|
|
|
949
949
|
UI.AppProvider.registerAppProvider({
|
|
950
950
|
async loadAppProvider() {
|
|
951
951
|
const Main = await loadMainModule();
|
|
952
|
-
return Main.SimpleApp.SimpleAppProvider
|
|
952
|
+
return new Main.SimpleApp.SimpleAppProvider();
|
|
953
953
|
},
|
|
954
954
|
order: 10,
|
|
955
955
|
});
|
|
@@ -3,16 +3,24 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../core/common/common.js';
|
|
6
|
+
import type * as Host from '../core/host/host.js';
|
|
6
7
|
import * as Root from '../core/root/root.js';
|
|
7
8
|
import * as SDK from '../core/sdk/sdk.js';
|
|
8
9
|
import * as AutofillManager from '../models/autofill_manager/autofill_manager.js';
|
|
9
10
|
import * as Bindings from '../models/bindings/bindings.js';
|
|
11
|
+
import * as Breakpoints from '../models/breakpoints/breakpoints.js';
|
|
12
|
+
import * as CrUXManager from '../models/crux-manager/crux-manager.js';
|
|
13
|
+
import * as JavaScriptMetadata from '../models/javascript_metadata/javascript_metadata.js';
|
|
10
14
|
import * as Logs from '../models/logs/logs.js';
|
|
15
|
+
import * as Persistence from '../models/persistence/persistence.js';
|
|
16
|
+
import * as ProjectSettings from '../models/project_settings/project_settings.js';
|
|
11
17
|
import * as Workspace from '../models/workspace/workspace.js';
|
|
12
18
|
|
|
13
19
|
export interface CreationOptions {
|
|
14
|
-
settingsCreationOptions: Common.Settings.SettingsCreationOptions
|
|
20
|
+
settingsCreationOptions: Omit<Common.Settings.SettingsCreationOptions, 'console'>;
|
|
15
21
|
overrideAutoStartModels?: Set<SDK.SDKModel.SDKModelConstructor>;
|
|
22
|
+
hostConfig: Root.Runtime.HostConfig;
|
|
23
|
+
inspectorFrontendHost: Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI;
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
export class Universe {
|
|
@@ -26,17 +34,22 @@ export class Universe {
|
|
|
26
34
|
const context = new Root.DevToolsContext.WritableDevToolsContext();
|
|
27
35
|
this.context = context;
|
|
28
36
|
|
|
37
|
+
const console = new Common.Console.Console();
|
|
38
|
+
context.set(Common.Console.Console, console);
|
|
39
|
+
|
|
29
40
|
// TODO(crbug.com/458180550): Store instance only on this.context instead.
|
|
30
41
|
// For now the global is required as not everything in foundation cleanly
|
|
31
42
|
// reads from the scoped `Settings` instance.
|
|
32
43
|
const settings = Common.Settings.Settings.instance({
|
|
33
44
|
forceNew: true,
|
|
45
|
+
console,
|
|
34
46
|
...options.settingsCreationOptions,
|
|
35
47
|
});
|
|
36
48
|
context.set(Common.Settings.Settings, settings);
|
|
37
49
|
|
|
38
|
-
const
|
|
39
|
-
|
|
50
|
+
const isolatedFileSystemManager =
|
|
51
|
+
new Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager(settings, console);
|
|
52
|
+
context.set(Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager, isolatedFileSystemManager);
|
|
40
53
|
|
|
41
54
|
const targetManager = new SDK.TargetManager.TargetManager(context, options.overrideAutoStartModels);
|
|
42
55
|
context.set(SDK.TargetManager.TargetManager, targetManager);
|
|
@@ -51,12 +64,40 @@ export class Universe {
|
|
|
51
64
|
new SDK.PageResourceLoader.PageResourceLoader(targetManager, settings, multitargetNetworkManager, null);
|
|
52
65
|
context.set(SDK.PageResourceLoader.PageResourceLoader, pageResourceLoader);
|
|
53
66
|
|
|
67
|
+
const projectSettingsModel = new ProjectSettings.ProjectSettingsModel.ProjectSettingsModel(
|
|
68
|
+
options.hostConfig,
|
|
69
|
+
pageResourceLoader,
|
|
70
|
+
targetManager,
|
|
71
|
+
);
|
|
72
|
+
context.set(ProjectSettings.ProjectSettingsModel.ProjectSettingsModel, projectSettingsModel);
|
|
73
|
+
|
|
74
|
+
const automaticFileSystemManager = new Persistence.AutomaticFileSystemManager.AutomaticFileSystemManager(
|
|
75
|
+
options.inspectorFrontendHost, projectSettingsModel);
|
|
76
|
+
context.set(Persistence.AutomaticFileSystemManager.AutomaticFileSystemManager, automaticFileSystemManager);
|
|
77
|
+
|
|
54
78
|
const cpuThrottlingManager = new SDK.CPUThrottlingManager.CPUThrottlingManager(settings, targetManager);
|
|
55
79
|
context.set(SDK.CPUThrottlingManager.CPUThrottlingManager, cpuThrottlingManager);
|
|
56
80
|
|
|
81
|
+
const domDebuggerManager = new SDK.DOMDebuggerModel.DOMDebuggerManager(targetManager);
|
|
82
|
+
context.set(SDK.DOMDebuggerModel.DOMDebuggerManager, domDebuggerManager);
|
|
83
|
+
|
|
84
|
+
const cruxManager = new CrUXManager.CrUXManager(targetManager, settings);
|
|
85
|
+
context.set(CrUXManager.CrUXManager, cruxManager);
|
|
86
|
+
|
|
57
87
|
const workspace = new Workspace.Workspace.WorkspaceImpl();
|
|
58
88
|
context.set(Workspace.Workspace.WorkspaceImpl, workspace);
|
|
59
89
|
|
|
90
|
+
const automaticFileSystemWorkspaceBinding =
|
|
91
|
+
new Persistence.AutomaticFileSystemWorkspaceBinding.AutomaticFileSystemWorkspaceBinding(
|
|
92
|
+
automaticFileSystemManager,
|
|
93
|
+
isolatedFileSystemManager,
|
|
94
|
+
workspace,
|
|
95
|
+
);
|
|
96
|
+
context.set(
|
|
97
|
+
Persistence.AutomaticFileSystemWorkspaceBinding.AutomaticFileSystemWorkspaceBinding,
|
|
98
|
+
automaticFileSystemWorkspaceBinding,
|
|
99
|
+
);
|
|
100
|
+
|
|
60
101
|
const ignoreListManager = new Workspace.IgnoreListManager.IgnoreListManager(settings, targetManager);
|
|
61
102
|
context.set(Workspace.IgnoreListManager.IgnoreListManager, ignoreListManager);
|
|
62
103
|
|
|
@@ -68,20 +109,86 @@ export class Universe {
|
|
|
68
109
|
resourceMapping, targetManager, ignoreListManager, workspace);
|
|
69
110
|
context.set(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding, debuggerWorkspaceBinding);
|
|
70
111
|
|
|
112
|
+
const breakpointManager = new Breakpoints.BreakpointManager.BreakpointManager(targetManager, workspace,
|
|
113
|
+
debuggerWorkspaceBinding, settings);
|
|
114
|
+
context.set(Breakpoints.BreakpointManager.BreakpointManager, breakpointManager);
|
|
115
|
+
|
|
116
|
+
const persistence = new Persistence.Persistence.PersistenceImpl(workspace, breakpointManager);
|
|
117
|
+
context.set(Persistence.Persistence.PersistenceImpl, persistence);
|
|
118
|
+
|
|
119
|
+
const networkPersistenceManager = new Persistence.NetworkPersistenceManager.NetworkPersistenceManager(
|
|
120
|
+
workspace,
|
|
121
|
+
persistence,
|
|
122
|
+
breakpointManager,
|
|
123
|
+
targetManager,
|
|
124
|
+
settings,
|
|
125
|
+
isolatedFileSystemManager,
|
|
126
|
+
multitargetNetworkManager,
|
|
127
|
+
);
|
|
128
|
+
context.set(Persistence.NetworkPersistenceManager.NetworkPersistenceManager, networkPersistenceManager);
|
|
129
|
+
|
|
71
130
|
const networkLog = new Logs.NetworkLog.NetworkLog(targetManager, settings);
|
|
72
131
|
context.set(Logs.NetworkLog.NetworkLog, networkLog);
|
|
73
132
|
|
|
74
133
|
const logManager = new Logs.LogManager.LogManager(targetManager, networkLog);
|
|
75
134
|
context.set(Logs.LogManager.LogManager, logManager);
|
|
76
135
|
|
|
136
|
+
const javaScriptMetadata = new JavaScriptMetadata.JavaScriptMetadata.JavaScriptMetadataImpl();
|
|
137
|
+
context.set(JavaScriptMetadata.JavaScriptMetadata.JavaScriptMetadataImpl, javaScriptMetadata);
|
|
138
|
+
|
|
77
139
|
this.autofillManager = new AutofillManager.AutofillManager.AutofillManager(targetManager, frameManager);
|
|
78
140
|
}
|
|
79
141
|
|
|
142
|
+
get automaticFileSystemManager(): Persistence.AutomaticFileSystemManager.AutomaticFileSystemManager {
|
|
143
|
+
return this.context.get(Persistence.AutomaticFileSystemManager.AutomaticFileSystemManager);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
get automaticFileSystemWorkspaceBinding():
|
|
147
|
+
Persistence.AutomaticFileSystemWorkspaceBinding.AutomaticFileSystemWorkspaceBinding {
|
|
148
|
+
return this.context.get(Persistence.AutomaticFileSystemWorkspaceBinding.AutomaticFileSystemWorkspaceBinding);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
get breakpointManager(): Breakpoints.BreakpointManager.BreakpointManager {
|
|
152
|
+
return this.context.get(Breakpoints.BreakpointManager.BreakpointManager);
|
|
153
|
+
}
|
|
154
|
+
|
|
80
155
|
get cpuThrottlingManager(): SDK.CPUThrottlingManager.CPUThrottlingManager {
|
|
81
156
|
return this.context.get(SDK.CPUThrottlingManager.CPUThrottlingManager);
|
|
82
157
|
}
|
|
83
158
|
|
|
159
|
+
get cruxManager(): CrUXManager.CrUXManager {
|
|
160
|
+
return this.context.get(CrUXManager.CrUXManager);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
get domDebuggerManager(): SDK.DOMDebuggerModel.DOMDebuggerManager {
|
|
164
|
+
return this.context.get(SDK.DOMDebuggerModel.DOMDebuggerManager);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
get isolatedFileSystemManager(): Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager {
|
|
168
|
+
return this.context.get(Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
get networkPersistenceManager(): Persistence.NetworkPersistenceManager.NetworkPersistenceManager {
|
|
172
|
+
return this.context.get(Persistence.NetworkPersistenceManager.NetworkPersistenceManager);
|
|
173
|
+
}
|
|
174
|
+
|
|
84
175
|
get pageResourceLoader(): SDK.PageResourceLoader.PageResourceLoader {
|
|
85
176
|
return this.context.get(SDK.PageResourceLoader.PageResourceLoader);
|
|
86
177
|
}
|
|
178
|
+
|
|
179
|
+
get persistence(): Persistence.Persistence.PersistenceImpl {
|
|
180
|
+
return this.context.get(Persistence.Persistence.PersistenceImpl);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
get projectSettingsModel(): ProjectSettings.ProjectSettingsModel.ProjectSettingsModel {
|
|
184
|
+
return this.context.get(ProjectSettings.ProjectSettingsModel.ProjectSettingsModel);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
get settings(): Common.Settings.Settings {
|
|
188
|
+
return this.context.get(Common.Settings.Settings);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
get targetManager(): SDK.TargetManager.TargetManager {
|
|
192
|
+
return this.context.get(SDK.TargetManager.TargetManager);
|
|
193
|
+
}
|
|
87
194
|
}
|
|
@@ -509,6 +509,10 @@ inspectorBackend.registerType("DeviceAccess.PromptDevice", [{"name": "id", "type
|
|
|
509
509
|
inspectorBackend.registerCommand("DeviceOrientation.clearDeviceOrientationOverride", [], [], "Clears the overridden Device Orientation.");
|
|
510
510
|
inspectorBackend.registerCommand("DeviceOrientation.setDeviceOrientationOverride", [{"name": "alpha", "type": "number", "optional": false, "description": "Mock alpha", "typeRef": null}, {"name": "beta", "type": "number", "optional": false, "description": "Mock beta", "typeRef": null}, {"name": "gamma", "type": "number", "optional": false, "description": "Mock gamma", "typeRef": null}], [], "Overrides the Device Orientation.");
|
|
511
511
|
|
|
512
|
+
// DigitalCredentials.
|
|
513
|
+
inspectorBackend.registerEnum("DigitalCredentials.VirtualWalletAction", {Respond: "respond", Decline: "decline", Wait: "wait", Clear: "clear"});
|
|
514
|
+
inspectorBackend.registerCommand("DigitalCredentials.setVirtualWalletBehavior", [{"name": "action", "type": "string", "optional": false, "description": "The action of the virtual wallet.", "typeRef": "DigitalCredentials.VirtualWalletAction"}, {"name": "protocol", "type": "string", "optional": true, "description": "The protocol identifier (e.g. \\\"openid4vp\\\"). Required when |action| is \\\"respond\\\", forbidden otherwise.", "typeRef": null}, {"name": "response", "type": "object", "optional": true, "description": "The response data object returned by the wallet. Required when |action| is \\\"respond\\\", forbidden otherwise.", "typeRef": null}], [], "Sets the behavior of the virtual wallet for digital credential requests issued from this frame.");
|
|
515
|
+
|
|
512
516
|
// Emulation.
|
|
513
517
|
inspectorBackend.registerEnum("Emulation.ScreenOrientationType", {PortraitPrimary: "portraitPrimary", PortraitSecondary: "portraitSecondary", LandscapePrimary: "landscapePrimary", LandscapeSecondary: "landscapeSecondary"});
|
|
514
518
|
inspectorBackend.registerEnum("Emulation.DisplayFeatureOrientation", {Vertical: "vertical", Horizontal: "horizontal"});
|
|
@@ -815,7 +819,7 @@ inspectorBackend.registerEnum("Network.ContentSecurityPolicySource", {HTTP: "HTT
|
|
|
815
819
|
inspectorBackend.registerEnum("Network.ReportStatus", {Queued: "Queued", Pending: "Pending", MarkedForRemoval: "MarkedForRemoval", Success: "Success"});
|
|
816
820
|
inspectorBackend.registerEnum("Network.DeviceBoundSessionWithUsageUsage", {NotInScope: "NotInScope", InScopeRefreshNotYetNeeded: "InScopeRefreshNotYetNeeded", InScopeRefreshNotAllowed: "InScopeRefreshNotAllowed", ProactiveRefreshNotPossible: "ProactiveRefreshNotPossible", ProactiveRefreshAttempted: "ProactiveRefreshAttempted", Deferred: "Deferred"});
|
|
817
821
|
inspectorBackend.registerEnum("Network.DeviceBoundSessionUrlRuleRuleType", {Exclude: "Exclude", Include: "Include"});
|
|
818
|
-
inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", {Success: "Success",
|
|
822
|
+
inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", {Success: "Success", SigningKeyGenerationError: "SigningKeyGenerationError", AttestationKeyGenerationError: "AttestationKeyGenerationError", SigningError: "SigningError", TransientSigningError: "TransientSigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh", CrossOriginRegistrationSiteNotIncluded: "CrossOriginRegistrationSiteNotIncluded"});
|
|
819
823
|
inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", {Refreshed: "Refreshed", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError", RefreshQuotaExceeded: "RefreshQuotaExceeded", FatalError: "FatalError", SigningQuotaExceeded: "SigningQuotaExceeded", RefreshedAsWaiter: "RefreshedAsWaiter", TransientSigningError: "TransientSigningError"});
|
|
820
824
|
inspectorBackend.registerEnum("Network.TerminationEventDetailsDeletionReason", {Expired: "Expired", FailedToRestoreKey: "FailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", StoragePartitionCleared: "StoragePartitionCleared", ClearBrowsingData: "ClearBrowsingData", ServerRequested: "ServerRequested", InvalidSessionParams: "InvalidSessionParams", RefreshFatalError: "RefreshFatalError", DevTools: "DevTools"});
|
|
821
825
|
inspectorBackend.registerEnum("Network.ChallengeEventDetailsChallengeResult", {Success: "Success", NoSessionId: "NoSessionId", NoSessionMatch: "NoSessionMatch", CantSetBoundCookie: "CantSetBoundCookie"});
|
|
@@ -1969,9 +1969,7 @@ export const generatedProperties = [
|
|
|
1969
1969
|
"keywords": [
|
|
1970
1970
|
"auto"
|
|
1971
1971
|
],
|
|
1972
|
-
"name": "column-height"
|
|
1973
|
-
"runtime_flag": "MulticolColumnWrapping",
|
|
1974
|
-
"runtime_flag_status": "stable"
|
|
1972
|
+
"name": "column-height"
|
|
1975
1973
|
},
|
|
1976
1974
|
{
|
|
1977
1975
|
"longhands": [
|
|
@@ -2135,9 +2133,7 @@ export const generatedProperties = [
|
|
|
2135
2133
|
"nowrap",
|
|
2136
2134
|
"wrap"
|
|
2137
2135
|
],
|
|
2138
|
-
"name": "column-wrap"
|
|
2139
|
-
"runtime_flag": "MulticolColumnWrapping",
|
|
2140
|
-
"runtime_flag_status": "stable"
|
|
2136
|
+
"name": "column-wrap"
|
|
2141
2137
|
},
|
|
2142
2138
|
{
|
|
2143
2139
|
"devtools_keywords": [
|
|
@@ -2482,6 +2482,14 @@ export namespace ProtocolMapping {
|
|
|
2482
2482
|
paramsType: [Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest];
|
|
2483
2483
|
returnType: void;
|
|
2484
2484
|
};
|
|
2485
|
+
/**
|
|
2486
|
+
* Sets the behavior of the virtual wallet for digital credential requests
|
|
2487
|
+
* issued from this frame.
|
|
2488
|
+
*/
|
|
2489
|
+
'DigitalCredentials.setVirtualWalletBehavior': {
|
|
2490
|
+
paramsType: [Protocol.DigitalCredentials.SetVirtualWalletBehaviorRequest];
|
|
2491
|
+
returnType: void;
|
|
2492
|
+
};
|
|
2485
2493
|
/**
|
|
2486
2494
|
* Tells whether emulation is supported.
|
|
2487
2495
|
*/
|
|
@@ -54,6 +54,8 @@ declare namespace ProtocolProxyApi {
|
|
|
54
54
|
|
|
55
55
|
DeviceOrientation: DeviceOrientationApi;
|
|
56
56
|
|
|
57
|
+
DigitalCredentials: DigitalCredentialsApi;
|
|
58
|
+
|
|
57
59
|
Emulation: EmulationApi;
|
|
58
60
|
|
|
59
61
|
EventBreakpoints: EventBreakpointsApi;
|
|
@@ -169,6 +171,8 @@ declare namespace ProtocolProxyApi {
|
|
|
169
171
|
|
|
170
172
|
DeviceOrientation: DeviceOrientationDispatcher;
|
|
171
173
|
|
|
174
|
+
DigitalCredentials: DigitalCredentialsDispatcher;
|
|
175
|
+
|
|
172
176
|
Emulation: EmulationDispatcher;
|
|
173
177
|
|
|
174
178
|
EventBreakpoints: EventBreakpointsDispatcher;
|
|
@@ -1639,6 +1643,17 @@ declare namespace ProtocolProxyApi {
|
|
|
1639
1643
|
export interface DeviceOrientationDispatcher {
|
|
1640
1644
|
}
|
|
1641
1645
|
|
|
1646
|
+
export interface DigitalCredentialsApi {
|
|
1647
|
+
/**
|
|
1648
|
+
* Sets the behavior of the virtual wallet for digital credential requests
|
|
1649
|
+
* issued from this frame.
|
|
1650
|
+
*/
|
|
1651
|
+
invoke_setVirtualWalletBehavior(params: Protocol.DigitalCredentials.SetVirtualWalletBehaviorRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
1652
|
+
|
|
1653
|
+
}
|
|
1654
|
+
export interface DigitalCredentialsDispatcher {
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1642
1657
|
export interface EmulationApi {
|
|
1643
1658
|
/**
|
|
1644
1659
|
* Tells whether emulation is supported.
|
|
@@ -7010,6 +7010,39 @@ export namespace DeviceOrientation {
|
|
|
7010
7010
|
}
|
|
7011
7011
|
}
|
|
7012
7012
|
|
|
7013
|
+
/**
|
|
7014
|
+
* This domain allows interacting with the Digital Credentials API for automation.
|
|
7015
|
+
*/
|
|
7016
|
+
export namespace DigitalCredentials {
|
|
7017
|
+
|
|
7018
|
+
/**
|
|
7019
|
+
* The type of virtual wallet action.
|
|
7020
|
+
*/
|
|
7021
|
+
export const enum VirtualWalletAction {
|
|
7022
|
+
Respond = 'respond',
|
|
7023
|
+
Decline = 'decline',
|
|
7024
|
+
Wait = 'wait',
|
|
7025
|
+
Clear = 'clear',
|
|
7026
|
+
}
|
|
7027
|
+
|
|
7028
|
+
export interface SetVirtualWalletBehaviorRequest {
|
|
7029
|
+
/**
|
|
7030
|
+
* The action of the virtual wallet.
|
|
7031
|
+
*/
|
|
7032
|
+
action: VirtualWalletAction;
|
|
7033
|
+
/**
|
|
7034
|
+
* The protocol identifier (e.g. "openid4vp"). Required when |action| is
|
|
7035
|
+
* "respond", forbidden otherwise.
|
|
7036
|
+
*/
|
|
7037
|
+
protocol?: string;
|
|
7038
|
+
/**
|
|
7039
|
+
* The response data object returned by the wallet.
|
|
7040
|
+
* Required when |action| is "respond", forbidden otherwise.
|
|
7041
|
+
*/
|
|
7042
|
+
response?: any;
|
|
7043
|
+
}
|
|
7044
|
+
}
|
|
7045
|
+
|
|
7013
7046
|
/**
|
|
7014
7047
|
* This domain emulates different environments for the page.
|
|
7015
7048
|
*/
|
|
@@ -12009,10 +12042,12 @@ export namespace Network {
|
|
|
12009
12042
|
|
|
12010
12043
|
/**
|
|
12011
12044
|
* A fetch result for a device bound session creation or refresh.
|
|
12045
|
+
* LINT_SKIP.IfChange(DeviceBoundSessionFetchResult)
|
|
12012
12046
|
*/
|
|
12013
12047
|
export const enum DeviceBoundSessionFetchResult {
|
|
12014
12048
|
Success = 'Success',
|
|
12015
|
-
|
|
12049
|
+
SigningKeyGenerationError = 'SigningKeyGenerationError',
|
|
12050
|
+
AttestationKeyGenerationError = 'AttestationKeyGenerationError',
|
|
12016
12051
|
SigningError = 'SigningError',
|
|
12017
12052
|
TransientSigningError = 'TransientSigningError',
|
|
12018
12053
|
ServerRequestedTermination = 'ServerRequestedTermination',
|
|
@@ -8,7 +8,6 @@ import * as Root from '../../core/root/root.js';
|
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import type * as LHModel from '../../models/lighthouse/lighthouse.js';
|
|
10
10
|
import type * as Trace from '../../models/trace/trace.js';
|
|
11
|
-
import * as Greendev from '../greendev/greendev.js';
|
|
12
11
|
import type * as NetworkTimeCalculator from '../network_time_calculator/network_time_calculator.js';
|
|
13
12
|
|
|
14
13
|
import {AccessibilityAgent} from './agents/AccessibilityAgent.js';
|
|
@@ -205,11 +204,6 @@ export class AiConversation {
|
|
|
205
204
|
return this.#contexts.at(0);
|
|
206
205
|
}
|
|
207
206
|
|
|
208
|
-
getPendingMultimodalInput(): MultimodalInput|undefined {
|
|
209
|
-
const greenDevEmulationEnabled = Greendev.Prototypes.instance().isEnabled('emulationCapabilities');
|
|
210
|
-
return greenDevEmulationEnabled ? this.#agent.popPendingMultimodalInput() : undefined;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
207
|
#reconstructHistory(historyWithoutImages: ResponseData[]): ResponseData[] {
|
|
214
208
|
const imageHistory = AiHistoryStorage.instance().getImageHistory();
|
|
215
209
|
if (imageHistory && imageHistory.length > 0) {
|
|
@@ -59,7 +59,7 @@ Content:
|
|
|
59
59
|
{
|
|
60
60
|
"parts": [
|
|
61
61
|
{
|
|
62
|
-
"text": "# Selected network request\nRequest: https://www.example.com\
|
|
62
|
+
"text": "# Selected network request\nRequest: https://www.example.com\nRequest headers:\ncontent-type: bar1\n\nResponse headers:\ncontent-type: bar2\nx-forwarded-for: bar3\n\nResponse body:\n{\"request\":\"body\"}\n\nResponse status: 200\nNetwork request status: pending\n\nRequest timing:\nQueued at (timestamp): 0 s\nStarted at (timestamp): 501 s\nQueueing (duration): 501 s\nConnection start (stalled) (duration): 800 ms\nRequest sent (duration): 100 ms\nDuration (duration): 501 s\n\nRequest initiator chain:\n- URL: <redacted cross-origin initiator URL>\n\t- URL: https://www.example.com\n\t\t- URL: https://www.example.com/1\n\t\t- URL: https://www.example.com/2\n\n# User request\n\ntest"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"role": 1
|