* chore: bump electron@9.0.5
* remove exploration config
* fix compile error
* fix compile error
* crashReporter has to be called only once before app ready
* chore: bump electron@9.1.0
* enable LayoutNG
* fix cron schedule
* allow disabling appcenter crash reporting
* set additional crash reporting parameters
* start crashreporter for child process on linux
* setup crash parameters only once
* remove unused crashReporter.guid
* address review feedback
* reuse argv.json for storing crash reporter id
* remove trailing commas
* update localized name
* update argv based on telemetry optout
* update initial config based on setting
* fix conditional errors
* remove telemetry.enableCrashReporter
* move default crash reporter config to electron-main
* update comment for ext host crash reporting
* set default value for configuration
* some 💄 changes
* address review feedback
* do not use ES7 features in JS yet
* add app.focus({ steal: true }) usage
Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>
* Use non-deprecated API version
* Prototype: enable offline iframe based webviews on desktop
Adds a new `vscode-webview` protocol for loading the wrapper contents of a webview
Still needs cleaning up
* fix loading of electron webview
* Cleanup and add `webview.experimental.useIframes` setting
Co-authored-by: deepak1556 <hop2deep@gmail.com>
* debug: allow debugging the renderer process
This adds a new parameter to the `launchVSCode` request --
`debugRenderer`. If set to true and we're in Electron, the main process
will attempt to stand up a CDP-speaking server and respond with the port
the debugger can connect to in order to handle debug events.
Note: this only works when webviews are iframe-based. It's _possible_
to do the same treatment to webviews with greater complexity. I didn't
implement that today, and maybe we say since iframes are coming
eventually (and they can be toggled on with a user setting that we could
have in the starter...) we don't need do add handling for that.
This does not work when debugging in web because there's no way to
force the browser to enter debug mode.
Code in this PR is still rough, I will keep this in PR until
I have js-debug working end to end and iron out any kinks.
* fixup! adopt new api
* webviews: add 'purpose' flag and extension ID to iframe webview uri
The `purpose` can be used for notebooks instead of the extension ID,
since there's no extension associated with the renderer view.
The renderer URL now looks like:
```
https://<guid>.vscode-webview-test.com/<random>/index.html?id=<guid>&extensionId=&purpose=notebookRenderer
```
And a renderer is:
```
https://<guid>.vscode-webview-test.com/<random>/index.html?id=<guid>&extensionId=connor4312.vsix-viewer&purpose=undefined
```
I wanted to put this in the page title, but unfortunately this is hard
due to https://bugs.chromium.org/p/chromium/issues/detail?id=1058108.
Instead, add it to the url which _is_ available and given in
the first targetInfoChanged event.
Co-authored-by: Andre Weinand <aweinand@microsoft.com>
* Move the webview port mapping from renderer to main process
Fixes#95955
Our port mapping impl for webview currently relies on `getWebContents` to handle port mapping in the renderer process. This API has been deprecated by electron.
This change instead moves the webview port mapping handler to the main process. To make this change, I also realized that the tunnel service needed to be moved from `vs/workbench` to `vs/platform` so that we could consume it from the main process
Other changes made as part of this refactoring:
- Register all webview in a `webview` partition. This ensures that our port mapping manger only intercepts requests made inside webviews.
- Send the `webContentsId` to the main process. This is required to implement `onBeforeRequest`. Unfortunatly the referrer always seems to be undefined for these requests
- Have the tunnel service take a resolved authority instead of taking the raw authority. This was required due to the tunnel service moving to `vs/platform`
* Cleanup and adding url filter
* Move webview's use of setIgnoreMenuShortcuts to main processes
Part of #95955
Switches from calling `setIgnoreMenuShortcuts` on the renderer to calling it on the main thread
* Use channels for communication instead of ipc
* Cleanup ipc implementation
* Rename webviewMainService -> WebviewManagerService