views: mac: Fix overlay association with host CefWindow (fixes #3456)

This commit is contained in:
Marshall Greenblatt
2023-04-14 12:58:21 -04:00
parent cad2498d87
commit 17cab6d955
6 changed files with 41 additions and 26 deletions

View File

@@ -22,6 +22,7 @@ class Point;
namespace views {
class NativeWidget;
class View;
class Widget;
namespace internal {
class NativeWidgetDelegate;
@@ -152,6 +153,14 @@ views::NativeWidget* CreateNativeWidget(
CefRefPtr<CefWindow> window,
CefWindowDelegate* window_delegate);
// Called from CefOverlayViewHost::Init to associate |host_view| with |widget|.
// This is necessary for GetWindowFor() to correctly return the CefWindow
// associated with the host Widget. On Aura platforms, |host_view| is the view
// whose position in the view hierarchy determines the z-order of the widget
// relative to views with layers and views with associated NativeViews.
void SetHostView(views::Widget* widget, views::View* host_view);
views::View* GetHostView(views::Widget* widget);
} // namespace view_util
#endif // CEF_LIBCEF_BROWSER_VIEWS_VIEW_UTIL_H_