Loïc Sharma 729dd91430 [Windows] Refactor window destroyed app lifecycle event (flutter/engine#50565)
Improves Windows's lifecycle event for window destruction:

1. Made `FlutterWindowsView` generate the "window hidden" event when the HWND is destroyed instead of the `FlutterWindow`.
    1. Before the window would submit this event using a destroyed view:
        1. The `FlutterWindowsView` destructor runs to completion.
        2. The view owns the window, so the `FlutterWindow` is destroyed
        3. The window's destructor generates a "window hidden" event
        4. The window uses the destroyed view to notify the engine of the event
2. Adds an app lifecycle integration test to verify the `resumed` and `hidden` events are sent when an app is launched and closed.
3. Removed the `FlutterWindowTest` type as it was unused

Prepares for https://github.com/flutter/flutter/issues/137267

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-02-13 22:35:42 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%