Automatically reveal '.headers' file in sidebar

When clicking on the 'Header Overrides' link in the network panel,
this click takes the user to the Sources panel and opens an editor for
the corresponding '.headers' file. With this CL, the same file will
also be selected in the sources tree in the sidebar.

Bug: 4255549
Change-Id: I50ed62b731e342819d618ef52b8d3627e0a71f4a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4255549
Commit-Queue: Wolfgang Beyer <[email protected]>
Auto-Submit: Wolfgang Beyer <[email protected]>
Commit-Queue: Danil Somsikov <[email protected]>
Reviewed-by: Danil Somsikov <[email protected]>
diff --git a/front_end/panels/network/components/RequestHeadersView.ts b/front_end/panels/network/components/RequestHeadersView.ts
index 9c2ae4d..7567574 100644
--- a/front_end/panels/network/components/RequestHeadersView.ts
+++ b/front_end/panels/network/components/RequestHeadersView.ts
@@ -289,6 +289,7 @@
       const uiSourceCode = this.#workspace.uiSourceCodeForURL(this.#getHeaderOverridesFileUrl());
       if (uiSourceCode) {
         Sources.SourcesPanel.SourcesPanel.instance().showUISourceCode(uiSourceCode);
+        Sources.SourcesPanel.SourcesPanel.instance().revealInNavigator(uiSourceCode);
       }
     };