chrome-devtools-frontend 1.0.1646286 → 1.0.1649421

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 (57) hide show
  1. package/SECURITY.md +1 -1
  2. package/extension-api/ExtensionAPI.d.ts +26 -0
  3. package/front_end/core/common/Debouncer.ts +9 -1
  4. package/front_end/core/sdk/CSSMatchedStyles.ts +3 -1
  5. package/front_end/core/sdk/CSSMetadata.ts +1 -0
  6. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +65 -0
  7. package/front_end/generated/InspectorBackendCommands.ts +2 -1
  8. package/front_end/generated/SupportedCSSProperties.js +739 -21
  9. package/front_end/generated/protocol.ts +26 -0
  10. package/front_end/models/ai_assistance/AiAgent2.ts +14 -9
  11. package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -3
  12. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -0
  13. package/front_end/models/ai_assistance/agents/StorageAgent.ts +45 -0
  14. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  15. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  16. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  17. package/front_end/models/ai_assistance/skills/network.md +16 -0
  18. package/front_end/models/ai_assistance/skills/styling.md +1 -1
  19. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +118 -0
  20. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +124 -0
  21. package/front_end/models/ai_assistance/tools/Tool.ts +2 -0
  22. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +4 -0
  23. package/front_end/models/emulation/EmulatedDevices.ts +430 -12
  24. package/front_end/models/extensions/ExtensionAPI.ts +47 -21
  25. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
  26. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +40 -1
  27. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
  28. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +228 -0
  29. package/front_end/panels/ai_assistance/components/ChatMessage.ts +39 -2
  30. package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -0
  31. package/front_end/panels/application/CookieItemsView.ts +55 -6
  32. package/front_end/panels/application/DOMStorageItemsView.ts +43 -8
  33. package/front_end/panels/application/KeyValueStorageItemsView.ts +17 -9
  34. package/front_end/panels/application/WebMCPTreeElement.ts +8 -0
  35. package/front_end/panels/elements/StylePropertyTreeElement.ts +73 -16
  36. package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +9 -1
  37. package/front_end/panels/elements/StylesSidebarPane.ts +22 -8
  38. package/front_end/panels/layer_viewer/PaintProfilerView.ts +309 -182
  39. package/front_end/panels/layer_viewer/paintProfiler.css +27 -23
  40. package/front_end/panels/layers/LayerPaintProfilerView.ts +86 -29
  41. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +210 -356
  42. package/front_end/panels/sources/watchExpressionsSidebarPane.css +7 -0
  43. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +5 -5
  44. package/front_end/panels/timeline/components/NetworkTrackWidget.ts +122 -0
  45. package/front_end/panels/timeline/components/components.ts +2 -0
  46. package/front_end/panels/timeline/components/networkTrackWidget.css +31 -0
  47. package/front_end/panels/timeline/timeline.ts +2 -0
  48. package/front_end/third_party/chromium/README.chromium +1 -1
  49. package/front_end/ui/components/buttons/FloatingButton.ts +17 -2
  50. package/front_end/ui/components/buttons/floatingButton.css +2 -2
  51. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +1 -1
  52. package/front_end/ui/legacy/TextPrompt.ts +24 -18
  53. package/front_end/ui/legacy/Treeoutline.ts +31 -4
  54. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +50 -24
  55. package/front_end/ui/legacy/components/utils/Linkifier.ts +10 -0
  56. package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
  57. package/package.json +1 -1
@@ -732,6 +732,72 @@ const emulatedDevices = [
732
732
  },
