chrome-devtools-frontend 1.0.1548980 → 1.0.1549484

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.
Files changed (188) hide show
  1. package/docs/contributing/settings-experiments-features.md +35 -0
  2. package/docs/styleguide/ux/patterns.md +27 -0
  3. package/eslint.config.mjs +1 -0
  4. package/front_end/Tests.js +2 -0
  5. package/front_end/core/host/InspectorFrontendHost.ts +26 -558
  6. package/front_end/core/host/InspectorFrontendHostAPI.ts +6 -3
  7. package/front_end/core/host/InspectorFrontendHostStub.ts +558 -0
  8. package/front_end/core/host/ResourceLoader.ts +9 -23
  9. package/front_end/core/host/UserMetrics.ts +4 -4
  10. package/front_end/core/root/DevToolsContext.ts +4 -0
  11. package/front_end/core/root/Runtime.ts +10 -0
  12. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
  13. package/front_end/core/sdk/CSSModel.ts +24 -24
  14. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -11
  15. package/front_end/core/sdk/CSSQuery.ts +1 -1
  16. package/front_end/core/sdk/CSSRule.ts +2 -2
  17. package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
  18. package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
  19. package/front_end/core/sdk/DOMModel.ts +3 -0
  20. package/front_end/core/sdk/NetworkManager.ts +29 -31
  21. package/front_end/core/sdk/NetworkRequest.ts +4 -0
  22. package/front_end/core/sdk/OverlayModel.ts +2 -2
  23. package/front_end/core/sdk/PageResourceLoader.ts +63 -37
  24. package/front_end/core/sdk/SourceMap.ts +6 -0
  25. package/front_end/core/sdk/SourceMapCache.ts +21 -0
  26. package/front_end/core/sdk/SourceMapManager.ts +7 -6
  27. package/front_end/core/sdk/SourceMapScopesInfo.ts +6 -2
  28. package/front_end/core/sdk/TargetManager.ts +14 -2
  29. package/front_end/core/sdk/sdk-meta.ts +13 -0
  30. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
  31. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +1 -1
  32. package/front_end/entrypoints/main/MainImpl.ts +13 -3
  33. package/front_end/foundation/Universe.ts +1 -1
  34. package/front_end/generated/Deprecation.ts +18 -4
  35. package/front_end/generated/InspectorBackendCommands.ts +33 -31
  36. package/front_end/generated/SupportedCSSProperties.js +41 -41
  37. package/front_end/generated/protocol-mapping.d.ts +12 -0
  38. package/front_end/generated/protocol-proxy-api.d.ts +11 -0
  39. package/front_end/generated/protocol.ts +70 -35
  40. package/front_end/models/ai_assistance/AiConversation.ts +5 -4
  41. package/front_end/models/ai_assistance/ChangeManager.ts +4 -4
  42. package/front_end/models/ai_assistance/ConversationHandler.ts +0 -15
  43. package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -6
  44. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +135 -3
  45. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +24 -0
  46. package/front_end/models/bindings/CompilerScriptMapping.ts +43 -0
  47. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +19 -0
  48. package/front_end/models/bindings/ResourceMapping.ts +73 -0
  49. package/front_end/models/bindings/ResourceScriptMapping.ts +50 -0
  50. package/front_end/models/issues_manager/GenericIssue.ts +17 -0
  51. package/front_end/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  52. package/front_end/models/javascript_metadata/NativeFunctions.js +7 -3
  53. package/front_end/models/source_map_scopes/FunctionCodeResolver.snapshot.txt +98 -0
  54. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +270 -0
  55. package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
  56. package/front_end/models/workspace/UISourceCode.ts +51 -44
  57. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +76 -34
  58. package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -0
  59. package/front_end/panels/ai_assistance/components/ChatView.ts +23 -11
  60. package/front_end/panels/application/AppManifestView.ts +3 -2
  61. package/front_end/panels/application/FrameDetailsView.ts +5 -6
  62. package/front_end/panels/application/ServiceWorkersView.ts +2 -2
  63. package/front_end/panels/application/TrustTokensTreeElement.ts +2 -6
  64. package/front_end/panels/application/components/PermissionsPolicySection.ts +201 -157
  65. package/front_end/panels/application/components/ProtocolHandlersView.ts +117 -80
  66. package/front_end/panels/application/components/ServiceWorkerRouterView.ts +47 -41
  67. package/front_end/panels/application/components/StorageMetadataView.ts +31 -34
  68. package/front_end/panels/application/components/TrustTokensView.ts +76 -68
  69. package/front_end/panels/console/ConsoleView.ts +3 -2
  70. package/front_end/panels/console/ConsoleViewMessage.ts +6 -4
  71. package/front_end/panels/console/console-meta.ts +0 -13
  72. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -1
  73. package/front_end/panels/elements/CSSRuleValidator.ts +7 -7
  74. package/front_end/panels/elements/CSSRuleValidatorHelper.ts +2 -2
  75. package/front_end/panels/elements/ElementsTreeElement.ts +16 -13
  76. package/front_end/panels/elements/ElementsTreeOutline.ts +2 -1
  77. package/front_end/panels/elements/LayoutPane.ts +12 -10
  78. package/front_end/panels/elements/StylePropertyTreeElement.ts +12 -12
  79. package/front_end/panels/elements/components/AdornerManager.ts +3 -3
  80. package/front_end/panels/elements/components/StylePropertyEditor.ts +6 -6
  81. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +27 -49
  82. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +15 -11
  83. package/front_end/panels/media/PlayerListView.ts +100 -73
  84. package/front_end/panels/media/playerListView.css +5 -0
  85. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +3 -3
  86. package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
  87. package/front_end/panels/network/components/DirectSocketConnectionView.ts +17 -0
  88. package/front_end/panels/network/resourceChunkView.css +4 -0
  89. package/front_end/panels/security/CookieControlsView.ts +1 -1
  90. package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
  91. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
  92. package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
  93. package/front_end/panels/settings/SettingsScreen.ts +6 -6
  94. package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
  95. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -1
  96. package/front_end/panels/snippets/SnippetsQuickOpen.ts +4 -2
  97. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  98. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +13 -5
  99. package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -2
  100. package/front_end/panels/sources/NavigatorView.ts +2 -2
  101. package/front_end/panels/sources/OpenFileQuickOpen.ts +7 -8
  102. package/front_end/panels/sources/OutlineQuickOpen.ts +6 -3
  103. package/front_end/panels/sources/ProfilePlugin.ts +21 -12
  104. package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
  105. package/front_end/panels/sources/filteredUISourceCodeListProvider.css +41 -0
  106. package/front_end/panels/timeline/TimelinePanel.ts +17 -18
  107. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +3 -3
  108. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
  109. package/front_end/panels/timeline/docs/flame_chart_migration.md +11 -16
  110. package/front_end/panels/utils/utils.ts +17 -3
  111. package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -20
  112. package/front_end/panels/whats_new/resources/WNDT.md +8 -8
  113. package/front_end/third_party/chromium/README.chromium +1 -1
  114. package/front_end/third_party/puppeteer/third_party/mitt/README.chromium +1 -0
  115. package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -0
  116. package/front_end/third_party/puppeteer/third_party/rxjs/README.chromium +1 -0
  117. package/front_end/ui/components/adorners/Adorner.ts +1 -1
  118. package/front_end/ui/components/annotations/AnnotationRepository.ts +98 -0
  119. package/front_end/ui/components/annotations/AnnotationType.ts +10 -0
  120. package/front_end/ui/components/annotations/annotations.ts +6 -0
  121. package/front_end/ui/components/buttons/Button.ts +1 -1
  122. package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
  123. package/front_end/ui/components/chrome_link/ChromeLink.ts +1 -1
  124. package/front_end/ui/components/dialogs/ButtonDialog.ts +1 -1
  125. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  126. package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -0
  127. package/front_end/ui/components/diff_view/DiffView.ts +1 -1
  128. package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
  129. package/front_end/ui/components/highlighting/HighlightElement.ts +1 -0
  130. package/front_end/ui/components/highlighting/MarkupHighlight.ts +162 -0
  131. package/front_end/ui/components/highlighting/highlighting.ts +7 -0
  132. package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
  133. package/front_end/ui/components/icon_button/Icon.ts +4 -2
  134. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  135. package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
  136. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
  137. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +1 -1
  138. package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
  139. package/front_end/ui/components/list/List.ts +184 -0
  140. package/front_end/ui/components/list/list.css +90 -0
  141. package/front_end/ui/components/{cards/cards.ts → list/lists.ts} +3 -3
  142. package/front_end/ui/components/markdown_view/CodeBlock.ts +1 -1
  143. package/front_end/ui/components/markdown_view/MarkdownImage.ts +1 -1
  144. package/front_end/ui/components/markdown_view/MarkdownLink.ts +1 -1
  145. package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
  146. package/front_end/ui/components/menus/Menu.ts +1 -1
  147. package/front_end/ui/components/menus/SelectMenu.ts +1 -1
  148. package/front_end/ui/components/node_text/NodeText.ts +1 -1
  149. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +1 -1
  150. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
  151. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  152. package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +1 -1
  153. package/front_end/ui/components/report_view/ReportView.ts +1 -1
  154. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  155. package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
  156. package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
  157. package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
  158. package/front_end/ui/components/spinners/Spinner.ts +1 -1
  159. package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
  160. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -0
  161. package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
  162. package/front_end/ui/components/switch/SwitchImpl.ts +1 -1
  163. package/front_end/ui/components/text_editor/TextEditor.ts +1 -0
  164. package/front_end/ui/components/text_prompt/TextPrompt.ts +1 -1
  165. package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
  166. package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
  167. package/front_end/ui/kit/kit.ts +5 -0
  168. package/front_end/ui/legacy/TabbedPane.ts +98 -0
  169. package/front_end/ui/legacy/UIUtils.ts +0 -184
  170. package/front_end/ui/legacy/ViewManager.ts +23 -8
  171. package/front_end/ui/legacy/ViewRegistration.ts +21 -22
  172. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -4
  173. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +73 -35
  174. package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +11 -2
  175. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +12 -13
  176. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +7 -16
  177. package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +5 -6
  178. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +18 -65
  179. package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -1
  180. package/front_end/ui/legacy/tabbedPane.css +10 -0
  181. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  182. package/inspector_overlay/README.md +3 -3
  183. package/mcp/HostBindings.ts +310 -0
  184. package/mcp/mcp.ts +17 -0
  185. package/mcp/tsconfig.json +6 -1
  186. package/package.json +26 -24
  187. /package/front_end/ui/{components → kit}/cards/Card.ts +0 -0
  188. /package/front_end/ui/{components → kit}/cards/card.css +0 -0
