views: Support specification of screen bounds for CefWindow creation (fixes issue #2980)

This commit is contained in:
Marshall Greenblatt
2020-09-02 14:25:25 -04:00
parent 4aad5f23a0
commit b579b37db4
10 changed files with 129 additions and 12 deletions

View File

@ -78,6 +78,17 @@ class CefWindowDelegate : public CefPanelDelegate {
return nullptr;
}
///
// Return the initial bounds for |window| in screen coordinates. If this
// method returns an empty CefRect then GetPreferredSize() will be called to
// retrieve the size, and the window will be placed on the default screen with
// origin (0,0).
///
/*--cef()--*/
virtual CefRect GetInitialBounds(CefRefPtr<CefWindow> window) {
return CefRect();
}
///
// Return true if |window| should be created without a frame or title bar. The
// window will be resizable if CanResize() returns true. Use