chrome-devtools-frontend 1.0.1542501 → 1.0.1543082

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 (30) hide show
  1. package/front_end/core/host/InspectorFrontendHost.ts +0 -3
  2. package/front_end/core/root/Runtime.ts +0 -10
  3. package/front_end/core/sdk/NetworkManager.ts +0 -7
  4. package/front_end/core/sdk/NetworkRequest.ts +0 -10
  5. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +5 -5
  6. package/front_end/entrypoints/main/main-meta.ts +1 -5
  7. package/front_end/generated/Deprecation.ts +0 -14
  8. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  9. package/front_end/generated/protocol.ts +0 -1
  10. package/front_end/models/ai_assistance/BuiltInAi.ts +13 -7
  11. package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
  12. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +3 -1
  13. package/front_end/panels/application/components/BackForwardCacheView.ts +12 -9
  14. package/front_end/panels/console/ConsolePrompt.ts +1 -1
  15. package/front_end/panels/console/ConsoleView.ts +3 -0
  16. package/front_end/panels/network/NetworkDataGridNode.ts +0 -7
  17. package/front_end/panels/network/NetworkLogView.ts +1 -45
  18. package/front_end/panels/security/SecurityPanel.ts +0 -2
  19. package/front_end/panels/security/SecurityPanelSidebar.ts +0 -16
  20. package/front_end/panels/security/security.ts +0 -2
  21. package/front_end/third_party/chromium/README.chromium +1 -1
  22. package/front_end/ui/components/expandable_list/ExpandableList.docs.ts +30 -0
  23. package/front_end/ui/legacy/components/utils/Linkifier.ts +45 -1
  24. package/package.json +1 -1
  25. package/front_end/panels/security/IPProtectionTreeElement.ts +0 -21
  26. package/front_end/panels/security/IPProtectionView.ts +0 -287
  27. package/front_end/ui/components/docs/expandable_list/basic.html +0 -24
  28. package/front_end/ui/components/docs/expandable_list/basic.ts +0 -30
  29. package/front_end/ui/components/docs/text_prompt/basic.html +0 -35
  30. package/front_end/ui/components/docs/text_prompt/basic.ts +0 -19
@@ -395,9 +395,6 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
395
395
  thirdPartyCookieHeuristicsEnabled: true,
396
396
  managedBlockThirdPartyCookies: 'Unset',
397
397
  },
398
- devToolsIpProtectionPanelInDevTools: {
399
- enabled: false,
400
- },
401
398
  devToolsFlexibleLayout: {
402
399
  verticalDrawerEnabled: true,
403
400
  },
@@ -465,10 +465,6 @@ export interface HostConfigThirdPartyCookieControls {
465
465
  managedBlockThirdPartyCookies: string|boolean;
466
466
  }
467
467
 
468
- export interface HostConfigIPProtection {
469
- enabled: boolean;
470
- }
471
-
472
468
  interface AiGeneratedTimelineLabels {
473
469
  enabled: boolean;
474
470
  }
@@ -482,10 +478,6 @@ interface AiSubmenuPrompts {
482
478
  featureName?: string;
483
479
  }
484
480
 