@@ -9,6 +9,11 @@ export class SourceMapCache {
9
9
  static readonly #INSTANCE = new SourceMapCache('devtools-source-map-cache');
10
10
 
11
11
  static instance(): SourceMapCache {
12
+ if (typeof window === 'undefined') {
13
+ // TODO(crbug.com/451502260): Move this behind a `HostRuntime` interface.
14
+ return IN_MEMORY_INSTANCE as unknown as
15
+ SourceMapCache; // TS doesn't like that our in-memory class doesn't have the same private fields.
16
+ }
12
17
  return this.#INSTANCE;
13
18
  }
14
19
 
@@ -52,3 +57,19 @@ export class SourceMapCache {
52
57
  await window.caches.delete(this.#name);
53
58
  }
54
59
  }
60
+
61
+ const IN_MEMORY_INSTANCE = new (class implements Pick<SourceMapCache, 'get'|'set'|'disposeForTest'> {
62
+ readonly #cache = new Map<DebugId, SourceMapV3>();
63
+
64
+ async set(debugId: DebugId, sourceMap: SourceMapV3): Promise<void> {
65
+ this.#cache.set(debugId, sourceMap);
66
+ }
67
+
68
+ async get(debugId: DebugId): Promise<SourceMapV3|null> {
69
+ return this.#cache.get(debugId) ?? null;
70
+ }
71
+
72
+ async disposeForTest(): Promise<void> {
73
+ // Do nothing.
74
+ }
75
+ })();
@@ -113,7 +113,7 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
113
113
  this.#attachingClient = null;
114
114
  const initiator = client.createPageResourceLoadInitiator();
115
115
  clientData.sourceMapPromise =
116
- loadSourceMap(sourceMapURL, client.debugId(), initiator)
116
+ loadSourceMap(PageResourceLoader.instance(), sourceMapURL, client.debugId(), initiator)
117
117
  .then(
118
118
  payload => {
119
119
  const sourceMap = this.#factory(sourceURL, sourceMapURL, payload, client);
@@ -180,8 +180,8 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
180
180
  }
181
181
  }
182
182
 
183
- export async function loadSourceMap(
184
- url: Platform.DevToolsPath.UrlString, debugId: DebugId|null,
183
+ async function loadSourceMap(
184
+ pageResourceLoader: PageResourceLoader, url: Platform.DevToolsPath.UrlString, debugId: DebugId|null,
185
185
  initiator: PageResourceLoadInitiator): Promise<SourceMapV3> {
186
186
  try {
187
187
  if (debugId) {
@@ -191,7 +191,7 @@ export async function loadSourceMap(
191
191
  }
192
192
  }
193
193
 
194
- const {content} = await PageResourceLoader.instance().loadResource(url, initiator);
194
+ const {content} = await pageResourceLoader.loadResource(url, initiator);
195
195
  const sourceMap = parseSourceMap(content);
196
196
  if ('debugId' in sourceMap && sourceMap.debugId) {
197
197
  // In case something goes wrong with updating the cache, we still want to use the source map.
@@ -204,9 +204,10 @@ export async function loadSourceMap(
204
204
  }
205
205
 
206
206
  export async function tryLoadSourceMap(
207
- url: Platform.DevToolsPath.UrlString, initiator: PageResourceLoadInitiator): Promise<SourceMapV3|null> {
207
+ pageResourceLoader: PageResourceLoader, url: Platform.DevToolsPath.UrlString,
208
+ initiator: PageResourceLoadInitiator): Promise<SourceMapV3|null> {
208
209
  try {
209
- return await loadSourceMap(url, null, initiator);
210
+ return await loadSourceMap(pageResourceLoader, url, null, initiator);
210
211
  } catch (cause) {
211
212
  console.error(cause);
212
213
  return null;
@@ -121,14 +121,18 @@ export class SourceMapScopesInfo {
121
121
  const canMapOriginalPosition = startEntry && endEntry && sourceIndex !== undefined &&
122
122
  startEntry.sourceIndex === endEntry.sourceIndex && startEntry.sourceIndex !== undefined && sourceIndex >= 0 &&
123
123
  sourceIndex < numSourceUrls;
124
- const isStackFrame = node.kind === Formatter.FormatterWorkerPool.ScopeKind.FUNCTION;
124
+ const isStackFrame = node.kind === Formatter.FormatterWorkerPool.ScopeKind.FUNCTION ||
125
+ node.kind === Formatter.FormatterWorkerPool.ScopeKind.ARROW_FUNCTION;
126
+ // TODO(crbug.com/368222773): Instead of mapping `start`, we should report a number of candidates. e.g. for arrow functions we should
127
+ // follow the spec and map the `=>` as the spec says that is where the original name (if any) for arrow functions can be found.
128
+ const name = node.kind === Formatter.FormatterWorkerPool.ScopeKind.FUNCTION ? startEntry?.name : undefined;
125
129
 
126
130
  let scope: ScopesCodec.OriginalScope|undefined;
127
131
  if (canMapOriginalPosition) {
128
132
  scope = {
129
133
  start: {line: startEntry.sourceLineNumber, column: startEntry.sourceColumnNumber},
130
134
  end: {line: endEntry.sourceLineNumber, column: endEntry.sourceColumnNumber},
131
- name: startEntry.name,
135
+ name,
132
136
  isStackFrame,
133
137
  variables: [],
134
138
  children: [],
@@ -14,6 +14,16 @@ import {type RegistrationInfo, SDKModel, type SDKModelConstructor} from './SDKMo
14
14
  import {Target, Type as TargetType} from './Target.js';
15
15
 
16
16
  export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
17
+ /**
18
+ * @deprecated
19
+ *
20
+ * Intended for {@link SDKModel} classes to be able to retrieve scoped singletons like
21
+ * the "PageResourceLoader" or the "FrameManager".
22
+ *
23
+ * This is only an intermediate step to migrate towards our "layering vision" where
24
+ * SDKModels don't require things from the next layer.
25
+ */
26
+ readonly context: Root.DevToolsContext.DevToolsContext;
17
27
  #targets: Set<Target>;
18
28
  readonly #observers: Set<Observer>;
19
29
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -36,8 +46,9 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
36
46
  /**
37
47
  * @param overrideAutoStartModels If provided, then the `autostart` flag on {@link RegistrationInfo} will be ignored.
38
48
  */
39
- constructor(overrideAutoStartModels?: Set<SDKModelConstructor>) {
49
+ constructor(context: Root.DevToolsContext.DevToolsContext, overrideAutoStartModels?: Set<SDKModelConstructor>) {
40
50
  super();
51
+ this.context = context;
41
52
  this.#targets = new Set();
42
53
  this.#observers = new Set();
43
54
  this.#modelListeners = new Platform.MapUtilities.Multimap();
@@ -55,7 +66,8 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
55
66
  forceNew: boolean,
56
67
  } = {forceNew: false}): TargetManager {
57
68
  if (!Root.DevToolsContext.globalInstance().has(TargetManager) || forceNew) {
58
- Root.DevToolsContext.globalInstance().set(TargetManager, new TargetManager());
69
+ Root.DevToolsContext.globalInstance().set(
70
+ TargetManager, new TargetManager(Root.DevToolsContext.globalInstance()));
59
71
  }
60
72
 
61
73
  return Root.DevToolsContext.globalInstance().get(TargetManager);
@@ -387,6 +387,10 @@ const UIStrings = {
387
387
  * @description Title of a setting under the Sources category that can be invoked through the Command Menu
388
388
  */
389
389
  disableCssSourceMaps: 'Disable CSS source maps',
390
+ /**
391
+ * @description Title of a setting under the Console category in Settings
392
+ */
393
+ logXmlhttprequests: 'Log XMLHttpRequests',
390
394
  } as const;
391
395
  const str_ = i18n.i18n.registerUIStrings('core/sdk/sdk-meta.ts', UIStrings);
392
396
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
@@ -1194,3 +1198,12 @@ Common.Settings.registerSettingExtension({
1194
1198
  },
1195
1199
  ],
1196
1200
  });
1201
+
1202
+ Common.Settings.registerSettingExtension({
1203
+ category: Common.Settings.SettingCategory.CONSOLE,
1204
+ storageType: Common.Settings.SettingStorageType.SYNCED,
1205
+ title: i18nLazyString(UIStrings.logXmlhttprequests),
1206
+ settingName: 'monitoring-xhr-enabled',
1207
+ settingType: Common.Settings.SettingType.BOOLEAN,
1208
+ defaultValue: false,
1209
+ });
@@ -48,6 +48,7 @@ export const enum ScopeKind {
48
48
  BLOCK = 1,
49
49
  FUNCTION = 2,
50
50
  GLOBAL = 3,
51
+ ARROW_FUNCTION = 4,
51
52
  }
52
53
 
53
54
  export interface ScopeTreeNode {
@@ -172,7 +172,7 @@ export class ScopeVariableAnalysis {
172
172
  node.elements.forEach(item => this.#processNode(item));
173
173
  break;
174
174
  case 'ArrowFunctionExpression': {
175
- this.#pushScope(node.start, node.end, ScopeKind.FUNCTION);
175
+ this.#pushScope(node.start, node.end, ScopeKind.ARROW_FUNCTION);
176
176
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.VAR, false));
177
177
  if (node.body.type === 'BlockStatement') {
178
178
  // Include the body of the arrow function in the same scope as the arguments.
@@ -132,6 +132,7 @@ let loadedPanelCommonModule: typeof PanelCommon|undefined;
132
132
  export class MainImpl {
133
133
  #readyForTestPromise = Promise.withResolvers<void>();
134
134
  #veStartPromise!: Promise<void>;
135
+ #universe!: Foundation.Universe.Universe;
135
136
 
136
137
  constructor() {
137
138
  MainImpl.instanceForTest = this;
@@ -175,8 +176,8 @@ export class MainImpl {
175
176
  runSettingsMigration: !Host.InspectorFrontendHost.isUnderTest(),
176
177
  },
177
178
  };
178
- const universe = new Foundation.Universe.Universe(creationOptions);
179
- Root.DevToolsContext.setGlobalInstance(universe.context);
179
+ this.#universe = new Foundation.Universe.Universe(creationOptions);
180
+ Root.DevToolsContext.setGlobalInstance(this.#universe.context);
180
181
 
181
182
  await this.requestAndRegisterLocaleData();
182
183
 
@@ -425,6 +426,7 @@ export class MainImpl {
425
426
  {forceNew: true, win: window, frontendHost: Host.InspectorFrontendHost.InspectorFrontendHostInstance});
426
427
  UI.ContextMenu.ContextMenu.initialize();
427
428
  UI.ContextMenu.ContextMenu.installHandler(document);
429
+ UI.ViewManager.ViewManager.instance({forceNew: true, universe: this.#universe});
428
430
 
429
431
  // These instances need to be created early so they don't miss any events about requests/issues/etc.
430
432
  Logs.NetworkLog.NetworkLog.instance();
@@ -445,6 +447,14 @@ export class MainImpl {
445
447
  targetManager.addEventListener(
446
448
  SDK.TargetManager.Events.SUSPEND_STATE_CHANGED, this.#onSuspendStateChanged.bind(this));
447
449
 
450
+ SDK.PageResourceLoader.PageResourceLoader.instance({
451
+ forceNew: true,
452
+ targetManager,
453
+ settings: Common.Settings.Settings.instance(),
454
+ userAgentProvider: SDK.NetworkManager.MultitargetNetworkManager.instance(),
455
+ loadOverride: null,
456
+ });
457
+
448
458
  Workspace.FileManager.FileManager.instance({forceNew: true});
449
459
 
450
460
  Bindings.NetworkProject.NetworkProjectManager.instance();
@@ -939,7 +949,7 @@ export class MainMenuItem implements UI.Toolbar.Provider {
939
949
  contextMenu.appendItemsAtLocation('mainMenu');
940
950
  const moreTools =
941
951
  contextMenu.defaultSection().appendSubMenuItem(i18nString(UIStrings.moreTools), false, 'more-tools');
942
- const viewExtensions = UI.ViewManager.getRegisteredViewExtensions();
952
+ const viewExtensions = UI.ViewManager.ViewManager.instance().getRegisteredViewExtensions();
943
953
  viewExtensions.sort((extension1, extension2) => {
944
954
  const title1 = extension1.title();
945
955
  const title2 = extension2.title();
@@ -24,7 +24,7 @@ export class Universe {
24
24
  ...options.settingsCreationOptions,
25
25
  });
26
26
 
27
- const targetManager = new SDK.TargetManager.TargetManager(options.overrideAutoStartModels);
27
+ const targetManager = new SDK.TargetManager.TargetManager(this.context, options.overrideAutoStartModels);
28
28
  this.context.set(SDK.TargetManager.TargetManager, targetManager);
29
29
 
30
30
  const workspace = new Workspace.Workspace.WorkspaceImpl();
@@ -58,6 +58,10 @@ export const UIStrings = {
58
58
  * @description Warning displayed to developers when a data: URL is assigned to SVGUseElement to let them know that the support is deprecated.
59
59
  */
60
60
  DataUrlInSvgUse: "Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future.",
61
+ /**
62
+ * @description Translation is not needed, this will never be exposed in production code.
63
+ */
64
+ ExampleBrowserProcessDeprecation: "This is an example for showing the code required for a browser process reported deprecation.",
61
65
  /**
62
66
  * @description A deprecation warning shown in the DevTools Issues tab. It's shown when one of the Protected Audience APIs like `navigator.joinAdInterestGroup`, `navigator.getInterestGroupAdAuctionData` or `navigator.runAdAuction` are called.
63
67
  */
@@ -174,10 +178,6 @@ export const UIStrings = {
174
178
  * @description Standard message when one web API is deprecated in favor of another.
175
179
  */
176
180
  PrefixedVideoSupportsFullscreen: "HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead.",
177
- /**
178
- * @description Warning displayed to developers that the API `chrome.privacy.websites.privacySandboxEnabled` is being deprecated in favour of three new more granular APIs: topicsEnabled, FledgeEnabled and adMeasurementEnabled. The `privacySandboxEnabled` API allowed extensions to control the homologous Chrome Setting. The existing Chrome Setting for Privacy Sandbox is also going away in favor of more granular settings that are matched by the new extensions APIs- topicsEnabled, FledgeEnabled and adMeasurementEnabled.
179
- */
180
- PrivacySandboxExtensionsAPI: "We're deprecating the API `chrome.privacy.websites.privacySandboxEnabled`, though it will remain active for backward compatibility until release M113. Instead, please use `chrome.privacy.websites.topicsEnabled`, `chrome.privacy.websites.fledgeEnabled` and `chrome.privacy.websites.adMeasurementEnabled`. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled.",
181
181
  /**
182
182
  * @description Standard message when one web API is deprecated in favor of another.
183
183
  */
@@ -210,6 +210,14 @@ export const UIStrings = {
210
210
  * @description A deprecation warning shown in the DevTools Issues tab. The placeholder is always the noun 'SharedArrayBuffer' which refers to a JavaScript construct.
211
211
  */
212
212
  SharedArrayBufferConstructedWithoutIsolation: "`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.",
213
+ /**
214
+ * @description A deprecation warning shown in the DevTools Issues tab. It's shown when one of the Shared Storage APIs like `sharedStorage.set()`, `sharedStorage.worklet.addModule()`, `sharedStorage.selectURL()`, etc., along with `<img sharedstoragewritable>`, `<iframe sharedstoragewritable>`, or `fetch(url, {sharedStorageWritable: true})` are used.
215
+ */
216
+ SharedStorage: "The Shared Storage API is deprecated and will be removed in a future release.",
217
+ /**
218
+ * @description A deprecation warning shown in the DevTools Issues tab. It's shown when the `document.requestStorageAccessFor` API is called. The placeholder will always be the string `document.requestStorageAccessFor`.
219
+ */
220
+ StorageAccessAPI_requestStorageAccessFor_Method: "`document.requestStorageAccessFor` is deprecated and will be removed. See https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/ for more details.",
213
221
  /**
214
222
  * @description A deprecation warning shown in the DevTools Issues tab. It's shown when the speech synthesis API is called before the page receives a user activation.
215
223
  */
@@ -351,6 +359,12 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
351
359
  "SharedArrayBufferConstructedWithoutIsolation": {
352
360
  "milestone": 106
353
361
  },
362
+ "SharedStorage": {
363
+ "chromeStatusFeature": 5076349064708096
364
+ },
365
+ "StorageAccessAPI_requestStorageAccessFor_Method": {
366
+ "chromeStatusFeature": 5162221567082496
367
+ },
354
368
  "TextToSpeech_DisallowedByAutoplay": {
355
369
  "chromeStatusFeature": 5687444770914304,
356
370
  "milestone": 71