void OSRWindow::OnBeforeClose(CefRefPtr<CefBrowser> browser) { // Disconnect all signal handlers that reference |this|. g_signal_handlers_disconnect_matched(glarea_, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, this); DisableGL(); }
NPError NPP_DestroyImpl(NPP instance, NPSavedData** save) { ClientPlugin* plugin = reinterpret_cast<ClientPlugin*>(instance->pdata); if (plugin) { if (plugin->hWnd) { DestroyWindow(plugin->hWnd); DisableGL(plugin->hWnd, plugin->hDC, plugin->hRC); } delete plugin; } return NPERR_NO_ERROR; }
NPError NPP_DestroyImpl(NPP instance, NPSavedData** save) { ClientPlugin* plugin = reinterpret_cast<ClientPlugin*>(instance->pdata); if (plugin) { if (g_offscreenBrowser.get()) { CefRefPtr<ClientOSRHandler> handler = static_cast<ClientOSRHandler*>(g_offscreenBrowser->GetClient().get()); handler->Detach(); } if (plugin->hWnd) { DestroyWindow(plugin->hWnd); DisableGL(plugin); } delete plugin; } return NPERR_NO_ERROR; }