-
Notifications
You must be signed in to change notification settings - Fork 44
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
Extracts the process handling out of the splash controller #233
Conversation
Like GUI ones, notifying when the process exit.
Leaving only the window management.
e2646d5
to
baa922a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy
in the new code
clang-format
found formatting issues in the code submitted.:warning:
Make sure to run clang-format and update this pull request.
(1/1)
DistroLauncher-Tests/DistroLauncher-Tests/ChildProcessTests.cpp
Outdated
Show resolved
Hide resolved
DistroLauncher-Tests/DistroLauncher-Tests/DistroLauncher-Tests.vcxproj
Outdated
Show resolved
Hide resolved
Requesting changes only for the typo 😄. The others are more debatable. |
Removed the using declaration in the namespace scope on ChildProcess. SplashController now accepts the ProcessAPI type parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that my "Abstract" and "Usage" comments have become a thing 😄
The splash controller is made of a state machine and a strategy class full of static functions to encapsulate the Win32 API's with the duty of starting and controlling the slide show application. There are a few premises related to its job:
It's quite easy to predict that the behavior of that class could be a nightmare of if-elses. That's why the state machine design.
Yet, the strategy class that feeds the controller with the Win32 capabilities is doing too much: controlling the application process and the application window. When porting the OOBE to Windows, most of the process handling behavior would be duplicated, but the window control would not, thus splitting those duties in two different components allows for an easier migration to the new OOBE while not breaking the current behavior (required for the upcoming point release).
So, this PR extracts the process creation, termination and spurious termination notification out of the splash controller component. Also, the splash controller is updated to reflect the changes in such a way that user won't notice any difference in the application behavior.