mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: views: Support window state restore (see issue #3359)
The cefclient sample app will persist window state across application restart if run with views, cache_path and persist_user_references enabled. To test: 1. Run `cefclient --use-views --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:
@@ -55,6 +55,12 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowCreated(CefRefPtr<CefWindow> window) {}
|
||||
|
||||
///
|
||||
/// Called when |window| is closing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowClosing(CefRefPtr<CefWindow> window) {}
|
||||
|
||||
///
|
||||
/// Called when |window| is destroyed. Release all references to |window| and
|
||||
/// do not attempt to execute any methods on |window| after this callback
|
||||
@@ -70,6 +76,14 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
virtual void OnWindowActivationChanged(CefRefPtr<CefWindow> window,
|
||||
bool active) {}
|
||||
|
||||
///
|
||||
/// Called when |window| bounds have changed. |new_bounds| will be in DIP
|
||||
/// screen coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowBoundsChanged(CefRefPtr<CefWindow> window,
|
||||
const CefRect& new_bounds) {}
|
||||
|
||||
///
|
||||
/// Return the parent for |window| or NULL if the |window| does not have a
|
||||
/// parent. Windows with parents will not get a taskbar button. Set |is_menu|
|
||||
|
Reference in New Issue
Block a user