[go: nahoru, domu]

tree: f58985a7fbda467f50c1a47482df5991d4f0262b [path history] [tgz]
  1. accessibility/
  2. accessibility_test_runner/
  3. animation/
  4. application_test_runner/
  5. axe_core_test_runner/
  6. bindings/
  7. bindings_test_runner/
  8. browser_debugger/
  9. browser_sdk/
  10. changes/
  11. cm/
  12. cm_headless/
  13. color_picker/
  14. common/
  15. component_docs/
  16. component_helpers/
  17. components/
  18. console/
  19. console_counters/
  20. console_test_runner/
  21. cookie_table/
  22. coverage/
  23. coverage_test_runner/
  24. cpu_profiler_test_runner/
  25. css_overview/
  26. dagre_layout/
  27. data_grid/
  28. data_grid_test_runner/
  29. developer_resources/
  30. device_mode_test_runner/
  31. diff/
  32. dom_extension/
  33. elements/
  34. elements_test_runner/
  35. emulated_devices/
  36. emulation/
  37. event_listeners/
  38. extensions/
  39. extensions_test_runner/
  40. formatter/
  41. formatter_worker/
  42. generated/
  43. global_typings/
  44. har_importer/
  45. heap_profiler_test_runner/
  46. heap_snapshot_model/
  47. heap_snapshot_worker/
  48. help/
  49. host/
  50. i18n/
  51. Images/
  52. inline_editor/
  53. input/
  54. inspector_main/
  55. issues/
  56. javascript_metadata/
  57. js_main/
  58. js_profiler/
  59. langpacks/
  60. layer_viewer/
  61. layers/
  62. layers_test_runner/
  63. legacy/
  64. lighthouse/
  65. lighthouse_test_runner/
  66. lighthouse_worker/
  67. linear_memory_inspector/
  68. main/
  69. media/
  70. mobile_throttling/
  71. network/
  72. network_test_runner/
  73. node_debugger/
  74. node_main/
  75. object_ui/
  76. perf_ui/
  77. performance_monitor/
  78. performance_test_runner/
  79. persistence/
  80. platform/
  81. profiler/
  82. protocol_client/
  83. protocol_monitor/
  84. quick_open/
  85. recorder/
  86. render_coordinator/
  87. resources/
  88. root/
  89. screencast/
  90. sdk/
  91. sdk_test_runner/
  92. search/
  93. security/
  94. security_test_runner/
  95. settings/
  96. snippets/
  97. source_frame/
  98. sources/
  99. sources_test_runner/
  100. startup/
  101. test_runner/
  102. text_editor/
  103. text_utils/
  104. theme_support/
  105. third_party/
  106. timeline/
  107. timeline_model/
  108. ui/
  109. wasmparser_worker/
  110. web_audio/
  111. webauthn/
  112. worker_main/
  113. workspace/
  114. workspace_diff/
  115. .eslintrc.js
  116. BUILD.gn
  117. devtools_app.js
  118. devtools_app.json
  119. devtools_compatibility.js
  120. entrypoint_template.html
  121. inspector.js
  122. inspector.json
  123. integration_test_runner.html
  124. integration_test_runner.js
  125. integration_test_runner.json
  126. js_app.js
  127. js_app.json
  128. lighthouse_worker.js
  129. lighthouse_worker.json
  130. ndb_app.js
  131. ndb_app.json
  132. node_app.js
  133. node_app.json
  134. OWNERS
  135. README.md
  136. rollup.config.js
  137. shell.js
  138. shell.json
  139. Tests.js
  140. toolbox.ts
  141. verification.ts
  142. worker_app.js
  143. worker_app.json
front_end/README.md

Registering Extensions

Extensions can add functionality to the DevTools application. Each extension is declared up front, using declarative registration calls. The implementation for each extension lives in their respective folder, which are lazy-loaded to ensure a performant startup process of the DevTools application.

There are multiple types of extensions, including how DevTools handles its own internal business logic or to declare user-facing features with localized strings. There are 4 main types of extensions:

  • UI.ActionRegistration.Action
  • UI.View.View
  • Common.Settings.Setting
  • General type lookups.

Each specific extension is documented in the README of their respective folder.

The registration of a particular extension implemented in module must always be declared in a <module>-meta.ts in the same folder. The meta files should be included by all relevant entrypoints. If you want to make functionality available in all DevTools entrypoints, you can import it in shell.js.

For example, the meta declaration file is called network-meta.ts and defined in network/BUILD.gn:

devtools_entrypoint("meta") {
	entrypoint = "network-meta.ts"
	deps = [
		":bundle",
		"../root:bundle",
		"../ui:bundle",
	]
}

The meta devtools_entrypoint is added as a dependency to front_end/BUILD.gn.