[DevTools] Update HostConfig
documentation.
Bug: 396033932 Change-Id: Ia1562126c4182959b21d8c32d6d96e810b23f961 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6257731 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1419237}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2c67a0ad83
commit
84b3c4562e
@ -60,16 +60,8 @@ and add appropriate logic to `DevToolsUIBindings::GetHostConfig()` in
|
||||
* [chrome/browser/devtools/devtools_ui_bindings.cc](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/devtools_ui_bindings.cc)
|
||||
|
||||
to expose the feature to DevTools' front-end ([example CL](https://crrev.com/c/6084996)).
|
||||
Afterwards hook up the feature in `devtools-frontend` by updating the following files
|
||||
([example CL](https://crrev.com/c/6085435)):
|
||||
|
||||
* [front_end/core/host/InspectorFrontendHost.ts](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/core/host/InspectorFrontendHost.ts) (add default state to `getHostConfig()`)
|
||||
* [front_end/core/root/Runtime.ts](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/core/root/Runtime.ts) (add type definitions for your host config additions)
|
||||
* [front_end/testing/EnvironmentHelpers.ts](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/testing/EnvironmentHelpers.ts) (add default state for unit tests)
|
||||
|
||||
You can access the host config via `Common.Settings.Settings.instance().getHostConfig()`
|
||||
in your code and check for your feature. Refer to the [documentation][devtools-cli-docs]
|
||||
for more information.
|
||||
Afterwards hook up the feature in `devtools-frontend` by following the steps outlined
|
||||
in the [documentation][devtools-cli-docs].
|
||||
|
||||
Historically, DevTools front-end used [Experiments][devtools-experiments] to gate
|
||||
new (experimental) features, but going forward the `base::Feature` mechanism should
|
||||
|
Reference in New Issue
Block a user