Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CoreWidgetProvider to be disposed #3524

Merged
merged 6 commits into from
Aug 5, 2024

Conversation

krschau
Copy link
Collaborator

@krschau krschau commented Jul 31, 2024

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:

  • In ExtensionService, removed an unused method, made a method that was only used locally private, and added a new method that returns an ExtensionWrapper given an extension's unique ID
  • In ExtensionWrapper, if we get a bad HRESULT throw it right away instead of trying to use the bad object.
  • ExtensionLibraryViewModel had a method with the same name as one from the ExtensionService. Changed the name of the method in ExtensionLibraryViewModel just to keep things more separate.

Validation steps performed

Validated locally using Dev and Canary core widgets.

PR checklist

@krschau krschau merged commit 4e39d43 into main Aug 5, 2024
4 checks passed
@krschau krschau deleted the user/krschau/start-core-extension branch August 9, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closing dev home does not terminate the dev home process
3 participants