cefclient: win: Support window state restore (see issue #3359)

The cefclient sample app on Windows will persist window state across application
restart if run with cache_path and persist_user_references enabled.

To test:
1. Run `cefclient --cache-path=/path/to/cache --persist-user-preferences`
2. Move or resize the window, maximize, minimize, etc.
3. Exit cefclient.
4. Run cefclient again with the same arguments. The previous window state will
   be restored.
This commit is contained in:
Marshall Greenblatt
2022-11-07 15:21:44 -05:00
parent 882bc19fdd
commit e2a9236106
13 changed files with 310 additions and 94 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=afef323719b977c74bb86d015ad1b0f5c253c3ba$
// $hash=d171aff72ef24ed2b85182e98b2b8d609ae25ddd$
//
#include "libcef_dll/ctocpp/views/display_ctocpp.h"
@@ -136,6 +136,32 @@ CefPoint CefDisplay::ConvertScreenPointFromPixels(const CefPoint& point) {
return _retval;
}
NO_SANITIZE("cfi-icall")
CefRect CefDisplay::ConvertScreenRectToPixels(const CefRect& rect) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_rect_t _retval = cef_display_convert_screen_rect_to_pixels(&rect);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
CefRect CefDisplay::ConvertScreenRectFromPixels(const CefRect& rect) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_rect_t _retval = cef_display_convert_screen_rect_from_pixels(&rect);
// Return type: simple
return _retval;
}
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall") int64 CefDisplayCToCpp::GetID() {