chrome-devtools-frontend 1.0.1681091 → 1.0.1682249

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 (208) hide show
  1. package/eslint.config.mjs +8 -3
  2. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  3. package/front_end/core/sdk/DOMModel.ts +8 -0
  4. package/front_end/core/sdk/NetworkManager.ts +9 -4
  5. package/front_end/core/sdk/OverlayModel.ts +3 -2
  6. package/front_end/core/sdk/PreloadingModel.ts +44 -22
  7. package/front_end/core/sdk/RemoteObject.ts +4 -1
  8. package/front_end/core/sdk/RuntimeModel.ts +5 -5
  9. package/front_end/core/sdk/SDKSettings.ts +19 -0
  10. package/front_end/core/sdk/sdk.ts +2 -0
  11. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
  12. package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
  13. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
  14. package/front_end/entrypoints/main/MainImpl.ts +9 -10
  15. package/front_end/entrypoints/main/main-meta.ts +82 -0
  16. package/front_end/entrypoints/shell/shell.ts +0 -5
  17. package/front_end/entrypoints/trace_app/trace_app.ts +0 -5
  18. package/front_end/generated/InspectorBackendCommands.ts +2 -0
  19. package/front_end/generated/protocol-mapping.d.ts +16 -0
  20. package/front_end/generated/protocol-proxy-api.d.ts +12 -0
  21. package/front_end/generated/protocol.ts +12 -0
  22. package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
  23. package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
  24. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
  25. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
  26. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
  27. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
  28. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
  29. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
  30. package/front_end/models/ai_code_completion/debug.ts +6 -3
  31. package/front_end/models/ai_code_generation/debug.ts +6 -3
  32. package/front_end/models/badges/UserBadges.ts +9 -2
  33. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
  34. package/front_end/models/emulation/DeviceModeModel.ts +16 -27
  35. package/front_end/models/emulation/EmulatedDevices.ts +30 -125
  36. package/front_end/models/extensions/ExtensionAPI.ts +34 -23
  37. package/front_end/models/formatter/ScriptFormatter.ts +1 -0
  38. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
  39. package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
  40. package/front_end/models/logs/NetworkLog.ts +11 -4
  41. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
  42. package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
  43. package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
  44. package/front_end/models/trace/Name.ts +5 -5
  45. package/front_end/models/trace/Styles.ts +115 -115
  46. package/front_end/models/trace/extras/TraceTree.ts +2 -1
  47. package/front_end/models/trace/helpers/Network.ts +4 -1
  48. package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
  49. package/front_end/models/trace/insights/CharacterSet.ts +3 -3
  50. package/front_end/models/trace/insights/DOMSize.ts +1 -1
  51. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
  52. package/front_end/models/trace/insights/FontDisplay.ts +9 -3
  53. package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
  54. package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
  55. package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
  56. package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
  57. package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
  58. package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
  59. package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
  60. package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
  61. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  62. package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
  63. package/front_end/models/trace/insights/ThirdParties.ts +13 -5
  64. package/front_end/models/trace/insights/Viewport.ts +4 -2
  65. package/front_end/models/workspace/IgnoreListManager.ts +53 -17
  66. package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
  67. package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
  68. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
  69. package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
  70. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
  71. package/front_end/panels/animation/AnimationTimeline.ts +2 -0
  72. package/front_end/panels/application/ServiceWorkersView.ts +1 -1
  73. package/front_end/panels/application/StorageView.ts +2 -0
  74. package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
  75. package/front_end/panels/application/preloading/components/components.ts +2 -0
  76. package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
  77. package/front_end/panels/changes/CombinedDiffView.ts +1 -1
  78. package/front_end/panels/common/BadgeNotification.ts +1 -1
  79. package/front_end/panels/common/ExtensionPanel.ts +12 -7
  80. package/front_end/panels/common/ExtensionServer.ts +85 -26
  81. package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
  82. package/front_end/panels/console/ConsoleView.ts +2 -1
  83. package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
  84. package/front_end/panels/console/console-meta.ts +9 -0
  85. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
  86. package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
  87. package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
  88. package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
  89. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
  90. package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
  91. package/front_end/panels/elements/DOMTreeContextMenu.ts +3 -6
  92. package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
  93. package/front_end/panels/elements/ElementStatePaneWidget.ts +9 -6
  94. package/front_end/panels/elements/ElementsPanel.ts +10 -10
  95. package/front_end/panels/elements/ElementsTreeElement.ts +35 -29
  96. package/front_end/panels/elements/ElementsTreeOutline.ts +5 -20
  97. package/front_end/panels/elements/EventListenersWidget.ts +18 -19
  98. package/front_end/panels/elements/LayersWidget.ts +4 -4
  99. package/front_end/panels/elements/LayoutPane.ts +11 -11
  100. package/front_end/panels/elements/MarkerDecorator.ts +3 -3
  101. package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
  102. package/front_end/panels/elements/PropertiesWidget.ts +4 -4
  103. package/front_end/panels/elements/PropertyRenderer.ts +2 -2
  104. package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
  105. package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
  106. package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
  107. package/front_end/panels/elements/StylesSidebarPane.ts +12 -13
  108. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
  109. package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
  110. package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
  111. package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
  112. package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
  113. package/front_end/panels/elements/elements-meta.ts +13 -13
  114. package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
  115. package/front_end/panels/issues/AffectedElementsView.ts +5 -0
  116. package/front_end/panels/issues/IssueView.ts +12 -8
  117. package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
  118. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
  119. package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
  120. package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
  121. package/front_end/panels/media/playerPropertiesView.css +1 -1
  122. package/front_end/panels/network/NetworkLogView.ts +5 -2
  123. package/front_end/panels/network/NetworkOverview.ts +11 -5
  124. package/front_end/panels/network/NetworkPanel.ts +4 -2
  125. package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
  126. package/front_end/panels/network/RequestHeadersView.ts +4 -4
  127. package/front_end/panels/network/components/ResponseHeaderSection.ts +7 -4
  128. package/front_end/panels/network/network-meta.ts +63 -0
  129. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
  130. package/front_end/panels/recorder/RecordingView.ts +89 -73
  131. package/front_end/panels/recorder/ReplaySection.ts +59 -40
  132. package/front_end/panels/recorder/injected/injected.ts +4 -0
  133. package/front_end/panels/security/SecurityPanel.ts +5 -6
  134. package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
  135. package/front_end/panels/security/security.ts +0 -4
  136. package/front_end/panels/settings/EditFileSystemView.ts +8 -7
  137. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
  138. package/front_end/panels/settings/components/SyncSection.ts +1 -1
  139. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
  140. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
  141. package/front_end/panels/sources/NavigatorView.ts +6 -2
  142. package/front_end/panels/sources/SourcesNavigator.ts +8 -4
  143. package/front_end/panels/sources/SourcesPanel.ts +4 -2
  144. package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
  145. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
  146. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
  147. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
  148. package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
  149. package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
  150. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
  151. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
  152. package/front_end/panels/timeline/components/Sidebar.ts +3 -3
  153. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
  154. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
  155. package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
  156. package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
  157. package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
  158. package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
  159. package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
  160. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
  161. package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
  162. package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
  163. package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
  164. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
  165. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
  166. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
  167. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
  168. package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
  169. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
  170. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
  171. package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
  172. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
  173. package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
  174. package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
  175. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
  176. package/front_end/panels/timeline/timeline.ts +0 -2
  177. package/front_end/panels/web_audio/WebAudioView.ts +14 -6
  178. package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
  179. package/front_end/third_party/chromium/README.chromium +1 -1
  180. package/front_end/third_party/web-vitals/rebuild.sh +1 -1
  181. package/front_end/ui/components/diff_view/DiffView.ts +2 -1
  182. package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
  183. package/front_end/ui/components/text_editor/javascript.ts +12 -13
  184. package/front_end/ui/legacy/GlassPane.ts +38 -14
  185. package/front_end/ui/legacy/Treeoutline.ts +14 -3
  186. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
  187. package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
  188. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
  189. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
  190. package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
  191. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +3 -3
  192. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +185 -355
  193. package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
  194. package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
  195. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
  196. package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
  197. package/front_end/ui/settings/InspectorMainSettings.ts +12 -0
  198. package/front_end/ui/settings/settings.ts +2 -0
  199. package/front_end/ui/visual_logging/KnownContextValues.ts +32 -0
  200. package/mcp/mcp.ts +0 -9
  201. package/package.json +1 -1
  202. package/front_end/core/sdk/sdk-meta.ts +0 -40
  203. package/front_end/models/badges/badges-meta.ts +0 -27
  204. package/front_end/models/logs/logs-meta.ts +0 -84
  205. package/front_end/models/persistence/persistence-meta.ts +0 -69
  206. package/front_end/models/workspace/workspace-meta.ts +0 -40
  207. package/front_end/panels/security/OriginTreeElement.ts +0 -60
  208. package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
