views: Add support for absolute positioned overlay views.

To test:
Run `cefclient.exe --use-views --hide-frame --hide-controls`
Add `--enable-chrome-runtime` for the same behavior using the Chrome location
bar instead of a text field.
This commit is contained in:
Marshall Greenblatt
2021-08-27 21:55:15 -04:00
parent 6f6072b857
commit 4a44e16a09
96 changed files with 3875 additions and 230 deletions

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=dd29f2990766a766a27dece7e39501eb11a296fd$
// $hash=d212d26c4fdb8c0b24a9f1ea12d0a402b8466995$
//
#include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h"
@ -193,6 +193,34 @@ panel_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
panel_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK panel_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@ -245,6 +273,7 @@ CefPanelDelegateCppToC::CefPanelDelegateCppToC() {
GetStruct()->base.on_child_view_changed =
panel_delegate_on_child_view_changed;
GetStruct()->base.on_window_changed = panel_delegate_on_window_changed;
GetStruct()->base.on_layout_changed = panel_delegate_on_layout_changed;
GetStruct()->base.on_focus = panel_delegate_on_focus;
GetStruct()->base.on_blur = panel_delegate_on_blur;
}