Allow CoreWidgetProvider to be disposed #3524
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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