chrome-devtools-frontend 1.0.947377 → 1.0.948916

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 (124) hide show
  1. package/config/gni/all_devtools_files.gni +1 -6
  2. package/config/gni/devtools_grd_files.gni +5 -12
  3. package/config/gni/devtools_image_files.gni +1 -0
  4. package/front_end/.eslintrc.js +1 -0
  5. package/front_end/Images/src/circled_backslash_icon.svg +3 -0
  6. package/front_end/core/host/UserMetrics.ts +1 -1
  7. package/front_end/core/i18n/locales/en-US.json +32 -44
  8. package/front_end/core/i18n/locales/en-XL.json +32 -44
  9. package/front_end/core/platform/platform.ts +0 -2
  10. package/front_end/core/platform/string-utilities.ts +14 -1
  11. package/front_end/core/platform/utilities.ts +0 -29
  12. package/front_end/core/root/Runtime.ts +4 -207
  13. package/front_end/core/sdk/Cookie.ts +0 -21
  14. package/front_end/core/sdk/RemoteObject.ts +15 -1
  15. package/front_end/core/sdk/sdk-legacy.ts +0 -3
  16. package/front_end/entrypoints/devtools_app/{devtools_app-meta-files.ts → devtools_app.ts} +9 -3
  17. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +2 -1
  18. package/front_end/entrypoints/js_app/{JsMain.ts → js_app.ts} +5 -1
  19. package/front_end/entrypoints/main/MainImpl.ts +0 -1
  20. package/front_end/entrypoints/ndb_app/{ndb_app.js → ndb_app.ts} +0 -2
  21. package/front_end/entrypoints/node_app/node_app.ts +1 -3
  22. package/front_end/entrypoints/shell/{shell.js → shell.ts} +0 -2
  23. package/front_end/entrypoints/visibility.gni +3 -1
  24. package/front_end/entrypoints/worker_app/worker_app.ts +1 -4
  25. package/front_end/generated/InspectorBackendCommands.js +8 -1
  26. package/front_end/generated/protocol-mapping.d.ts +4 -0
  27. package/front_end/generated/protocol-proxy-api.d.ts +6 -0
  28. package/front_end/generated/protocol.d.ts +9 -0
  29. package/front_end/legacy/legacy-defs.d.ts +0 -4
  30. package/front_end/legacy_test_runner/test_runner/TestRunner.js +35 -59
  31. package/front_end/models/issues_manager/AttributionReportingIssue.ts +27 -2
  32. package/front_end/models/issues_manager/CorsIssue.ts +15 -15
  33. package/front_end/models/issues_manager/descriptions/{corsInsecurePrivateNetworkPreflight.md → corsPreflightAllowPrivateNetworkError.md} +1 -1
  34. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +3 -1
  35. package/front_end/panels/application/BackForwardCacheStrings.ts +1 -5
  36. package/front_end/panels/application/BackForwardCacheView.ts +150 -58
  37. package/front_end/panels/application/ResourcesPanel.ts +0 -42
  38. package/front_end/panels/application/application-legacy.ts +0 -3
  39. package/front_end/panels/application/application-meta.ts +0 -13
  40. package/front_end/panels/application/backForwardCacheView.css +44 -6
  41. package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
  42. package/front_end/panels/application/components/OriginTrialTreeView.ts +3 -3
  43. package/front_end/panels/application/components/StackTrace.ts +1 -1
  44. package/front_end/panels/console/ConsolePrompt.ts +0 -4
  45. package/front_end/panels/coverage/CoverageView.ts +1 -1
  46. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -0
  47. package/front_end/panels/css_overview/cssOverviewCompletedView.css +1 -1
  48. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -1
  49. package/front_end/panels/elements/AccessibilityTreeUtils.ts +1 -7
  50. package/front_end/panels/elements/ElementsPanel.ts +9 -1
  51. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  52. package/front_end/panels/elements/PropertiesWidget.ts +109 -4
  53. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  54. package/front_end/panels/elements/propertiesWidget.css +34 -0
  55. package/front_end/panels/emulation/DeviceModeToolbar.ts +5 -1
  56. package/front_end/panels/issues/CorsIssueDetailsView.ts +20 -8
  57. package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -0
  58. package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -1
  59. package/front_end/panels/profiler/ProfileDataGrid.ts +2 -1
  60. package/front_end/panels/settings/components/SyncSection.ts +2 -2
  61. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +46 -46
  62. package/front_end/panels/timeline/TimelineTreeView.ts +2 -1
  63. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  64. package/front_end/ui/components/helpers/component-server-setup.ts +1 -12
  65. package/front_end/ui/components/helpers/helpers.ts +0 -2
  66. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  67. package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
  68. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +3 -3
  69. package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
  70. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +98 -0
  71. package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
  72. package/front_end/ui/components/panel_feedback/previewToggle.css +24 -0
  73. package/front_end/ui/components/report_view/ReportView.ts +22 -0
  74. package/front_end/ui/components/report_view/reportSection.css +20 -0
  75. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  76. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -2
  77. package/front_end/ui/components/text_editor/config.ts +4 -3
  78. package/front_end/ui/components/text_editor/javascript.ts +8 -4
  79. package/front_end/ui/components/text_prompt/TextPrompt.ts +2 -2
  80. package/front_end/ui/legacy/GlassPane.ts +1 -1
  81. package/front_end/ui/legacy/SearchableView.ts +2 -1
  82. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  83. package/front_end/ui/legacy/Widget.ts +1 -1
  84. package/front_end/ui/legacy/XWidget.ts +0 -5
  85. package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +2 -2
  86. package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
  87. package/front_end/ui/legacy/utils/append-style.ts +2 -13
  88. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +7 -5
  89. package/package.json +2 -4
  90. package/scripts/build/build_inspector_overlay.py +15 -1
  91. package/scripts/build/rjsmin.py +84 -115
  92. package/scripts/eslint_rules/lib/ban_a_tags_in_lit_html.js +2 -11
  93. package/scripts/eslint_rules/lib/ban_literal_devtools_component_tag_names.js +2 -11
  94. package/scripts/eslint_rules/lib/ban_self_closing_custom_element_tagnames.js +2 -11
  95. package/scripts/eslint_rules/lib/ban_style_tags_in_lit_html.js +2 -11
  96. package/scripts/eslint_rules/lib/lit_html_data_as_type.js +2 -11
  97. package/scripts/eslint_rules/lib/lit_html_no_attribute_quotes.js +89 -0
  98. package/scripts/eslint_rules/lib/lit_no_style_interpolation.js +2 -11
  99. package/scripts/eslint_rules/lib/no_only_eslint_tests.js +53 -0
  100. package/scripts/eslint_rules/lib/static_tag_must_be_static_property.js +2 -11
  101. package/scripts/eslint_rules/lib/utils.js +29 -0
  102. package/scripts/eslint_rules/tests/.eslintrc.js +18 -0
  103. package/scripts/eslint_rules/tests/lit_html_no_attribute_quotes_test.js +45 -0
  104. package/scripts/eslint_rules/tests/no_only_eslint_tests_test.js +94 -0
  105. package/scripts/eslint_rules/tests/utils_test.js +40 -0
  106. package/front_end/entrypoints/devtools_app/devtools_app.js +0 -11
  107. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -4
  108. package/front_end/entrypoints/js_app/js_app.js +0 -12
  109. package/front_end/entrypoints/js_app/js_app.json +0 -3
  110. package/front_end/entrypoints/ndb_app/ndb_app.json +0 -4
  111. package/front_end/entrypoints/startup/RuntimeInstantiator.ts +0 -95
  112. package/front_end/entrypoints/startup/startup.ts +0 -9
  113. package/front_end/panels/help/HelpImpl.ts +0 -141
  114. package/front_end/panels/help/ReleaseNoteText.ts +0 -1496
  115. package/front_end/panels/help/ReleaseNoteView.ts +0 -107
  116. package/front_end/panels/help/help-meta.ts +0 -145
  117. package/front_end/panels/help/help.ts +0 -13
  118. package/front_end/panels/help/releaseNote.css +0 -115
  119. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -45
  120. package/scripts/build/build_release_applications.py +0 -216
  121. package/scripts/build/modular_build.py +0 -184
  122. package/scripts/check_gn.js +0 -119
  123. package/scripts/json_validator/module.schema.json +0 -19
  124. package/scripts/json_validator/validate_module_json.js +0 -44
