void ClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) { REQUIRE_UI_THREAD(); AutoLock lock_scope(this); if (!browser->IsPopup()) { if (!mainBrowserHandle.get()) { mainBrowserHandle = browser; } windowCount++; NativeWindow* window = NativeWindow::GetWindow(browser); window->SetBrowser(browser); window->Emit("create"); } }
Handle<Object> ClientHandler::CreatedBrowser(CefRefPtr<CefBrowser> browser) { NativeWindow* window = GetWindow(browser); window->SetBrowser(browser); return window->GetV8Handle(); }