chrome-devtools-frontend 1.0.1682249 → 1.0.1683520
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/front_end/entrypoints/inspector_main/InspectorMain.ts +2 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +4 -3
- package/front_end/entrypoints/main/main-meta.ts +4 -20
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +13 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/trace/Processor.ts +1 -0
- package/front_end/panels/elements/ElementsPanel.ts +4 -2
- package/front_end/panels/network/RequestPayloadView.ts +5 -2
- package/front_end/panels/sources/SourcesPanel.ts +6 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/text_editor/config.ts +2 -1
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +5 -2
- package/front_end/ui/settings/InspectorMainSettings.ts +7 -0
- package/front_end/ui/settings/MainSettings.ts +33 -0
- package/front_end/ui/settings/settings.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -248,7 +248,8 @@ export class BackendSettingsSync implements SDK.TargetManager.Observer {
|
|
|
248
248
|
readonly #emulatePageFocusSetting: Common.Settings.Setting<boolean>;
|
|
249
249
|
|
|
250
250
|
constructor() {
|
|
251
|
-
this.#autoAttachSetting = Common.Settings.Settings.instance().
|
|
251
|
+
this.#autoAttachSetting = Common.Settings.Settings.instance().resolve(
|
|
252
|
+
SettingsUI.InspectorMainSettings.autoAttachToCreatedPagesSettingDescriptor);
|
|
252
253
|
this.#autoAttachSetting.addChangeListener(this.#updateAutoAttach, this);
|
|
253
254
|
this.#updateAutoAttach();
|
|
254
255
|
|
|
@@ -462,14 +462,10 @@ SettingsUI.SettingUIRegistration.register(SettingsUI.InspectorMainSettings.adBlo
|
|
|
462
462
|
],
|
|
463
463
|
});
|
|
464
464
|
|
|
465
|
-
|
|
465
|
+
SettingsUI.SettingUIRegistration.register(SettingsUI.InspectorMainSettings.autoAttachToCreatedPagesSettingDescriptor, {
|
|
466
466
|
category: Common.Settings.SettingCategory.GLOBAL,
|
|
467
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
468
467
|
title: i18nLazyString(UIStrings.autoOpenDevTools),
|
|
469
|
-
settingName: 'auto-attach-to-created-pages',
|
|
470
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
471
468
|
order: 2,
|
|
472
|
-
defaultValue: false,
|
|
473
469
|
options: [
|
|
474
470
|
{
|
|
475
471
|
value: true,
|
|
@@ -56,6 +56,7 @@ import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
|
56
56
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
57
57
|
import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
|
|
58
58
|
import {html, render} from '../../ui/lit/lit.js';
|
|
59
|
+
import * as SettingsUI from '../../ui/settings/settings.js';
|
|
59
60
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
60
61
|
|
|
61
62
|
import {ExecutionContextSelector} from './ExecutionContextSelector.js';
|
|
@@ -268,7 +269,8 @@ export class MainImpl {
|
|
|
268
269
|
}
|
|
269
270
|
|
|
270
271
|
async requestAndRegisterLocaleData(): Promise<void> {
|
|
271
|
-
const settingLanguage =
|
|
272
|
+
const settingLanguage =
|
|
273
|
+
Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.languageSettingDescriptor).get();
|
|
272
274
|
const devToolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance({
|
|
273
275
|
create: true,
|
|
274
276
|
data: {
|
|
@@ -427,8 +429,7 @@ export class MainImpl {
|
|
|
427
429
|
Persistence.IsolatedFileSystemManager.Events.FileSystemError,
|
|
428
430
|
event => Snackbar.Snackbar.Snackbar.show({message: event.data}));
|
|
429
431
|
|
|
430
|
-
const
|
|
431
|
-
const themeSetting = Common.Settings.Settings.instance().createSetting('ui-theme', defaultThemeSetting);
|
|
432
|
+
const themeSetting = Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.uiThemeSettingDescriptor);
|
|
432
433
|
UI.UIUtils.initializeUIUtils(document);
|
|
433
434
|
|
|
434
435
|
// Initialize theme support and apply it.
|
|
@@ -658,13 +658,9 @@ UI.ActionRegistration.registerActionExtension({
|
|
|
658
658
|
],
|
|
659
659
|
});
|
|
660
660
|
|
|
661
|
-
|
|
661
|
+
SettingsUI.SettingUIRegistration.register(SettingsUI.MainSettings.uiThemeSettingDescriptor, {
|
|
662
662
|
category: Common.Settings.SettingCategory.APPEARANCE,
|
|
663
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
664
663
|
title: i18nLazyString(UIStrings.theme),
|
|
665
|
-
settingName: 'ui-theme',
|
|
666
|
-
settingType: Common.Settings.SettingType.ENUM,
|
|
667
|
-
defaultValue: 'systemPreferred',
|
|
668
664
|
reloadRequired: false,
|
|
669
665
|
options: [
|
|
670
666
|
{
|
|
@@ -689,13 +685,9 @@ Common.Settings.registerSettingExtension({
|
|
|
689
685
|
],
|
|
690
686
|
});
|
|
691
687
|
|
|
692
|
-
|
|
688
|
+
SettingsUI.SettingUIRegistration.register(SettingsUI.MainSettings.chromeThemeColorsSettingDescriptor, {
|
|
693
689
|
category: Common.Settings.SettingCategory.APPEARANCE,
|
|
694
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
695
690
|
title: i18nLazyString(UIStrings.matchChromeColorScheme),
|
|
696
|
-
settingName: 'chrome-theme-colors',
|
|
697
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
698
|
-
defaultValue: true,
|
|
699
691
|
options: [
|
|
700
692
|
{
|
|
701
693
|
value: true,
|
|
@@ -713,13 +705,9 @@ Common.Settings.registerSettingExtension({
|
|
|
713
705
|
},
|
|
714
706
|
});
|
|
715
707
|
|
|
716
|
-
|
|
708
|
+
SettingsUI.SettingUIRegistration.register(SettingsUI.MainSettings.sidebarPositionSettingDescriptor, {
|
|
717
709
|
category: Common.Settings.SettingCategory.APPEARANCE,
|
|
718
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
719
710
|
title: i18nLazyString(UIStrings.panelLayout),
|
|
720
|
-
settingName: 'sidebar-position',
|
|
721
|
-
settingType: Common.Settings.SettingType.ENUM,
|
|
722
|
-
defaultValue: 'auto',
|
|
723
711
|
options: [
|
|
724
712
|
{
|
|
725
713
|
title: i18nLazyString(UIStrings.useHorizontalPanelLayout),
|
|
@@ -739,13 +727,9 @@ Common.Settings.registerSettingExtension({
|
|
|
739
727
|
],
|
|
740
728
|
});
|
|
741
729
|
|
|
742
|
-
|
|
730
|
+
SettingsUI.SettingUIRegistration.register(SettingsUI.MainSettings.languageSettingDescriptor, {
|
|
743
731
|
category: Common.Settings.SettingCategory.APPEARANCE,
|
|
744
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
745
|
-
settingName: 'language',
|
|
746
|
-
settingType: Common.Settings.SettingType.ENUM,
|
|
747
732
|
title: i18nLazyString(UIStrings.language),
|
|
748
|
-
defaultValue: 'en-US',
|
|
749
733
|
options: [
|
|
750
734
|
{
|
|
751
735
|
value: 'browserLanguage',
|
|
@@ -1137,7 +1137,7 @@ inspectorBackend.registerCommand("Page.setLifecycleEventsEnabled", [{"name": "en
|
|
|
1137
1137
|
inspectorBackend.registerEnum("Page.SetTouchEmulationEnabledRequestConfiguration", {Mobile: "mobile", Desktop: "desktop"});
|
|
1138
1138
|
inspectorBackend.registerCommand("Page.setTouchEmulationEnabled", [{"name": "enabled", "type": "boolean", "optional": false, "description": "Whether the touch event emulation should be enabled.", "typeRef": null}, {"name": "configuration", "type": "string", "optional": true, "description": "Touch/gesture events configuration. Default: current platform.", "typeRef": "Page.SetTouchEmulationEnabledRequestConfiguration"}], [], "Toggles mouse event-based touch event emulation.");
|
|
1139
1139
|
inspectorBackend.registerEnum("Page.StartScreencastRequestFormat", {Jpeg: "jpeg", Png: "png"});
|
|
1140
|
-
inspectorBackend.registerCommand("Page.startScreencast", [{"name": "format", "type": "string", "optional": true, "description": "Image compression format.", "typeRef": "Page.StartScreencastRequestFormat"}, {"name": "quality", "type": "number", "optional": true, "description": "Compression quality from range [0..100].", "typeRef": null}, {"name": "maxWidth", "type": "number", "optional": true, "description": "Maximum screenshot width.", "typeRef": null}, {"name": "maxHeight", "type": "number", "optional": true, "description": "Maximum screenshot height.", "typeRef": null}, {"name": "everyNthFrame", "type": "number", "optional": true, "description": "Send every n-th frame.", "typeRef": null}], [], "Starts sending each frame using the `screencastFrame` event.");
|
|
1140
|
+
inspectorBackend.registerCommand("Page.startScreencast", [{"name": "format", "type": "string", "optional": true, "description": "Image compression format.", "typeRef": "Page.StartScreencastRequestFormat"}, {"name": "quality", "type": "number", "optional": true, "description": "Compression quality from range [0..100].", "typeRef": null}, {"name": "maxWidth", "type": "number", "optional": true, "description": "Maximum screenshot width.", "typeRef": null}, {"name": "maxHeight", "type": "number", "optional": true, "description": "Maximum screenshot height.", "typeRef": null}, {"name": "everyNthFrame", "type": "number", "optional": true, "description": "Send every n-th frame. Must be a positive integer.", "typeRef": null}, {"name": "maxFramesInFlight", "type": "number", "optional": true, "description": "Maximum number of frames sent until screencastFrameAck is required. Defaults to 3. Must be a positive integer.", "typeRef": null}, {"name": "sendLastFrame", "type": "boolean", "optional": true, "description": "By default, after screencastFrameAck arrives, the next produced frame is sent. Passing this flag enables storing the last produced frame in memory, which is immediately sent upon screencastFrameAck. This way, overall performance is traded for a better latency.", "typeRef": null}], [], "Starts sending each frame using the `screencastFrame` event.");
|
|
1141
1141
|
inspectorBackend.registerCommand("Page.startScreenRecording", [{"name": "audio", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "maxWidth", "type": "number", "optional": true, "description": "Maximum frame width in pixels.", "typeRef": null}, {"name": "maxHeight", "type": "number", "optional": true, "description": "Maximum frame height in pixels.", "typeRef": null}, {"name": "frameRate", "type": "number", "optional": true, "description": "Maximum frame rate in frames per second.", "typeRef": null}], ["stream"], "Starts screencast video recording.");
|
|
1142
1142
|
inspectorBackend.registerCommand("Page.stopScreenRecording", [], ["stream"], "Stops screencast video recording.");
|
|
1143
1143
|
inspectorBackend.registerCommand("Page.stopLoading", [], [], "Force the page stop all navigations and pending resource fetches.");
|
|
@@ -16299,9 +16299,21 @@ export namespace Page {
|
|
|
16299
16299
|
*/
|
|
16300
16300
|
maxHeight?: integer;
|
|
16301
16301
|
/**
|
|
16302
|
-
* Send every n-th frame.
|
|
16302
|
+
* Send every n-th frame. Must be a positive integer.
|
|
16303
16303
|
*/
|
|
16304
16304
|
everyNthFrame?: integer;
|
|
16305
|
+
/**
|
|
16306
|
+
* Maximum number of frames sent until screencastFrameAck is required.
|
|
16307
|
+
* Defaults to 3. Must be a positive integer.
|
|
16308
|
+
*/
|
|
16309
|
+
maxFramesInFlight?: integer;
|
|
16310
|
+
/**
|
|
16311
|
+
* By default, after screencastFrameAck arrives, the next produced frame is sent.
|
|
16312
|
+
* Passing this flag enables storing the last produced frame in memory, which is
|
|
16313
|
+
* immediately sent upon screencastFrameAck. This way, overall performance is
|
|
16314
|
+
* traded for a better latency.
|
|
16315
|
+
*/
|
|
16316
|
+
sendLastFrame?: boolean;
|
|
16305
16317
|
}
|
|
16306
16318
|
|
|
16307
16319
|
export interface StartScreenRecordingRequest {
|
|
@@ -6718,6 +6718,10 @@ export const NativeFunctions = [
|
|
|
6718
6718
|
name: "copyElementImageToTexture",
|
|
6719
6719
|
signatures: [["source","destination"]]
|
|
6720
6720
|
},
|
|
6721
|
+
{
|
|
6722
|
+
name: "drawElementImageToTexture",
|
|
6723
|
+
signatures: [["source","destination"]]
|
|
6724
|
+
},
|
|
6721
6725
|
{
|
|
6722
6726
|
name: "multiDrawIndirect",
|
|
6723
6727
|
signatures: [["indirectBuffer","indirectOffset","maxDrawCount","?drawCountBuffer","?drawCountBufferOffset"]]
|
|
@@ -44,6 +44,7 @@ import * as ComputedStyle from '../../models/computed_style/computed_style.js';
|
|
|
44
44
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
45
45
|
import type * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
46
46
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
47
|
+
import * as SettingsUI from '../../ui/settings/settings.js';
|
|
47
48
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
48
49
|
|
|
49
50
|
import {AccessibilityTreeView} from './AccessibilityTreeView.js';
|
|
@@ -294,7 +295,8 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
294
295
|
|
|
295
296
|
this.metricsWidget = new MetricsSidebarPane(this.#computedStyleModel);
|
|
296
297
|
|
|
297
|
-
this.#settings.
|
|
298
|
+
this.#settings.resolve(SettingsUI.MainSettings.sidebarPositionSettingDescriptor)
|
|
299
|
+
.addChangeListener(this.updateSidebarPosition.bind(this));
|
|
298
300
|
this.updateSidebarPosition();
|
|
299
301
|
|
|
300
302
|
this.cssStyleTrackerByCSSModel = new Map();
|
|
@@ -1180,7 +1182,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
1180
1182
|
return;
|
|
1181
1183
|
} // We can't reparent extension iframes.
|
|
1182
1184
|
|
|
1183
|
-
const position = this.#settings.
|
|
1185
|
+
const position = this.#settings.resolve(SettingsUI.MainSettings.sidebarPositionSettingDescriptor).get();
|
|
1184
1186
|
let splitMode = SplitMode.HORIZONTAL;
|
|
1185
1187
|
if (position === 'right' || (position === 'auto' && this.splitWidget.element.offsetWidth > 680)) {
|
|
1186
1188
|
splitMode = SplitMode.VERTICAL;
|
|
@@ -203,7 +203,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
203
203
|
});
|
|
204
204
|
objectTree.expanded = true;
|
|
205
205
|
return html`
|
|
206
|
-
<li role=treeitem class="source-code object-properties-section-root-element object-properties-section" open>
|
|
206
|
+
<li role=treeitem class="source-code object-properties-section-root-element object-properties-section" toggle-on-click open>
|
|
207
207
|
${object.description}
|
|
208
208
|
${object.hasChildren ? ObjectUI.ObjectPropertiesSection.renderObjectTree(objectTree) : nothing}
|
|
209
209
|
</li>
|
|
@@ -241,13 +241,14 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
241
241
|
|
|
242
242
|
// clang-format off
|
|
243
243
|
render(html`<style>${requestPayloadViewStyles}</style>
|
|
244
|
-
<devtools-tree dense class=request-payload-tree .template=${html`
|
|
244
|
+
<devtools-tree dense show-selection-on-keyboard-focus class=request-payload-tree .template=${html`
|
|
245
245
|
<style>${objectValueStyles}</style>
|
|
246
246
|
<style>${objectPropertiesSectionStyles}</style>
|
|
247
247
|
<style>${requestPayloadTreeStyles}</style>
|
|
248
248
|
<ul role=tree>
|
|
249
249
|
<li
|
|
250
250
|
role=treeitem
|
|
251
|
+
toggle-on-click
|
|
251
252
|
?hidden=${!input.queryParameters}
|
|
252
253
|
jslog=${VisualLogging.section().context('query-string')}
|
|
253
254
|
@contextmenu=${onContextMenu(
|
|
@@ -280,6 +281,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
280
281
|
</li>
|
|
281
282
|
<li
|
|
282
283
|
role=treeitem
|
|
284
|
+
toggle-on-click
|
|
283
285
|
?hidden=${!input.formData || !input.formParameters}
|
|
284
286
|
jslog=${VisualLogging.section().context('form-data')}
|
|
285
287
|
@contextmenu=${onContextMenu(
|
|
@@ -311,6 +313,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
311
313
|
</li>
|
|
312
314
|
<li
|
|
313
315
|
role=treeitem
|
|
316
|
+
toggle-on-click
|
|
314
317
|
?hidden=${!input.formData || Boolean(input.formParameters) || Boolean(input.binaryPayloadContentData)}
|
|
315
318
|
jslog=${VisualLogging.section().context('request-payload')}
|
|
316
319
|
@contextmenu=${onContextMenu(
|
|
@@ -48,6 +48,7 @@ import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
|
48
48
|
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
49
49
|
import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
50
50
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
51
|
+
import * as Settings from '../../ui/settings/settings.js';
|
|
51
52
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
52
53
|
import * as Snippets from '../snippets/snippets.js';
|
|
53
54
|
|
|
@@ -281,7 +282,7 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
281
282
|
this.callstackPane = CallStackSidebarPane.instance();
|
|
282
283
|
|
|
283
284
|
Common.Settings.Settings.instance()
|
|
284
|
-
.
|
|
285
|
+
.resolve(Settings.MainSettings.sidebarPositionSettingDescriptor)
|
|
285
286
|
.addChangeListener(this.updateSidebarPosition.bind(this));
|
|
286
287
|
this.updateSidebarPosition();
|
|
287
288
|
|
|
@@ -414,7 +415,8 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
414
415
|
}
|
|
415
416
|
|
|
416
417
|
override onResize(): void {
|
|
417
|
-
if (Common.Settings.Settings.instance().
|
|
418
|
+
if (Common.Settings.Settings.instance().resolve(Settings.MainSettings.sidebarPositionSettingDescriptor).get() ===
|
|
419
|
+
'auto') {
|
|
418
420
|
this.element.window().requestAnimationFrame(this.updateSidebarPosition.bind(this));
|
|
419
421
|
} // Do not force layout.
|
|
420
422
|
}
|
|
@@ -1111,7 +1113,8 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
1111
1113
|
|
|
1112
1114
|
private updateSidebarPosition(): void {
|
|
1113
1115
|
let vertically;
|
|
1114
|
-
const position =
|
|
1116
|
+
const position =
|
|
1117
|
+
Common.Settings.Settings.instance().resolve(Settings.MainSettings.sidebarPositionSettingDescriptor).get();
|
|
1115
1118
|
if (position === 'right') {
|
|
1116
1119
|
vertically = false;
|
|
1117
1120
|
} else if (position === 'bottom') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: c7fa750520673537bb8f56d44c3c07bb2d580372
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -10,6 +10,7 @@ import * as TextUtils from '../../../core/text_utils/text_utils.js';
|
|
|
10
10
|
import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
11
11
|
import {Icon} from '../../kit/kit.js';
|
|
12
12
|
import * as UI from '../../legacy/legacy.js';
|
|
13
|
+
import * as SettingsUI from '../../settings/settings.js';
|
|
13
14
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
14
15
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
|
15
16
|
|
|
@@ -327,7 +328,7 @@ const baseKeymap = CM.keymap.of([
|
|
|
327
328
|
]);
|
|
328
329
|
|
|
329
330
|
function themeIsDark(): boolean {
|
|
330
|
-
const setting = Common.Settings.Settings.instance().
|
|
331
|
+
const setting = Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.uiThemeSettingDescriptor).get();
|
|
331
332
|
return setting === 'systemPreferred' ? window.matchMedia('(prefers-color-scheme: dark)').matches : setting === 'dark';
|
|
332
333
|
}
|
|
333
334
|
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
import * as Common from '../../../core/common/common.js';
|
|
38
38
|
import * as Host from '../../../core/host/host.js';
|
|
39
39
|
import * as Root from '../../../core/root/root.js';
|
|
40
|
+
import * as SettingsUI from '../../settings/settings.js';
|
|
40
41
|
|
|
41
42
|
let themeSupportInstance: ThemeSupport;
|
|
42
43
|
|
|
@@ -159,7 +160,8 @@ export class ThemeSupport extends EventTarget {
|
|
|
159
160
|
this.#themeName = useSystemPreferred ? systemPreferredTheme : this.setting.get();
|
|
160
161
|
document.documentElement.classList.toggle('theme-with-dark-background', this.#themeName === 'dark');
|
|
161
162
|
|
|
162
|
-
const useChromeTheme =
|
|
163
|
+
const useChromeTheme =
|
|
164
|
+
Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.chromeThemeColorsSettingDescriptor).get();
|
|
163
165
|
const isIncognito = Root.Runtime.hostConfig.isOffTheRecord === true;
|
|
164
166
|
// Baseline is the name of Chrome's default color theme and there are two of these: default and grayscale.
|
|
165
167
|
// The collective name for the rest of the color themes is dynamic.
|
|
@@ -191,7 +193,8 @@ export class ThemeSupport extends EventTarget {
|
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
#fetchColorsAndApplyHostTheme(document: Document): void {
|
|
194
|
-
const useChromeTheme =
|
|
196
|
+
const useChromeTheme =
|
|
197
|
+
Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.chromeThemeColorsSettingDescriptor).get();
|
|
195
198
|
if (Host.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode() || !useChromeTheme) {
|
|
196
199
|
this.#applyThemeToDocument(document);
|
|
197
200
|
return;
|
|
@@ -10,3 +10,10 @@ export const adBlockingEnabledSettingDescriptor: Common.Settings.SettingDescript
|
|
|
10
10
|
defaultValue: false,
|
|
11
11
|
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
12
12
|
};
|
|
13
|
+
|
|
14
|
+
export const autoAttachToCreatedPagesSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
15
|
+
name: 'auto-attach-to-created-pages',
|
|
16
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
17
|
+
defaultValue: false,
|
|
18
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
19
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2026 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 Common from '../../core/common/common.js';
|
|
6
|
+
|
|
7
|
+
export const uiThemeSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
8
|
+
name: 'ui-theme',
|
|
9
|
+
type: Common.Settings.SettingType.ENUM,
|
|
10
|
+
defaultValue: 'systemPreferred',
|
|
11
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const chromeThemeColorsSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
15
|
+
name: 'chrome-theme-colors',
|
|
16
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
17
|
+
defaultValue: true,
|
|
18
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const sidebarPositionSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
22
|
+
name: 'sidebar-position',
|
|
23
|
+
type: Common.Settings.SettingType.ENUM,
|
|
24
|
+
defaultValue: 'auto',
|
|
25
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const languageSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
29
|
+
name: 'language',
|
|
30
|
+
type: Common.Settings.SettingType.ENUM,
|
|
31
|
+
defaultValue: 'en-US',
|
|
32
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
33
|
+
};
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as InspectorMainSettings from './InspectorMainSettings.js';
|
|
6
|
+
import * as MainSettings from './MainSettings.js';
|
|
6
7
|
import * as SettingUIRegistration from './SettingUIRegistration.js';
|
|
7
8
|
|
|
8
9
|
export {
|
|
9
10
|
InspectorMainSettings,
|
|
11
|
+
MainSettings,
|
|
10
12
|
SettingUIRegistration,
|
|
11
13
|
};
|
|
@@ -727,6 +727,7 @@ export const knownContextValues = new Set([
|
|
|
727
727
|
'breakpoints-active',
|
|
728
728
|
'browser-debugger.refresh-global-event-listeners',
|
|
729
729
|
'browser-language',
|
|
730
|
+
'browserLanguage',
|
|
730
731
|
'bs',
|
|
731
732
|
'buffered-rendering',
|
|
732
733
|
'button',
|
|
@@ -1629,6 +1630,8 @@ export const knownContextValues = new Set([
|
|
|
1629
1630
|
'emulation.toggle-device-mode',
|
|
1630
1631
|
'emulation.toolbar-controls-enabled',
|
|
1631
1632
|
'emulation.touch',
|
|
1633
|
+
'en-GB',
|
|
1634
|
+
'en-US',
|
|
1632
1635
|
'en-gb',
|
|
1633
1636
|
'en-us',
|
|
1634
1637
|
'en-xl',
|
|
@@ -1834,6 +1837,7 @@ export const knownContextValues = new Set([
|
|
|
1834
1837
|
'form-factors',
|
|
1835
1838
|
'fourth',
|
|
1836
1839
|
'fr',
|
|
1840
|
+
'fr-CA',
|
|
1837
1841
|
'fr-ca',
|
|
1838
1842
|
'frame',
|
|
1839
1843
|
'frame-creation-stack-trace',
|
|
@@ -3305,6 +3309,7 @@ export const knownContextValues = new Set([
|
|
|
3305
3309
|
'pseudo-property',
|
|
3306
3310
|
'pseudotype',
|
|
3307
3311
|
'pt',
|
|
3312
|
+
'pt-PT',
|
|
3308
3313
|
'pt-pt',
|
|
3309
3314
|
'push-message',
|
|
3310
3315
|
'push-messaging',
|
|
@@ -3977,6 +3982,7 @@ export const knownContextValues = new Set([
|
|
|
3977
3982
|
'spread',
|
|
3978
3983
|
'sq',
|
|
3979
3984
|
'sr',
|
|
3985
|
+
'sr-Latn',
|
|
3980
3986
|
'sr-latn',
|
|
3981
3987
|
'src',
|
|
3982
3988
|
'srgb',
|
|
@@ -4653,6 +4659,8 @@ export const knownContextValues = new Set([
|
|
|
4653
4659
|
'y-offset',
|
|
4654
4660
|
'z-index',
|
|
4655
4661
|
'zh',
|
|
4662
|
+
'zh-HK',
|
|
4663
|
+
'zh-TW',
|
|
4656
4664
|
'zh-hk',
|
|
4657
4665
|
'zh-tw',
|
|
4658
4666
|
'zoo',
|
package/package.json
CHANGED