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>
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>