485
- interface IpProtectionInDevTools {
486
- enabled: boolean;
487
- }
488
-
489
481
  interface AiDebugWithAi {
490
482
  enabled: boolean;
491
483
  featureName?: string;
@@ -568,7 +560,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
568
560
  devToolsWellKnown: HostConfigWellKnown,
569
561
  devToolsPrivacyUI: HostConfigPrivacyUI,
570
562
  devToolsIndividualRequestThrottling: DevToolsIndividualRequestThrottling,
571
- devToolsIpProtectionPanelInDevTools: HostConfigIPProtection,
572
563
  /**
573
564
  * OffTheRecord here indicates that the user's profile is either incognito,
574
565
  * or guest mode, rather than a "normal" profile.
@@ -580,7 +571,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
580
571
  devToolsAiGeneratedTimelineLabels: AiGeneratedTimelineLabels,
581
572
  devToolsAllowPopoverForcing: AllowPopoverForcing,
582
573
  devToolsAiSubmenuPrompts: AiSubmenuPrompts,
583
- devToolsIpProtectionInDevTools: IpProtectionInDevTools,
584
574
  devToolsGlobalAiButton: GlobalAiButton,
585
575
  devToolsGdpProfiles: GdpProfiles,
586
576
  devToolsGdpProfilesAvailability: GdpProfilesAvailability,
@@ -689,13 +689,6 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
689
689
  networkRequest.setSecurityDetails(response.securityDetails);
690
690
  }
691
691
 
692
- // TODO(crbug.com/425645896): Remove this guard once IP Protection is fully launched.
693
- if (Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled) {
694
- if (response.isIpProtectionUsed) {
695
- networkRequest.setIsIpProtectionUsed(response.isIpProtectionUsed);
696
- }
697
- }
698
-
699
692
  const newResourceType = Common.ResourceType.ResourceType.fromMimeTypeOverride(networkRequest.mimeType);
700
693
  if (newResourceType) {
701
694
  networkRequest.setResourceType(newResourceType);
@@ -317,7 +317,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
317
317
  responseReceivedPromiseResolve?: () => void;
318
318
  directSocketInfo?: DirectSocketInfo;
319
319
  readonly #directSocketChunks: DirectSocketChunk[] = [];
320
- #isIpProtectionUsed: boolean;
321
320
  #isAdRelated: boolean;
322
321
  #appliedNetworkConditionsId?: string;
323
322
 
@@ -341,7 +340,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
341
340
  this.#loaderId = loaderId;
342
341
  this.#initiator = initiator;
343
342
  this.#hasUserGesture = hasUserGesture;
344
- this.#isIpProtectionUsed = false;
345
343
  this.#isAdRelated = false;
346
344
  }
347
345
 
@@ -1832,14 +1830,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
1832
1830
  return this.#isSameSite;
1833
1831
  }
1834
1832
 
1835
- setIsIpProtectionUsed(isIpProtectionUsed: boolean): void {
1836
- this.#isIpProtectionUsed = isIpProtectionUsed;
1837
- }
1838
-
1839
- isIpProtectionUsed(): boolean|null {
1840
- return this.#isIpProtectionUsed;
1841
- }
1842
-
1843
1833
  setIsAdRelated(isAdRelated: boolean): void {
1844
1834
  this.#isAdRelated = isAdRelated;
1845
1835
  }
@@ -66,13 +66,13 @@ const UIStrings = {
66
66
  'Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations.',
67
67
  /**
68
68
  * @description The name of a checkbox setting in the Rendering tool. This setting highlights the
69
- * rendering frames for ads that are found on the page.
69
+ * rendering elements for ads that are found on the page.
70
70
  */
71
- highlightAdFrames: 'Highlight ad frames',
71
+ highlightAds: 'Highlight ads',
72
72
  /**
73
- * @description Explanation text for the 'Highlight ad frames' setting in the Rendering tool.
73
+ * @description Explanation text for the 'Highlight ads' setting in the Rendering tool.
74
74
  */
75
- highlightsFramesRedDetectedToBe: 'Highlights frames (red) detected to be ads.',
75
+ highlightsElementsRedDetectedToBe: 'Highlights elements (red) detected to be ads.',
76
76
  /**
77
77
  * @description The name of a checkbox setting in the Rendering tool. This setting prevents the
78
78
  * webpage from loading 'local' fonts. Local fonts are fonts that are installed on the user's
@@ -207,7 +207,7 @@ export class RenderingOptionsView extends UI.Widget.VBox {
207
207
  i18nString(UIStrings.scrollingPerformanceIssues), i18nString(UIStrings.highlightsElementsTealThatCan),
208
208
  Common.Settings.Settings.instance().moduleSetting('show-scroll-bottleneck-rects'));
209
209
  this.#appendCheckbox(
210
- i18nString(UIStrings.highlightAdFrames), i18nString(UIStrings.highlightsFramesRedDetectedToBe),
210
+ i18nString(UIStrings.highlightAds), i18nString(UIStrings.highlightsElementsRedDetectedToBe),
211
211
  Common.Settings.Settings.instance().moduleSetting('show-ad-highlights'));
212
212
  this.#appendCheckbox(
213
213
  i18nString(UIStrings.disableLocalFonts), i18nString(UIStrings.disablesLocalSourcesInFontface),
@@ -910,13 +910,9 @@ UI.Toolbar.registerToolbarItem({
910
910
  condition(config) {
911
911
  const isFlagEnabled = config?.devToolsGlobalAiButton?.enabled;
912
912
 
913
- const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
914
- const isLocaleRestricted = !devtoolsLocale.locale.startsWith('en-');
915
-
916
913
  const isGeoRestricted = config?.aidaAvailability?.blockedByGeo === true;
917
914
  const isPolicyRestricted = config?.aidaAvailability?.blockedByEnterprisePolicy === true;
918
- const isAgeRestricted = Boolean(config?.aidaAvailability?.blockedByAge);
919
- return Boolean(isFlagEnabled && !isLocaleRestricted && !isGeoRestricted && !isPolicyRestricted && !isAgeRestricted);
915
+ return Boolean(isFlagEnabled && !isGeoRestricted && !isPolicyRestricted);
920
916
  },
921
917
  async loadItem() {
922
918
  const Main = await loadMainModule();
@@ -90,14 +90,6 @@ export const UIStrings = {
90
90
  * @description This warning occurs when a stylesheet loaded from a local file directive does not end in the file type `.css`.
91
91
  */
92
92
  LocalCSSFileExtensionRejected: "CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.",
93
- /**
94
- * @description This is a deprecation warning to developers that occurs when the script attempts to use the Media Source Extensions API in a way that is no longer supported by the specification for the API. The usage that is problematic is when the script calls the `SourceBuffer.abort()` method at a time when there is still processing happening in response to a previous `SourceBuffer.remove()` call for the same SourceBuffer object. More precisely, we show this warning to developers when script calls the SourceBuffer abort() method while the asynchronous processing of a remove() call on that SourceBuffer is not yet complete. Early versions of the Media Source Extensions specification allowed such aborts, but standardization of the specification resulted in disallowing the aborts. The script should instead wait for the asynchronous remove() operation to complete, which is observable by listening for the associated 'updateend' event from the SourceBuffer. A note is also included in the warning, describing when abort() is meaningful and allowed by the specification for purposes other than interrupting a remove() operation's asynchronous steps. Those supported purposes include using abort() to interrupt processing that may still be happening in response to a previous appendBuffer() call on that SourceBuffer, or using abort() to clear the internal of any unprocessed data remaining from previous appendBuffer() calls. See https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-abort for the currently specified behavior, which would throw an exception once the deprecated removal abort is no longer supported. See https://github.com/w3c/media-source/issues/19 for the discussion that led to the specification change.
95
- */
96
- MediaSourceAbortRemove: "Using `SourceBuffer.abort()` to abort `remove()`'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the `updateend` event instead. `abort()` is intended to only abort an asynchronous media append or reset parser state.",
97
- /**
98
- * @description This is a deprecation warning to developers that occurs when the script attempts to use the Media Source Extensions API in a way that is no longer supported by the specification for the API. The usage that is problematic is when the script sets the duration attribute of a MediaSource object too low. The duration attribute of a MediaSource must be longer than the actual duration of any media (audio or video) already in the MediaSource. When set too low, the MediaSource must remove audio and video content that is beyond the time indicated by the new duration. Content removal that is caused by setting the duration attribute too low is no longer allowed by the specification. The message describes the minimum allowable duration value as the 'highest presentation timestamp of any buffered coded frames' as a more precise way of describing the duration of content already in the MediaSource: 'coded frames' are the specification's way of describing compressed audio frames or compressed video frames, and they each have a 'presentation timestamp' that describes precisely when that frame's playback occurs in the overall media presentation. Early versions of the Media Source Extensions specification allowed this to happen, but standardization of the specification resulted in disallowing this behavior. The underlying issue leading to this specification change was that setting the duration attribute should be synchronous, but setting it lower than the timestamp of something currently buffered would cause confusing removal of media between that new duration and the previous, larger, duration. The script should instead explicitly remove that range of media first, before lowering the duration. See https://www.w3.org/TR/media-source-2/#dom-mediasource-duration and https://www.w3.org/TR/media-source-2/#dom-mediasource-duration for the currently specified behavior, which would throw an exception once support is removed for deprecated implicit asynchronous range removal when duration is truncated. See both https://github.com/w3c/media-source/issues/20 and https://github.com/w3c/media-source/issues/26 for the discussion that led to the specification change.
99
- */
100
- MediaSourceDurationTruncatingBuffered: "Setting `MediaSource.duration` below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit `remove(newDuration, oldDuration)` on all `sourceBuffers`, where `newDuration < oldDuration`.",
101
93
  /**
102
94
  * @description This warning occurs when the browser requests Web MIDI access as sysex (system exclusive messages) can be allowed via prompt even if the browser did not specifically request it.
103
95
  */
@@ -283,12 +275,6 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
283
275
  "LocalCSSFileExtensionRejected": {
284
276
  "milestone": 64
285
277
  },
286
- "MediaSourceAbortRemove": {
287
- "chromeStatusFeature": 6107495151960064
288
- },
289
- "MediaSourceDurationTruncatingBuffered": {
290
- "chromeStatusFeature": 6107495151960064
291
- },
292
278
  "NoSysexWebMIDIWithoutPermission": {
293
279
  "chromeStatusFeature": 5138066234671104,
294
280
  "milestone": 82
@@ -983,7 +983,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
983
983
  inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
984
984
  inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
985
985
  inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
986
- inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", AttributionReporting: "attribution-reporting", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DirectSocketsPrivate: "direct-sockets-private", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FencedUnpartitionedStorageRead: "fenced-unpartitioned-storage-read", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetworkAccess: "local-network-access", Magnetometer: "magnetometer", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", Popins: "popins", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedAutofill: "shared-autofill", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
986
+ inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", AttributionReporting: "attribution-reporting", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DirectSocketsPrivate: "direct-sockets-private", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FencedUnpartitionedStorageRead: "fenced-unpartitioned-storage-read", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetworkAccess: "local-network-access", Magnetometer: "magnetometer", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedAutofill: "shared-autofill", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
987
987
  inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
988
988
  inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
989
989
  inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
@@ -13705,7 +13705,6 @@ export namespace Page {
13705
13705
  OtpCredentials = 'otp-credentials',
13706
13706
  Payment = 'payment',
13707
13707
  PictureInPicture = 'picture-in-picture',
13708
- Popins = 'popins',
13709
13708
  PrivateAggregation = 'private-aggregation',
13710
13709
  PrivateStateTokenIssuance = 'private-state-token-issuance',
13711
13710
  PrivateStateTokenRedemption = 'private-state-token-redemption',
@@ -185,13 +185,19 @@ export class BuiltInAi {
185
185
  async * getConsoleInsight(prompt: string, abortController: AbortController): AsyncGenerator<string> {
186
186
  // Clone the session to start a fresh conversation for each answer. Otherwise
187
187
  // previous dialog would pollute the context resulting in worse answers.
188
- const session = await this.#consoleInsightsSession.clone();
189
- const stream = session.promptStreaming(prompt, {
190
- signal: abortController.signal,
191
- });
192
- for await (const chunk of stream) {
193
- yield chunk;
188
+ let session: LanguageModel|null = null;
189
+ try {
190
+ session = await this.#consoleInsightsSession.clone();
191
+ const stream = session.promptStreaming(prompt, {
192
+ signal: abortController.signal,
193
+ });
194
+ for await (const chunk of stream) {
195
+ yield chunk;
196
+ }
197
+ } finally {
198
+ if (session) {
199
+ session.destroy();
200
+ }
194
201
  }
195
- session.destroy();
196
202
  }
197
203
  }
@@ -45,6 +45,7 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
45
45
  readonly #uiSourceCodeToSourceMaps =
46
46
  new Platform.MapUtilities.Multimap<Workspace.UISourceCode.UISourceCode, SDK.SourceMap.SourceMap>();
47
47
  readonly #debuggerModel: SDK.DebuggerModel.DebuggerModel;
48
+ readonly #ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager;
48
49
 
49
50
  constructor(
50
51
  debuggerModel: SDK.DebuggerModel.DebuggerModel, workspace: Workspace.Workspace.WorkspaceImpl,
@@ -52,6 +53,7 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
52
53
  this.#sourceMapManager = debuggerModel.sourceMapManager();
53
54
  this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
54
55
  this.#debuggerModel = debuggerModel;
56
+ this.#ignoreListManager = debuggerWorkspaceBinding.ignoreListManager;
55
57
 
56
58
  this.#stubProject = new ContentProviderBasedProject(
57
59
  workspace, 'jsSourceMaps:stub:' + debuggerModel.target().id(), Workspace.Workspace.projectTypes.Service, '',
@@ -362,8 +364,7 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
362
364
  // Create stub UISourceCode for the time source mapping is being loaded.
363
365
  this.addStubUISourceCode(script);
364
366
  void this.#debuggerWorkspaceBinding.updateLocations(script);
365
- if (Workspace.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(
366
- script.sourceURL, {isContentScript: script.isContentScript()})) {
367
+ if (this.#ignoreListManager.isUserIgnoreListedURL(script.sourceURL, {isContentScript: script.isContentScript()})) {
367
368
  this.#sourceMapManager.cancelAttachSourceMap(script);
368
369
  }
369
370
  }
@@ -27,11 +27,13 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
27
27
  readonly #debuggerModelToData: Map<SDK.DebuggerModel.DebuggerModel, ModelData>;
28
28
  readonly #liveLocationPromises: Set<Promise<void|Location|StackTraceTopFrameLocation|null>>;
29
29
  readonly pluginManager: DebuggerLanguagePluginManager;
30
+ readonly ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager;
30
31
 
31
32
  private constructor(
32
33
  resourceMapping: ResourceMapping, targetManager: SDK.TargetManager.TargetManager,
33
34
  ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager) {
34
35
  this.resourceMapping = resourceMapping;
36
+ this.ignoreListManager = ignoreListManager;
35
37
 
36
38
  this.#debuggerModelToData = new Map();
37
39
  targetManager.addModelListener(
@@ -39,7 +41,7 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
39
41
  targetManager.addModelListener(
40
42
  SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed, this.debuggerResumed, this);
41
43
  targetManager.observeModels(SDK.DebuggerModel.DebuggerModel, this);
42
- ignoreListManager.addEventListener(
44
+ this.ignoreListManager.addEventListener(
43
45
  Workspace.IgnoreListManager.Events.IGNORED_SCRIPT_RANGES_UPDATED, event => this.updateLocations(event.data));
44
46
 
45
47
  this.#liveLocationPromises = new Set();
@@ -147,6 +147,7 @@ const UIStrings = {
147
147
 
148
148
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheView.ts', UIStrings);
149
149
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
150
+ const {widgetConfig} = UI.Widget;
150
151
 
151
152
  const enum ScreenStatusType {
152
153
  RUNNING = 'Running',
@@ -384,16 +385,18 @@ function maybeRenderJavaScriptDetails(details: Protocol.Page.BackForwardCacheBlo
384
385
  return nothing;
385
386
  }
386
387
  const maxLengthForDisplayedURLs = 50;
387
- const linkifier = new Components.Linkifier.Linkifier(maxLengthForDisplayedURLs);
388
388
  const rows = [html`<div>${i18nString(UIStrings.filesPerIssue, {n: details.length})}</div>`];
389
- rows.push(...details.map(
390
- detail => html`${
391
- linkifier.linkifyScriptLocation(
392
- null, null, detail.url as Platform.DevToolsPath.UrlString, detail.lineNumber, {
393
- columnNumber: detail.columnNumber,
394
- showColumnNumber: true,
395
- inlineFrameIndex: 0,
396
- })}`));
389
+ rows.push(...details.map(detail => html`
390
+ <devtools-widget .widgetConfig=${widgetConfig(Components.Linkifier.ScriptLocationLink, {
391
+ sourceURL: detail.url as Platform.DevToolsPath.UrlString,
392
+ lineNumber: detail.lineNumber,
393
+ options: {
394
+ columnNumber: detail.columnNumber,
395
+ showColumnNumber: true,
396
+ inlineFrameIndex: 0,
397
+ maxLength: maxLengthForDisplayedURLs,
398
+ }
399
+ })}></devtools-widget>`));
397
400
  return html`
398
401
  <div class="details-list">
399
402
  <devtools-expandable-list .data=${
@@ -75,7 +75,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
75
75
  private aidaAvailability?: Host.AidaClient.AidaAccessPreconditions;
76
76
  private boundOnAidaAvailabilityChange?: () => Promise<void>;
77
77
  private aiCodeCompletion?: AiCodeCompletion.AiCodeCompletion.AiCodeCompletion;
78
- private teaser?: PanelCommon.AiCodeCompletionTeaser;
78
+ teaser?: PanelCommon.AiCodeCompletionTeaser;
79
79
  private placeholderCompartment: CodeMirror.Compartment = new CodeMirror.Compartment();
80
80
  private aiCodeCompletionSetting =
81
81
  Common.Settings.Settings.instance().createSetting('ai-code-completion-enabled', false);
@@ -1457,6 +1457,9 @@ export class ConsoleView extends UI.Widget.VBox implements
1457
1457
  }
1458
1458
 
1459
1459
  private async keyDown(event: Event): Promise<void> {
1460
+ if (!this.prompt.teaser?.isShowing()) {
1461
+ return;
1462
+ }
1460
1463
  const keyboardEvent = (event as KeyboardEvent);
1461
1464
  if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(keyboardEvent)) {
1462
1465
  if (keyboardEvent.key === 'i') {
@@ -325,7 +325,6 @@ const UIStrings = {
325
325
  /**
326
326
  * @description Tooltip to explain why the request has an IPP icon
327
327
  */
328
- responseIsIpProtectedToolTip: 'This request was sent through IP Protection proxies.',
329
328
  } as const;
330
329
  const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkDataGridNode.ts', UIStrings);
331
330
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -1175,12 +1174,6 @@ export class NetworkRequestNode extends NetworkNode {
1175
1174
  cell.addEventListener('focus', () => this.parentView().resetFocus());
1176
1175
 
1177
1176
  // render icons
1178
- if (this.requestInternal.isIpProtectionUsed()) {
1179
- const ippIcon = IconButton.Icon.create('shield', 'icon');
1180
- ippIcon.title = i18nString(UIStrings.responseIsIpProtectedToolTip);
1181
- ippIcon.style.color = 'var(--sys-color-on-surface-subtle);';
1182
- cell.appendChild(ippIcon);
1183
- }
1184
1177
 
1185
1178
  const iconElement = PanelUtils.getIconForNetworkRequest(this.requestInternal);
1186
1179
  // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
@@ -128,14 +128,6 @@ const UIStrings = {
128
128
  * @description Tooltip for a filter in the Network panel
129
129
  */
130
130
  onlyShowThirdPartyRequests: 'Show only requests with origin different from page origin',
131
- /**
132
- * @description Label for a filter in the Network panel
133
- */
134
- ippRequests: 'IP Protected requests',
135
- /**
136
- * @description Tooltip for a filter in the Network panel
137
- */
138
- onlyShowIPProtectedRequests: 'Show only requests sent to IP Protection proxies. Has no effect in regular browsing.',
139
131
  /**
140
132
  * @description Text that appears when user drag and drop something (for example, a file) in Network Log View of the Network panel
141
133
  */
@@ -530,7 +522,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
530
522
  private readonly networkOnlyThirdPartySetting: Common.Settings.Setting<boolean>;
531
523
  private readonly networkResourceTypeFiltersSetting: Common.Settings.Setting<Record<string, boolean>>;
532
524
  private readonly networkShowOptionsToGenerateHarWithSensitiveData: Common.Settings.Setting<boolean>;
533
- private readonly networkOnlyIPProtectedRequestsSetting: Common.Settings.Setting<boolean>;
534
525
  private readonly progressBarContainer: Element;
535
526
  private readonly networkLogLargeRowsSetting: Common.Settings.Setting<boolean>;
536
527
  private rowHeightInternal: number;
@@ -586,8 +577,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
586
577
  Common.Settings.Settings.instance().createSetting('network-only-blocked-requests', false);
587
578
  this.networkOnlyThirdPartySetting =
588
579
  Common.Settings.Settings.instance().createSetting('network-only-third-party-setting', false);
589
- this.networkOnlyIPProtectedRequestsSetting =
590
- Common.Settings.Settings.instance().createSetting('network-only-ip-protected-requests', false);
591
580
  this.networkResourceTypeFiltersSetting =
592
581
  Common.Settings.Settings.instance().createSetting('network-resource-type-filters', {});
593
582
  this.networkShowOptionsToGenerateHarWithSensitiveData = Common.Settings.Settings.instance().createSetting(
@@ -1603,7 +1592,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1603
1592
  this.networkOnlyBlockedRequestsSetting.set(false);
1604
1593
  this.networkOnlyThirdPartySetting.set(false);
1605
1594
  this.networkHideChromeExtensions.set(false);
1606
- this.networkOnlyIPProtectedRequestsSetting.set(false);
1607
1595
  this.resourceCategoryFilterUI.reset();
1608
1596
  }
1609
1597
 
@@ -2108,16 +2096,12 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
2108
2096
  if (!this.resourceCategoryFilterUI.accept(categoryName)) {
2109
2097
  return false;
2110
2098
  }
2111
- const [hideDataURL, blockedCookies, blockedRequests, thirdParty, hideExtensionURL, ippRequests] = [
2099
+ const [hideDataURL, blockedCookies, blockedRequests, thirdParty, hideExtensionURL] = [
2112
2100
  this.networkHideDataURLSetting.get(),
2113
2101
  this.networkShowBlockedCookiesOnlySetting.get(),
2114
2102
  this.networkOnlyBlockedRequestsSetting.get(),
2115
2103
  this.networkOnlyThirdPartySetting.get(),
2116
2104
  this.networkHideChromeExtensions.get(),
2117
- // TODO(crbug.com/425645896): Remove this guard once IP Protection is fully launched.
2118
- Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled ?
2119
- this.networkOnlyIPProtectedRequestsSetting.get() :
2120
- false,
2121
2105
  ];
2122
2106
 
2123
2107
  if (hideDataURL && (request.parsedURL.isDataURL() || request.parsedURL.isBlobURL())) {
@@ -2135,12 +2119,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
2135
2119
  if (hideExtensionURL && request.scheme === 'chrome-extension') {
2136
2120
  return false;
2137
2121
  }
2138
- // TODO(crbug.com/425645896): Remove this guard once IP Protection is fully launched.
2139
- if (Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled) {
2140
- if (ippRequests && !request.isIpProtectionUsed()) {
2141
- return false;
2142
- }
2143
- }
2144
2122
  for (let i = 0; i < this.filters.length; ++i) {
2145
2123
  if (!this.filters[i](request)) {
2146
2124
  return false;
@@ -2756,7 +2734,6 @@ export class MoreFiltersDropDownUI extends Common.ObjectWrapper.ObjectWrapper<UI
2756
2734
  private networkShowBlockedCookiesOnlySetting: Common.Settings.Setting<boolean>;
2757
2735
  private networkOnlyBlockedRequestsSetting: Common.Settings.Setting<boolean>;
2758
2736
  private networkOnlyThirdPartySetting: Common.Settings.Setting<boolean>;
2759
- private networkOnlyIPProtectedRequestsSetting: Common.Settings.Setting<boolean>;
2760
2737
  private activeFiltersCount: HTMLElement;
2761
2738
  private activeFiltersCountAdorner: Adorners.Adorner.Adorner;
2762
2739
 
@@ -2772,8 +2749,6 @@ export class MoreFiltersDropDownUI extends Common.ObjectWrapper.ObjectWrapper<UI
2772
2749
  Common.Settings.Settings.instance().createSetting('network-only-blocked-requests', false);
2773
2750
  this.networkOnlyThirdPartySetting =
2774
2751
  Common.Settings.Settings.instance().createSetting('network-only-third-party-setting', false);
2775
- this.networkOnlyIPProtectedRequestsSetting =
2776
- Common.Settings.Settings.instance().createSetting('network-only-ip-protected-requests', false);
2777
2752
 
2778
2753
  this.filterElement = document.createElement('div');
2779
2754
  this.filterElement.setAttribute('aria-label', 'Show only/hide requests dropdown');
@@ -2810,10 +2785,6 @@ export class MoreFiltersDropDownUI extends Common.ObjectWrapper.ObjectWrapper<UI
2810
2785
  this.networkShowBlockedCookiesOnlySetting.addChangeListener(this.#onSettingChanged.bind(this));
2811
2786
  this.networkOnlyBlockedRequestsSetting.addChangeListener(this.#onSettingChanged.bind(this));
2812
2787
  this.networkOnlyThirdPartySetting.addChangeListener(this.#onSettingChanged.bind(this));
2813
- // TODO(crbug.com/425645896): Remove this guard once IP Protection is fully launched.
2814
- if (Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled) {
2815
- this.networkOnlyIPProtectedRequestsSetting.addChangeListener(this.#onSettingChanged.bind(this));
2816
- }
2817
2788
 
2818
2789
  contextMenu.defaultSection().appendCheckboxItem(
2819
2790
  i18nString(UIStrings.hideDataUrls),
@@ -2845,17 +2816,6 @@ export class MoreFiltersDropDownUI extends Common.ObjectWrapper.ObjectWrapper<UI
2845
2816
  tooltip: i18nString(UIStrings.onlyShowBlockedRequests),
2846
2817
  jslogContext: 'only-blocked-requests',
2847
2818
  });
2848
- // Disable this filter if in regular browsing, as IP Protection is only available in incognito mode.
2849
- // TODO(crbug.com/425645896): Remove this guard once IP Protection is fully launched.
2850
- if (Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled) {
2851
- contextMenu.defaultSection().appendCheckboxItem(
2852
- i18nString(UIStrings.ippRequests),
2853
- () => this.networkOnlyIPProtectedRequestsSetting.set(!this.networkOnlyIPProtectedRequestsSetting.get()), {
2854
- checked: this.networkOnlyIPProtectedRequestsSetting.get(),
2855
- tooltip: i18nString(UIStrings.onlyShowIPProtectedRequests),
2856
- jslogContext: 'only-ip-protected-requests',
2857
- });
2858
- }
2859
2819
  contextMenu.defaultSection().appendCheckboxItem(
2860
2820
  i18nString(UIStrings.thirdParty),
2861
2821
  () => this.networkOnlyThirdPartySetting.set(!this.networkOnlyThirdPartySetting.get()), {
@@ -2872,10 +2832,6 @@ export class MoreFiltersDropDownUI extends Common.ObjectWrapper.ObjectWrapper<UI
2872
2832
  ...this.networkShowBlockedCookiesOnlySetting.get() ? [i18nString(UIStrings.hasBlockedCookies)] : [],
2873
2833
  ...this.networkOnlyBlockedRequestsSetting.get() ? [i18nString(UIStrings.blockedRequests)] : [],
2874
2834
  ...this.networkOnlyThirdPartySetting.get() ? [i18nString(UIStrings.thirdParty)] : [],
2875
- ...Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled &&
2876
- this.networkOnlyIPProtectedRequestsSetting.get() ?
2877
- [i18nString(UIStrings.ippRequests)] :
2878
- [],
2879
2835
  ];
2880
2836
  return filters;
2881
2837
  }
@@ -17,7 +17,6 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
17
17
 
18
18
  import {CookieControlsView} from './CookieControlsView.js';
19
19
  import {CookieReportView} from './CookieReportView.js';
20
- import {IPProtectionView} from './IPProtectionView.js';
21
20
  import lockIconStyles from './lockIcon.css.js';
22
21
  import mainViewStyles from './mainView.css.js';
23
22
  import {ShowOriginEvent} from './OriginTreeElement.js';
@@ -556,7 +555,6 @@ const DEFAULT_VIEW: View = (input: ViewInput, output: ViewOutput, target: HTMLEl
556
555
  <devtools-widget
557
556
  slot="sidebar"
558
557
  .widgetConfig=${widgetConfig(SecurityPanelSidebar)}
559
- @showIPProtection=${() => output.setVisibleView(new IPProtectionView())}
560
558
  @showCookieReport=${()=>output.setVisibleView(new CookieReportView())}
561
559
  @showFlagControls=${() => output.setVisibleView(new CookieControlsView())}
562
560
  ${UI.Widget.widgetRef(SecurityPanelSidebar, e => {output.sidebar = e;})}>
@@ -13,7 +13,6 @@ import * as UI from '../../ui/legacy/legacy.js';
13
13
 
14
14
  import {CookieControlsTreeElement} from './CookieControlsTreeElement.js';
15
15
  import {CookieReportTreeElement} from './CookieReportTreeElement.js';
16
- import {IPProtectionTreeElement} from './IPProtectionTreeElement.js';
17
16
  import lockIconStyles from './lockIcon.css.js';
18
17
  import {OriginTreeElement} from './OriginTreeElement.js';
19
18
  import {
@@ -42,10 +41,6 @@ const UIStrings = {
42
41
  * @description Sidebar element text in the Security panel
43
42
  */
44
43
  flagControls: 'Controls',
45
- /**
46
- * @description Sidebar element text in the Security panel
47
- */
48
- ipProtection: 'IP Protection',
49
44
  /**
50
45
  * @description Text in Security Panel of the Security panel
51
46
  */
@@ -83,7 +78,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
83
78
  securityOverviewElement: OriginTreeElement;
84
79
  readonly #cookieControlsTreeElement: CookieControlsTreeElement|undefined;
85
80
  readonly cookieReportTreeElement: CookieReportTreeElement|undefined;
86
- readonly ipProtectionTreeElement: IPProtectionTreeElement|undefined;
87
81
  readonly #elementsByOrigin: Map<string, OriginTreeElement>;
88
82
  readonly #mainViewReloadMessage: UI.TreeOutline.TreeElement;
89
83
  #mainOrigin: string|null;
@@ -108,11 +102,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
108
102
  this.cookieReportTreeElement = new CookieReportTreeElement(i18nString(UIStrings.cookieReport), 'cookie-report');
109
103
  privacyTreeSection.appendChild(this.cookieReportTreeElement);
110
104
 
111
- if (Root.Runtime.hostConfig.devToolsIpProtectionPanelInDevTools?.enabled) {
112
- this.ipProtectionTreeElement = new IPProtectionTreeElement(i18nString(UIStrings.ipProtection), 'ip-protection');
113
- privacyTreeSection.appendChild(this.ipProtectionTreeElement);
114
- }
115
-
116
105
  // If this if the first time this setting is set, go to the controls tool
117
106
  if (this.#securitySidebarLastItemSetting.get() === '') {
118
107
  this.#securitySidebarLastItemSetting.set(this.#cookieControlsTreeElement.elemId);
@@ -192,11 +181,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
192
181
  this.#securitySidebarLastItemSetting.get() === this.cookieReportTreeElement.elemId) {
193
182
  this.cookieReportTreeElement.select();
194
183
  this.cookieReportTreeElement.showElement();
195
- } else if (
196
- this.ipProtectionTreeElement &&
197
- this.#securitySidebarLastItemSetting.get() === this.ipProtectionTreeElement.elemId) {
198
- this.ipProtectionTreeElement.select();
199
- this.ipProtectionTreeElement.showElement();
200
184
  } else {
201
185
  this.securityOverviewElement.select();
202
186
  this.securityOverviewElement.showElement();
@@ -4,14 +4,12 @@
4
4
 
5
5
  import * as CookieControlsView from './CookieControlsView.js';
6
6
  import * as CookieReportView from './CookieReportView.js';
7
- import * as IPProtectionView from './IPProtectionView.js';
8
7
  import * as SecurityModel from './SecurityModel.js';
9
8
  import * as SecurityPanel from './SecurityPanel.js';
10
9
 
11
10
  export {
12
11
  CookieControlsView,
13
12
  CookieReportView,
14
- IPProtectionView,
15
13
  SecurityModel,
16
14
  SecurityPanel,
17
15
  };
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: https://chromium.googlesource.com/chromium/src
3
3
  Version: N/A
4
- Revision: 5270546e53b6cf52712ff2091c6a405e61dc0873
4
+ Revision: 3e8720c1c3a43f134e2008e1764e70380a5b8bc1
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -0,0 +1,30 @@
1
+ // Copyright 2021 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Lit from '../../lit/lit.js';
6
+
7
+ import {ExpandableList} from './expandable_list.js';
8
+
9
+ const {html} = Lit;
10
+
11
+ export function render(container: HTMLElement): void {
12
+ const component = new ExpandableList.ExpandableList();
13
+
14
+ const rows = [];
15
+ rows.push(html`
16
+ <div>This is row 1. Click on the triangle icon to expand.</div>
17
+ `);
18
+
19
+ for (let rowNumber = 2; rowNumber < 11; rowNumber++) {
20
+ rows.push(html`
21
+ <div>This is row ${rowNumber}.</div>
22
+ `);
23
+ }
24
+
25
+ component.data = {
26
+ rows,
27
+ };
28
+
29
+ container.appendChild(component);
30
+ }
@@ -17,6 +17,7 @@ import * as TextUtils from '../../../../models/text_utils/text_utils.js';
17
17
  import type * as Trace from '../../../../models/trace/trace.js';
18
18
  import * as Workspace from '../../../../models/workspace/workspace.js';
19
19
  import type * as IconButton from '../../../components/icon_button/icon_button.js';
20
+ import {html, render} from '../../../lit/lit.js';
20
21
  import * as VisualLogging from '../../../visual_logging/visual_logging.js';
21
22
  import * as UI from '../../legacy.js';
22
23
 
@@ -229,7 +230,7 @@ export class Linkifier extends Common.ObjectWrapper.ObjectWrapper<EventTypes> im
229
230
  let fallbackAnchor: HTMLElement|null = null;
230
231
  const linkifyURLOptions: LinkifyURLOptions = {
231
232
  lineNumber,
232
- maxLength: this.maxLength,
233
+ maxLength: options?.maxLength ?? this.maxLength,
233
234
  columnNumber: options?.columnNumber,
234
235
  showColumnNumber: Boolean(options?.showColumnNumber),
235
236
  className: options?.className,
@@ -1148,6 +1149,7 @@ export interface LinkifyOptions {
1148
1149
  * {@link LinkDisplayOptions.revealBreakpoint}
1149
1150
  */
1150
1151
  revealBreakpoint?: boolean;
1152
+ maxLength?: number;
1151
1153
  }
1152
1154
 
1153
1155
  interface CreateLinkOptions {
@@ -1207,3 +1209,45 @@ export const enum Events {
1207
1209
  export interface EventTypes {
1208
1210
  [Events.LIVE_LOCATION_UPDATED]: Bindings.LiveLocation.LiveLocation;
1209
1211
  }
1212
+
1213
+ interface ScriptLocationViewInput {
1214
+ target?: SDK.Target.Target;
1215
+ scriptId?: Protocol.Runtime.ScriptId;
1216
+ sourceURL: Platform.DevToolsPath.UrlString;
1217
+ lineNumber?: number;
1218
+ options?: LinkifyOptions;
1219
+ linkifier: Linkifier;
1220
+ }
1221
+
1222
+ type ScriptLocationView = (input: ScriptLocationViewInput, output: undefined, target: HTMLElement) => void;
1223
+
1224
+ const DEFAULT_SCRIPT_LOCATION_VIEW: ScriptLocationView = (input, _output, target) => {
1225
+ render(
1226
+ html`${
1227
+ input.linkifier.linkifyScriptLocation(
1228
+ input.target ?? null, input.scriptId ?? null, input.sourceURL, input.lineNumber, input.options)}`,
1229
+ target);
1230
+ };
1231
+
1232
+ export class ScriptLocationLink extends UI.Widget.Widget {
1233
+ target?: SDK.Target.Target;
1234
+ scriptId?: Protocol.Runtime.ScriptId;
1235
+ sourceURL = '' as Platform.DevToolsPath.UrlString;
1236
+ lineNumber?: number;
1237
+ options?: LinkifyOptions;
1238
+ linkifier = new Linkifier();
1239
+ #view: ScriptLocationView;
1240
+
1241
+ constructor(element: HTMLElement, view = DEFAULT_SCRIPT_LOCATION_VIEW) {
1242
+ super(element);
1243
+ this.#view = view;
1244
+ }
1245
+
1246
+ override performUpdate(): void {
1247
+ this.#view(this, undefined, this.contentElement);
1248
+ }
1249
+
1250
+ override onDetach(): void {
1251
+ this.linkifier.dispose();
1252
+ }
1253
+ }
package/package.json CHANGED
@@ -103,5 +103,5 @@
103
103
  "flat-cache": "6.1.12"
104
104
  }
105
105
  },
106
- "version": "1.0.1542501"
106
+ "version": "1.0.1543082"
107
107
  }
@@ -1,21 +0,0 @@
1
- // Copyright 2025 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
5
-
6
- import {SecurityPanelSidebarTreeElement} from './SecurityPanelSidebarTreeElement.js';
7
-
8
- export class IPProtectionTreeElement extends SecurityPanelSidebarTreeElement {
9
- constructor(title: string, jslogContext: string|number) {
10
- super(title, false, jslogContext);
11
- this.setLeadingIcons([IconButton.Icon.create('shield', 'shield-icon')]);
12
- }
13
-
14
- override get elemId(): string {
15
- return 'protection';
16
- }
17
-
18
- override showElement(): void {
19
- this.listItemElement.dispatchEvent(new CustomEvent('showIPProtection', {bubbles: true, composed: true}));
20
- }
21
- }
@@ -1,287 +0,0 @@
1
- // Copyright 2025 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import '../../ui/components/switch/switch.js';
6
- import '../../ui/components/cards/cards.js';
7
- import '../../ui/legacy/components/data_grid/data_grid.js';
8
- import '../../ui/components/buttons/buttons.js';
9
-
10
- import * as i18n from '../../core/i18n/i18n.js';
11
- import type * as Platform from '../../core/platform/platform.js';
12
- import * as Root from '../../core/root/root.js';
13
- import * as SDK from '../../core/sdk/sdk.js';
14
- import * as Protocol from '../../generated/protocol.js';
15
- import * as UI from '../../ui/legacy/legacy.js';
16
- import * as Lit from '../../ui/lit/lit.js';
17
-
18
- import ipProtectionViewStyles from './ipProtectionView.css.js';
19
-
20
- const {render, html} = Lit;
21
- const {widgetConfig} = UI.Widget;
22
-
23
- const UIStrings = {
24
- /**
25
- *@description Title in the view's header for the IP Protection tool in the Privacy & Security panel
26
- */
27
- viewTitle: 'IP Protection Proxy Controls',
28
- /**
29
- *@description Explanation in the view's header about the purpose of this IP Protection tool
30
- */
31
- viewExplanation: 'Test how this site will perform if IP Proxy is enabled in Chrome',
32
- /**
33
- *@description Title in the card within the IP Protection tool
34
- */
35
- cardTitle: 'IP Protection Proxy Status',
36
- /**
37
- *@description Subheading for bypassing IP protection toggle
38
- */
39
- bypassTitle: 'Bypass IP Protection',
40
- /**
41
- *@description Description of bypass IP protection toggle
42
- */
43
- bypassDescription: 'Temporarily bypass IP protection for testing',
44
- /**
45
- * @description Text informing the user that IP Proxy is not available
46
- */
47
- notInIncognito: 'IP proxy unavailable',
48
- /**
49
- * @description Description in the widget instructing users to open site in incognito
50
- */
51
- openIncognito: 'IP proxy is only available within incognito mode. Open site in incognito.',
52
- /**
53
- * @description Column header for the ID of a proxy request in the Proxy Request View panel.
54
- */
55
- idColumn: 'ID',
56
- /**
57
- * @description Column header for the URL of a proxy request in the Proxy Request View panel.
58
- */
59
- urlColumn: 'URL',
60
- /**
61
- * @description Column header for the HTTP method of a proxy request in the Proxy Request View panel.
62
- */
63
- methodColumn: 'Method',
64
- /**
65
- * @description Column header for the status code of a proxy request in the Proxy Request View panel.
66
- */
67
- statusColumn: 'Status',
68
- /**
69
- * @description Title for the grid of proxy requests.
70
- */
71
- proxyRequests: 'Proxy Requests',
72
- /**
73
- * @description The status text for the available status of the IP protection proxy.
74
- */
75
- Available: 'IP Protection is enabled and active.',
76
- /**
77
- * @description The status text for when the feature is not enabled.
78
- */
79
- FeatureNotEnabled: 'IP Protection feature is not enabled.',
80
- /**
81
- * @description The status text for when the masked domain list is not enabled.
82
- */
83
- MaskedDomainListNotEnabled: 'Masked Domain List feature is not enabled.',
84
- /**
85
- * @description The status text for when the masked domain list is not populated.
86
- */
87
- MaskedDomainListNotPopulated: 'Masked Domain List is not populated.',
88
- /**
89
- * @description The status text for when authentication tokens are unavailable.
90
- */
91
- AuthTokensUnavailable: 'Limit for authentication tokens was reached. IP Protection will be paused.',
92
- /**
93
- * @description The status text for when the proxy is unavailable for another reason.
94
- */
95
- Unavailable: 'IP Protection is unavailable.',
96
- /**
97
- * @description The status text for when the proxy is bypassed by DevTools.
98
- */
99
- BypassedByDevTools: 'IP Protection is being bypassed by DevTools.',
100
- /**
101
- * @description The status text for when the status is unknown or being loaded.
102
- */
103
- statusUnknown: 'Status unknown',
104
- } as const;
105
-
106
- const str_ = i18n.i18n.registerUIStrings('panels/security/IPProtectionView.ts', UIStrings);
107
- export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
108
-
109
- // Explicitly reference dynamically referenced UIStrings to prevent the linter from removing
110
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
111
- const allStatusStrings = [
112
- UIStrings.Available,
113
- UIStrings.FeatureNotEnabled,
114
- UIStrings.MaskedDomainListNotEnabled,
115
- UIStrings.MaskedDomainListNotPopulated,
116
- UIStrings.AuthTokensUnavailable,
117
- UIStrings.Unavailable,
118
- UIStrings.BypassedByDevTools,
119
- UIStrings.statusUnknown,
120
- ];
121
- const INCOGNITO_EXPLANATION_URL = 'https://support.google.com/chrome/answer/95464?hl=en&co=GENIE.Platform%3DDesktop' as
122
- Platform.DevToolsPath.UrlString;
123
-
124
- /** A simplified representation of a network request for mock data. **/
125
- interface MockNetworkRequest {
126
- requestId: string;
127
- url: string;
128
- requestMethod: string;
129
- statusCode: number;
130
- }
131
-
132
- export interface ViewInput {
133
- status: Protocol.Network.IpProxyStatus|null;
134
- proxyRequests: readonly MockNetworkRequest[];
135
- }
136
- export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
137
-
138
- export const DEFAULT_VIEW: View = (input, _output, target) => {
139
- const {status} = input;
140
- const statusText = status ? i18nString(UIStrings[status]) : i18nString(UIStrings.statusUnknown);
141
-
142
- // clang-format off
143
- const cardHeader = html`
144
- <div class="card-header">
145
- <div class="lhs">
146
- <div class="text">
147
- <h2 class="main-text">${i18nString(UIStrings.cardTitle)}</h2>
148
- <div class="body subtext">${statusText}</div>
149
- </div>
150
- </div>
151
- <div class="status-badge">
152
- ${
153
- status === Protocol.Network.IpProxyStatus.Available ?
154
- html`<devtools-icon class="status-icon green-status-icon" role="presentation" name="check-circle"></devtools-icon>` :
155
- html`<devtools-icon class="status-icon red-status-icon" role="presentation" name="cross-circle-filled"></devtools-icon>`}
156
- </div>
157
- </div>
158
- `;
159
- render(
160
- html`
161
- <style>
162
- ${ipProtectionViewStyles}
163
- </style>
164
- ${
165
- Root.Runtime.hostConfig.isOffTheRecord ? html`
166
- <div class="overflow-auto">
167
- <div class="ip-protection">
168
- <div class="header">
169
- <h1>${i18nString(UIStrings.viewTitle)}</h1>
170
- <div class="body">${i18nString(UIStrings.viewExplanation)}</div>
171
- </div>
172
- <devtools-card class="card-container">
173
- <div class="card">
174
- ${cardHeader}
175
- <div>
176
- <div class="card-row">
177
- <div class="lhs">
178
- <h3 class="main-text">${i18nString(UIStrings.bypassTitle)}</h3>
179
- <div class="body subtext">${i18nString(UIStrings.bypassDescription)}</div>
180
- </div>
181
- <div>
182
- <devtools-switch></devtools-switch>
183
- </div>
184
- </div>
185
- </div>
186
- </div>
187
- </devtools-card>
188
- <devtools-data-grid striped name=${i18nString(UIStrings.proxyRequests)}>
189
- <table>
190
- <thead>
191
- <tr>
192
- <th id="id" sortable>${i18nString(UIStrings.idColumn)}</th>
193
- <th id="url" sortable>${i18nString(UIStrings.urlColumn)}</th>
194
- <th id="method" sortable>${i18nString(UIStrings.methodColumn)}</th>
195
- <th id="status" sortable>${i18nString(UIStrings.statusColumn)}</th>
196
- </tr>
197
- </thead>
198
- <tbody id="proxy-requests-body">
199
- ${input.proxyRequests.map((request, index) => html`
200
- <tr data-request-id=${request.requestId}>
201
- <td>${index + 1}</td>
202
- <td>${request.url}</td>
203
- <td>${request.requestMethod}</td>
204
- <td>${String(request.statusCode)}</td>
205
- </tr>
206
- `)}
207
- </tbody>
208
- </table>
209
- </devtools-data-grid>
210
- </div>
211
- </div>
212
- ` :
213
- html`
214
- <div class="empty-report">
215
- <devtools-widget
216
- class="learn-more"
217
- .widgetConfig=${widgetConfig(UI.EmptyWidget.EmptyWidget, {
218
- header: i18nString(UIStrings.notInIncognito),
219
- text: i18nString(UIStrings.openIncognito),
220
- link: INCOGNITO_EXPLANATION_URL,
221
- })}>
222
- </devtools-widget>
223
- </div>
224
- `}
225
- `,
226
- target);
227
- // clang-format on
228
- };
229
- export class IPProtectionView extends UI.Widget.VBox {
230
- #view: View;
231
- #proxyRequests: MockNetworkRequest[] = [];
232
- #status: Protocol.Network.IpProxyStatus|null = null;
233
-
234
- constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
235
- super(element, {useShadowDom: true});
236
- this.#view = view;
237
-
238
- // TODO(crbug.com/429153435): Replace with real data.
239
- this.#proxyRequests = [
240
- {requestId: '1', url: 'https://example.com/api/data', requestMethod: 'GET', statusCode: 200},
241
- {requestId: '2', url: 'https://example.com/api/submit', requestMethod: 'POST', statusCode: 404},
242
- {requestId: '3', url: 'https://example.com/assets/style.css', requestMethod: 'GET', statusCode: 200},
243
- ];
244
- }
245
-
246
- override async wasShown(): Promise<void> {
247
- super.wasShown();
248
- SDK.TargetManager.TargetManager.instance().addModelListener(
249
- SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
250
- this.#updateIpProtectionStatus, this);
251
- await this.#updateIpProtectionStatus();
252
- }
253
-
254
- override willHide(): void {
255
- SDK.TargetManager.TargetManager.instance().removeModelListener(
256
- SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
257
- this.#updateIpProtectionStatus, this);
258
- super.willHide();
259
- }
260
-
261
- async #updateIpProtectionStatus(): Promise<void> {
262
- const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
263
- if (!target) {
264
- this.#status = null;
265
- this.requestUpdate();
266
- return;
267
- }
268
- const model = target.model(SDK.NetworkManager.NetworkManager);
269
- if (!model) {
270
- this.#status = null;
271
- this.requestUpdate();
272
- return;
273
- }
274
- const status = await model.getIpProtectionProxyStatus();
275
- this.#status = status;
276
- this.requestUpdate();
277
- }
278
-
279
- get proxyRequests(): readonly MockNetworkRequest[] {
280
- return this.#proxyRequests;
281
- }
282
-
283
- override performUpdate(): void {
284
- const input = {status: this.#status, proxyRequests: this.#proxyRequests};
285
- this.#view(input, this, this.contentElement);
286
- }
287
- }
@@ -1,24 +0,0 @@
1
- <!--
2
- Copyright 2021 The Chromium Authors
3
- Use of this source code is governed by a BSD-style license that can be
4
- found in the LICENSE file.
5
- -->
6
- <!DOCTYPE html>
7
- <html>
8
- <head>
9
- <meta charset="UTF-8" />
10
- <meta name="viewport" content="width=device-width" />
11
- <title>Basic Expandable List example</title>
12
- <style>
13
- #container {
14
- padding: 20px;
15
- font-size: 16px;
16
- }
17
- </style>
18
- </head>
19
- <body>
20
- <div id="container">
21
- </div>
22
- <script type="module" src="./basic.js"></script>
23
- </body>
24
- </html>
@@ -1,30 +0,0 @@
1
- // Copyright 2021 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';
6
- import * as Lit from '../../../lit/lit.js';
7
- import * as ExpandableList from '../../expandable_list/expandable_list.js';
8
-
9
- const {html} = Lit;
10
-
11
- await FrontendHelpers.initializeGlobalVars();
12
-
13
- const component = new ExpandableList.ExpandableList.ExpandableList();
14
-
15
- const rows = [];
16
- rows.push(html`
17
- <div>This is row 1. Click on the triangle icon to expand.</div>
18
- `);
19
-
20
- for (let rowNumber = 2; rowNumber < 11; rowNumber++) {
21
- rows.push(html`
22
- <div>This is row ${rowNumber}.</div>
23
- `);
24
- }
25
-
26
- component.data = {
27
- rows,
28
- };
29
-
30
- document.getElementById('container')?.appendChild(component);
@@ -1,35 +0,0 @@
1
- <!--
2
- Copyright 2021 The Chromium Authors
3
- Use of this source code is governed by a BSD-style license that can be
4
- found in the LICENSE file.
5
- -->
6
- <!DOCTYPE html>
7
- <html>
8
-
9
- <head>
10
- <meta charset="UTF-8" />
11
- <meta name="viewport" content="width=device-width" />
12
- <title>Basic Text Prompt example</title>
13
- <meta charset="UTF-8" />
14
- <style>
15
- #container {
16
- width: 80%;
17
- border: 1px solid black;
18
- padding: 20px;
19
- height: 300px;
20
- }
21
-
22
- #container > devtools-text-prompt {
23
- vertical-align: middle;
24
- font-size: 14px;
25
- border: 1px solid #ccc;
26
- }
27
- </style>
28
- </head>
29
-
30
- <body>
31
- <div id="container"></div>
32
- <script type="module" src="./basic.js"></script>
33
- </body>
34
-
35
- </html>
@@ -1,19 +0,0 @@
1
- // Copyright 2021 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';
6
- import * as ComponentHelpers from '../../helpers/helpers.js';
7
- import * as TextPrompt from '../../text_prompt/text_prompt.js';
8
-
9
- await ComponentHelpers.ComponentServerSetup.setup();
10
- await FrontendHelpers.initializeGlobalVars();
11
-
12
- const textPrompt = new TextPrompt.TextPrompt.TextPrompt();
13
- document.getElementById('container')?.appendChild(textPrompt);
14
-
15
- textPrompt.data = {
16
- ariaLabel: 'Quick open prompt',
17
- prefix: 'Open',
18
- suggestion: 'File',
19
- };