I'm using CEF views in an application that allows the user to drag a browser view from one window to another. So I need to detach the NSView created by CEF from the content view of one NSWindow and attach it to another content view. It works well on Windows, I can set the parent to the CEF browser host HWND to the window of my choice.
The problem I have on Mac is that when I try to remove CEF browser host NSView from its parent view, CEF detects that the view is no longer attached to a window and it disposes the browser is closed. When I attach the view on my new window, there is no content.
This appends when I execute
- Code: Select all
[myCEFHostView removeFromSuperView];
If I try to avoid to remove the view first from its superview, and add it to the new view directly, it crashes
- Code: Select all
[myNewContentView addSubview: myCefHostView]
Any clue ? How does Chromium Mac handles moving one tab from one window to another ?
Thanks for your help!
- François