chrome-devtools-frontend 1.0.1573331 → 1.0.1575174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/docs/contributing/settings-experiments-features.md +5 -2
- package/front_end/Images/src/account-tree.svg +10 -1
- package/front_end/Images/src/arrow-right-circle.svg +2 -7
- package/front_end/Images/src/center-focus-weak.svg +3 -1
- package/front_end/Images/src/dog-paw.svg +10 -3
- package/front_end/Images/src/group.svg +3 -1
- package/front_end/Images/src/home.svg +3 -1
- package/front_end/Images/src/spark-info.svg +3 -3
- package/front_end/Images/src/spark.svg +2 -9
- package/front_end/core/common/Settings.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +10 -0
- package/front_end/core/host/UserMetrics.ts +15 -0
- package/front_end/core/root/Runtime.ts +119 -39
- package/front_end/core/sdk/AnimationModel.ts +0 -6
- package/front_end/devtools_compatibility.js +16 -1
- package/front_end/entrypoints/main/GlobalAiButton.ts +18 -3
- package/front_end/entrypoints/main/MainImpl.ts +13 -1
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- package/front_end/generated/SupportedCSSProperties.js +17 -4
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +2 -0
- package/front_end/generated/protocol.ts +37 -7
- package/front_end/models/ai_assistance/AiUtils.ts +8 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +3 -3
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +5 -4
- package/front_end/models/issues_manager/CorsIssue.ts +1 -44
- package/front_end/models/logs/NetworkLog.ts +0 -9
- package/front_end/models/stack_trace/StackTrace.ts +40 -0
- package/front_end/panels/ai_assistance/PatchWidget.ts +2 -1
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +34 -13
- package/front_end/panels/ai_assistance/components/ChatInput.ts +24 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +3 -1
- package/front_end/panels/ai_assistance/components/ChatView.ts +20 -3
- package/front_end/panels/ai_assistance/components/chatView.css +20 -0
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +3 -1
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +32 -16
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- package/front_end/panels/console/ConsoleFormat.ts +31 -2
- package/front_end/panels/console/ConsoleInsightTeaser.ts +8 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +47 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/issues/CorsIssueDetailsView.ts +0 -46
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -1
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +0 -5
- package/front_end/panels/profiler/HeapProfileView.ts +0 -6
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -14
- package/front_end/panels/settings/AISettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +12 -6
- package/front_end/panels/settings/settings-meta.ts +1 -0
- package/front_end/panels/sources/NavigatorView.ts +3 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +11 -11
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPResponse.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPResponse.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +53 -55
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +7 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +7 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPResponse.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPResponse.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +54 -56
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +7 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +7 -1
- package/front_end/third_party/puppeteer/package/package.json +5 -5
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +62 -71
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +29 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +12 -1
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +26 -14
- package/front_end/ui/components/buttons/FloatingButton.ts +7 -3
- package/front_end/ui/components/buttons/floatingButton.css +44 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/mcp/HostBindings.ts +6 -0
- package/package.json +3 -2
package/AUTHORS
CHANGED
|
@@ -64,6 +64,7 @@ Krishnal Ciccolella <ciccolella.krishnal@gmail.com>
|
|
|
64
64
|
Liam DeBeasi <ldebeasi@gmail.com>
|
|
65
65
|
Luke Swiderski <luke.swiderski@gmail.com>
|
|
66
66
|
Luke Warlow <luke@warlow.dev>
|
|
67
|
+
Lyra Rebane <rebane2001@gmail.com>
|
|
67
68
|
Marijn Haverbeke <marijnh@gmail.com>
|
|
68
69
|
Max 😎 Coplan <mchcopl@gmail.com>
|
|
69
70
|
Michael Brüning <michael.bruning@qt.io>
|
|
@@ -12,6 +12,9 @@ Adding new DevTools experiments is deprecated, the preferred way for adding new
|
|
|
12
12
|
features / exposing experimental features is via `base::Feature`s. These are
|
|
13
13
|
controllable via Chromium command line parameters or optionally via `chrome://flags`.
|
|
14
14
|
|
|
15
|
+
Note: We are currently in the process of migrating away from DevTools experiments,
|
|
16
|
+
this documentation is partly outdated and will be updated ASAP.
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
[TOC]
|
|
17
20
|
|
|
@@ -76,9 +79,9 @@ This step is optional. If you want the `base::Feature` to be controllable via th
|
|
|
76
79
|
|
|
77
80
|
Please refer to this [example CL](https://crrev.com/c/5626314).
|
|
78
81
|
|
|
79
|
-
## How to add experiments
|
|
82
|
+
## DEPRECATED:How to add experiments
|
|
80
83
|
|
|
81
|
-
Note:
|
|
84
|
+
Note: We are currently in the process of migrating away from DevTools experiments, please use a `base::Feature` instead.
|
|
82
85
|
|
|
83
86
|
If you want to launch a new feature in DevTools behind an experiment flag, you
|
|
84
87
|
will need to do two things:
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_5629_175)">
|
|
3
|
+
<path d="M13 17V14.75H9.25V6.75H7V9H2V3H7V5.25H13V3H18V9H13V6.75H10.75V13.25H13V11H18V17H13ZM3.5 4.5V7.5V4.5ZM14.5 12.5V15.5V12.5ZM14.5 4.5V7.5V4.5ZM14.5 7.5H16.5V4.5H14.5V7.5ZM14.5 15.5H16.5V12.5H14.5V15.5ZM3.5 7.5H5.5V4.5H3.5V7.5Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_5629_175">
|
|
7
|
+
<rect width="20" height="20" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
3
|
-
<rect width="24" height="24" fill="#D9D9D9"/>
|
|
4
|
-
</mask>
|
|
5
|
-
<g mask="url(#mask0_3853_165798)">
|
|
6
|
-
<path d="M6.6255 12.99L13.838 12.99L12.247 14.581L13.6612 15.9952L17.6564 12L13.6612 8.00489L12.247 9.41911L13.8203 10.9924H6.64318L6.6255 12.99ZM4.92844 19.0711C3.95028 18.0929 3.21666 16.9881 2.72757 15.7565C2.23849 14.525 1.99395 13.2728 1.99395 12C1.99395 10.7273 2.23849 9.47509 2.72757 8.24354C3.21666 7.012 3.95028 5.90714 4.92844 4.92898C5.90661 3.95081 7.01146 3.21719 8.24301 2.72811C9.47455 2.23903 10.7267 1.99448 11.9995 1.99448C13.2723 1.99448 14.5245 2.23903 15.756 2.72811C16.9876 3.21719 18.0924 3.95081 19.0706 4.92898C20.0487 5.90714 20.7824 7.012 21.2714 8.24354C21.7605 9.47509 22.0051 10.7273 22.0051 12C22.0051 13.2728 21.7605 14.525 21.2714 15.7565C20.7824 16.9881 20.0487 18.0929 19.0706 19.0711C18.0924 20.0493 16.9876 20.7829 15.756 21.272C14.5245 21.7611 13.2723 22.0056 11.9995 22.0056C10.7267 22.0056 9.47455 21.7611 8.24301 21.272C7.01146 20.7829 5.90661 20.0493 4.92844 19.0711ZM6.34266 17.6569C7.92186 19.2361 9.80748 20.0257 11.9995 20.0257C14.1915 20.0257 16.0772 19.2361 17.6564 17.6569C19.2356 16.0777 20.0252 14.1921 20.0252 12C20.0252 9.80801 19.2356 7.9224 17.6564 6.34319C16.0772 4.76399 14.1915 3.97438 11.9995 3.97438C9.80748 3.97438 7.92186 4.76399 6.34266 6.34319C4.76345 7.9224 3.97385 9.80801 3.97385 12C3.97385 14.1921 4.76345 16.0777 6.34266 17.6569Z" fill="#1F1F1F"/>
|
|
7
|
-
</g>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10 13L13 10L10 7L8.9375 8.0625L10.125 9.25H7V10.75H10.125L8.9375 11.9375L10 13ZM10 18C8.90278 18 7.86806 17.7917 6.89583 17.375C5.92361 16.9583 5.06944 16.3889 4.33333 15.6667C3.61111 14.9306 3.04167 14.0764 2.625 13.1042C2.20833 12.1319 2 11.0972 2 10C2 8.88889 2.20833 7.85417 2.625 6.89583C3.04167 5.92361 3.61111 5.07639 4.33333 4.35417C5.06944 3.61806 5.92361 3.04167 6.89583 2.625C7.86806 2.20833 8.90278 2 10 2C11.1111 2 12.1458 2.20833 13.1042 2.625C14.0764 3.04167 14.9236 3.61806 15.6458 4.35417C16.3819 5.07639 16.9583 5.92361 17.375 6.89583C17.7917 7.85417 18 8.88889 18 10C18 11.0972 17.7917 12.1319 17.375 13.1042C16.9583 14.0764 16.3819 14.9306 15.6458 15.6667C14.9236 16.3889 14.0764 16.9583 13.1042 17.375C12.1458 17.7917 11.1111 18 10 18ZM10 16.5C11.8056 16.5 13.3403 15.8681 14.6042 14.6042C15.8681 13.3403 16.5 11.8056 16.5 10C16.5 8.19445 15.8681 6.65972 14.6042 5.39583C13.3403 4.13194 11.8056 3.5 10 3.5C8.19444 3.5 6.65972 4.13194 5.39583 5.39583C4.13194 6.65972 3.5 8.19445 3.5 10C3.5 11.8056 4.13194 13.3403 5.39583 14.6042C6.65972 15.8681 8.19444 16.5 10 16.5Z" fill="black"/>
|
|
8
3
|
</svg>
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10 13C9.16667 13 8.45833 12.7083 7.875 12.125C7.29167 11.5417 7 10.8333 7 10C7 9.16667 7.29167 8.45833 7.875 7.875C8.45833 7.29167 9.16667 7 10 7C10.8333 7 11.5417 7.29167 12.125 7.875C12.7083 8.45833 13 9.16667 13 10C13 10.8333 12.7083 11.5417 12.125 12.125C11.5417 12.7083 10.8333 13 10 13ZM10 11.5C10.4167 11.5 10.7708 11.3542 11.0625 11.0625C11.3542 10.7708 11.5 10.4167 11.5 10C11.5 9.58333 11.3542 9.22917 11.0625 8.9375C10.7708 8.64583 10.4167 8.5 10 8.5C9.58333 8.5 9.22917 8.64583 8.9375 8.9375C8.64583 9.22917 8.5 9.58333 8.5 10C8.5 10.4167 8.64583 10.7708 8.9375 11.0625C9.22917 11.3542 9.58333 11.5 10 11.5ZM4.5 17C4.08333 17 3.72917 16.8542 3.4375 16.5625C3.14583 16.2708 3 15.9167 3 15.5V12H4.5V15.5H8V17H4.5ZM12 17V15.5H15.5V12H17V15.5C17 15.9167 16.8542 16.2708 16.5625 16.5625C16.2708 16.8542 15.9167 17 15.5 17H12ZM3 8V4.5C3 4.08333 3.14583 3.72917 3.4375 3.4375C3.72917 3.14583 4.08333 3 4.5 3H8V4.5H4.5V8H3ZM15.5 8V4.5H12V3H15.5C15.9167 3 16.2708 3.14583 16.5625 3.4375C16.8542 3.72917 17 4.08333 17 4.5V8H15.5Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path
|
|
3
|
-
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_5628_51)">
|
|
3
|
+
<path d="M7.04167 14.9792C7.31945 14.9792 7.71528 14.9375 8.22917 14.8542C8.75694 14.7569 9.33333 14.7083 9.95833 14.7083C10.5833 14.7083 11.1597 14.7569 11.6875 14.8542C12.2292 14.9514 12.6458 15 12.9375 15C13.3403 15 13.6944 14.8194 14 14.4583C14.3194 14.0972 14.4792 13.6944 14.4792 13.25C14.4792 12.7639 14.3194 12.3403 14 11.9792C13.6806 11.6181 13.3403 11.25 12.9792 10.875C12.7569 10.6389 12.5486 10.3889 12.3542 10.125C12.1597 9.86111 11.9306 9.59028 11.6667 9.3125C11.3611 8.97917 11.0972 8.76389 10.875 8.66667C10.6667 8.55555 10.3611 8.5 9.95833 8.5C9.68056 8.5 9.40278 8.57639 9.125 8.72917C8.84722 8.86805 8.60417 9.0625 8.39583 9.3125C8.14583 9.59028 7.91667 9.86805 7.70833 10.1458C7.5 10.4097 7.26389 10.6806 7 10.9583C6.66667 11.3056 6.32639 11.6667 5.97917 12.0417C5.64583 12.4028 5.47917 12.8264 5.47917 13.3125C5.47917 13.7431 5.63889 14.1319 5.95833 14.4792C6.27778 14.8125 6.63889 14.9792 7.04167 14.9792ZM5.5 10.25C5.91667 10.25 6.27083 10.1042 6.5625 9.8125C6.85417 9.52083 7 9.16667 7 8.75C7 8.33333 6.85417 7.97917 6.5625 7.6875C6.27083 7.39583 5.91667 7.25 5.5 7.25C5.08333 7.25 4.72917 7.39583 4.4375 7.6875C4.14583 7.97917 4 8.33333 4 8.75C4 9.16667 4.14583 9.52083 4.4375 9.8125C4.72917 10.1042 5.08333 10.25 5.5 10.25ZM14.5 10.25C14.9167 10.25 15.2708 10.1042 15.5625 9.8125C15.8542 9.52083 16 9.16667 16 8.75C16 8.33333 15.8542 7.97917 15.5625 7.6875C15.2708 7.39583 14.9167 7.25 14.5 7.25C14.0833 7.25 13.7292 7.39583 13.4375 7.6875C13.1458 7.97917 13 8.33333 13 8.75C13 9.16667 13.1458 9.52083 13.4375 9.8125C13.7292 10.1042 14.0833 10.25 14.5 10.25ZM8 7.75C8.41667 7.75 8.77083 7.60417 9.0625 7.3125C9.35417 7.02083 9.5 6.66667 9.5 6.25C9.5 5.83333 9.35417 5.47917 9.0625 5.1875C8.77083 4.89583 8.41667 4.75 8 4.75C7.58333 4.75 7.22917 4.89583 6.9375 5.1875C6.64583 5.47917 6.5 5.83333 6.5 6.25C6.5 6.66667 6.64583 7.02083 6.9375 7.3125C7.22917 7.60417 7.58333 7.75 8 7.75ZM11.5 7.75C11.9167 7.75 12.2708 7.60417 12.5625 7.3125C12.8542 7.02083 13 6.66667 13 6.25C13 5.83333 12.8542 5.47917 12.5625 5.1875C12.2708 4.89583 11.9167 4.75 11.5 4.75C11.0833 4.75 10.7292 4.89583 10.4375 5.1875C10.1458 5.47917 10 5.83333 10 6.25C10 6.66667 10.1458 7.02083 10.4375 7.3125C10.7292 7.60417 11.0833 7.75 11.5 7.75ZM10 18C8.90278 18 7.86806 17.7917 6.89583 17.375C5.92361 16.9583 5.06944 16.3889 4.33333 15.6667C3.61111 14.9306 3.04167 14.0764 2.625 13.1042C2.20833 12.1319 2 11.0972 2 10C2 8.88889 2.20833 7.85417 2.625 6.89583C3.04167 5.92361 3.61111 5.07639 4.33333 4.35417C5.06944 3.61805 5.92361 3.04167 6.89583 2.625C7.86806 2.20833 8.90278 2 10 2C11.1111 2 12.1458 2.20833 13.1042 2.625C14.0764 3.04167 14.9236 3.61805 15.6458 4.35417C16.3819 5.07639 16.9583 5.92361 17.375 6.89583C17.7917 7.85417 18 8.88889 18 10C18 11.0972 17.7917 12.1319 17.375 13.1042C16.9583 14.0764 16.3819 14.9306 15.6458 15.6667C14.9236 16.3889 14.0764 16.9583 13.1042 17.375C12.1458 17.7917 11.1111 18 10 18Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_5628_51">
|
|
7
|
+
<rect width="20" height="20" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2 16V14.0833C2 13.7222 2.08333 13.3958 2.25 13.1042C2.43056 12.7986 2.67361 12.5556 2.97917 12.375C3.72917 11.9306 4.52083 11.5903 5.35417 11.3542C6.20139 11.1181 7.08333 11 8 11C8.91667 11 9.79167 11.1181 10.625 11.3542C11.4722 11.5903 12.2708 11.9306 13.0208 12.375C13.3264 12.5556 13.5625 12.7986 13.7292 13.1042C13.9097 13.3958 14 13.7222 14 14.0833V16H2ZM15.5 16V14.0833C15.5 13.5 15.3611 12.9583 15.0833 12.4583C14.8194 11.9583 14.4583 11.5486 14 11.2292C14.5417 11.3403 15.0625 11.4931 15.5625 11.6875C16.0764 11.8681 16.5625 12.0972 17.0208 12.375C17.3264 12.5556 17.5625 12.7986 17.7292 13.1042C17.9097 13.3958 18 13.7222 18 14.0833V16H15.5ZM8 10C7.16667 10 6.45833 9.70833 5.875 9.125C5.29167 8.54167 5 7.83333 5 7C5 6.16667 5.29167 5.45833 5.875 4.875C6.45833 4.29167 7.16667 4 8 4C8.83333 4 9.54167 4.29167 10.125 4.875C10.7083 5.45833 11 6.16667 11 7C11 7.83333 10.7083 8.54167 10.125 9.125C9.54167 9.70833 8.83333 10 8 10ZM15 7C15 7.83333 14.7083 8.54167 14.125 9.125C13.5417 9.70833 12.8333 10 12 10C11.8889 10 11.7847 10 11.6875 10C11.5903 9.98611 11.4861 9.96528 11.375 9.9375C11.7222 9.53472 11.9931 9.09028 12.1875 8.60417C12.3958 8.10417 12.5 7.56944 12.5 7C12.5 6.43056 12.3958 5.90278 12.1875 5.41667C11.9931 4.91667 11.7222 4.46528 11.375 4.0625C11.4861 4.03472 11.5903 4.02083 11.6875 4.02083C11.7847 4.00694 11.8889 4 12 4C12.8333 4 13.5417 4.29167 14.125 4.875C14.7083 5.45833 15 6.16667 15 7ZM3.5 14.5H12.5V14.0833C12.5 14 12.4792 13.9236 12.4375 13.8542C12.3958 13.7708 12.3403 13.7083 12.2708 13.6667C11.6181 13.2917 10.9306 13.0069 10.2083 12.8125C9.48611 12.6042 8.75 12.5 8 12.5C7.25 12.5 6.51389 12.5972 5.79167 12.7917C5.06944 12.9861 4.38194 13.2778 3.72917 13.6667C3.65972 13.7083 3.60417 13.7639 3.5625 13.8333C3.52083 13.9028 3.5 13.9861 3.5 14.0833V14.5ZM8 8.5C8.41667 8.5 8.77083 8.35417 9.0625 8.0625C9.35417 7.77083 9.5 7.41667 9.5 7C9.5 6.58333 9.35417 6.22917 9.0625 5.9375C8.77083 5.64583 8.41667 5.5 8 5.5C7.58333 5.5 7.22917 5.64583 6.9375 5.9375C6.64583 6.22917 6.5 6.58333 6.5 7C6.5 7.41667 6.64583 7.77083 6.9375 8.0625C7.22917 8.35417 7.58333 8.5 8 8.5Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M5.5 15.5H7.5V10.5H12.5V15.5H14.5V8.25L10 4.875L5.5 8.25V15.5ZM4 17V7.5L10 3L16 7.5V17H11V12H9V17H4Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path d="
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M15.5 8C15.4861 8 15.4306 7.95833 15.3333 7.875C15.1389 7.08333 14.75 6.40278 14.1667 5.83333C13.5972 5.25 12.9167 4.86111 12.125 4.66667C12.0972 4.65278 12.0556 4.59722 12 4.5C12 4.47222 12.0417 4.41667 12.125 4.33333C12.9167 4.13889 13.5972 3.75694 14.1667 3.1875C14.75 2.60417 15.1389 1.91667 15.3333 1.125C15.3472 1.09722 15.4028 1.05556 15.5 1C15.5278 1 15.5833 1.04167 15.6667 1.125C15.875 1.91667 16.2639 2.59722 16.8333 3.16667C17.4028 3.73611 18.0833 4.125 18.875 4.33333C18.9028 4.33333 18.9444 4.38889 19 4.5C19 4.51389 18.9583 4.56944 18.875 4.66667C18.0833 4.86111 17.3958 5.25 16.8125 5.83333C16.2431 6.40278 15.8611 7.08333 15.6667 7.875C15.6667 7.90278 15.6111 7.94444 15.5 8ZM15.5 8C15.4861 8 15.4306 7.95833 15.3333 7.875C15.1389 7.08333 14.75 6.40278 14.1667 5.83333C13.5972 5.25 12.9167 4.86111 12.125 4.66667C12.0972 4.65278 12.0556 4.59722 12 4.5C12 4.47222 12.0417 4.41667 12.125 4.33333C12.9167 4.13889 13.5972 3.75694 14.1667 3.1875C14.75 2.60417 15.1389 1.91667 15.3333 1.125C15.3472 1.09722 15.4028 1.05556 15.5 1C15.5278 1 15.5833 1.04167 15.6667 1.125C15.875 1.91667 16.2639 2.59722 16.8333 3.16667C17.4028 3.73611 18.0833 4.125 18.875 4.33333C18.9028 4.33333 18.9444 4.38889 19 4.5C19 4.51389 18.9583 4.56944 18.875 4.66667C18.0833 4.86111 17.3958 5.25 16.8125 5.83333C16.2431 6.40278 15.8611 7.08333 15.6667 7.875C15.6667 7.90278 15.6111 7.94444 15.5 8ZM10 3.5C8.19444 3.5 6.65972 4.13194 5.39583 5.39583C4.13194 6.65972 3.5 8.19445 3.5 10C3.5 11.8056 4.125 13.3403 5.375 14.6042C6.63889 15.8681 8.18056 16.5 10 16.5C11.8056 16.5 13.3403 15.8681 14.6042 14.6042C15.8681 13.3403 16.5 11.8056 16.5 10C16.7361 10 16.9792 10 17.2292 10C17.4792 10 17.7361 10 18 10C18 11.0972 17.7917 12.1319 17.375 13.1042C16.9583 14.0764 16.3819 14.9306 15.6458 15.6667C14.9236 16.3889 14.0764 16.9583 13.1042 17.375C12.1458 17.7917 11.1111 18 10 18C8.90278 18 7.86806 17.7917 6.89583 17.375C5.92361 16.9583 5.06944 16.3889 4.33333 15.6667C3.61111 14.9306 3.04167 14.0764 2.625 13.1042C2.20833 12.1319 2 11.0972 2 10C2 8.88889 2.20833 7.85417 2.625 6.89583C3.04167 5.92361 3.61111 5.07639 4.33333 4.35417C5.06944 3.61806 5.92361 3.04167 6.89583 2.625C7.86806 2.20833 8.90278 2 10 2C10 2.26389 10 2.52083 10 2.77083C10 3.02083 10 3.26389 10 3.5ZM9.25 14H10.75V9H9.25V14ZM10 8C10.2083 8 10.3819 7.93056 10.5208 7.79167C10.6736 7.63889 10.75 7.45833 10.75 7.25C10.75 7.04167 10.6736 6.86806 10.5208 6.72917C10.3819 6.57639 10.2083 6.5 10 6.5C9.79167 6.5 9.61111 6.57639 9.45833 6.72917C9.31945 6.86806 9.25 7.04167 9.25 7.25C9.25 7.45833 9.31945 7.63889 9.45833 7.79167C9.61111 7.93056 9.79167 8 10 8Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
3
|
-
<path d="M7 12.6319C6.94299 12.6319 6.89549 12.6129 6.85749 12.5749C6.81948 12.5369 6.79098 12.4894 6.77198 12.4324C6.61997 11.8338 6.38245 11.259 6.05942 10.708C5.74589 10.1474 5.37536 9.64862 4.94782 9.21158C4.51078 8.77454 4.01199 8.39926 3.45144 8.08573C2.90039 7.7722 2.32559 7.53943 1.72704 7.38742C1.67003 7.36842 1.62253 7.33992 1.58452 7.30191C1.54652 7.26391 1.52752 7.2164 1.52752 7.1594C1.52752 7.10239 1.54652 7.05489 1.58452 7.01689C1.62253 6.97888 1.67003 6.95038 1.72704 6.93138C2.32559 6.77937 2.90039 6.5466 3.45144 6.23307C4.00249 5.91954 4.50128 5.54426 4.94782 5.10722C5.38486 4.67968 5.76014 4.18564 6.07367 3.62509C6.3872 3.06454 6.61997 2.48499 6.77198 1.88644C6.79098 1.82943 6.81948 1.78193 6.85749 1.74392C6.89549 1.70592 6.94299 1.68692 7 1.68692C7.057 1.68692 7.10451 1.70592 7.14251 1.74392C7.18052 1.78193 7.20902 1.82943 7.22802 1.88644C7.38003 2.48499 7.6128 3.06454 7.92633 3.62509C8.23986 4.17614 8.61514 4.67018 9.05218 5.10722C9.48922 5.54426 9.98326 5.91954 10.5343 6.23307C11.0949 6.5466 11.6744 6.77937 12.273 6.93138C12.33 6.95038 12.3775 6.97888 12.4155 7.01689C12.4535 7.05489 12.4725 7.10239 12.4725 7.1594C12.4725 7.2164 12.4535 7.26391 12.4155 7.30191C12.3775 7.33992 12.33 7.36842 12.273 7.38742C11.6744 7.53943 11.0949 7.7722 10.5343 8.08573C9.97376 8.39926 9.47972 8.77454 9.05218 9.21158C8.61514 9.65812 8.23986 10.1569 7.92633 10.708C7.6128 11.259 7.38003 11.8338 7.22802 12.4324C7.20902 12.4894 7.18052 12.5369 7.14251 12.5749C7.10451 12.6129 7.057 12.6319 7 12.6319Z" fill="#0B57D0"/>
|
|
4
|
-
</g>
|
|
5
|
-
<defs>
|
|
6
|
-
<clipPath id="clip0_1320_25512">
|
|
7
|
-
<rect width="14" height="15.1442" fill="white"/>
|
|
8
|
-
</clipPath>
|
|
9
|
-
</defs>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10 18C9.91667 18 9.84722 17.9722 9.79167 17.9167C9.73611 17.8611 9.69444 17.7917 9.66667 17.7083C9.44444 16.8333 9.09722 15.9931 8.625 15.1875C8.16667 14.3681 7.625 13.6389 7 13C6.36111 12.3611 5.63194 11.8125 4.8125 11.3542C4.00694 10.8958 3.16667 10.5556 2.29167 10.3333C2.20833 10.3056 2.13889 10.2639 2.08333 10.2083C2.02778 10.1528 2 10.0833 2 10C2 9.91667 2.02778 9.84722 2.08333 9.79167C2.13889 9.73611 2.20833 9.69445 2.29167 9.66667C3.16667 9.44444 4.00694 9.10417 4.8125 8.64583C5.61806 8.1875 6.34722 7.63889 7 7C7.63889 6.375 8.1875 5.65278 8.64583 4.83333C9.10417 4.01389 9.44444 3.16667 9.66667 2.29167C9.69444 2.20833 9.73611 2.13889 9.79167 2.08333C9.84722 2.02778 9.91667 2 10 2C10.0833 2 10.1528 2.02778 10.2083 2.08333C10.2639 2.13889 10.3056 2.20833 10.3333 2.29167C10.5556 3.16667 10.8958 4.01389 11.3542 4.83333C11.8125 5.63889 12.3611 6.36111 13 7C13.6389 7.63889 14.3611 8.1875 15.1667 8.64583C15.9861 9.10417 16.8333 9.44444 17.7083 9.66667C17.7917 9.69445 17.8611 9.73611 17.9167 9.79167C17.9722 9.84722 18 9.91667 18 10C18 10.0833 17.9722 10.1528 17.9167 10.2083C17.8611 10.2639 17.7917 10.3056 17.7083 10.3333C16.8333 10.5556 15.9861 10.8958 15.1667 11.3542C14.3472 11.8125 13.625 12.3611 13 13C12.3611 13.6528 11.8125 14.3819 11.3542 15.1875C10.8958 15.9931 10.5556 16.8333 10.3333 17.7083C10.3056 17.7917 10.2639 17.8611 10.2083 17.9167C10.1528 17.9722 10.0833 18 10 18Z" fill="black"/>
|
|
10
3
|
</svg>
|
|
@@ -343,7 +343,7 @@ export class SettingsStorage {
|
|
|
343
343
|
export class Deprecation {
|
|
344
344
|
readonly disabled: boolean;
|
|
345
345
|
readonly warning: Platform.UIString.LocalizedString;
|
|
346
|
-
readonly experiment?: Root.Runtime.Experiment;
|
|
346
|
+
readonly experiment?: Root.Runtime.Experiment|Root.Runtime.HostExperiment;
|
|
347
347
|
|
|
348
348
|
constructor({deprecationNotice}: SettingRegistration) {
|
|
349
349
|
if (!deprecationNotice) {
|
|
@@ -389,6 +389,8 @@ export interface InspectorFrontendHostAPI {
|
|
|
389
389
|
|
|
390
390
|
recordPerformanceHistogram(histogramName: string, duration: number): void;
|
|
391
391
|
|
|
392
|
+
recordPerformanceHistogramMedium(histogramName: string, duration: number): void;
|
|
393
|
+
|
|
392
394
|
recordUserMetricsAction(umaName: string): void;
|
|
393
395
|
|
|
394
396
|
recordNewBadgeUsage(featureName: string): void;
|
|
@@ -449,6 +451,8 @@ export interface InspectorFrontendHostAPI {
|
|
|
449
451
|
recordKeyDown(event: KeyDownEvent): void;
|
|
450
452
|
recordSettingAccess(event: SettingAccessEvent): void;
|
|
451
453
|
recordFunctionCall(event: FunctionCallEvent): void;
|
|
454
|
+
|
|
455
|
+
setChromeFlag(flagName: string, value: boolean): void;
|
|
452
456
|
}
|
|
453
457
|
|
|
454
458
|
export interface AcceleratorDescriptor {
|
|
@@ -512,7 +516,7 @@ export interface SyncInformation {
|
|
|
512
516
|
}
|
|
513
517
|
|
|
514
518
|
/**
|
|
515
|
-
* Enum for
|
|
519
|
+
* Enum for recordEnumeratedHistogram
|
|
516
520
|
* Warning: There is another definition of this enum in the DevTools code
|
|
517
521
|
* base, keep them in sync:
|
|
518
522
|
* front_end/devtools_compatibility.js
|
|
@@ -255,6 +255,13 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
|
|
|
255
255
|
this.recordedPerformanceHistograms.push({histogramName, duration});
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
recordPerformanceHistogramMedium(histogramName: string, duration: number): void {
|
|
259
|
+
if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {
|
|
260
|
+
this.recordedPerformanceHistograms.shift();
|
|
261
|
+
}
|
|
262
|
+
this.recordedPerformanceHistograms.push({histogramName, duration});
|
|
263
|
+
}
|
|
264
|
+
|
|
258
265
|
recordUserMetricsAction(_umaName: string): void {
|
|
259
266
|
}
|
|
260
267
|
|
|
@@ -555,4 +562,7 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
|
|
|
555
562
|
}
|
|
556
563
|
recordFunctionCall(_event: FunctionCallEvent): void {
|
|
557
564
|
}
|
|
565
|
+
|
|
566
|
+
setChromeFlag(_flagName: string, _value: boolean): void {
|
|
567
|
+
}
|
|
558
568
|
}
|
|
@@ -283,11 +283,26 @@ export class UserMetrics {
|
|
|
283
283
|
'DevTools.Insights.TeaserGenerationTime', timeInMilliseconds);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
consoleInsightTeaserGeneratedMedium(timeInMilliseconds: number): void {
|
|
287
|
+
InspectorFrontendHostInstance.recordPerformanceHistogramMedium(
|
|
288
|
+
'DevTools.Insights.TeaserGenerationTimeMedium', timeInMilliseconds);
|
|
289
|
+
}
|
|
290
|
+
|
|
286
291
|
consoleInsightTeaserFirstChunkGenerated(timeInMilliseconds: number): void {
|
|
287
292
|
InspectorFrontendHostInstance.recordPerformanceHistogram(
|
|
288
293
|
'DevTools.Insights.TeaserFirstChunkGenerationTime', timeInMilliseconds);
|
|
289
294
|
}
|
|
290
295
|
|
|
296
|
+
consoleInsightTeaserFirstChunkGeneratedMedium(timeInMilliseconds: number): void {
|
|
297
|
+
InspectorFrontendHostInstance.recordPerformanceHistogramMedium(
|
|
298
|
+
'DevTools.Insights.TeaserFirstChunkGenerationTimeMedium', timeInMilliseconds);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
consoleInsightTeaserChunkToEndMedium(timeInMilliseconds: number): void {
|
|
302
|
+
InspectorFrontendHostInstance.recordPerformanceHistogramMedium(
|
|
303
|
+
'DevTools.Insights.TeaserChunkToEndMedium', timeInMilliseconds);
|
|
304
|
+
}
|
|
305
|
+
|
|
291
306
|
consoleInsightTeaserAbortedAfterFirstCharacter(timeInMilliseconds: number): void {
|
|
292
307
|
InspectorFrontendHostInstance.recordPerformanceHistogram(
|
|
293
308
|
'DevTools.Insights.TeaserAfterFirstCharacterAbortionTime', timeInMilliseconds);
|
|
@@ -159,24 +159,35 @@ export interface Option {
|
|
|
159
159
|
|
|
160
160
|
export class ExperimentsSupport {
|
|
161
161
|
#experiments: Experiment[] = [];
|
|
162
|
+
#hostExperiments = new Map<ExperimentName, HostExperiment>();
|
|
162
163
|
readonly #experimentNames = new Set<ExperimentName>();
|
|
163
|
-
readonly #
|
|
164
|
+
readonly #enabledForTests = new Set<ExperimentName>();
|
|
164
165
|
readonly #enabledByDefault = new Set<ExperimentName>();
|
|
165
166
|
readonly #serverEnabled = new Set<ExperimentName>();
|
|
166
167
|
readonly #storage = new ExperimentStorage();
|
|
167
168
|
|
|
168
|
-
allConfigurableExperiments(): Experiment
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
allConfigurableExperiments(): Array<Experiment|HostExperiment> {
|
|
170
|
+
return [...this.#experiments, ...this.#hostExperiments.values()];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
registerHostExperiment(params: {
|
|
174
|
+
name: ExperimentName,
|
|
175
|
+
title: string,
|
|
176
|
+
aboutFlag: string,
|
|
177
|
+
isEnabled: boolean,
|
|
178
|
+
docLink?: Platform.DevToolsPath.UrlString,
|
|
179
|
+
readonly feedbackLink?: Platform.DevToolsPath.UrlString,
|
|
180
|
+
}): HostExperiment {
|
|
181
|
+
if (this.#isHostExperiment(params.name) || this.#isExperiment(params.name)) {
|
|
182
|
+
throw new Error(`Duplicate registration of experiment '${params.name}'`);
|
|
174
183
|
}
|
|
175
|
-
|
|
184
|
+
const hostExperiment = new HostExperiment({...params, experiments: this});
|
|
185
|
+
this.#hostExperiments.set(params.name, hostExperiment);
|
|
186
|
+
return hostExperiment;
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
register(experimentName: ExperimentName, experimentTitle: string, docLink?: string, feedbackLink?: string): void {
|
|
179
|
-
if (this.#
|
|
190
|
+
if (this.#isHostExperiment(experimentName) || this.#isExperiment(experimentName)) {
|
|
180
191
|
throw new Error(`Duplicate registration of experiment '${experimentName}'`);
|
|
181
192
|
}
|
|
182
193
|
this.#experimentNames.add(experimentName);
|
|
@@ -187,63 +198,87 @@ export class ExperimentsSupport {
|
|
|
187
198
|
}
|
|
188
199
|
|
|
189
200
|
isEnabled(experimentName: ExperimentName): boolean {
|
|
190
|
-
this
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (this.#storage.get(experimentName) === false) {
|
|
194
|
-
return false;
|
|
201
|
+
if (this.#isHostExperiment(experimentName)) {
|
|
202
|
+
return this.#enabledForTests.has(experimentName) ||
|
|
203
|
+
(this.#hostExperiments.get(experimentName)?.isEnabled() ?? false);
|
|
195
204
|
}
|
|
196
|
-
if (this.#
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
205
|
+
if (this.#isExperiment(experimentName)) {
|
|
206
|
+
// Check for explicitly disabled #experiments first - the code could call setEnable(false)
|
|
207
|
+
// on the experiment enabled by default and we should respect that.
|
|
208
|
+
if (this.#storage.get(experimentName) === false) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
if (this.#enabledForTests.has(experimentName) || this.#enabledByDefault.has(experimentName)) {
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
if (this.#serverEnabled.has(experimentName)) {
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
return Boolean(this.#storage.get(experimentName));
|
|
201
218
|
}
|
|
202
|
-
|
|
203
|
-
return Boolean(this.#storage.get(experimentName));
|
|
219
|
+
throw new Error(`Unknown experiment '${experimentName}'`);
|
|
204
220
|
}
|
|
205
221
|
|
|
206
|
-
|
|
207
|
-
this.
|
|
208
|
-
this.#storage.set(experimentName, enabled);
|
|
222
|
+
getValueFromStorage(experimentName: ExperimentName): boolean|undefined {
|
|
223
|
+
return this.#storage.get(experimentName);
|
|
209
224
|
}
|
|
210
225
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
this.
|
|
214
|
-
|
|
226
|
+
setEnabled(experimentName: ExperimentName, enabled: boolean): void {
|
|
227
|
+
if (this.#isHostExperiment(experimentName)) {
|
|
228
|
+
this.#hostExperiments.get(experimentName)?.setEnabled(enabled);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (this.#isExperiment(experimentName)) {
|
|
232
|
+
this.#storage.set(experimentName, enabled);
|
|
233
|
+
return;
|
|
215
234
|
}
|
|
235
|
+
throw new Error(`Unknown experiment '${experimentName}'`);
|
|
216
236
|
}
|
|
217
237
|
|
|
238
|
+
// Only applicable to legacy experiments.
|
|
218
239
|
enableExperimentsByDefault(experimentNames: ExperimentName[]): void {
|
|
219
240
|
for (const experimentName of experimentNames) {
|
|
220
|
-
this
|
|
241
|
+
if (!this.#isExperiment(experimentName)) {
|
|
242
|
+
throw new Error(`Unknown (legacy) experiment '${experimentName}'`);
|
|
243
|
+
}
|
|
221
244
|
this.#enabledByDefault.add(experimentName);
|
|
222
245
|
}
|
|
223
246
|
}
|
|
224
247
|
|
|
248
|
+
// Only applicable to legacy experiments.
|
|
225
249
|
setServerEnabledExperiments(experiments: string[]): void {
|
|
226
250
|
for (const experiment of experiments) {
|
|
227
251
|
const experimentName = experiment as ExperimentName;
|
|
228
|
-
this
|
|
252
|
+
if (!this.#isExperiment(experimentName)) {
|
|
253
|
+
throw new Error(`Unknown (legacy) experiment '${experimentName}'`);
|
|
254
|
+
}
|
|
229
255
|
this.#serverEnabled.add(experimentName);
|
|
230
256
|
}
|
|
231
257
|
}
|
|
232
258
|
|
|
233
259
|
enableForTest(experimentName: ExperimentName): void {
|
|
234
|
-
this
|
|
235
|
-
|
|
260
|
+
if (!this.#isHostExperiment(experimentName) && !this.#isExperiment(experimentName)) {
|
|
261
|
+
throw new Error(`Unknown experiment '${experimentName}'`);
|
|
262
|
+
}
|
|
263
|
+
this.#enabledForTests.add(experimentName);
|
|
236
264
|
}
|
|
237
265
|
|
|
238
266
|
disableForTest(experimentName: ExperimentName): void {
|
|
239
|
-
this
|
|
240
|
-
|
|
267
|
+
if (!this.#isHostExperiment(experimentName) && !this.#isExperiment(experimentName)) {
|
|
268
|
+
throw new Error(`Unknown experiment '${experimentName}'`);
|
|
269
|
+
}
|
|
270
|
+
this.#enabledForTests.delete(experimentName);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
isEnabledForTest(experimentName: ExperimentName): boolean {
|
|
274
|
+
return this.#enabledForTests.has(experimentName);
|
|
241
275
|
}
|
|
242
276
|
|
|
243
277
|
clearForTest(): void {
|
|
244
278
|
this.#experiments = [];
|
|
279
|
+
this.#hostExperiments.clear();
|
|
245
280
|
this.#experimentNames.clear();
|
|
246
|
-
this.#
|
|
281
|
+
this.#enabledForTests.clear();
|
|
247
282
|
this.#enabledByDefault.clear();
|
|
248
283
|
this.#serverEnabled.clear();
|
|
249
284
|
}
|
|
@@ -252,10 +287,12 @@ export class ExperimentsSupport {
|
|
|
252
287
|
this.#storage.cleanUpStaleExperiments(this.#experimentNames);
|
|
253
288
|
}
|
|
254
289
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
290
|
+
#isHostExperiment(experimentName: ExperimentName): boolean {
|
|
291
|
+
return this.#hostExperiments.has(experimentName);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
#isExperiment(experimentName: ExperimentName): boolean {
|
|
295
|
+
return this.#experimentNames.has(experimentName);
|
|
259
296
|
}
|
|
260
297
|
}
|
|
261
298
|
|
|
@@ -332,6 +369,44 @@ export class Experiment {
|
|
|
332
369
|
}
|
|
333
370
|
}
|
|
334
371
|
|
|
372
|
+
export class HostExperiment {
|
|
373
|
+
name: ExperimentName;
|
|
374
|
+
title: string;
|
|
375
|
+
readonly #experiments: ExperimentsSupport;
|
|
376
|
+
// This is the name of the corresponding Chromium flag (in chrome/browser/about_flags.cc).
|
|
377
|
+
// It is NOT the the name of the corresponding Chromium `base::Feature`.
|
|
378
|
+
aboutFlag: string;
|
|
379
|
+
#isEnabled: boolean;
|
|
380
|
+
docLink?: Platform.DevToolsPath.UrlString;
|
|
381
|
+
readonly feedbackLink?: Platform.DevToolsPath.UrlString;
|
|
382
|
+
|
|
383
|
+
constructor(params: {
|
|
384
|
+
name: ExperimentName,
|
|
385
|
+
title: string,
|
|
386
|
+
experiments: ExperimentsSupport,
|
|
387
|
+
aboutFlag: string,
|
|
388
|
+
isEnabled: boolean,
|
|
389
|
+
docLink?: Platform.DevToolsPath.UrlString,
|
|
390
|
+
feedbackLink?: Platform.DevToolsPath.UrlString,
|
|
391
|
+
}) {
|
|
392
|
+
this.name = params.name;
|
|
393
|
+
this.title = params.title;
|
|
394
|
+
this.#experiments = params.experiments;
|
|
395
|
+
this.aboutFlag = params.aboutFlag;
|
|
396
|
+
this.#isEnabled = params.isEnabled;
|
|
397
|
+
this.docLink = params.docLink;
|
|
398
|
+
this.feedbackLink = params.feedbackLink;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
isEnabled(): boolean {
|
|
402
|
+
return this.#experiments.isEnabledForTest(this.name) || this.#isEnabled;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
setEnabled(enabled: boolean): void {
|
|
406
|
+
this.#isEnabled = enabled;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
335
410
|
/** This must be constructed after the query parameters have been parsed. **/
|
|
336
411
|
export const experiments = new ExperimentsSupport();
|
|
337
412
|
|
|
@@ -524,6 +599,10 @@ interface ConsoleInsightsTeasers {
|
|
|
524
599
|
allowWithoutGpu: boolean;
|
|
525
600
|
}
|
|
526
601
|
|
|
602
|
+
interface DevToolsProtocolMonitor {
|
|
603
|
+
enabled: boolean;
|
|
604
|
+
}
|
|
605
|
+
|
|
527
606
|
/**
|
|
528
607
|
* The host configuration that we expect from the DevTools back-end.
|
|
529
608
|
*
|
|
@@ -575,6 +654,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
575
654
|
devToolsAiAssistanceContextSelectionAgent: HostConfigAiAssistanceContextSelectionAgent,
|
|
576
655
|
devToolsConsoleInsightsTeasers: ConsoleInsightsTeasers,
|
|
577
656
|
devToolsGeminiRebranding: HostConfigGeminiRebranding,
|
|
657
|
+
devToolsProtocolMonitor: DevToolsProtocolMonitor,
|
|
578
658
|
}>;
|
|
579
659
|
|
|
580
660
|
/**
|
|
@@ -443,12 +443,6 @@ export class AnimationModel extends SDKModel<EventTypes> {
|
|
|
443
443
|
void this.agent.invoke_setPlaybackRate({playbackRate});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
async releaseAllAnimations(): Promise<void> {
|
|
447
|
-
const animationIds = [...this.animationGroups.values()].flatMap(
|
|
448
|
-
animationGroup => animationGroup.animations().map(animation => animation.id()));
|
|
449
|
-
await this.agent.invoke_releaseAnimations({animations: animationIds});
|
|
450
|
-
}
|
|
451
|
-
|
|
452
446
|
releaseAnimations(animations: string[]): void {
|
|
453
447
|
void this.agent.invoke_releaseAnimations({animations});
|
|
454
448
|
}
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
// InspectorFrontendHostImpl --------------------------------------------------
|
|
410
410
|
|
|
411
411
|
/**
|
|
412
|
-
* Enum for
|
|
412
|
+
* Enum for recordEnumeratedHistogram
|
|
413
413
|
* Warning: There is another definition of this enum in the DevTools code
|
|
414
414
|
* base, keep them in sync:
|
|
415
415
|
* front_end/core/host/InspectorFrontendHostAPI.ts
|
|
@@ -754,6 +754,14 @@
|
|
|
754
754
|
DevToolsAPI.sendMessageToEmbedder('recordPerformanceHistogram', [histogramName, duration], null);
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
+
/**
|
|
758
|
+
* @param histogramName
|
|
759
|
+
* @param duration
|
|
760
|
+
*/
|
|
761
|
+
recordPerformanceHistogramMedium(histogramName, duration) {
|
|
762
|
+
DevToolsAPI.sendMessageToEmbedder('recordPerformanceHistogramMedium', [histogramName, duration], null);
|
|
763
|
+
}
|
|
764
|
+
|
|
757
765
|
/**
|
|
758
766
|
* @param featureName
|
|
759
767
|
*/
|
|
@@ -1021,6 +1029,13 @@
|
|
|
1021
1029
|
DevToolsAPI.sendMessageToEmbedder('recordFunctionCall', [functionCallEvent], null);
|
|
1022
1030
|
}
|
|
1023
1031
|
|
|
1032
|
+
/**
|
|
1033
|
+
* @param featureName
|
|
1034
|
+
*/
|
|
1035
|
+
setChromeFlag(featureName, value) {
|
|
1036
|
+
DevToolsAPI.sendMessageToEmbedder('setChromeFlag', [featureName, value], null);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1024
1039
|
// Backward-compatible methods below this line --------------------------------------------
|
|
1025
1040
|
/**
|
|
1026
1041
|
* Support for legacy front-ends (<M65).
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
|
+
import * as AIAssistance from '../../models/ai_assistance/ai_assistance.js';
|
|
8
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
10
|
import * as Lit from '../../ui/lit/lit.js';
|
|
10
11
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -22,6 +23,14 @@ const UIStrings = {
|
|
|
22
23
|
* @description Button's tooltip text.
|
|
23
24
|
*/
|
|
24
25
|
openAiAssistance: 'Open AI assistance panel',
|
|
26
|
+
/**
|
|
27
|
+
* @description Button's string in promotion state.
|
|
28
|
+
*/
|
|
29
|
+
gemini: 'Gemini',
|
|
30
|
+
/**
|
|
31
|
+
* @description Button's tooltip text.
|
|
32
|
+
*/
|
|
33
|
+
openGemini: 'Open Gemini panel',
|
|
25
34
|
} as const;
|
|
26
35
|
const str_ = i18n.i18n.registerUIStrings('entrypoints/main/GlobalAiButton.ts', UIStrings);
|
|
27
36
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -55,13 +64,19 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
55
64
|
'global-ai-button': true,
|
|
56
65
|
expanded: inPromotionState,
|
|
57
66
|
});
|
|
67
|
+
|
|
68
|
+
const strings = AIAssistance.AiUtils.isGeminiBranding() ?
|
|
69
|
+
{title: i18nString(UIStrings.openGemini), label: i18nString(UIStrings.gemini)} :
|
|
70
|
+
{title: i18nString(UIStrings.openAiAssistance), label: i18nString(UIStrings.aiAssistance)};
|
|
71
|
+
const icon = AIAssistance.AiUtils.getIconName();
|
|
72
|
+
|
|
58
73
|
// clang-format off
|
|
59
74
|
render(html`
|
|
60
75
|
<style>${globalAiButtonStyles}</style>
|
|
61
76
|
<div class="global-ai-button-container">
|
|
62
|
-
<button class=${classes} @click=${input.onClick} title=${
|
|
63
|
-
<devtools-icon name
|
|
64
|
-
<span class="button-text">${` ${
|
|
77
|
+
<button class=${classes} @click=${input.onClick} title=${strings.title} jslog=${VisualLogging.action().track({click: true}).context('global-ai-button')}>
|
|
78
|
+
<devtools-icon name=${icon}></devtools-icon>
|
|
79
|
+
<span class="button-text">${` ${strings.label}`}</span>
|
|
65
80
|
</button>
|
|
66
81
|
</div>
|
|
67
82
|
`, target);
|
|
@@ -328,6 +328,19 @@ export class MainImpl {
|
|
|
328
328
|
return {syncedStorage, globalStorage, localStorage};
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
+
// eslint-disable-next-line no-unused-private-class-members
|
|
332
|
+
#migrateValueFromLegacyToHostExperiment(
|
|
333
|
+
legacyExperimentName: Root.ExperimentNames.ExperimentName, hostExperiment: Root.Runtime.HostExperiment): void {
|
|
334
|
+
const value = Root.Runtime.experiments.getValueFromStorage(legacyExperimentName);
|
|
335
|
+
if (value !== undefined && hostExperiment.aboutFlag) {
|
|
336
|
+
// Set the host experiment to the same value as the legacy experiment.
|
|
337
|
+
hostExperiment.setEnabled(value);
|
|
338
|
+
// Set the chrome flag to the same value as the legacy experiment.
|
|
339
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setChromeFlag(hostExperiment.aboutFlag, value);
|
|
340
|
+
// The legacy experiment will be cleaned up by `cleanUpStaleExperiments`.
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
331
344
|
#initializeExperiments(): void {
|
|
332
345
|
Root.Runtime.experiments.register(
|
|
333
346
|
Root.ExperimentNames.ExperimentName.CAPTURE_NODE_CREATION_STACKS, 'Capture node creation stacks');
|
|
@@ -413,7 +426,6 @@ export class MainImpl {
|
|
|
413
426
|
if (enabledExperiments) {
|
|
414
427
|
Root.Runtime.experiments.setServerEnabledExperiments(enabledExperiments.split(';'));
|
|
415
428
|
}
|
|
416
|
-
Root.Runtime.experiments.enableExperimentsTransiently([]);
|
|
417
429
|
|
|
418
430
|
if (Host.InspectorFrontendHost.isUnderTest()) {
|
|
419
431
|
const testParam = Root.Runtime.Runtime.queryParam('test');
|