用自定义弹出窗口,替换默认弹出窗口
主要是用到 CefLifeSpanHandler 接口的OnBeforePopup方法
如果BrowserHandler没有继承这个接口,需要添加上
// BrowserHandler implements CefClient and a number of other interfaces. class BrowserHandler : public nbase::SupportWeakCallback, public CefClient, public CefLifeSpanHandler, //生命期管理 public CefRenderHandler, public CefContextMenuHandler, public CefDisplayHandler, public CefDragHandler, public CefGeolocationHandler, public CefJSDialogHandler, public CefKeyboardHandler, public CefLoadHandler, public CefRequestHandler, public CefDownloadHandler, public CefDialogHandlerclass CefLifeSpanHandler : public virtual CefBase { public: typedef cef_window_open_disposition_t WindowOpenDisposition; /// // Called on the IO thread before a new popup browser is created. The // |browser| and |frame| values