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=a201b988556a825fffe39f58e378664b93795c72$
// $hash=d6a40fcd6be6297224b573ac1600701ff6818680$
//
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
@ -473,6 +473,34 @@ window_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
window_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
CefWindowDelegateCppToC::Get(reinterpret_cast<cef_window_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK window_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@ -538,6 +566,7 @@ CefWindowDelegateCppToC::CefWindowDelegateCppToC() {
GetStruct()->base.base.on_child_view_changed =
window_delegate_on_child_view_changed;
GetStruct()->base.base.on_window_changed = window_delegate_on_window_changed;
GetStruct()->base.base.on_layout_changed = window_delegate_on_layout_changed;
GetStruct()->base.base.on_focus = window_delegate_on_focus;
GetStruct()->base.base.on_blur = window_delegate_on_blur;
}