@@ -7,9 +7,6 @@ const originalAssert = console.assert;
7
7
 
8
8
  const queryParamsObject = new URLSearchParams(location.search);
9
9
 
10
- // The following variable are initialized all the way at the bottom of this file
11
- let importScriptPathPrefix: string;
12
-
13
10
  let runtimePlatform = '';
14
11
 
15
12
  let runtimeInstance: Runtime|undefined;
@@ -32,62 +29,16 @@ export function getRemoteBase(location: string = self.location.toString()): {
32
29
  return {base: `${url.origin}/remote/serve_file/${version[1]}/`, version: version[1]};
33
30
  }
34
31
 
35
- export const mappingForLayoutTests = new Map<string, string>([
36
- ['panels/animation', 'animation'],
37
- ['panels/browser_debugger', 'browser_debugger'],
38
- ['panels/changes', 'changes'],
39
- ['panels/console', 'console'],
40
- ['panels/elements', 'elements'],
41
- ['panels/emulation', 'emulation'],
42
- ['panels/mobile_throttling', 'mobile_throttling'],
43
- ['panels/network', 'network'],
44
- ['panels/profiler', 'profiler'],
45
- ['panels/application', 'resources'],
46
- ['panels/search', 'search'],
47
- ['panels/sources', 'sources'],
48
- ['panels/snippets', 'snippets'],
49
- ['panels/settings', 'settings'],
50
- ['panels/timeline', 'timeline'],
51
- ['panels/web_audio', 'web_audio'],
52
- ['models/persistence', 'persistence'],
53
- ['models/workspace_diff', 'workspace_diff'],
54
- ['entrypoints/main', 'main'],
55
- ['third_party/diff', 'diff'],
56
- ['ui/legacy/components/inline_editor', 'inline_editor'],
57
- ['ui/legacy/components/data_grid', 'data_grid'],
58
- ['ui/legacy/components/perf_ui', 'perf_ui'],
59
- ['ui/legacy/components/source_frame', 'source_frame'],
60
- ['ui/legacy/components/color_picker', 'color_picker'],
61
- ['ui/legacy/components/cookie_table', 'cookie_table'],
62
- ['ui/legacy/components/quick_open', 'quick_open'],
63
- ['ui/legacy/components/utils', 'components'],
64
- ]);
65
-
66
32
  export class Runtime {
67
- readonly #modules: Module[];
68
- modulesMap: {
69
- [x: string]: Module,
70
- };
71
- private constructor(descriptors: ModuleDescriptor[]) {
72
- this.#modules = [];
73
- this.modulesMap = {};
74
-
75
- for (const descriptor of descriptors) {
76
- this.registerModule(descriptor);
77
- }
33
+ private constructor() {
78
34
  }
79
35
 
80
36
  static instance(opts: {
81
37
  forceNew: boolean|null,
82
- moduleDescriptors: Array<ModuleDescriptor>|null,
83
- }|undefined = {forceNew: null, moduleDescriptors: null}): Runtime {
84
- const {forceNew, moduleDescriptors} = opts;
38
+ }|undefined = {forceNew: null}): Runtime {
39
+ const {forceNew} = opts;
85
40
  if (!runtimeInstance || forceNew) {
86
- if (!moduleDescriptors) {
87
- throw new Error(`Unable to create runtime: moduleDescriptors must be provided: ${new Error().stack}`);
88
- }
89
-
90
- runtimeInstance = new Runtime(moduleDescriptors);
41
+ runtimeInstance = new Runtime();
91
42
  }
92
43
 
93
44
  return runtimeInstance;
@@ -198,51 +149,11 @@ export class Runtime {
198
149
  return '\n/*# sourceURL=' + sourceURL + ' */';
199
150
  }
200
151
 
201
- module(moduleName: string): Module {
202
- return this.modulesMap[moduleName];
203
- }
204
-
205
- private registerModule(descriptor: ModuleDescriptor): void {
206
- const module = new Module(this, descriptor);
207
- this.#modules.push(module);
208
- this.modulesMap[descriptor['name']] = module;
209
- const mappedName = mappingForLayoutTests.get(descriptor['name']);
210
- if (mappedName !== undefined) {
211
- this.modulesMap[mappedName] = module;
212
- }
213
- }
214
-
215
- loadModulePromise(moduleName: string): Promise<boolean> {
216
- return this.modulesMap[moduleName].loadPromise();
217
- }
218
-
219
- loadAutoStartModules(moduleNames: string[]): Promise<boolean[]> {
220
- const promises = [];
221
- for (const moduleName of moduleNames) {
222
- promises.push(this.loadModulePromise(moduleName));
223
- }
224
- return Promise.all(promises);
225
- }
226
-
227
- getModulesMap(): {[x: string]: Module} {
228
- return this.modulesMap;
229
- }
230
-
231
152
  loadLegacyModule(modulePath: string): Promise<void> {
232
153
  return import(`../../${modulePath}`);
233
154
  }
234
155
  }
235
156
 
236
- export class ModuleDescriptor {
237
- name!: string;
238
- dependencies!: string[]|undefined;
239
- modules!: string[];
240
- resources!: string[];
241
- condition!: string|undefined;
242
- experiment!: string|null;
243
- constructor() {
244
- }
245
- }
246
157
  export interface Option {
247
158
  title: string;
248
159
  value: string|boolean;
@@ -250,92 +161,6 @@ export interface Option {
250
161
  text?: string;
251
162
  }
252
163
 
253
- function computeContainingFolderName(name: string): string {
254
- if (name.includes('/')) {
255
- return name.substring(name.lastIndexOf('/') + 1, name.length);
256
- }
257
- return name;
258
- }
259
-
260
- export class Module {
261
- readonly #manager: Runtime;
262
- readonly descriptor: ModuleDescriptor;
263
- readonly #nameInternal: string;
264
- #loadedForTest: boolean;
265
- #pendingLoadPromise?: Promise<boolean>;
266
- constructor(manager: Runtime, descriptor: ModuleDescriptor) {
267
- this.#manager = manager;
268
- this.descriptor = descriptor;
269
- this.#nameInternal = descriptor.name;
270
- this.#loadedForTest = false;
271
- }
272
-
273
- name(): string {
274
- return this.#nameInternal;
275
- }
276
-
277
- enabled(): boolean {
278
- return Runtime.isDescriptorEnabled(this.descriptor);
279
- }
280
-
281
- resource(name: string): string {
282
- const fullName = this.#nameInternal + '/' + name;
283
- const content = cachedResources.get(fullName);
284
- if (!content) {
285
- throw new Error(fullName + ' not preloaded. Check module.json');
286
- }
287
- return content;
288
- }
289
-
290
- loadPromise(): Promise<boolean> {
291
- if (!this.enabled()) {
292
- return Promise.reject(new Error('Module ' + this.#nameInternal + ' is not enabled'));
293
- }
294
-
295
- if (this.#pendingLoadPromise) {
296
- return this.#pendingLoadPromise;
297
- }
298
-
299
- const dependencies = this.descriptor.dependencies;
300
- const dependencyPromises = [];
301
- for (let i = 0; dependencies && i < dependencies.length; ++i) {
302
- dependencyPromises.push(this.#manager.getModulesMap()[dependencies[i]].loadPromise());
303
- }
304
-
305
- this.#pendingLoadPromise = Promise.all(dependencyPromises).then(this.loadModules.bind(this)).then(() => {
306
- this.#loadedForTest = true;
307
- return this.#loadedForTest;
308
- });
309
-
310
- return this.#pendingLoadPromise;
311
- }
312
-
313
- private async loadModules(): Promise<void> {
314
- const containingFolderName = computeContainingFolderName(this.#nameInternal);
315
-
316
- const moduleFileName = `${containingFolderName}_module.js`;
317
- const entrypointFileName = `${containingFolderName}.js`;
318
-
319
- // If a module has resources, they are part of the `_module.js` files that are generated
320
- // by `build_release_applications`. These need to be loaded before any other code is
321
- // loaded, to make sure that the resource content is properly cached in `cachedResources`.
322
- if (this.descriptor.modules && this.descriptor.modules.includes(moduleFileName)) {
323
- await import(`../../${this.#nameInternal}/${moduleFileName}`);
324
- }
325
-
326
- await import(`../../${this.#nameInternal}/${entrypointFileName}`);
327
- }
328
-
329
- private modularizeURL(resourceName: string): string {
330
- return Runtime.normalizePath(this.#nameInternal + '/' + resourceName);
331
- }
332
-
333
- fetchResource(resourceName: string): Promise<string> {
334
- const sourceURL = getResourceURL(this.modularizeURL(resourceName));
335
- return loadResourcePromise(sourceURL);
336
- }
337
- }
338
-
339
164
  export class ExperimentsSupport {
340
165
  #experiments: Experiment[];
341
166
  #experimentNames: Set<string>;
@@ -509,37 +334,9 @@ export function loadResourcePromise(url: string): Promise<string> {
509
334
  }
510
335
  }
511
336
 
512
- function getResourceURL(scriptName: string, base?: string): string {
513
- const sourceURL = (base || importScriptPathPrefix) + scriptName;
514
- const schemaIndex = sourceURL.indexOf('://') + 3;
515
- let pathIndex = sourceURL.indexOf('/', schemaIndex);
516
- if (pathIndex === -1) {
517
- pathIndex = sourceURL.length;
518
- }
519
- return sourceURL.substring(0, pathIndex) + Runtime.normalizePath(sourceURL.substring(pathIndex));
520
- }
521
-
522
- (function(): void {
523
- const baseUrl = self.location ? self.location.origin + self.location.pathname : '';
524
- importScriptPathPrefix = baseUrl.substring(0, baseUrl.lastIndexOf('/') + 1);
525
- })();
526
-
527
337
  // This must be constructed after the query parameters have been parsed.
528
338
  export const experiments = new ExperimentsSupport();
529
339
 
530
- export const cachedResources = new Map<string, string>();
531
-
532
- // Only exported for LightHouse, which uses it in `report-generator.js`.
533
- // Do not use this global in DevTools' implementation.
534
- // TODO(crbug.com/1127292): remove this global
535
- // @ts-ignore
536
- globalThis.EXPORTED_CACHED_RESOURCES_ONLY_FOR_LIGHTHOUSE = cachedResources;
537
-
538
- export let appStartedPromiseCallback: () => void;
539
- export const appStarted = new Promise<void>(fulfill => {
540
- appStartedPromiseCallback = fulfill;
541
- });
542
-
543
340
  // TODO(crbug.com/1167717): Make this a const enum again
544
341
  // eslint-disable-next-line rulesdir/const_enum
545
342
  export enum ExperimentName {
@@ -263,24 +263,3 @@ export enum Attributes {
263
263
  Priority = 'priority',
264
264
  PartitionKey = 'partitionKey',
265
265
  }
266
-
267
- /**
268
- * A `CookieReference` uniquely identifies a cookie by the triple (#name,domain,#path). Additionally, a context may be
269
- * included to make it clear which site under Application>Cookies should be opened when revealing a `CookieReference`.
270
- */
271
- export class CookieReference {
272
- readonly #domainInternal: string;
273
- readonly #contextUrlInternal: string|undefined;
274
- constructor(_name: string, domain: string, _path: string, contextUrl: string|undefined) {
275
- this.#domainInternal = domain;
276
- this.#contextUrlInternal = contextUrl;
277
- }
278
-
279
- domain(): string {
280
- return this.#domainInternal;
281
- }
282
-
283
- contextUrl(): string|undefined {
284
- return this.#contextUrlInternal;
285
- }
286
- }
@@ -33,7 +33,7 @@
33
33
  */
34
34
 
35
35
  import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
36
- import type * as Protocol from '../../generated/protocol.js';
36
+ import * as Protocol from '../../generated/protocol.js';
37
37
 
38
38
  import type {DebuggerModel, FunctionDetails} from './DebuggerModel.js';
39
39
  import type {RuntimeModel} from './RuntimeModel.js';
@@ -62,6 +62,20 @@ export class RemoteObject {
62
62
  return remoteObject.type;
63
63
  }
64
64
 
65
+ static isNullOrUndefined(remoteObject: RemoteObject|null|undefined): boolean {
66
+ if (remoteObject === null || remoteObject === undefined) {
67
+ return true;
68
+ }
69
+ switch (remoteObject.type) {
70
+ case Protocol.Runtime.RemoteObjectType.Object:
71
+ return remoteObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Null;
72
+ case Protocol.Runtime.RemoteObjectType.Undefined:
73
+ return true;
74
+ default:
75
+ return false;
76
+ }
77
+ }
78
+
65
79
  static arrayNameFromDescription(description: string): string {
66
80
  return description.replace(_descriptionLengthParenRegex, '').replace(_descriptionLengthSquareRegex, '');
67
81
  }
@@ -73,9 +73,6 @@ SDK.ConsoleMessage.FrontendMessageSource = SDKModule.ConsoleModel.FrontendMessag
73
73
  /** @constructor */
74
74
  SDK.Cookie = SDKModule.Cookie.Cookie;
75
75
 
76
- /** @constructor */
77
- SDK.CookieReference = SDKModule.Cookie.CookieReference;
78
-
79
76
  /** @constructor */
80
77
  SDK.CookieParser = SDKModule.CookieParser.CookieParser;
81
78
 
@@ -1,7 +1,7 @@
1
- // Copyright 2021 The Chromium Authors. All rights reserved.
1
+ // Copyright 2018 The Chromium Authors. All rights reserved.
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
-
4
+ import '../shell/shell.js';
5
5
  import '../../panels/css_overview/css_overview-meta.js';
6
6
  import '../../panels/elements/elements-meta.js';
7
7
  import '../../panels/browser_debugger/browser_debugger-meta.js';
@@ -15,7 +15,6 @@ import '../../panels/developer_resources/developer_resources-meta.js';
15
15
  import '../inspector_main/inspector_main-meta.js';
16
16
  import '../../panels/application/application-meta.js';
17
17
  import '../../panels/issues/issues-meta.js';
18
- import '../../panels/help/help-meta.js';
19
18
  import '../../panels/layers/layers-meta.js';
20
19
  import '../../panels/lighthouse/lighthouse-meta.js';
21
20
  import '../../panels/media/media-meta.js';
@@ -25,3 +24,10 @@ import '../../panels/timeline/timeline-meta.js';
25
24
  import '../../panels/web_audio/web_audio-meta.js';
26
25
  import '../../panels/webauthn/webauthn-meta.js';
27
26
  import '../../panels/layer_viewer/layer_viewer-meta.js';
27
+
28
+ import * as Root from '../../core/root/root.js';
29
+ import * as Main from '../main/main.js';
30
+
31
+ // @ts-ignore Exposed for legacy layout tests
32
+ self.runtime = Root.Runtime.Runtime.instance({forceNew: true});
33
+ new Main.MainImpl.MainImpl();
@@ -909,7 +909,8 @@ export abstract class HeapSnapshot {
909
909
  return matchedStringIndexes;
910
910
  }
911
911
 
912
- const regexp = searchConfig.isRegex ? new RegExp(query) : createPlainTextSearchRegex(query, 'i');
912
+ const regexp =
913
+ searchConfig.isRegex ? new RegExp(query) : Platform.StringUtilities.createPlainTextSearchRegex(query, 'i');
913
914
 
914
915
  function filterRegexp(matchedStringIndexes: Set<number>, string: string, index: number): Set<number> {
915
916
  if (regexp.test(string)) {
@@ -1,12 +1,15 @@
1
1
  // Copyright 2018 The Chromium Authors. All rights reserved.
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
+ import '../shell/shell.js';
5
+ import '../../panels/js_profiler/js_profiler-meta.js';
4
6
 
5
7
  import * as Common from '../../core/common/common.js';
6
8
  import * as Host from '../../core/host/host.js';
7
9
  import * as i18n from '../../core/i18n/i18n.js';
8
10
  import * as SDK from '../../core/sdk/sdk.js';
9
11
  import * as Components from '../../ui/legacy/components/utils/utils.js';
12
+ import * as Main from '../main/main.js';
10
13
 
11
14
  const UIStrings = {
12
15
  /**
@@ -15,7 +18,7 @@ const UIStrings = {
15
18
  main: 'Main',
16
19
  };
17
20
 
18
- const str_ = i18n.i18n.registerUIStrings('entrypoints/js_app/JsMain.ts', UIStrings);
21
+ const str_ = i18n.i18n.registerUIStrings('entrypoints/js_app/js_app.ts', UIStrings);
19
22
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
20
23
 
21
24
  let jsMainImplInstance: JsMainImpl;
@@ -41,3 +44,4 @@ export class JsMainImpl implements Common.Runnable.Runnable {
41
44
  }
42
45
 
43
46
  Common.Runnable.registerEarlyInitializationRunnable(JsMainImpl.instance);
47
+ new Main.MainImpl.MainImpl();
@@ -139,7 +139,6 @@ export class MainImpl {
139
139
 
140
140
  private async loaded(): Promise<void> {
141
141
  console.timeStamp('Main._loaded');
142
- await Root.Runtime.appStarted;
143
142
  Root.Runtime.Runtime.setPlatform(Host.Platform.platform());
144
143
  const prefs = await new Promise<{[key: string]: string}>(resolve => {
145
144
  Host.InspectorFrontendHost.InspectorFrontendHostInstance.getPreferences(resolve);
@@ -4,7 +4,5 @@
4
4
  import '../shell/shell.js';
5
5
 
6
6
  import * as Main from '../main/main.js';
7
- import * as Startup from '../startup/startup.js';
8
7
 
9
8
  new Main.MainImpl.MainImpl();
10
- Startup.RuntimeInstantiator.startApplication('ndb_app');
@@ -73,9 +73,7 @@ UI.ViewManager.registerViewExtension({
73
73
  },
74
74
  });
75
75
 
76
- const runtimeInstance = Root.Runtime.Runtime.instance({forceNew: true, moduleDescriptors: []});
77
76
  // @ts-ignore Exposed for legacy layout tests
78
- self.runtime = runtimeInstance;
77
+ self.runtime = Root.Runtime.Runtime.instance({forceNew: true});
79
78
  Common.Runnable.registerEarlyInitializationRunnable(NodeMainImpl.instance);
80
79
  new Main.MainImpl.MainImpl();
81
- Root.Runtime.appStartedPromiseCallback();
@@ -3,9 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import '../../Images/Images.js';
6
- import '../startup/startup.js';
7
6
  import '../../core/root/root-legacy.js';
8
- import '../../core/platform/platform.js';
9
7
  import '../../core/dom_extension/dom_extension.js';
10
8
 
11
9
  import '../../panels/sources/sources-meta.js';
@@ -2,6 +2,8 @@
2
2
  # Use of this source code is governed by a BSD-style license that can be
3
3
  # found in the LICENSE file.
4
4
 
5
+ import("../visibility.gni")
6
+
5
7
  declare_args() {
6
- devtools_entrypoints_visibility = []
8
+ devtools_entrypoints_visibility = devtools_visibility
7
9
  }
@@ -5,7 +5,6 @@ import '../shell/shell.js';
5
5
  import '../../panels/browser_debugger/browser_debugger-meta.js';
6
6
  import '../../panels/developer_resources/developer_resources-meta.js';
7
7
  import '../../panels/elements/elements-meta.js';
8
- import '../../panels/help/help-meta.js';
9
8
  import '../../panels/issues/issues-meta.js';
10
9
  import '../../panels/layer_viewer/layer_viewer-meta.js';
11
10
  import '../../panels/mobile_throttling/mobile_throttling-meta.js';
@@ -17,8 +16,6 @@ import './WorkerMain.js';
17
16
  import * as Root from '../../core/root/root.js';
18
17
  import * as Main from '../main/main.js';
19
18
 
20
- const runtimeInstance = Root.Runtime.Runtime.instance({forceNew: true, moduleDescriptors: []});
21
19
  // @ts-ignore Exposed for legacy layout tests
22
- self.runtime = runtimeInstance;
20
+ self.runtime = Root.Runtime.Runtime.instance({forceNew: true});
23
21
  new Main.MainImpl.MainImpl();
24
- Root.Runtime.appStartedPromiseCallback();
@@ -270,7 +270,12 @@ export function registerCommands(inspectorBackend) {
270
270
  AttributionSourceUntrustworthyOrigin: 'AttributionSourceUntrustworthyOrigin',
271
271
  AttributionUntrustworthyOrigin: 'AttributionUntrustworthyOrigin',
272
272
  AttributionTriggerDataTooLarge: 'AttributionTriggerDataTooLarge',
273
- AttributionEventSourceTriggerDataTooLarge: 'AttributionEventSourceTriggerDataTooLarge'
273
+ AttributionEventSourceTriggerDataTooLarge: 'AttributionEventSourceTriggerDataTooLarge',
274
+ InvalidAttributionSourceExpiry: 'InvalidAttributionSourceExpiry',
275
+ InvalidAttributionSourcePriority: 'InvalidAttributionSourcePriority',
276
+ InvalidEventSourceTriggerData: 'InvalidEventSourceTriggerData',
277
+ InvalidTriggerPriority: 'InvalidTriggerPriority',
278
+ InvalidTriggerDedupKey: 'InvalidTriggerDedupKey'
274
279
  });
275
280
  inspectorBackend.registerEnum(
276
281
  'Audits.GenericIssueErrorType', {CrossOriginPortalPostMessageError: 'CrossOriginPortalPostMessageError'});
@@ -591,6 +596,8 @@ export function registerCommands(inspectorBackend) {
591
596
  inspectorBackend.registerCommand('Cast.disable', [], []);
592
597
  inspectorBackend.registerCommand(
593
598
  'Cast.setSinkToUse', [{'name': 'sinkName', 'type': 'string', 'optional': false}], []);
599
+ inspectorBackend.registerCommand(
600
+ 'Cast.startDesktopMirroring', [{'name': 'sinkName', 'type': 'string', 'optional': false}], []);
594
601
  inspectorBackend.registerCommand(
595
602
  'Cast.startTabMirroring', [{'name': 'sinkName', 'type': 'string', 'optional': false}], []);
596
603
  inspectorBackend.registerCommand('Cast.stopCasting', [{'name': 'sinkName', 'type': 'string', 'optional': false}], []);
@@ -1086,6 +1086,10 @@ export namespace ProtocolMapping {
1086
1086
  * sink via Presentation API, Remote Playback API, or Cast SDK.
1087
1087
  */
1088
1088
  'Cast.setSinkToUse': {paramsType: [Protocol.Cast.SetSinkToUseRequest]; returnType: void;};
1089
+ /**
1090
+ * Starts mirroring the desktop to the sink.
1091
+ */
1092
+ 'Cast.startDesktopMirroring': {paramsType: [Protocol.Cast.StartDesktopMirroringRequest]; returnType: void;};
1089
1093
  /**
1090
1094
  * Starts mirroring the tab to the sink.
1091
1095
  */
@@ -751,6 +751,12 @@ declare namespace ProtocolProxyApi {
751
751
  */
752
752
  invoke_setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<Protocol.ProtocolResponseWithError>;
753
753
 
754
+ /**
755
+ * Starts mirroring the desktop to the sink.
756
+ */
757
+ invoke_startDesktopMirroring(params: Protocol.Cast.StartDesktopMirroringRequest):
758
+ Promise<Protocol.ProtocolResponseWithError>;
759
+
754
760
  /**
755
761
  * Starts mirroring the tab to the sink.
756
762
  */
@@ -967,6 +967,11 @@ declare namespace Protocol {
967
967
  AttributionUntrustworthyOrigin = 'AttributionUntrustworthyOrigin',
968
968
  AttributionTriggerDataTooLarge = 'AttributionTriggerDataTooLarge',
969
969
  AttributionEventSourceTriggerDataTooLarge = 'AttributionEventSourceTriggerDataTooLarge',
970
+ InvalidAttributionSourceExpiry = 'InvalidAttributionSourceExpiry',
971
+ InvalidAttributionSourcePriority = 'InvalidAttributionSourcePriority',
972
+ InvalidEventSourceTriggerData = 'InvalidEventSourceTriggerData',
973
+ InvalidTriggerPriority = 'InvalidTriggerPriority',
974
+ InvalidTriggerDedupKey = 'InvalidTriggerDedupKey',
970
975
  }
971
976
 
972
977
  /**
@@ -2773,6 +2778,10 @@ declare namespace Protocol {
2773
2778
  sinkName: string;
2774
2779
  }
2775
2780
 
2781
+ export interface StartDesktopMirroringRequest {
2782
+ sinkName: string;
2783
+ }
2784
+
2776
2785
  export interface StartTabMirroringRequest {
2777
2786
  sinkName: string;
2778
2787
  }
@@ -1,9 +1,6 @@
1
1
  // Copyright 2020 The Chromium Authors. All rights reserved.
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
- interface StringConstructor {
5
- sprintf(format: string, ...var_arg: any): string;
6
- }
7
4
 
8
5
  interface Window {
9
6
  UI: {themeSupport: unknown}
@@ -124,7 +121,6 @@ interface Node {
124
121
 
125
122
  declare function isEnterOrSpaceKey(event: Event): boolean;
126
123
  declare function isEscKey(event: Event): boolean;
127
- declare function createPlainTextSearchRegex(query: string, flags?: string): RegExp;
128
124
  declare function onInvokeElement(element: Element, callback: (event: Event) => void): void;
129
125
 
130
126
  interface ServicePort {