yaakovschectman d7059df4eb Listen to WM_CLOSE message on Windows to allow framework to cancel exit (flutter/engine#40493)
* Intercept WM_CLOSE

* Messy but framework is in place

* Test exit and cancel

* Try to test for windows

* Check for parent HWND

* Move string to PlatformHandler class

* Rename lifecycle manageR

* Change condition for headless

* Move window proc to lambda

* Formatting and licenses

* Encode JSON dart values

* Clean up lifecycle

* PR feedback

* Update shell/platform/windows/platform_handler.h

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Update shell/platform/windows/windows_lifecycle_manager.cc

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Update shell/platform/windows/windows_lifecycle_manager.cc

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Static cast enum to int

* Formatting

* Update shell/platform/windows/testing/engine_modifier.h

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

* Update shell/platform/windows/windows_lifecycle_manager.cc

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

* Update shell/platform/windows/platform_handler.cc

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

* Update unit tests

* PR Feedback

* PR Feedback

* Constexpr

* Formatting

* Wparam

---------

Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-03-24 12:44:42 -04:00
..