mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
views: mac: Fix overlay association with host CefWindow (fixes #3456)
This commit is contained in:
@@ -20,11 +20,6 @@
|
||||
#include "ui/display/win/screen_win.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA)
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/views/view_constants_aura.h"
|
||||
#endif
|
||||
|
||||
namespace view_util {
|
||||
|
||||
namespace {
|
||||
@@ -169,17 +164,12 @@ void ResumeOwnership(CefRefPtr<CefView> view) {
|
||||
CefRefPtr<CefWindow> GetWindowFor(views::Widget* widget) {
|
||||
CefRefPtr<CefWindow> window;
|
||||
|
||||
#if defined(USE_AURA)
|
||||
// Retrieve the parent Widget for an overlay.
|
||||
// If |widget| is an overlay, retrieve the host Widget.
|
||||
if (widget) {
|
||||
// See matching logic in CefOverlayViewHost::Init.
|
||||
auto widget_view =
|
||||
widget->GetNativeView()->GetProperty(views::kHostViewKey);
|
||||
if (widget_view) {
|
||||
if (auto widget_view = GetHostView(widget)) {
|
||||
widget = widget_view->GetWidget();
|
||||
}
|
||||
}
|
||||
#endif // defined(USE_AURA)
|
||||
|
||||
if (widget) {
|
||||
// The views::WidgetDelegate should be a CefWindowView and |content_view|
|
||||
|
Reference in New Issue
Block a user