Пример #1
0
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");
  }
}
Пример #2
0
Handle<Object> ClientHandler::CreatedBrowser(CefRefPtr<CefBrowser> browser) {
  NativeWindow* window = GetWindow(browser);
  window->SetBrowser(browser);
  return window->GetV8Handle();
}