733
733
  {
734
734
  'order': 15,
735
+ 'show-by-default': false,
736
+ 'title': 'iPhone 14',
737
+ 'screen': {
738
+ 'horizontal': {
739
+ 'width': 844,
740
+ 'height': 390,
741
+ },
742
+ 'device-pixel-ratio': 3,
743
+ 'vertical': {
744
+ 'width': 390,
745
+ 'height': 844,
746
+ },
747
+ },
748
+ 'capabilities': ['touch', 'mobile'],
749
+ 'user-agent':
750
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
751
+ 'user-agent-metadata':
752
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
753
+ 'type': 'phone',
754
+ },
755
+ {
756
+ 'order': 16,
757
+ 'show-by-default': false,
758
+ 'title': 'iPhone 14 Plus',
759
+ 'screen': {
760
+ 'horizontal': {
761
+ 'width': 926,
762
+ 'height': 428,
763
+ },
764
+ 'device-pixel-ratio': 3,
765
+ 'vertical': {
766
+ 'width': 428,
767
+ 'height': 926,
768
+ },
769
+ },
770
+ 'capabilities': ['touch', 'mobile'],
771
+ 'user-agent':
772
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
773
+ 'user-agent-metadata':
774
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
775
+ 'type': 'phone',
776
+ },
777
+ {
778
+ 'order': 17,
779
+ 'show-by-default': false,
780
+ 'title': 'iPhone 14 Pro',
781
+ 'screen': {
782
+ 'horizontal': {
783
+ 'width': 852,
784
+ 'height': 393,
785
+ },
786
+ 'device-pixel-ratio': 3,
787
+ 'vertical': {
788
+ 'width': 393,
789
+ 'height': 852,
790
+ },
791
+ },
792
+ 'capabilities': ['touch', 'mobile'],
793
+ 'user-agent':
794
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
795
+ 'user-agent-metadata':
796
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
797
+ 'type': 'phone',
798
+ },
799
+ {
800
+ 'order': 18,
735
801
  'show-by-default': true,
736
802
  'title': 'iPhone 14 Pro Max',
737
803
  'screen': {
@@ -753,7 +819,205 @@ const emulatedDevices = [
753
819
  'type': 'phone',
754
820
  },
755
821
  {
756
- 'order': 16,
822
+ 'order': 19,
823
+ 'show-by-default': false,
824
+ 'title': 'iPhone 15',
825
+ 'screen': {
826
+ 'horizontal': {
827
+ 'width': 852,
828
+ 'height': 393,
829
+ },
830
+ 'device-pixel-ratio': 3,
831
+ 'vertical': {
832
+ 'width': 393,
833
+ 'height': 852,
834
+ },
835
+ },
836
+ 'capabilities': ['touch', 'mobile'],
837
+ 'user-agent':
838
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
839
+ 'user-agent-metadata':
840
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
841
+ 'type': 'phone',
842
+ },
843
+ {
844
+ 'order': 20,
845
+ 'show-by-default': false,
846
+ 'title': 'iPhone 15 Plus',
847
+ 'screen': {
848
+ 'horizontal': {
849
+ 'width': 932,
850
+ 'height': 430,
851
+ },
852
+ 'device-pixel-ratio': 3,
853
+ 'vertical': {
854
+ 'width': 430,
855
+ 'height': 932,
856
+ },
857
+ },
858
+ 'capabilities': ['touch', 'mobile'],
859
+ 'user-agent':
860
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
861
+ 'user-agent-metadata':
862
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
863
+ 'type': 'phone',
864
+ },
865
+ {
866
+ 'order': 21,
867
+ 'show-by-default': false,
868
+ 'title': 'iPhone 15 Pro',
869
+ 'screen': {
870
+ 'horizontal': {
871
+ 'width': 852,
872
+ 'height': 393,
873
+ },
874
+ 'device-pixel-ratio': 3,
875
+ 'vertical': {
876
+ 'width': 393,
877
+ 'height': 852,
878
+ },
879
+ },
880
+ 'capabilities': ['touch', 'mobile'],
881
+ 'user-agent':
882
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
883
+ 'user-agent-metadata':
884
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
885
+ 'type': 'phone',
886
+ },
887
+ {
888
+ 'order': 22,
889
+ 'show-by-default': true,
890
+ 'title': 'iPhone 15 Pro Max',
891
+ 'screen': {
892
+ 'horizontal': {
893
+ 'width': 932,
894
+ 'height': 430,
895
+ },
896
+ 'device-pixel-ratio': 3,
897
+ 'vertical': {
898
+ 'width': 430,
899
+ 'height': 932,
900
+ },
901
+ },
902
+ 'capabilities': ['touch', 'mobile'],
903
+ 'user-agent':
904
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
905
+ 'user-agent-metadata':
906
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
907
+ 'type': 'phone',
908
+ },
909
+ {
910
+ 'order': 23,
911
+ 'show-by-default': false,
912
+ 'title': 'iPhone 16e',
913
+ 'screen': {
914
+ 'horizontal': {
915
+ 'width': 844,
916
+ 'height': 390,
917
+ },
918
+ 'device-pixel-ratio': 3,
919
+ 'vertical': {
920
+ 'width': 390,
921
+ 'height': 844,
922
+ },
923
+ },
924
+ 'capabilities': ['touch', 'mobile'],
925
+ 'user-agent':
926
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
927
+ 'user-agent-metadata':
928
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
929
+ 'type': 'phone',
930
+ },
931
+ {
932
+ 'order': 24,
933
+ 'show-by-default': false,
934
+ 'title': 'iPhone 16',
935
+ 'screen': {
936
+ 'horizontal': {
937
+ 'width': 852,
938
+ 'height': 393,
939
+ },
940
+ 'device-pixel-ratio': 3,
941
+ 'vertical': {
942
+ 'width': 393,
943
+ 'height': 852,
944
+ },
945
+ },
946
+ 'capabilities': ['touch', 'mobile'],
947
+ 'user-agent':
948
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
949
+ 'user-agent-metadata':
950
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
951
+ 'type': 'phone',
952
+ },
953
+ {
954
+ 'order': 25,
955
+ 'show-by-default': false,
956
+ 'title': 'iPhone 16 Plus',
957
+ 'screen': {
958
+ 'horizontal': {
959
+ 'width': 932,
960
+ 'height': 430,
961
+ },
962
+ 'device-pixel-ratio': 3,
963
+ 'vertical': {
964
+ 'width': 430,
965
+ 'height': 932,
966
+ },
967
+ },
968
+ 'capabilities': ['touch', 'mobile'],
969
+ 'user-agent':
970
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
971
+ 'user-agent-metadata':
972
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
973
+ 'type': 'phone',
974
+ },
975
+ {
976
+ 'order': 26,
977
+ 'show-by-default': false,
978
+ 'title': 'iPhone 16 Pro',
979
+ 'screen': {
980
+ 'horizontal': {
981
+ 'width': 874,
982
+ 'height': 402,
983
+ },
984
+ 'device-pixel-ratio': 3,
985
+ 'vertical': {
986
+ 'width': 402,
987
+ 'height': 874,
988
+ },
989
+ },
990
+ 'capabilities': ['touch', 'mobile'],
991
+ 'user-agent':
992
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
993
+ 'user-agent-metadata':
994
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
995
+ 'type': 'phone',
996
+ },
997
+ {
998
+ 'order': 27,
999
+ 'show-by-default': true,
1000
+ 'title': 'iPhone 16 Pro Max',
1001
+ 'screen': {
1002
+ 'horizontal': {
1003
+ 'width': 956,
1004
+ 'height': 440,
1005
+ },
1006
+ 'device-pixel-ratio': 3,
1007
+ 'vertical': {
1008
+ 'width': 440,
1009
+ 'height': 956,
1010
+ },
1011
+ },
1012
+ 'capabilities': ['touch', 'mobile'],
1013
+ 'user-agent':
1014
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
1015
+ 'user-agent-metadata':
1016
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
1017
+ 'type': 'phone',
1018
+ },
1019
+ {
1020
+ 'order': 28,
757
1021
  'show-by-default': false,
758
1022
  'title': 'Pixel 3 XL',
759
1023
  'screen': {
@@ -775,7 +1039,7 @@ const emulatedDevices = [
775
1039
  'type': 'phone',
776
1040
  },
777
1041
  {
778
- 'order': 18,
1042
+ 'order': 30,
779
1043
  'show-by-default': true,
780
1044
  'title': 'Pixel 7',
781
1045
  'screen': {
@@ -797,7 +1061,161 @@ const emulatedDevices = [
797
1061
  'type': 'phone',
798
1062
  },
799
1063
  {
800
- 'order': 20,
1064
+ 'order': 31,
1065
+ 'show-by-default': true,
1066
+ 'title': 'Pixel 8',
1067
+ 'screen': {
1068
+ 'horizontal': {
1069
+ 'width': 915,
1070
+ 'height': 412,
1071
+ },
1072
+ 'device-pixel-ratio': 2.625,
1073
+ 'vertical': {
1074
+ 'width': 412,
1075
+ 'height': 915,
1076
+ },
1077
+ },
1078
+ 'capabilities': ['touch', 'mobile'],
1079
+ 'user-agent':
1080
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1081
+ 'user-agent-metadata':
1082
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 8', 'mobile': true},
1083
+ 'type': 'phone',
1084
+ },
1085
+ {
1086
+ 'order': 32,
1087
+ 'show-by-default': false,
1088
+ 'title': 'Pixel 8 Pro',
1089
+ 'screen': {
1090
+ 'horizontal': {
1091
+ 'width': 997,
1092
+ 'height': 448,
1093
+ },
1094
+ 'device-pixel-ratio': 3,
1095
+ 'vertical': {
1096
+ 'width': 448,
1097
+ 'height': 997,
1098
+ },
1099
+ },
1100
+ 'capabilities': ['touch', 'mobile'],
1101
+ 'user-agent':
1102
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1103
+ 'user-agent-metadata':
1104
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 8 Pro', 'mobile': true},
1105
+ 'type': 'phone',
1106
+ },
1107
+ {
1108
+ 'order': 33,
1109
+ 'show-by-default': false,
1110
+ 'title': 'Pixel 8a',
1111
+ 'screen': {
1112
+ 'horizontal': {
1113
+ 'width': 915,
1114
+ 'height': 412,
1115
+ },
1116
+ 'device-pixel-ratio': 2.625,
1117
+ 'vertical': {
1118
+ 'width': 412,
1119
+ 'height': 915,
1120
+ },
1121
+ },
1122
+ 'capabilities': ['touch', 'mobile'],
1123
+ 'user-agent':
1124
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 8a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1125
+ 'user-agent-metadata':
1126
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 8a', 'mobile': true},
1127
+ 'type': 'phone',
1128
+ },
1129
+ {
1130
+ 'order': 34,
1131
+ 'show-by-default': true,
1132
+ 'title': 'Pixel 9',
1133
+ 'screen': {
1134
+ 'horizontal': {
1135
+ 'width': 924,
1136
+ 'height': 412,
1137
+ },
1138
+ 'device-pixel-ratio': 2.625,
1139
+ 'vertical': {
1140
+ 'width': 412,
1141
+ 'height': 924,
1142
+ },
1143
+ },
1144
+ 'capabilities': ['touch', 'mobile'],
1145
+ 'user-agent':
1146
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1147
+ 'user-agent-metadata':
1148
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 9', 'mobile': true},
1149
+ 'type': 'phone',
1150
+ },
1151
+ {
1152
+ 'order': 35,
1153
+ 'show-by-default': false,
1154
+ 'title': 'Pixel 9 Pro',
1155
+ 'screen': {
1156
+ 'horizontal': {
1157
+ 'width': 952,
1158
+ 'height': 427,
1159
+ },
1160
+ 'device-pixel-ratio': 3,
1161
+ 'vertical': {
1162
+ 'width': 427,
1163
+ 'height': 952,
1164
+ },
1165
+ },
1166
+ 'capabilities': ['touch', 'mobile'],
1167
+ 'user-agent':
1168
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1169
+ 'user-agent-metadata':
1170
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 9 Pro', 'mobile': true},
1171
+ 'type': 'phone',
1172
+ },
1173
+ {
1174
+ 'order': 36,
1175
+ 'show-by-default': false,
1176
+ 'title': 'Pixel 9 Pro XL',
1177
+ 'screen': {
1178
+ 'horizontal': {
1179
+ 'width': 997,
1180
+ 'height': 448,
1181
+ },
1182
+ 'device-pixel-ratio': 3,
1183
+ 'vertical': {
1184
+ 'width': 448,
1185
+ 'height': 997,
1186
+ },
1187
+ },
1188
+ 'capabilities': ['touch', 'mobile'],
1189
+ 'user-agent':
1190
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1191
+ 'user-agent-metadata':
1192
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 9 Pro XL', 'mobile': true},
1193
+ 'type': 'phone',
1194
+ },
1195
+ {
1196
+ 'order': 37,
1197
+ 'show-by-default': true,
1198
+ 'title': 'Pixel 10',
1199
+ 'screen': {
1200
+ 'horizontal': {
1201
+ 'width': 924,
1202
+ 'height': 412,
1203
+ },
1204
+ 'device-pixel-ratio': 2.625,
1205
+ 'vertical': {
1206
+ 'width': 412,
1207
+ 'height': 924,
1208
+ },
1209
+ },
1210
+ 'capabilities': ['touch', 'mobile'],
1211
+ 'user-agent':
1212
+ 'Mozilla/5.0 (Linux; Android 16; Pixel 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1213
+ 'user-agent-metadata':
1214
+ {'platform': 'Android', 'platformVersion': '16', 'architecture': '', 'model': 'Pixel 10', 'mobile': true},
1215
+ 'type': 'phone',
1216
+ },
1217
+ {
1218
+ 'order': 38,
801
1219
  'show-by-default': true,
802
1220
  'title': 'Samsung Galaxy S8+',
803
1221
  'screen': {
@@ -819,7 +1237,7 @@ const emulatedDevices = [
819
1237
  'type': 'phone',
820
1238
  },
821
1239
  {
822
- 'order': 24,
1240
+ 'order': 39,
823
1241
  'show-by-default': true,
824
1242
  'title': 'Samsung Galaxy S20 Ultra',
825
1243
  'screen': {
@@ -841,7 +1259,7 @@ const emulatedDevices = [
841
1259
  'type': 'phone',
842
1260
  },
843
1261
  {
844
- 'order': 26,
1262
+ 'order': 40,
845
1263
  'show-by-default': true,
846
1264
  'title': 'iPad Mini',
847
1265
  'screen': {
@@ -863,7 +1281,7 @@ const emulatedDevices = [
863
1281
  'type': 'tablet',
864
1282
  },
865
1283
  {
866
- 'order': 28,
1284
+ 'order': 41,
867
1285
  'show-by-default': true,
868
1286
  'title': 'iPad Air',
869
1287
  'screen': {
@@ -885,7 +1303,7 @@ const emulatedDevices = [
885
1303
  'type': 'tablet',
886
1304
  },
887
1305
  {
888
- 'order': 29,
1306
+ 'order': 42,
889
1307
  'show-by-default': true,
890
1308
  'title': 'iPad Pro',
891
1309
  'screen': {
@@ -907,7 +1325,7 @@ const emulatedDevices = [
907
1325
  'type': 'tablet',
908
1326
  },
909
1327
  {
910
- 'order': 30,
1328
+ 'order': 43,
911
1329
  'show-by-default': true,
912
1330
  'title': 'Surface Pro 7',
913
1331
  'screen': {
@@ -927,7 +1345,7 @@ const emulatedDevices = [
927
1345
  'type': 'tablet',
928
1346
  },
929
1347
  {
930
- 'order': 32,
1348
+ 'order': 44,
931
1349
  'show-by-default': true,
932
1350
  'dual-screen': true,
933
1351
  'title': 'Surface Duo',
@@ -964,7 +1382,7 @@ const emulatedDevices = [
964
1382
  ],
965
1383
  },
966
1384
  {
967
- 'order': 34,
1385
+ 'order': 46,
968
1386
  'show-by-default': true,
969
1387
  'foldable-screen': true,
970
1388
  'title': 'Galaxy Z Fold 5',
@@ -1015,7 +1433,7 @@ const emulatedDevices = [
1015
1433
  ],
1016
1434
  },
1017
1435
  {
1018
- 'order': 35,
1436
+ 'order': 47,
1019
1437
  'show-by-default': true,
1020
1438
  'foldable-screen': true,
1021
1439
  'title': 'Asus Zenbook Fold',
@@ -1070,7 +1488,7 @@ const emulatedDevices = [
1070
1488
  ],
1071
1489
  },
1072
1490
  {
1073
- 'order': 36,
1491
+ 'order': 48,
1074
1492
  'show-by-default': true,
1075
1493
  'title': 'Samsung Galaxy A51/71',
1076
1494
  'screen': {
@@ -607,19 +607,29 @@ self.injectedExtensionAPI = function(
607
607
  }
608
608
 
609
609
  (Network.prototype as Pick<APIImpl.Network, 'getHAR'|'addRequestHeaders'>) = {
610
- getHAR: function(this: PublicAPI.Chrome.DevTools.Network, callback?: (harLog: Object) => unknown): void {
611
- function callbackWrapper(response: unknown): void {
612
- const result =
613
- response as ({entries: Array<HAR.Log.EntryDTO&{__proto__?: APIImpl.Request, _requestId?: number}>});
614
- const entries = (result?.entries) || [];
615
- for (let i = 0; i < entries.length; ++i) {
616
- entries[i].__proto__ = new (Constructor(Request))(entries[i]._requestId as number);
617
- delete entries[i]._requestId;
618
- }
619
- callback?.(result);
620
- }
621
- extensionServer.sendRequest({command: PrivateAPI.Commands.GetHAR}, callback && callbackWrapper);
622
- },
610
+ getHAR: function(this: PublicAPI.Chrome.DevTools.Network, _callback?: (harLog: object) => unknown): Promise<object>|
611
+ void {
612
+ const {callback: callbackArg, promise, resolve, reject} = callbackOrPromise<object>(arguments);
613
+
614
+ function callbackWrapper(response: unknown): void {
615
+ if (checkErrorAndReject(response, reject)) {
616
+ return;
617
+ }
618
+
619
+ const result =
620
+ response as ({entries: Array<HAR.Log.EntryDTO&{__proto__?: APIImpl.Request, _requestId?: number}>});
621
+ const entries = (result?.entries) || [];
622
+ for (let i = 0; i < entries.length; ++i) {
623
+ entries[i].__proto__ = new (Constructor(Request))(entries[i]._requestId as number);
624
+ delete entries[i]._requestId;
625
+ }
626
+ resolve?.(result);
627
+ callbackArg?.(result);
628
+ }
629
+ extensionServer.sendRequest({command: PrivateAPI.Commands.GetHAR}, callbackWrapper);
630
+
631
+ return promise;
632
+ } as PublicAPI.Chrome.DevTools.Network['getHAR'],
623
633
 
624
634
  addRequestHeaders: function(headers: Record<string, string>): void {
625
635
  extensionServer.sendRequest(
@@ -631,15 +641,31 @@ self.injectedExtensionAPI = function(
631
641
  this._id = id;
632
642
  }
633
643
 
644
+ interface GetContentPromiseSignature {
645
+ content: string;
646
+ encoding: string;
647
+ }
648
+ type GetContentCallbackSignature = [content: string, encoding: string];
634
649
  (RequestImpl.prototype as Pick<APIImpl.Request, 'getContent'>) = {
635
- getContent: function(this: APIImpl.Request, callback?: (content: string, encoding: string) => unknown): void {
636
- function callbackWrapper(response: unknown): void {
637
- const {content, encoding} = response as {content: string, encoding: string};
638
- callback?.(content, encoding);
639
- }
640
- extensionServer.sendRequest(
641
- {command: PrivateAPI.Commands.GetRequestContent, id: this._id}, callback && callbackWrapper);
642
- },
650
+ getContent: function(this: APIImpl.Request, _callback?: (...args: GetContentCallbackSignature) => unknown):
651
+ Promise<GetContentPromiseSignature>|
652
+ void {
653
+ const {callback: callbackArg, promise, resolve, reject} =
654
+ callbackOrPromise<GetContentPromiseSignature, GetContentCallbackSignature>(arguments);
655
+
656
+ function callbackWrapper(response: unknown): void {
657
+ if (checkErrorAndReject(response, reject)) {
658
+ return;
659
+ }
660
+
661
+ const {content, encoding} = response as {content: string, encoding: string};
662
+ resolve?.({content, encoding});
663
+ callbackArg?.(content, encoding);
664
+ }
665
+ extensionServer.sendRequest({command: PrivateAPI.Commands.GetRequestContent, id: this._id}, callbackWrapper);
666
+
667
+ return promise;
668
+ } as PublicAPI.Chrome.DevTools.Request['getContent'],
643
669
  };
644
670
 
645
671
  function Panels(this: APIImpl.Panels): void {
@@ -6975,7 +6975,7 @@ export const NativeFunctions = [
6975
6975
  },
6976
6976
  {
6977
6977
  name: "install",
6978
- signatures: [["?install_url","?manifest_id"]],
6978
+ signatures: [["?install_url","?manifest_id"],["params"]],
6979
6979
  receivers: ["Navigator"]
6980
6980
  },
6981
6981
  {
@@ -8398,6 +8398,10 @@ export const NativeFunctions = [
8398
8398
  name: "Profiler",
8399
8399
  signatures: [["options"]]
8400
8400
  },
8401
+ {
8402
+ name: "getPathData",
8403
+ signatures: [["?settings"]]
8404
+ },
8401
8405
  {
8402
8406
  name: "ByteLengthQueuingStrategy",
8403
8407
  signatures: [["init"]]