Allow CoreWidgetProvider to be disposed by krschau · Pull Request #3524 · microsoft/devhome (original) (raw)

Summary of the pull request

When Dev Home's ExtensionService starts an extension process, it keeps a reference around so that when Dev Home is closed, it can signal to the extension that it can stop. Previously, we have relied on the WidgetService to start the CoreWidgetProvider process. Since it implements no other Dev Home provider, nowhere inside Dev Home was starting it, so we had no way to signal it to stop and it would continue running.

This change starts the CoreWidgetProvider as a Dev Home extension when a core widget it put on the Dashboard (either via Add Widget or having been pinned during a previous run). The WidgetExtensionService is a new service that handles this. Now it can be signaled to stop and does when Dev Home closes.

Core Widgets can still be used in the Windows Widget Board, the WidgetService can still start the process when needed there.

Detailed description of the pull request / Additional comments

Additional changes:

Validation steps performed

Validated locally using Dev and Canary core widgets.

PR checklist