Commit Graph
6 Commits
Author SHA1 Message Date
Paul Lewis ada689f4f7 Add API to notify extensions on theme change
We recently changed the behavior of DevTools such that it doesn't reload
when the theme changes. However, during instantiation an extension
receives the current theme name under chrome.devtools.panels.themeName.
Given the above, when the theme changes, the themeName value is stale,
and the extension has no way of knowing that the theme has changed.

This CL introduces a new hook for extensions, setThemeChangeHandler,
which follows the same pattern as setOpenResourceHandler. This allows an
extension developer to register a callback for when the theme changes.
The chrome.devtools.panels.themeName is automatically updated, and the
callback also receives the theme name as its parameter.

Bug: 1285420
Change-Id: I52aa813d7d7b327ad6bfe8ca99fa9d578662b417
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3380591
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2022-01-11 13:21:55 +00:00
Tim van der Lippe 269e9ae3eb Replace any in return values for void
This applies the following regex to the codebase:

=> any

and replaces it with

=> void

All obsolete typescript-eslint disable rules have been removed as well.

R=szuend@chromium.org

Bug: 1172300
Change-Id: I98dc2153f539c68853ed4e9cba8503a4b69763ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3338347
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
2021-12-14 14:27:48 +00:00
Philip Pfaffe 140e54340d [extensions] Add a columnNumber argument to panels.openResource
chrome.devtools.panels.openResource is an extension API that causes a
page resource to be opened in the sources panel at a given line. For
wasm, though, line numbers are meaningless. Across DevTools, wasm module
offsets are encoded as column numbers. This CL adds a column number to
the openResource API.

Fixed: 1234438
Change-Id: I141ea0cdb10e211d9cdb8bbab0fc994597ddb5a6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3063505
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-14 05:24:00 +00:00
Philip Pfaffe 11e43681c0 [extensions] Replace getter with readonly property in interface
Bug: none
Change-Id: I3803e8d2ebfd5b98f33ff42530de95331fb3d0b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3059611
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-29 12:32:37 +00:00
Philip Pfaffe 1e2a371b61 [language extensions] Use extension-api typedefs
This CL removes the remaining duplicates of the langauge extension api
type declarations, and uses the extension-api in their place.

Drive-by: Add an enumerators field to the API.

Bug: none
Change-Id: Ic71871aa0364eb715fa90ab5cc1becf5a43cb9e9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3045353
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-07-23 10:37:22 +00:00
Philip Pfaffe 5df6626235 [ts] ExtensionAPI: Add public extension api typedefs
This change adds typedefs for the public extension API that can be
imported both by the front_end as well as the e2e tests.

Bug: 1219420
Change-Id: I4cde713d167bec0ce3acbe5187f9914b3223e666
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2963825
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-19 15:25:40 +00:00