package/eslint.config.mjs CHANGED
@@ -3,14 +3,14 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import stylisticPlugin from '@stylistic/eslint-plugin';
6
- import { defineConfig, globalIgnores } from 'eslint/config';
6
+ import {defineConfig, globalIgnores} from 'eslint/config';
7
7
  import eslintPlugin from 'eslint-plugin-eslint-plugin';
8
8
  import importPlugin from 'eslint-plugin-import';
9
9
  import jsdocPlugin from 'eslint-plugin-jsdoc';
10
10
  import litPlugin from 'eslint-plugin-lit';
11
11
  import mochaPlugin from 'eslint-plugin-mocha';
12
12
  import globals from 'globals';
13
- import { join } from 'node:path';
13
+ import {join} from 'node:path';
14
14
  import typescriptEslint from 'typescript-eslint';
15
15
 
16
16
  import devToolsPlugin from './scripts/eslint_rules/plugin.mjs';
@@ -731,8 +731,10 @@ export default defineConfig([
731
731
  name: 'TypeScript test files',
732
732
  files: [
733
733
  '*.test.ts',
734
+ '*.docs.ts',
734
735
  // This makes the specificity greater than the front-end ts files
735
736
  'front_end/**/*.test.ts',
737
+ 'front_end/**/*.docs.ts',
736
738
  'test/**/*.ts',
737
739
  '**/testing/*.ts',
738
740
  'scripts/eslint_rules/test/**/*',
@@ -870,7 +872,10 @@ export default defineConfig([
870
872
  {
871
873
  name: 'Keep models/trace isolated',
872
874
  files: ['front_end/models/trace/**/*.ts'],
873
- ignores: ['front_end/models/trace/**/*.test.ts'],
875
+ ignores: [
876
+ 'front_end/models/trace/**/*.test.ts',
877
+ 'front_end/models/trace/**/*.docs.ts',
878
+ ],
874
879
  rules: {
875
880
  '@devtools/no-imports-in-directory': [
876
881
  'error',
@@ -145,7 +145,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
145
145
  async evaluateCommandInConsole(
146
146
  executionContext: ExecutionContext, originatingMessage: ConsoleMessage, expression: string,
147
147
  useCommandLineAPI: boolean): Promise<void> {
148
- const result = await executionContext.evaluate(
148
+ const result = await executionContext.evaluateWithSelectedFrameFallback(
149
149
  {
150
150
  expression,
151
151
  objectGroup: 'console',
@@ -40,6 +40,7 @@ import * as Common from '../common/common.js';
40
40
  import * as Platform from '../platform/platform.js';
41
41
  import * as Root from '../root/root.js';
42
42
 
43
+ import {ConsoleModel} from './ConsoleModel.js';
43
44
  import {CSSModel} from './CSSModel.js';
44
45
  import type {FrameManager} from './FrameManager.js';
45
46
  import {OverlayModel} from './OverlayModel.js';
@@ -1334,6 +1335,13 @@ export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventType
1334
1335
  };
1335
1336
  }
1336
1337
 
1338
+ async saveNodeToTempVariable(): Promise<void> {
1339
+ const remoteObjectForConsole = await this.resolveToObject();
1340
+ const consoleModel = this.#domModel.target().model(ConsoleModel);
1341
+ await consoleModel?.saveToTempVariable(remoteObjectForConsole?.runtimeModel().defaultExecutionContext() ?? null,
1342
+ remoteObjectForConsole);
1343
+ }
1344
+
1337
1345
  async scrollIntoView(): Promise<void> {
1338
1346
  const node = this.enclosingElementOrSelf();
1339
1347
  if (!node) {
@@ -26,7 +26,12 @@ import {
26
26
  } from './NetworkRequest.js';
27
27
  import {type ExecutionContext, RuntimeModel} from './RuntimeModel.js';
28
28
  import {SDKModel} from './SDKModel.js';
29
- import {cacheDisabledSettingDescriptor, requestBlockingEnabledSettingDescriptor} from './SDKSettings.js';
29
+ import {
30
+ cacheDisabledSettingDescriptor,
31
+ monitoringXHREnabledSettingDescriptor,
32
+ preserveNetworkLogSettingDescriptor,
33
+ requestBlockingEnabledSettingDescriptor,
34
+ } from './SDKSettings.js';
30
35
  import {Capability, type Target} from './Target.js';
31
36
  import {type SDKModelObserver, TargetManager} from './TargetManager.js';
32
37
 
@@ -199,7 +204,7 @@ export class NetworkManager extends SDKModel<EventTypes> {
199
204
  });
200
205
 
201
206
  if (Root.Runtime.hostConfig.devToolsEnableDurableMessages?.enabled) {
202
- const preserveLogSetting = settings.moduleSetting('network-log.preserve-log');
207
+ const preserveLogSetting = settings.resolve(preserveNetworkLogSettingDescriptor);
203
208
  this.#updateDurableMessages(preserveLogSetting.get());
204
209
  preserveLogSetting.addChangeListener(this.preserveLogChanged, this);
205
210
  }
@@ -557,7 +562,7 @@ export class NetworkManager extends SDKModel<EventTypes> {
557
562
  override dispose(): void {
558
563
  const settings = this.target().targetManager().settings;
559
564
  settings.resolve(cacheDisabledSettingDescriptor).removeChangeListener(this.cacheDisabledSettingChanged, this);
560
- settings.moduleSetting('network-log.preserve-log').removeChangeListener(this.preserveLogChanged, this);
565
+ settings.resolve(preserveNetworkLogSettingDescriptor).removeChangeListener(this.preserveLogChanged, this);
561
566
  }
562
567
 
563
568
  private bypassServiceWorkerChanged(): void {
@@ -1405,7 +1410,7 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1405
1410
  this.#multitargetNetworkManager.inflightMainResourceRequests.delete(networkRequest.requestId());
1406
1411
 
1407
1412
  const settings = this.#manager.target().targetManager().settings;
1408
- if (settings.moduleSetting('monitoring-xhr-enabled').get() &&
1413
+ if (settings.resolve(monitoringXHREnabledSettingDescriptor).get() &&
1409
1414
  networkRequest.resourceType().category() === Common.ResourceType.resourceCategories.XHR) {
1410
1415
  let message;
1411
1416
  const failedToLoad = networkRequest.failed || networkRequest.hasErrorStatusCode();
@@ -16,6 +16,7 @@ import type {RemoteObject} from './RemoteObject.js';
16
16
  import {SDKModel} from './SDKModel.js';
17
17
  import {
18
18
  apcaSettingDescriptor,
19
+ disablePausedStateOverlaySettingDescriptor,
19
20
  showAdHighlightsSettingDescriptor,
20
21
  showDebugBordersSettingDescriptor,
21
22
  showFPSCounterSettingDescriptor,
@@ -122,7 +123,7 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
122
123
  const settings = this.target().targetManager().settings;
123
124
  this.#debuggerModel = target.model(DebuggerModel);
124
125
  if (this.#debuggerModel) {
125
- settings.moduleSetting('disable-paused-state-overlay')
126
+ settings.resolve(disablePausedStateOverlaySettingDescriptor)
126
127
  .addChangeListener(this.updatePausedInDebuggerMessage, this);
127
128
  this.#debuggerModel.addEventListener(
128
129
  DebuggerModelEvents.DebuggerPaused, this.updatePausedInDebuggerMessage, this);
@@ -313,7 +314,7 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
313
314
  }
314
315
  const settings = this.target().targetManager().settings;
315
316
  const message = this.#debuggerModel && this.#debuggerModel.isPaused() &&
316
- !settings.moduleSetting('disable-paused-state-overlay').get() ?
317
+ !settings.resolve(disablePausedStateOverlaySettingDescriptor).get() ?
317
318
  i18nString(UIStrings.pausedInDebugger) :
318
319
  undefined;
319
320
  void this.overlayAgent.invoke_setPausedInDebuggerMessage({message});
@@ -4,8 +4,7 @@
4
4
 
5
5
  import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
6
6
  import * as Protocol from '../../generated/protocol.js';
7
- import type * as Common from '../common/common.js';
8
- import {MapWithDefault} from '../common/MapWithDefault.js';
7
+ import * as Common from '../common/common.js';
9
8
  import {assertNotNullOrUndefined} from '../platform/platform.js';
10
9
 
11
10
  import {
@@ -652,12 +651,15 @@ class PreloadingAttemptRegistry {
652
651
  private map: Map<PreloadingAttemptId, PreloadingAttemptInternal> =
653
652
  new Map<PreloadingAttemptId, PreloadingAttemptInternal>();
654
653
  private pipelines:
655
- MapWithDefault<Protocol.Preload.PreloadPipelineId, Map<Protocol.Preload.SpeculationAction, PreloadingAttemptId>> =
656
- new MapWithDefault<
657
- Protocol.Preload.PreloadPipelineId, Map<Protocol.Preload.SpeculationAction, PreloadingAttemptId>>();
658
-
659
- private enrich(attempt: PreloadingAttemptInternal, source: Protocol.Preload.PreloadingAttemptSource|null):
660
- PreloadingAttempt {
654
+ Common.MapWithDefault.MapWithDefault<Protocol.Preload.PreloadPipelineId,
655
+ Map<Protocol.Preload.SpeculationAction, PreloadingAttemptId>> =
656
+ new Common.MapWithDefault.MapWithDefault<Protocol.Preload.PreloadPipelineId,
657
+ Map<Protocol.Preload.SpeculationAction, PreloadingAttemptId>>();
658
+
659
+ private enrich(
660
+ attempt: PreloadingAttemptInternal,
661
+ source: Protocol.Preload.PreloadingAttemptSource|null,
662
+ ): PreloadingAttempt {
661
663
  let ruleSetIds: Protocol.Preload.RuleSetId[] = [];
662
664
  let nodeIds: Protocol.DOM.BackendNodeId[] = [];
663
665
  if (source !== null) {
@@ -706,12 +708,17 @@ class PreloadingAttemptRegistry {
706
708
  if (pipeline.size === 0) {
707
709
  throw new Error('unreachable');
708
710
  }
709
- return [...pipeline.keys()].every(action => getSortKey(action) <= getSortKey(attempt.action));
711
+ return [...pipeline.keys()].every(
712
+ action => getSortKey(action) <= getSortKey(attempt.action),
713
+ );
710
714
  }
711
715
 
712
716
  // Returns reference. Don't save returned values.
713
717
  // Returned values may or may not be updated as the time grows.
714
- getById(id: PreloadingAttemptId, sources: SourceRegistry): PreloadingAttempt|null {
718
+ getById(
719
+ id: PreloadingAttemptId,
720
+ sources: SourceRegistry,
721
+ ): PreloadingAttempt|null {
715
722
  const attempt = this.map.get(id) || null;
716
723
  if (attempt === null) {
717
724
  return null;
@@ -725,16 +732,23 @@ class PreloadingAttemptRegistry {
725
732
  //
726
733
  // Returns reference. Don't save returned values.
727
734
  // Returned values may or may not be updated as the time grows.
728
- getAllRepresentative(ruleSetId: Protocol.Preload.RuleSetId|null, sources: SourceRegistry):
729
- Array<WithId<PreloadingAttemptId, PreloadingAttempt>> {
735
+ getAllRepresentative(
736
+ ruleSetId: Protocol.Preload.RuleSetId|null,
737
+ sources: SourceRegistry,
738
+ ): Array<WithId<PreloadingAttemptId, PreloadingAttempt>> {
730
739
  return [...this.map.entries()]
731
- .map(([id, value]) => ({id, value: this.enrich(value, sources.getById(id))}))
740
+ .map(([id, value]) => ({
741
+ id,
742
+ value: this.enrich(value, sources.getById(id)),
743
+ }))
732
744
  .filter(({value}) => !ruleSetId || value.ruleSetIds.includes(ruleSetId))
733
745
  .filter(({value}) => this.isAttemptRepresentative(value));
734
746
  }
735
747
 
736
- getPipeline(pipelineId: Protocol.Preload.PreloadPipelineId, sources: SourceRegistry):
737
- Map<Protocol.Preload.SpeculationAction, PreloadingAttempt>|null {
748
+ getPipeline(
749
+ pipelineId: Protocol.Preload.PreloadPipelineId,
750
+ sources: SourceRegistry,
751
+ ): Map<Protocol.Preload.SpeculationAction, PreloadingAttempt>|null {
738
752
  const pipeline = this.pipelines.get(pipelineId);
739
753
 
740
754
  if (pipeline === undefined || pipeline.size === 0) {
@@ -745,11 +759,13 @@ class PreloadingAttemptRegistry {
745
759
  for (const [id, attempt] of this.map.entries()) {
746
760
  map[id] = attempt;
747
761
  }
748
- return new Map(pipeline.entries().map(([action, id]) => {
749
- const attempt = this.getById(id, sources);
750
- assertNotNullOrUndefined(attempt);
751
- return [action, attempt];
752
- }));
762
+ return new Map(
763
+ pipeline.entries().map(([action, id]) => {
764
+ const attempt = this.getById(id, sources);
765
+ assertNotNullOrUndefined(attempt);
766
+ return [action, attempt];
767
+ }),
768
+ );
753
769
  }
754
770
 
755
771
  upsert(attempt: PreloadingAttemptInternal): void {
@@ -770,7 +786,10 @@ class PreloadingAttemptRegistry {
770
786
  continue;
771
787
  }
772
788
 
773
- const pipeline = this.pipelines.getOrInsertComputed(attempt.pipelineId, () => new Map());
789
+ const pipeline = this.pipelines.getOrInsertComputed(
790
+ attempt.pipelineId,
791
+ () => new Map(),
792
+ );
774
793
  pipeline.set(attempt.action, id);
775
794
  }
776
795
  }
@@ -830,7 +849,10 @@ class PreloadingAttemptRegistry {
830
849
  // Removes keys in `this.map` that are not in `sources`. This is used to
831
850
  // remove attempts that no longer have a matching speculation rule.
832
851
  cleanUpRemovedAttempts(sources: SourceRegistry): void {
833
- const keysToRemove = Array.from(this.map.keys()).filter(key => !sources.getById(key));
852
+ const keysToRemove = Array.from(this.map.keys())
853
+ .filter(
854
+ key => !sources.getById(key),
855
+ );
834
856
  for (const key of keysToRemove) {
835
857
  this.map.delete(key);
836
858
  }
@@ -4,11 +4,14 @@
4
4
 
5
5
  import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
6
6
  import * as Protocol from '../../generated/protocol.js';
7
- import type {DOMPinnedWebIDLProp, DOMPinnedWebIDLType} from '../common/JavaScriptMetaData.js';
7
+ import type * as Common from '../common/common.js';
8
8
 
9
9
  import type {DebuggerModel, FunctionDetails} from './DebuggerModel.js';
10
10
  import type {RuntimeModel} from './RuntimeModel.js';
11
11
 
12
+ type DOMPinnedWebIDLProp = Common.JavaScriptMetaData.DOMPinnedWebIDLProp;
13
+ type DOMPinnedWebIDLType = Common.JavaScriptMetaData.DOMPinnedWebIDLType;
14
+
12
15
  /** This cannot be an interface due to "instanceof RemoteObject" checks in the code. **/
13
16
  export abstract class RemoteObject {
14
17
  static fromLocalObject(value: unknown): RemoteObject {
@@ -589,12 +589,13 @@ export class ExecutionContext {
589
589
  return a.name.localeCompare(b.name);
590
590
  }
591
591
 
592
- async evaluate(options: EvaluationOptions, userGesture: boolean, awaitPromise: boolean): Promise<EvaluationResult> {
592
+ async evaluateWithSelectedFrameFallback(options: EvaluationOptions, userGesture: boolean,
593
+ awaitPromise: boolean): Promise<EvaluationResult> {
593
594
  // FIXME: It will be moved to separate ExecutionContext.
594
595
  if (this.debuggerModel.selectedCallFrame()) {
595
596
  return await this.debuggerModel.evaluateOnSelectedCallFrame(options);
596
597
  }
597
- return await this.evaluateGlobal(options, userGesture, awaitPromise);
598
+ return await this.evaluate(options, userGesture, awaitPromise);
598
599
  }
599
600
 
600
601
  globalObject(objectGroup: string, generatePreview: boolean): Promise<EvaluationResult> {
@@ -606,7 +607,7 @@ export class ExecutionContext {
606
607
  returnByValue: false,
607
608
  generatePreview,
608
609
  };
609
- return this.evaluateGlobal((evaluationOptions as EvaluationOptions), false, false);
610
+ return this.evaluate((evaluationOptions as EvaluationOptions), false, false);
610
611
  }
611
612
 
612
613
  async callFunctionOn(options: CallFunctionOptions): Promise<EvaluationResult> {
@@ -629,8 +630,7 @@ export class ExecutionContext {
629
630
  return {object: this.runtimeModel.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails};
630
631
  }
631
632
 
632
- private async evaluateGlobal(options: EvaluationOptions, userGesture: boolean, awaitPromise: boolean):
633
- Promise<EvaluationResult> {
633
+ async evaluate(options: EvaluationOptions, userGesture: boolean, awaitPromise: boolean): Promise<EvaluationResult> {
634
634
  if (!options.expression) {
635
635
  // There is no expression, so the completion should happen against global properties.
636
636
  options.expression = 'this';
@@ -312,3 +312,22 @@ export const consoleUserActivationEvalSettingDescriptor: Common.Settings.Setting
312
312
  defaultValue: true,
313
313
  storageType: Common.Settings.SettingStorageType.SYNCED,
314
314
  };
315
+ export const monitoringXHREnabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
316
+ name: 'monitoring-xhr-enabled',
317
+ type: Common.Settings.SettingType.BOOLEAN,
318
+ defaultValue: false,
319
+ storageType: Common.Settings.SettingStorageType.SYNCED,
320
+ };
321
+
322
+ export const disablePausedStateOverlaySettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
323
+ name: 'disable-paused-state-overlay',
324
+ type: Common.Settings.SettingType.BOOLEAN,
325
+ defaultValue: false,
326
+ storageType: Common.Settings.SettingStorageType.SYNCED,
327
+ };
328
+
329
+ export const preserveNetworkLogSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
330
+ name: 'network-log.preserve-log',
331
+ type: Common.Settings.SettingType.BOOLEAN,
332
+ defaultValue: false,
333
+ };
@@ -67,6 +67,7 @@ import * as PaintProfiler from './PaintProfiler.js';
67
67
  import * as PerformanceMetricsModel from './PerformanceMetricsModel.js';
68
68
  import * as PreloadingModel from './PreloadingModel.js';
69
69
  import * as RehydratingConnection from './RehydratingConnection.js';
70
+ import * as RehydratingObject from './RehydratingObject.js';
70
71
  import * as RemoteObject from './RemoteObject.js';
71
72
  import * as Resource from './Resource.js';
72
73
  import * as ResourceTreeModel from './ResourceTreeModel.js';
@@ -153,6 +154,7 @@ export {
153
154
  PerformanceMetricsModel,
154
155
  PreloadingModel,
155
156
  RehydratingConnection, // TODO(crbug.com/444191656): Exported for tests.
157
+ RehydratingObject,
156
158
  RemoteObject,
157
159
  Resource,
158
160
  ResourceTreeModel,
@@ -6,7 +6,7 @@ import * as Platform from '../../core/platform/platform.js';
6
6
  import * as Root from '../../core/root/root.js';
7
7
  // This file is required to bring some types into scope, even though it
8
8
  // is not used.
9
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @devtools/es-modules-import
10
10
  import type * as CodeMirrorModule from '../../third_party/codemirror/codemirror-legacy.js';
11
11
 
12
12
  import {CSSFormatter} from './CSSFormatter.js';
@@ -12,6 +12,7 @@ import * as MobileThrottling from '../../panels/mobile_throttling/mobile_throttl
12
12
  import * as Components from '../../ui/legacy/components/utils/utils.js';
13
13
  import * as UI from '../../ui/legacy/legacy.js';
14
14
  import * as Lit from '../../ui/lit/lit.js';
15
+ import * as SettingsUI from '../../ui/settings/settings.js';
15
16
 
16
17
  import nodeIconStyles from './nodeIcon.css.js';
17
18
 
@@ -251,7 +252,8 @@ export class BackendSettingsSync implements SDK.TargetManager.Observer {
251
252
  this.#autoAttachSetting.addChangeListener(this.#updateAutoAttach, this);
252
253
  this.#updateAutoAttach();
253
254
 
254
- this.#adBlockEnabledSetting = Common.Settings.Settings.instance().moduleSetting('network.ad-blocking-enabled');
255
+ this.#adBlockEnabledSetting = Common.Settings.Settings.instance().resolve(
256
+ SettingsUI.InspectorMainSettings.adBlockingEnabledSettingDescriptor);
255
257
  this.#adBlockEnabledSetting.addChangeListener(this.#update, this);
256
258
 
257
259
  this.#emulatePageFocusSetting =
@@ -447,13 +447,9 @@ UI.ActionRegistration.registerActionExtension({
447
447
  },
448
448
  });
449
449
 
450
- Common.Settings.registerSettingExtension({
450
+ SettingsUI.SettingUIRegistration.register(SettingsUI.InspectorMainSettings.adBlockingEnabledSettingDescriptor, {
451
451
  category: Common.Settings.SettingCategory.NETWORK,
452
452
  title: i18nLazyString(UIStrings.forceAdBlocking),
453
- settingName: 'network.ad-blocking-enabled',
454
- settingType: Common.Settings.SettingType.BOOLEAN,
455
- storageType: Common.Settings.SettingStorageType.SESSION,
456
- defaultValue: false,
457
453
  options: [
458
454
  {
459
455
  value: true,
@@ -595,16 +595,15 @@ export class MainImpl {
595
595
  if (event.data.payload === 'true' || event.data.payload === 'false') {
596
596
  VisualLogging.setVeDebuggingEnabled(event.data.payload === 'true', (query: string) => {
597
597
  VisualLogging.setVeDebuggingEnabled(false);
598
- void runtimeModel?.defaultExecutionContext()?.evaluate(
599
- {
600
- expression: `window.inspect(${JSON.stringify(query)})`,
601
- includeCommandLineAPI: false,
602
- silent: true,
603
- returnByValue: false,
604
- generatePreview: false,
605
- },
606
- /* userGesture */ false,
607
- /* awaitPromise */ false);
598
+ void runtimeModel?.defaultExecutionContext()?.evaluateWithSelectedFrameFallback({
599
+ expression: `window.inspect(${JSON.stringify(query)})`,
600
+ includeCommandLineAPI: false,
601
+ silent: true,
602
+ returnByValue: false,
603
+ generatePreview: false,
604
+ },
605
+ /* userGesture */ false,
606
+ /* awaitPromise */ false);
608
607
  });
609
608
  } else {
610
609
  VisualLogging.setHighlightedVe(event.data.payload === 'null' ? null : event.data.payload);
@@ -8,14 +8,62 @@ import * as i18n from '../../core/i18n/i18n.js';
8
8
  import type * as Platform from '../../core/platform/platform.js';
9
9
  import * as Root from '../../core/root/root.js';
10
10
  import * as SDK from '../../core/sdk/sdk.js';
11
+ import * as Badges from '../../models/badges/badges.js';
12
+ import * as Persistence from '../../models/persistence/persistence.js';
11
13
  import * as Workspace from '../../models/workspace/workspace.js';
12
14
  import * as Components from '../../ui/legacy/components/utils/utils.js';
13
15
  import * as UI from '../../ui/legacy/legacy.js';
16
+ import * as SettingsUI from '../../ui/settings/settings.js';
14
17
  import type * as InspectorMain from '../inspector_main/inspector_main.js';
15
18
 
16
19
  import type * as Main from './main.js';
17
20
 
18
21
  const UIStrings = {
22
+ /**
23
+ * @description Title of a setting under the Persistence category in Settings.
24
+ */
25
+ localOverrides: 'Local overrides',
26
+ /**
27
+ * @description A tag of enable local overrides setting that can be searched in the command menu.
28
+ */
29
+ interception: 'interception',
30
+ /**
31
+ * @description A tag of enable local overrides setting that can be searched in the command menu.
32
+ */
33
+ override: 'override',
34
+ /**
35
+ * @description A tag of group network by frame setting that can be searched in the command menu.
36
+ */
37
+ network: 'network',
38
+ /**
39
+ * @description A tag of enable local overrides setting that can be searched in the command menu.
40
+ */
41
+ rewrite: 'rewrite',
42
+ /**
43
+ * @description A tag of enable local overrides setting that can be searched in the command menu.
44
+ * Noun for network request.
45
+ */
46
+ request: 'request',
47
+ /**
48
+ * @description Title of an option under the Persistence category that can be invoked through the command menu.
49
+ */
50
+ enableOverrideNetworkRequests: 'Enable override network requests',
51
+ /**
52
+ * @description Title of an option under the Persistence category that can be invoked through the command menu.
53
+ */
54
+ disableOverrideNetworkRequests: 'Disable override network requests',
55
+ /**
56
+ * @description Label for a checkbox in the settings UI. Allows developers to opt-in/opt-out
57
+ * of receiving Google Developer Program (GDP) badges based on their activity in Chrome DevTools.
58
+ */
59
+ earnBadges: 'Earn badges',
60
+ /**
61
+ * @description Title of a setting under the Appearance category in Settings. When the webpage is
62
+ * paused by devtools, an overlay is shown on top of the page to indicate that it is paused. The
63
+ * overlay is a pause/unpause button and some text, which appears on top of the paused page. This
64
+ * setting turns off this overlay.
65
+ */
66
+ disablePaused: 'Disable paused state overlay',
19
67
  /**
20
68
  * @description Action title to focus the page being debugged.
21
69
  */
@@ -719,6 +767,11 @@ Common.Settings.registerSettingExtension({
719
767
  defaultValue: false,
720
768
  });
721
769
 
770
+ SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.disablePausedStateOverlaySettingDescriptor, {
771
+ category: Common.Settings.SettingCategory.APPEARANCE,
772
+ title: i18nLazyString(UIStrings.disablePaused),
773
+ });
774
+
722
775
  Common.Settings.registerSettingExtension({
723
776
  category: Common.Settings.SettingCategory.GLOBAL,
724
777
  settingName: 'currentDockState',
@@ -790,6 +843,35 @@ Common.Settings.registerSettingExtension({
790
843
  reloadRequired: true,
791
844
  });
792
845
 
846
+ SettingsUI.SettingUIRegistration.register(Badges.receiveGdpBadgesSettingDescriptor, {
847
+ category: Common.Settings.SettingCategory.ACCOUNT,
848
+ title: i18nLazyString(UIStrings.earnBadges),
849
+ reloadRequired: true,
850
+ });
851
+
852
+ SettingsUI.SettingUIRegistration.register(
853
+ Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor, {
854
+ category: Common.Settings.SettingCategory.PERSISTENCE,
855
+ title: i18nLazyString(UIStrings.localOverrides),
856
+ tags: [
857
+ i18nLazyString(UIStrings.interception),
858
+ i18nLazyString(UIStrings.override),
859
+ i18nLazyString(UIStrings.network),
860
+ i18nLazyString(UIStrings.rewrite),
861
+ i18nLazyString(UIStrings.request),
862
+ ],
863
+ options: [
864
+ {
865
+ value: true,
866
+ title: i18nLazyString(UIStrings.enableOverrideNetworkRequests),
867
+ },
868
+ {
869
+ value: false,
870
+ title: i18nLazyString(UIStrings.disableOverrideNetworkRequests),
871
+ },
872
+ ],
873
+ });
874
+
793
875
  Common.Settings.registerSettingExtension({
794
876
  storageType: Common.Settings.SettingStorageType.SYNCED,
795
877
  settingName: 'user-shortcuts',
@@ -16,14 +16,9 @@ import '../../panels/changes/changes-meta.js';
16
16
  import '../../panels/linear_memory_inspector/linear_memory_inspector-meta.js';
17
17
  import '../../panels/settings/settings-meta.js';
18
18
  import '../../panels/protocol_monitor/protocol_monitor-meta.js';
19
- import '../../models/persistence/persistence-meta.js';
20
- import '../../models/logs/logs-meta.js';
21
- import '../../models/badges/badges-meta.js';
22
19
  import '../main/main-meta.js';
23
20
  import '../../ui/legacy/components/perf_ui/perf_ui-meta.js';
24
21
  import '../../ui/legacy/components/quick_open/quick_open-meta.js';
25
- import '../../core/sdk/sdk-meta.js';
26
- import '../../models/workspace/workspace-meta.js';
27
22
  import '../../ui/legacy/components/source_frame/source_frame-meta.js';
28
23
  import '../../panels/console_counters/console_counters-meta.js';
29
24
  import '../../panels/explain/explain-meta.js';
@@ -4,16 +4,11 @@
4
4
  // found in the LICENSE file.
5
5
  import '../main/main-meta.js';
6
6
  import '../inspector_main/inspector_main-meta.js';
7
- import '../../core/sdk/sdk-meta.js';
8
- import '../../models/workspace/workspace-meta.js';
9
7
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
8
  // @ts-ignore: tsc 6.0 does not support side-effect imports without a type definition.
11
9
  // We cannot use `@ts-expect-error` here because the import is correctly resolved
12
10
  // when bundling the application (which doesn't error) and only errors in unbundled builds.
13
11
  import '../../Images/Images.js';
14
- import '../../models/logs/logs-meta.js';
15
- import '../../models/persistence/persistence-meta.js';
16
- import '../../models/badges/badges-meta.js';
17
12
  import '../../panels/browser_debugger/browser_debugger-meta.js';
18
13
  import '../../panels/developer_resources/developer_resources-meta.js';
19
14
  // panels/timeline depends on mobile_throttling for settings UI
@@ -226,6 +226,8 @@ inspectorBackend.registerCommand("Browser.setContentsSize", [{"name": "windowId"
226
226
  inspectorBackend.registerCommand("Browser.setDockTile", [{"name": "badgeLabel", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "image", "type": "string", "optional": true, "description": "Png encoded image.", "typeRef": null}], [], "Set dock tile details, platform-specific.");
227
227
  inspectorBackend.registerCommand("Browser.executeBrowserCommand", [{"name": "commandId", "type": "string", "optional": false, "description": "", "typeRef": "Browser.BrowserCommandId"}], [], "Invoke custom browser commands used by telemetry.");
228
228
  inspectorBackend.registerCommand("Browser.addPrivacySandboxEnrollmentOverride", [{"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.");
229
+ inspectorBackend.registerCommand("Browser.getGlobalPrivacyControl", [], ["gpc"], "Gets the current globally-applied privacy control status See https://www.w3.org/TR/gpc/#get-global-privacy-control");
230
+ inspectorBackend.registerCommand("Browser.setGlobalPrivacyControl", [{"name": "gpc", "type": "boolean", "optional": false, "description": "", "typeRef": null}], ["gpc"], "Sets and then gets the current globally-applied privacy control status See https://www.w3.org/TR/gpc/#set-global-privacy-control");
229
231
  inspectorBackend.registerType("Browser.Bounds", [{"name": "left", "type": "number", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels.", "typeRef": null}, {"name": "top", "type": "number", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels.", "typeRef": null}, {"name": "width", "type": "number", "optional": true, "description": "The window width in pixels.", "typeRef": null}, {"name": "height", "type": "number", "optional": true, "description": "The window height in pixels.", "typeRef": null}, {"name": "windowState", "type": "string", "optional": true, "description": "The window state. Default to normal.", "typeRef": "Browser.WindowState"}]);
230
232
  inspectorBackend.registerType("Browser.PermissionDescriptor", [{"name": "name", "type": "string", "optional": false, "description": "Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.", "typeRef": null}, {"name": "sysex", "type": "boolean", "optional": true, "description": "For \\\"midi\\\" permission, may also specify sysex control.", "typeRef": null}, {"name": "userVisibleOnly", "type": "boolean", "optional": true, "description": "For \\\"push\\\" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.", "typeRef": null}, {"name": "allowWithoutSanitization", "type": "boolean", "optional": true, "description": "For \\\"clipboard\\\" permission, may specify allowWithoutSanitization.", "typeRef": null}, {"name": "allowWithoutGesture", "type": "boolean", "optional": true, "description": "For \\\"fullscreen\\\" permission, must specify allowWithoutGesture:true.", "typeRef": null}, {"name": "panTiltZoom", "type": "boolean", "optional": true, "description": "For \\\"camera\\\" permission, may specify panTiltZoom.", "typeRef": null}]);
231
233
  inspectorBackend.registerType("Browser.Bucket", [{"name": "low", "type": "number", "optional": false, "description": "Minimum value (inclusive).", "typeRef": null}, {"name": "high", "type": "number", "optional": false, "description": "Maximum value (exclusive).", "typeRef": null}, {"name": "count", "type": "number", "optional": false, "description": "Number of samples.", "typeRef": null}]);
@@ -1487,6 +1487,22 @@ export namespace ProtocolMapping {
1487
1487
  paramsType: [Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest];
1488
1488
  returnType: void;
1489
1489
  };
1490
+ /**
1491
+ * Gets the current globally-applied privacy control status
1492
+ * See https://www.w3.org/TR/gpc/#get-global-privacy-control
1493
+ */
1494
+ 'Browser.getGlobalPrivacyControl': {
1495
+ paramsType: [];
1496
+ returnType: Protocol.Browser.GetGlobalPrivacyControlResponse;
1497
+ };
1498
+ /**
1499
+ * Sets and then gets the current globally-applied privacy control status
1500
+ * See https://www.w3.org/TR/gpc/#set-global-privacy-control
1501
+ */
1502
+ 'Browser.setGlobalPrivacyControl': {
1503
+ paramsType: [Protocol.Browser.SetGlobalPrivacyControlRequest];
1504
+ returnType: Protocol.Browser.SetGlobalPrivacyControlResponse;
1505
+ };
1490
1506
  /**
1491
1507
  * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
1492
1508
  * position specified by `location`.
@@ -713,6 +713,18 @@ declare namespace ProtocolProxyApi {
713
713
  */
714
714
  invoke_addPrivacySandboxEnrollmentOverride(params: Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest): Promise<Protocol.ProtocolResponseWithError>;
715
715
 
716
+ /**
717
+ * Gets the current globally-applied privacy control status
718
+ * See https://www.w3.org/TR/gpc/#get-global-privacy-control
719
+ */
720
+ invoke_getGlobalPrivacyControl(): Promise<Protocol.Browser.GetGlobalPrivacyControlResponse>;
721
+
722
+ /**
723
+ * Sets and then gets the current globally-applied privacy control status
724
+ * See https://www.w3.org/TR/gpc/#set-global-privacy-control
725
+ */
726
+ invoke_setGlobalPrivacyControl(params: Protocol.Browser.SetGlobalPrivacyControlRequest): Promise<Protocol.Browser.SetGlobalPrivacyControlResponse>;
727
+
716
728
  }
717
729
  export interface BrowserDispatcher {
718
730
  /**