chrome-devtools-frontend 1.0.953165 → 1.0.953446
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/config/gni/devtools_grd_files.gni +1 -0
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/info-icon.svg +1 -0
- package/front_end/core/common/ParsedURL.ts +31 -0
- package/front_end/core/i18n/locales/en-US.json +45 -0
- package/front_end/core/i18n/locales/en-XL.json +45 -0
- package/front_end/core/sdk/PageResourceLoader.ts +1 -2
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +93 -15
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +2 -0
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +2 -0
- package/inspector_overlay/main.ts +2 -16
- package/package.json +1 -1
|
@@ -93,6 +93,7 @@ grd_files_release_sources = [
|
|
|
93
93
|
"front_end/Images/ic_suggest_color.svg",
|
|
94
94
|
"front_end/Images/ic_undo_16x16_icon.svg",
|
|
95
95
|
"front_end/Images/ic_warning_black_18dp.svg",
|
|
96
|
+
"front_end/Images/info-icon.svg",
|
|
96
97
|
"front_end/Images/issue-cross-icon.svg",
|
|
97
98
|
"front_end/Images/issue-exclamation-icon.svg",
|
|
98
99
|
"front_end/Images/issue-questionmark-icon.svg",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="11" height="12" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="5.5" cy="6" r="5" stroke="#202124"/><path fill="#202124" d="M5 4.5h1v5H5zM5 2.5h1v1H5z"/></svg>
|
|
@@ -110,6 +110,30 @@ export class ParsedURL {
|
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
private static preEncodeSpecialCharactersInPath(path: string): string {
|
|
114
|
+
// Based on net::FilePathToFileURL. Ideally we would handle
|
|
115
|
+
// '\\' as well on non-Windows file systems.
|
|
116
|
+
for (const specialChar of ['%', ';', '#', '?']) {
|
|
117
|
+
(path as string) = path.replaceAll(specialChar, encodeURIComponent(specialChar));
|
|
118
|
+
}
|
|
119
|
+
return path;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static rawPathToEncodedPathString(path: Platform.DevToolsPath.RawPathString):
|
|
123
|
+
Platform.DevToolsPath.EncodedPathString {
|
|
124
|
+
const partiallyEncoded = ParsedURL.preEncodeSpecialCharactersInPath(path);
|
|
125
|
+
if (path.startsWith('/')) {
|
|
126
|
+
return new URL(partiallyEncoded, 'file:///').pathname as Platform.DevToolsPath.EncodedPathString;
|
|
127
|
+
}
|
|
128
|
+
// URL prepends a '/'
|
|
129
|
+
return new URL('/' + partiallyEncoded, 'file:///').pathname.substr(1) as Platform.DevToolsPath.EncodedPathString;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static encodedPathToRawPathString(encPath: Platform.DevToolsPath.EncodedPathString):
|
|
133
|
+
Platform.DevToolsPath.RawPathString {
|
|
134
|
+
return decodeURIComponent(encPath) as Platform.DevToolsPath.RawPathString;
|
|
135
|
+
}
|
|
136
|
+
|
|
113
137
|
static rawPathToUrlString(fileSystemPath: Platform.DevToolsPath.RawPathString): Platform.DevToolsPath.UrlString {
|
|
114
138
|
let rawPath: string = fileSystemPath;
|
|
115
139
|
rawPath = rawPath.replace(/\\/g, '/');
|
|
@@ -123,6 +147,13 @@ export class ParsedURL {
|
|
|
123
147
|
return rawPath as Platform.DevToolsPath.UrlString;
|
|
124
148
|
}
|
|
125
149
|
|
|
150
|
+
static relativePathToUrlString(relativePath: string, baseURL: Platform.DevToolsPath.UrlString):
|
|
151
|
+
Platform.DevToolsPath.UrlString {
|
|
152
|
+
const preEncodedPath: string = ParsedURL.preEncodeSpecialCharactersInPath(
|
|
153
|
+
relativePath.replace(/\\/g, '/') as Platform.DevToolsPath.RawPathString);
|
|
154
|
+
return new URL(preEncodedPath, baseURL).toString() as Platform.DevToolsPath.UrlString;
|
|
155
|
+
}
|
|
156
|
+
|
|
126
157
|
static capFilePrefix(fileURL: Platform.DevToolsPath.UrlString, isWindows?: boolean):
|
|
127
158
|
Platform.DevToolsPath.RawPathString {
|
|
128
159
|
console.assert(fileURL.startsWith('file://'), 'This must be a file URL.');
|
|
@@ -2510,6 +2510,51 @@
|
|
|
2510
2510
|
"panels/application/components/BackForwardCacheStrings.ts | documentLoaded": {
|
|
2511
2511
|
"message": "The document did not finish loading before navigating away."
|
|
2512
2512
|
},
|
|
2513
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager": {
|
|
2514
|
+
"message": "App Banner was present upon navigating away."
|
|
2515
|
+
},
|
|
2516
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager": {
|
|
2517
|
+
"message": "Chrome Password Manager was present upon navigating away."
|
|
2518
|
+
},
|
|
2519
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate": {
|
|
2520
|
+
"message": "DOM distillation was in progress upon navigating away."
|
|
2521
|
+
},
|
|
2522
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource": {
|
|
2523
|
+
"message": "DOM Distiller Viewer was present upon navigating away."
|
|
2524
|
+
},
|
|
2525
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging": {
|
|
2526
|
+
"message": "Back/forward cache is disabled due to extensions using messaging API."
|
|
2527
|
+
},
|
|
2528
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort": {
|
|
2529
|
+
"message": "Extensions with long-lived connection should close the connection before entering back/forward cache."
|
|
2530
|
+
},
|
|
2531
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions": {
|
|
2532
|
+
"message": "Back/forward cache is disabled due to extensions."
|
|
2533
|
+
},
|
|
2534
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame": {
|
|
2535
|
+
"message": "Extensions with long-lived connection attempted to send messages to frames in back/forward cache."
|
|
2536
|
+
},
|
|
2537
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog": {
|
|
2538
|
+
"message": "Modal dialog such as form resubmission or http password dialog was shown for the page upon navigating away."
|
|
2539
|
+
},
|
|
2540
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage": {
|
|
2541
|
+
"message": "The offline page was shown upon navigating away."
|
|
2542
|
+
},
|
|
2543
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper": {
|
|
2544
|
+
"message": "Out-Of-Memory Intervention bar was present upon navigating away."
|
|
2545
|
+
},
|
|
2546
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager": {
|
|
2547
|
+
"message": "There were permission requests upon navigating away."
|
|
2548
|
+
},
|
|
2549
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper": {
|
|
2550
|
+
"message": "Popup blocker was present upon navigating away."
|
|
2551
|
+
},
|
|
2552
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails": {
|
|
2553
|
+
"message": "Safe Browsing details were shown upon navigating away."
|
|
2554
|
+
},
|
|
2555
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker": {
|
|
2556
|
+
"message": "Safe Browsing considered this page to be abusive and blocked popup."
|
|
2557
|
+
},
|
|
2513
2558
|
"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded": {
|
|
2514
2559
|
"message": "A service worker was activated while the page was in back/forward cache."
|
|
2515
2560
|
},
|
|
@@ -2510,6 +2510,51 @@
|
|
|
2510
2510
|
"panels/application/components/BackForwardCacheStrings.ts | documentLoaded": {
|
|
2511
2511
|
"message": "T̂h́ê d́ôćûḿêńt̂ d́îd́ n̂ót̂ f́îńîśĥ ĺôád̂ín̂ǵ b̂éf̂ór̂é n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2512
2512
|
},
|
|
2513
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager": {
|
|
2514
|
+
"message": "Âṕp̂ B́âńn̂ér̂ ẃâś p̂ŕêśêńt̂ úp̂ón̂ ńâv́îǵât́îńĝ áŵáŷ."
|
|
2515
|
+
},
|
|
2516
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager": {
|
|
2517
|
+
"message": "Ĉh́r̂óm̂é P̂áŝśŵór̂d́ M̂án̂áĝér̂ ẃâś p̂ŕêśêńt̂ úp̂ón̂ ńâv́îǵât́îńĝ áŵáŷ."
|
|
2518
|
+
},
|
|
2519
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate": {
|
|
2520
|
+
"message": "D̂ÓM̂ d́îśt̂íl̂ĺât́îón̂ ẃâś îń p̂ŕôǵr̂éŝś ûṕôń n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2521
|
+
},
|
|
2522
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource": {
|
|
2523
|
+
"message": "D̂ÓM̂ D́îśt̂íl̂ĺêŕ V̂íêẃêŕ ŵáŝ ṕr̂éŝén̂t́ ûṕôń n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2524
|
+
},
|
|
2525
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging": {
|
|
2526
|
+
"message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé îś d̂íŝáb̂ĺêd́ d̂úê t́ô éx̂t́êńŝíôńŝ úŝín̂ǵ m̂éŝśâǵîńĝ ÁP̂Í."
|
|
2527
|
+
},
|
|
2528
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort": {
|
|
2529
|
+
"message": "Êx́t̂én̂śîón̂ś ŵít̂h́ l̂ón̂ǵ-l̂ív̂éd̂ ćôńn̂éĉt́îón̂ śĥóûĺd̂ ćl̂óŝé t̂h́ê ćôńn̂éĉt́îón̂ b́êf́ôŕê én̂t́êŕîńĝ b́âćk̂/f́ôŕŵár̂d́ ĉáĉh́ê."
|
|
2530
|
+
},
|
|
2531
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions": {
|
|
2532
|
+
"message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé îś d̂íŝáb̂ĺêd́ d̂úê t́ô éx̂t́êńŝíôńŝ."
|
|
2533
|
+
},
|
|
2534
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame": {
|
|
2535
|
+
"message": "Êx́t̂én̂śîón̂ś ŵít̂h́ l̂ón̂ǵ-l̂ív̂éd̂ ćôńn̂éĉt́îón̂ át̂t́êḿp̂t́êd́ t̂ó ŝén̂d́ m̂éŝśâǵêś t̂ó f̂ŕâḿêś îń b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé."
|
|
2536
|
+
},
|
|
2537
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog": {
|
|
2538
|
+
"message": "M̂ód̂ál̂ d́îál̂óĝ śûćĥ áŝ f́ôŕm̂ ŕêśûb́m̂íŝśîón̂ ór̂ h́t̂t́p̂ ṕâśŝẃôŕd̂ d́îál̂óĝ ẃâś ŝh́ôẃn̂ f́ôŕ t̂h́ê ṕâǵê úp̂ón̂ ńâv́îǵât́îńĝ áŵáŷ."
|
|
2539
|
+
},
|
|
2540
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage": {
|
|
2541
|
+
"message": "T̂h́ê óf̂f́l̂ín̂é p̂áĝé ŵáŝ śĥóŵń ûṕôń n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2542
|
+
},
|
|
2543
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper": {
|
|
2544
|
+
"message": "Ôút̂-Óf̂-Ḿêḿôŕŷ Ín̂t́êŕv̂én̂t́îón̂ b́âŕ ŵáŝ ṕr̂éŝén̂t́ ûṕôń n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2545
|
+
},
|
|
2546
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager": {
|
|
2547
|
+
"message": "T̂h́êŕê ẃêŕê ṕêŕm̂íŝśîón̂ ŕêq́ûéŝt́ŝ úp̂ón̂ ńâv́îǵât́îńĝ áŵáŷ."
|
|
2548
|
+
},
|
|
2549
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper": {
|
|
2550
|
+
"message": "P̂óp̂úp̂ b́l̂óĉḱêŕ ŵáŝ ṕr̂éŝén̂t́ ûṕôń n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2551
|
+
},
|
|
2552
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails": {
|
|
2553
|
+
"message": "Ŝáf̂é B̂ŕôẃŝín̂ǵ d̂ét̂áîĺŝ ẃêŕê śĥóŵń ûṕôń n̂áv̂íĝát̂ín̂ǵ âẃâý."
|
|
2554
|
+
},
|
|
2555
|
+
"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker": {
|
|
2556
|
+
"message": "Ŝáf̂é B̂ŕôẃŝín̂ǵ ĉón̂śîd́êŕêd́ t̂h́îś p̂áĝé t̂ó b̂é âb́ûśîv́ê án̂d́ b̂ĺôćk̂éd̂ ṕôṕûṕ."
|
|
2557
|
+
},
|
|
2513
2558
|
"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded": {
|
|
2514
2559
|
"message": "Â śêŕv̂íĉé ŵór̂ḱêŕ ŵáŝ áĉt́îv́ât́êd́ ŵh́îĺê t́ĥé p̂áĝé ŵáŝ ín̂ b́âćk̂/f́ôŕŵár̂d́ ĉáĉh́ê."
|
|
2515
2560
|
},
|
|
@@ -219,8 +219,7 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
219
219
|
return this.#loadOverride(url);
|
|
220
220
|
}
|
|
221
221
|
const parsedURL = new Common.ParsedURL.ParsedURL(url);
|
|
222
|
-
const eligibleForLoadFromTarget =
|
|
223
|
-
getLoadThroughTargetSetting().get() && parsedURL && parsedURL.scheme !== 'file' && parsedURL.scheme !== 'data';
|
|
222
|
+
const eligibleForLoadFromTarget = getLoadThroughTargetSetting().get() && parsedURL && parsedURL.isHttpOrHttps();
|
|
224
223
|
Host.userMetrics.developerResourceScheme(this.getDeveloperResourceScheme(parsedURL));
|
|
225
224
|
if (eligibleForLoadFromTarget) {
|
|
226
225
|
try {
|
|
@@ -420,6 +420,84 @@ const UIStrings = {
|
|
|
420
420
|
* @description Description text for not restored reason ContentMediaPlay.
|
|
421
421
|
*/
|
|
422
422
|
contentMediaPlay: 'A media player was playing upon navigating away.',
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @description Description text for not restored reason EmbedderPopupBlockerTabHelper.
|
|
426
|
+
*/
|
|
427
|
+
embedderPopupBlockerTabHelper: 'Popup blocker was present upon navigating away.',
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @description Description text for not restored reason EmbedderSafeBrowsingTriggeredPopupBlocker.
|
|
431
|
+
*/
|
|
432
|
+
embedderSafeBrowsingTriggeredPopupBlocker: 'Safe Browsing considered this page to be abusive and blocked popup.',
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @description Description text for not restored reason EmbedderSafeBrowsingThreatDetails.
|
|
436
|
+
*/
|
|
437
|
+
embedderSafeBrowsingThreatDetails: 'Safe Browsing details were shown upon navigating away.',
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @description Description text for not restored reason EmbedderAppBannerManager.
|
|
441
|
+
*/
|
|
442
|
+
embedderAppBannerManager: 'App Banner was present upon navigating away.',
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* @description Description text for not restored reason EmbedderDomDistillerViewerSource.
|
|
446
|
+
*/
|
|
447
|
+
embedderDomDistillerViewerSource: 'DOM Distiller Viewer was present upon navigating away.',
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @description Description text for not restored reason EmbedderDomDistillerSelfDeletingRequestDelegate.
|
|
451
|
+
*/
|
|
452
|
+
embedderDomDistillerSelfDeletingRequestDelegate: 'DOM distillation was in progress upon navigating away.',
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @description Description text for not restored reason EmbedderOomInterventionTabHelper.
|
|
456
|
+
*/
|
|
457
|
+
embedderOomInterventionTabHelper: 'Out-Of-Memory Intervention bar was present upon navigating away.',
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* @description Description text for not restored reason EmbedderOfflinePage.
|
|
461
|
+
*/
|
|
462
|
+
embedderOfflinePage: 'The offline page was shown upon navigating away.',
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @description Description text for not restored reason EmbedderChromePasswordManagerClientBindCredentialManager.
|
|
466
|
+
*/
|
|
467
|
+
embedderChromePasswordManagerClientBindCredentialManager: 'Chrome Password Manager was present upon navigating away.',
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @description Description text for not restored reason EmbedderPermissionRequestManager.
|
|
471
|
+
*/
|
|
472
|
+
embedderPermissionRequestManager: 'There were permission requests upon navigating away.',
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* @description Description text for not restored reason EmbedderModalDialog.
|
|
476
|
+
*/
|
|
477
|
+
embedderModalDialog:
|
|
478
|
+
'Modal dialog such as form resubmission or http password dialog was shown for the page upon navigating away.',
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @description Description text for not restored reason EmbedderExtensions.
|
|
482
|
+
*/
|
|
483
|
+
embedderExtensions: 'Back/forward cache is disabled due to extensions.',
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @description Description text for not restored reason EmbedderExtensionMessaging.
|
|
487
|
+
*/
|
|
488
|
+
embedderExtensionMessaging: 'Back/forward cache is disabled due to extensions using messaging API.',
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* @description Description text for not restored reason EmbedderExtensionMessagingForOpenPort.
|
|
492
|
+
*/
|
|
493
|
+
embedderExtensionMessagingForOpenPort:
|
|
494
|
+
'Extensions with long-lived connection should close the connection before entering back/forward cache.',
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @description Description text for not restored reason EmbedderExtensionSentMessageToCachedFrame.
|
|
498
|
+
*/
|
|
499
|
+
embedderExtensionSentMessageToCachedFrame:
|
|
500
|
+
'Extensions with long-lived connection attempted to send messages to frames in back/forward cache.',
|
|
423
501
|
};
|
|
424
502
|
|
|
425
503
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheStrings.ts', UIStrings);
|
|
@@ -538,23 +616,23 @@ export const NotRestoredReasonDescription = {
|
|
|
538
616
|
'ContentMediaSessionService': {name: i18nLazyString(UIStrings.contentMediaSessionService)},
|
|
539
617
|
'ContentMediaPlay': {name: i18nLazyString(UIStrings.contentMediaPlay)},
|
|
540
618
|
'ContentScreenReader': {name: i18n.i18n.lockedLazyString('ContentScreenReader')},
|
|
541
|
-
'EmbedderPopupBlockerTabHelper': {name:
|
|
619
|
+
'EmbedderPopupBlockerTabHelper': {name: i18nLazyString(UIStrings.embedderPopupBlockerTabHelper)},
|
|
542
620
|
'EmbedderSafeBrowsingTriggeredPopupBlocker':
|
|
543
|
-
{name:
|
|
544
|
-
'EmbedderSafeBrowsingThreatDetails': {name:
|
|
545
|
-
'EmbedderAppBannerManager': {name:
|
|
546
|
-
'EmbedderDomDistillerViewerSource': {name:
|
|
621
|
+
{name: i18nLazyString(UIStrings.embedderSafeBrowsingTriggeredPopupBlocker)},
|
|
622
|
+
'EmbedderSafeBrowsingThreatDetails': {name: i18nLazyString(UIStrings.embedderSafeBrowsingThreatDetails)},
|
|
623
|
+
'EmbedderAppBannerManager': {name: i18nLazyString(UIStrings.embedderAppBannerManager)},
|
|
624
|
+
'EmbedderDomDistillerViewerSource': {name: i18nLazyString(UIStrings.embedderDomDistillerViewerSource)},
|
|
547
625
|
'EmbedderDomDistillerSelfDeletingRequestDelegate':
|
|
548
|
-
{name:
|
|
549
|
-
'EmbedderOomInterventionTabHelper': {name:
|
|
550
|
-
'EmbedderOfflinePage': {name:
|
|
626
|
+
{name: i18nLazyString(UIStrings.embedderDomDistillerSelfDeletingRequestDelegate)},
|
|
627
|
+
'EmbedderOomInterventionTabHelper': {name: i18nLazyString(UIStrings.embedderOomInterventionTabHelper)},
|
|
628
|
+
'EmbedderOfflinePage': {name: i18nLazyString(UIStrings.embedderOfflinePage)},
|
|
551
629
|
'EmbedderChromePasswordManagerClientBindCredentialManager':
|
|
552
|
-
{name:
|
|
553
|
-
'EmbedderPermissionRequestManager': {name:
|
|
554
|
-
'EmbedderModalDialog': {name:
|
|
555
|
-
'EmbedderExtensions': {name:
|
|
556
|
-
'EmbedderExtensionMessaging': {name:
|
|
557
|
-
'EmbedderExtensionMessagingForOpenPort': {name:
|
|
630
|
+
{name: i18nLazyString(UIStrings.embedderChromePasswordManagerClientBindCredentialManager)},
|
|
631
|
+
'EmbedderPermissionRequestManager': {name: i18nLazyString(UIStrings.embedderPermissionRequestManager)},
|
|
632
|
+
'EmbedderModalDialog': {name: i18nLazyString(UIStrings.embedderModalDialog)},
|
|
633
|
+
'EmbedderExtensions': {name: i18nLazyString(UIStrings.embedderExtensions)},
|
|
634
|
+
'EmbedderExtensionMessaging': {name: i18nLazyString(UIStrings.embedderExtensionMessaging)},
|
|
635
|
+
'EmbedderExtensionMessagingForOpenPort': {name: i18nLazyString(UIStrings.embedderExtensionMessagingForOpenPort)},
|
|
558
636
|
'EmbedderExtensionSentMessageToCachedFrame':
|
|
559
|
-
{name:
|
|
637
|
+
{name: i18nLazyString(UIStrings.embedderExtensionSentMessageToCachedFrame)},
|
|
560
638
|
};
|
|
@@ -80,17 +80,10 @@ type MessageLookup = {
|
|
|
80
80
|
drawingFinished: '',
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
let queue: unknown[][] = [];
|
|
84
|
-
let prevQueue: string = '';
|
|
85
|
-
|
|
86
83
|
const dispatch = <K extends keyof MessageLookup>(message: [a: K, b: MessageLookup[K]]) => {
|
|
87
84
|
const functionName = message[0];
|
|
88
85
|
if (functionName === 'setOverlay') {
|
|
89
86
|
const overlayName = message[1] as keyof Overlays;
|
|
90
|
-
// No need to swap overlays if it's the same overlay.
|
|
91
|
-
if (overlays[overlayName] === currentOverlay) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
87
|
if (currentOverlay) {
|
|
95
88
|
currentOverlay.uninstall();
|
|
96
89
|
}
|
|
@@ -104,16 +97,9 @@ const dispatch = <K extends keyof MessageLookup>(message: [a: K, b: MessageLooku
|
|
|
104
97
|
} else if (functionName === 'setPlatform') {
|
|
105
98
|
platformName = message[1];
|
|
106
99
|
} else if (functionName === 'drawingFinished') {
|
|
107
|
-
|
|
108
|
-
if (currentQueue !== prevQueue) {
|
|
109
|
-
for (const message of queue) {
|
|
110
|
-
currentOverlay.dispatch(message);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
prevQueue = currentQueue;
|
|
114
|
-
queue = [];
|
|
100
|
+
// TODO The logic needs to be added here once the backend starts sending this event.
|
|
115
101
|
} else {
|
|
116
|
-
|
|
102
|
+
currentOverlay.dispatch(message);
|
|
117
103
|
}
|
|
118
104
|
};
|
|
119
105
|
|
package/package.json
CHANGED